codex-bridge

v0.3.0
io.github.xallindrome-labs/codex-bridge Checked 4 days ago Published 25 days ago

Claude Code consults Codex for plans, images and optional code, as durable background jobs.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

codex_plan

Ask Codex (OpenAI) to act as the planner: produce an implementation plan, review a design, or give a second opinion. Codex runs in a READ-ONLY sandbox in `cwd` and can inspect the project but not change it. Claude remains the implementer. Calls can take several minutes; use background=true to keep working meanwhile. Including relevant code/diffs in `context` makes it faster. Returns Codex's answer, a job_id and a session_id; pass session_id back to ask follow-ups in the same Codex thread.

ParameterTypeDescription
cwd *stringAbsolute path of the project directory Codex should inspect.
request *stringWhat to plan or review. Include goals, constraints and acceptance criteria.
backgroundbooleanOptional. true = return a job_id immediately and keep working; collect the result later with codex_result. Default false (wait for the answer).
contextstringOptional extra context: relevant diffs, error output, decisions already made.
effortstringOptional reasoning effort. Default: the user's Codex config (high). Use medium/low for quick questions; xhigh/max for hard architecture problems.
modelstringOptional Codex model override. Default: the user's Codex config.
session_idstringOptional. Continue an earlier Codex thread instead of starting fresh.

codex_image

Ask Codex to generate (or edit) raster images with its image generation tool. Images are saved into `output_dir` as they are made, and their paths returned. Pass reference_images to edit or riff on existing images, and session_id to iterate on a previous result. Set `count` for batches so progress and resumes are tracked. Runs on gpt-6-luna at high effort by default; leave model/effort unset unless the user asks. Calls take ~1 min per image; use background=true for batches.

ParameterTypeDescription
output_dir *stringAbsolute directory where the images should be saved (created if missing).
prompt *stringDescription of the image(s): subject, style, size/aspect ratio, background (e.g. transparent), variations.
backgroundbooleanOptional. true = return a job_id immediately and keep working; collect the result later with codex_result. Default false (wait for the answer).
countintegerOptional number of images wanted. Enables progress (k/count) and precise resumes.
effortstringOptional. Default high; rarely needs changing.
filenamestringOptional base filename, e.g. "hero-banner.png".
modelstringOptional. Default gpt-6-luna; rarely needs changing.
reference_imagesarrayOptional absolute paths of images to attach as references or to edit.
session_idstringOptional. Continue an earlier Codex thread (e.g. "make it darker").

codex_result

Get the status or result of a Codex job (jobs persist across Claude sessions and restarts). With job_id: the result if finished, otherwise progress. wait_seconds (max 240) blocks until the job finishes or the wait expires. Without job_id: lists recent jobs.

ParameterTypeDescription
job_idstringJob id returned by codex_plan/codex_image.
wait_secondsnumberOptional. Seconds to wait for completion (0-240). Default 0.

codex_resume

Continue a job that was interrupted (reboot/crash), timed out or failed, from where it stopped: it continues the same Codex thread, and for image jobs first rescues images Codex already generated, then asks only for the missing ones. Returns immediately; collect with codex_result.

ParameterTypeDescription
job_id *stringJob id to resume.

codex_cancel

Stop a running Codex job.

ParameterTypeDescription
job_id *stringJob id to cancel.