codex-bridge
v0.3.0Claude 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.
| Parameter | Type | Description |
|---|---|---|
cwd * | string | Absolute path of the project directory Codex should inspect. |
request * | string | What to plan or review. Include goals, constraints and acceptance criteria. |
background | boolean | Optional. true = return a job_id immediately and keep working; collect the result later with codex_result. Default false (wait for the answer). |
context | string | Optional extra context: relevant diffs, error output, decisions already made. |
effort | string | Optional reasoning effort. Default: the user's Codex config (high). Use medium/low for quick questions; xhigh/max for hard architecture problems. |
model | string | Optional Codex model override. Default: the user's Codex config. |
session_id | string | Optional. 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.
| Parameter | Type | Description |
|---|---|---|
output_dir * | string | Absolute directory where the images should be saved (created if missing). |
prompt * | string | Description of the image(s): subject, style, size/aspect ratio, background (e.g. transparent), variations. |
background | boolean | Optional. true = return a job_id immediately and keep working; collect the result later with codex_result. Default false (wait for the answer). |
count | integer | Optional number of images wanted. Enables progress (k/count) and precise resumes. |
effort | string | Optional. Default high; rarely needs changing. |
filename | string | Optional base filename, e.g. "hero-banner.png". |
model | string | Optional. Default gpt-6-luna; rarely needs changing. |
reference_images | array | Optional absolute paths of images to attach as references or to edit. |
session_id | string | Optional. 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.
| Parameter | Type | Description |
|---|---|---|
job_id | string | Job id returned by codex_plan/codex_image. |
wait_seconds | number | Optional. 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.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job id to resume. |
codex_cancel
Stop a running Codex job.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job id to cancel. |