Fable-GPT: Claude orchestrates, Codex executes
Role split
- Claude (main thread): planning, repo understanding, architecture decisions, task decomposition, final review, small surgical edits.
- Codex (codex plugin): heavy implementation, debugging, test fixing, refactors, multi-file edits. Runs on the ChatGPT subscription — zero Claude tokens for execution. Global default is
gpt-5.5 at xhigh reasoning (~/.codex/config.toml); do not pass --model/--effort unless deliberately overriding.
How to delegate
| Situation |
Route |
| Quick, bounded task |
/codex:rescue (foreground) |
| Big, open-ended, or long-running |
codex-rescue subagent (already model: sonnet, Bash-only — passes agent-model-guard) or --background; poll /codex:status, fetch /codex:result |
| Continue prior Codex work |
say "resume"/"continue" (maps to --resume-last) |
| Routine pre-commit review or second-opinion diagnosis |
/codex:review — default here before spending Claude subagent tokens; reserve /code-review or /adversarial-review for high-stakes diffs |
Task prompt shape (keep it focused)
Goal: [one sentence]
Files: [paths]
Constraints: [style, don't touch X]
Done when: [verification command + expected result]
One task per delegation. Split unrelated work into separate rescues.
Workspace root gotcha: Codex's sandbox root is the session's cwd, not the task's target repo. If the target repo differs from cwd, the codex-rescue subagent and /codex:rescue will spawn a task that can't write ("patch rejected: writing outside of the project") — Codex burns the whole run discovering this. Invoke the companion runtime directly instead:
node "<plugin>/scripts/codex-companion.mjs" task --prompt-file <spec.md> --cwd "<target-repo>" --write --background
Long specs go in a --prompt-file (avoids shell quoting). Job state is keyed to the --cwd value — pass the SAME --cwd to status/result/cancel or the job appears not to exist. Errors print to stderr; don't 2>/dev/null status calls.
After Codex finishes — never accept blindly
git diff — read what actually changed.
- Run the "Done when" verification command yourself and read the output.
- Wrong or sloppy → re-delegate with specific corrections (use resume); small issues → fix inline.
When NOT to delegate
- Trivial edits (faster inline than writing the delegation prompt).
- Architecture or product decisions — Claude's job.
- Anything under CLAUDE.md Hard Stops (deploy, migrations, auth/billing config, external comms).
- Tasks needing conversation context Codex doesn't have — inline the needed context into the task prompt or keep it in Claude.
1---2name: fable-gpt3description: Use for heavy implementation, debugging, test fixing, or multi-file edits Codex could execute, or orchestrating Claude + Codex.4---56# Fable-GPT: Claude orchestrates, Codex executes78## Role split910- **Claude (main thread):** planning, repo understanding, architecture decisions, task decomposition, final review, small surgical edits.11- **Codex (codex plugin):** heavy implementation, debugging, test fixing, refactors, multi-file edits. Runs on the ChatGPT subscription — zero Claude tokens for execution. Global default is `gpt-5.5` at `xhigh` reasoning (`~/.codex/config.toml`); do not pass `--model`/`--effort` unless deliberately overriding.1213## How to delegate1415| Situation | Route |16|---|---|17| Quick, bounded task | `/codex:rescue` (foreground) |18| Big, open-ended, or long-running | `codex-rescue` subagent (already `model: sonnet`, Bash-only — passes agent-model-guard) or `--background`; poll `/codex:status`, fetch `/codex:result` |19| Continue prior Codex work | say "resume"/"continue" (maps to `--resume-last`) |20| Routine pre-commit review or second-opinion diagnosis | `/codex:review` — default here before spending Claude subagent tokens; reserve `/code-review` or `/adversarial-review` for high-stakes diffs |2122## Task prompt shape (keep it focused)2324```25Goal: [one sentence]26Files: [paths]27Constraints: [style, don't touch X]28Done when: [verification command + expected result]29```3031One task per delegation. Split unrelated work into separate rescues.3233**Workspace root gotcha:** Codex's sandbox root is the session's cwd, not the task's target repo. If the target repo differs from cwd, the `codex-rescue` subagent and `/codex:rescue` will spawn a task that can't write ("patch rejected: writing outside of the project") — Codex burns the whole run discovering this. Invoke the companion runtime directly instead:3435```36node "<plugin>/scripts/codex-companion.mjs" task --prompt-file <spec.md> --cwd "<target-repo>" --write --background37```3839Long specs go in a `--prompt-file` (avoids shell quoting). Job state is keyed to the `--cwd` value — pass the SAME `--cwd` to `status`/`result`/`cancel` or the job appears not to exist. Errors print to stderr; don't `2>/dev/null` status calls.4041## After Codex finishes — never accept blindly42431. `git diff` — read what actually changed.442. Run the "Done when" verification command yourself and read the output.453. Wrong or sloppy → re-delegate with specific corrections (use resume); small issues → fix inline.4647## When NOT to delegate4849- Trivial edits (faster inline than writing the delegation prompt).50- Architecture or product decisions — Claude's job.51- Anything under CLAUDE.md Hard Stops (deploy, migrations, auth/billing config, external comms).52- Tasks needing conversation context Codex doesn't have — inline the needed context into the task prompt or keep it in Claude.