seatlisted
Install: claude install-skill Nowely/codex-delegate
# Delegating to Codex
The **user** requests the work; the **coordinator** chooses and synthesises the composition; one Codex
**seat** performs one deliverable under rights declared in its prompt.
## One call
One background Bash task per seat. Write the prompt to a file with the Write tool, then run this, with
`run_in_background: true` and no `&` of your own:
CLAUDE_PLUGIN_DATA="${CLAUDE_PLUGIN_DATA}" node "${CLAUDE_SKILL_DIR}/scripts/driver.mjs" --seat-file "<DIR>/prompt.txt" --report-file "<REPORT>" > "<DIR>/out.json" 2> "<DIR>/err.txt"
The call's `description` is `Codex <model> <id>: <task in a few words>`, so the row the user sees names the
agent by its model and not the command line. `<DIR>` is one `mktemp -d "${TMPDIR:-/tmp}/codex-seat.XXXXXXXX"` per seat: Write and Read expand nothing,
so they need the absolute path it prints. `<REPORT>` is an absolute path of this seat's own, `<DIR>/report.json` where nothing else
chooses it; the driver makes every directory that path needs, at 0700, so it may name a root your own Write and `mkdir` are refused.
The task's exit notification is the seat's completion, and `<REPORT>` is what to read then.
Every driver call forwards that variable under its own name — the plugin's own data directory, where the
driver's state and every Codex artifact the report names (`answerPath`, a worktree harvest) live. The
driver reads `CODEX_DELEGATE_STATE_DIR` first and that variable second, and with neither it exits 2; only
`--help` needs no