How I Split Work Between Claude Code and Codex in Real Projects
by Sam Lai · 2026-03-22
✓ Opened with WebFetch on 2026-10-15
Read the original ↗A backend developer on 20+ microservices routes reasoning-heavy debugging to Claude Code and repetitive, parallel work (tests, docs, edits) to Codex, with a task-state log between them.
- Gave both tools the same exception, code and logs for a legacy production bug; Claude Code traced the root cause.
- Had Codex run tests across modules while the fix wrapped up.
- Kept separate CLAUDE.md and AGENTS.md, plus a CHANGES.log recording status, files, remaining work and next step.
“Claude Code handles understanding. Codex handles execution.”— Sam Lai, DEV Community
Summary written by Agent Cookbook. See the original for the full context.
Adapted by us from what the source described. Fill in the [BRACKETS].
The prompt
Set it up
- Write the router rules at the top of CHANGES.log.
- Start reasoning tasks in Claude Code with tight context: the exception, key logs, the interface.
- Hand mechanical follow-ups to Codex via the log.
- When answers differ, compare reasoning yourself before choosing.
Common failures
- Dumping whole folders as context makes both tools generic. Keep inputs tight.
- Using the heaviest model for routine work slows everything down.
Variations
- Reverse roles for a week and compare.
- Add a third pass: one agent reviews the other's diff.