Graduated Codex delegation for Claude Code: advisory at 70%, enforced at 85%, full handoff at 95%.
Your statusline shows the current tier:
Opus 4.6 │ ██████░░░░ 72% │ 5h:72% │ CDX:adv │ ⎇ main │ my-project
Opus 4.6 │ ████████░░ 87% │ 5h:87% │ CDX:dlg │ ⎇ main │ my-project
Opus 4.6 │ █████████░ 96% │ 5h:96% │ CDX:full │ ⎇ main │ my-project
At 70% (advisory): Claude can still write code, but gets nudged to delegate large tasks.
You: "refactor the auth module"
Claude: "This is a big refactor. Let me delegate to Codex."
> codex:codex-rescue(Refactor auth module...)
At 85% (delegation): Heavy work must go through Codex. Small edits still allowed.
You: "fix this typo on line 42" → Claude fixes it directly
You: "build me a REST API" → Delegated to Codex
At 95% (full): Everything gets delegated. Claude reads, plans, and coordinates only.
You: "build me a REST API with auth"
Claude: > codex:codex-rescue(Build Express REST API with JWT auth)
> Done (1 tool use - 15.2k tokens - 12s)
Claude: "Done. Here's what was created: ..."
claude plugin marketplace add https://github.com/bambushu/codex-mode
claude plugin install codex-mode@bambushuThen add the statusline snippet to your ~/.claude/statusline.sh. See the full README for setup and details.
Claude Code's Max plan gives you a 5-hour rolling usage window. Hit the limit mid-task and you're stuck waiting. codex-mode solves this with graduated delegation: at 70% Claude gets nudged to offload big tasks, at 85% heavy work is enforced through Codex, at 95% everything is delegated. Codex runs on its own token pool, so you keep working without interruption.
A few discoveries for anyone building Claude Code plugins:
- Statusline JSON is the richest data source hooks can't access
- Flag file bridge pattern connects statusline data to hooks via disk
- JSON flag with TTL prevents zombie flags from crashed sessions
- Graduated constraint language matches urgency to usage level
hookSpecificOutputwrapping required foradditionalContextinjection--plugin-dirdoesn't load hooks - must install via marketplace
Full technical writeup in the plugin README.
MIT - Bambushu