| name | run |
| description | Hand a task to Codex with a preset (consult, plan, implement, research, quick) and report the envelope. Use for "/codex-bridge:run <task>". |
| argument-hint | [--preset consult|plan|implement|research|quick] [--write] [--model M] [--effort E] [--bg] <task text> |
| disable-model-invocation | true |
| allowed-tools | Bash(node:*), Read, AskUserQuestion |
Run one Codex turn with the codex-bridge runtime and present the result.
Steps
- Parse
$ARGUMENTS. Routing flags: --preset <name> (default consult), --write (workspace-write sandbox), --model, --effort, --timeout, --bg (run in background). Everything else is the task text. If the task text is empty, ask for it.
- If the task text is longer than about 40 words, write it to a temp file and use
--task-file; otherwise pass --task "<text>".
- Run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-bridge.mjs" run --preset <preset> [flags] --task "<text>"
With --bg, or when the preset is implement or plan, use Bash run_in_background: true and tell the user the run is in progress; the envelope arrives with the completion notification.
- Present the envelope: status, the
summary verbatim (it is already formatted by the preset contract), files_changed when non-empty, duration_s, and the thread_id with the hint that /codex-bridge:resume continues it. Mention out_file only if summary was truncated.
- On
status: failed, show error and, for Unauthorized or "not found" errors, suggest /codex-bridge:doctor.
Do not paste file contents into the task. Codex reads the repository itself; name paths instead.