10 lines
1.2 KiB
Markdown
10 lines
1.2 KiB
Markdown
# Common — codex transport
|
|
|
|
- `cwd: <absolute path>` is MANDATORY (agent won't launch without it).
|
|
- Task in `=== TASK FOR CODEX ===` / `=== END TASK ===` (wrapper forwards only this block).
|
|
- `codex options:` line passed verbatim to `scripts/codex-run.sh` after mode; saved to `$JOB/codex-flags` (NUL-delimited) and re-applied on `resume` so permissions survive retries.
|
|
- Overrides: `-m <model>` (e.g. `<model-from-discovery>`), `-c model_reasoning_effort="<effort-from-discovery>"` (per-model, run `scripts/codex-models.sh` to list), `-s read-only|workspace-write|danger-full-access`, `--dangerously-bypass-approvals-and-sandbox` (global, hoisted before `exec`), `--add-dir <dir>`, `-c key=value`. Never `--ephemeral`.
|
|
- Codex has shell+apply_patch always, browser_use stable. MCP via `codex mcp list` if needed.
|
|
- Wait-loop: agent polls `$JOB/status` with short 60s foreground calls, streams `tail -5 $JOB/events.jsonl` via `SendMessage` (to: main) without ending turn; final answer + `thread_id` only in last message.
|
|
- Resume: on `stalled`/`error` or orchestrator SendMessage, write new `$JOB/prompt.md` and `codex-run.sh $JOB resume $(cat $JOB/thread_id)` with saved flags.
|