codexlisted
Install: claude install-skill moiri-gamboni/roost
# codex — delegate work to OpenAI Codex (GPT)
`codex exec` is the delegation primitive: non-interactive, repo-aware, prints an event log to stdout and writes the final answer to the `-o` file. Treat a run like a spawned subagent: brief it fully (it sees only its prompt plus the repo — same briefing rules as any subagent: goal and why, explicit file scope, what the final message must contain), run it in the background, read its answer when it exits.
## Preflight
`codex login status` — if `Not logged in`, stop and ask the user to run `codex login --device-auth` in a terminal (prints a URL + one-time code to complete in any browser; an SSH-blocking poll, so don't background-and-forget it for them without surfacing the code). Auth is the user's ChatGPT account; nothing Claude can fix.
## One-shot run
```bash
codex exec -C /path/to/repo -s workspace-write \
-o "$SCRATCHPAD/codex-answer.md" \
"<subagent-style brief>"
```
- **Sandbox**: omit `-s` (read-only) for analysis/review; `-s workspace-write` when it should edit the working tree. The sandbox blocks network by default — add `-c sandbox_workspace_write.network_access=true` only when the task genuinely needs installs/fetches. **Never** `--dangerously-bypass-approvals-and-sandbox`: this box has NOPASSWD sudo.
- **Working dir**: `-C <dir>` sets the root; `--skip-git-repo-check` for non-repo dirs.
- **Write tasks**: codex edits the tree directly — `git status` first and checkpoint (commit, or note the dirty state) so its