1.2 KiB
1.2 KiB
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 toscripts/codex-run.shafter mode; saved to$JOB/codex-flags(NUL-delimited) and re-applied onresumeso permissions survive retries.- Overrides:
-m <model>(e.g.<model-from-discovery>),-c model_reasoning_effort="<effort-from-discovery>"(per-model, runscripts/codex-models.shto list),-s read-only|workspace-write|danger-full-access,--dangerously-bypass-approvals-and-sandbox(global, hoisted beforeexec),--add-dir <dir>,-c key=value. Never--ephemeral. - Codex has shell+apply_patch always, browser_use stable. MCP via
codex mcp listif needed. - Wait-loop: agent polls
$JOB/statuswith short 60s foreground calls, streamstail -5 $JOB/events.jsonlviaSendMessage(to: main) without ending turn; final answer +thread_idonly in last message. - Resume: on
stalled/erroror orchestrator SendMessage, write new$JOB/prompt.mdandcodex-run.sh $JOB resume $(cat $JOB/thread_id)with saved flags.