One Codex session (a session with OpenAI's coding agent) used to plan my work, write the code, review the diff and commit it. As the tasks grew, the plan kept drowning in its own implementation noise.
The agent would lose the thread of what it was building, because its context window was full of Terraform diffs and test output. So I split the coding agent that builds BinderDex, my Pokémon card collection and price app, in two. I call the halves Sol and Terra.
Two roles, one hard rule
- Sol (GPT-5.6, on its highest reasoning setting) owns planning, architecture, ambiguity calls, the final diff review, independent verification and the commit message. Sol never edits code.
- Terra (GPT-5.6, on a lower reasoning setting) receives a bounded handoff packet, implements it, runs the verify commands and stops.
The packet is the interface
Terra never sees the planning conversation, so the task it receives has to stand alone. This is the shape every handoff takes. In this example, a database migration that backfills routes for the news pages ran past its 60-second limit on production-sized data:
TASK: Add statement_timeout to news route backfill
CONTEXT: Production corpus exceeds fixture-sized 60s budget.
OWNERSHIP: migration-0035.test.ts, 0035_public_news_routes.sql
REQUIREMENTS:
- Bump timeout to 15min, keep it bounded
- Assert the old 60s value never returns
VERIFY:
- pnpm --filter etl test -- migration-0035
- git diff --check
OUT OF SCOPE: any other migration, schema changes, UI work
STOP/ASK: if the backfill needs an unbounded timeout
DO NOT COMMIT. Leave changes for Sol to review.
A ladder for failures
When Terra's work falls short, it gets one corrective retry on the same thread, so it keeps its implementation context. If that fails, Terra reruns at the highest reasoning setting with a revised packet. After that, Sol revises the plan or stops and asks me. Sol never takes over the coding, and there's no triviality floor: every code change goes to Terra, however small.
What the split buys
It's too early to say whether the code is better. The separation already feels right in three ways. The planning thread stays clean. The review is independent, because Sol never wrote the code it's reviewing. And the packet forces me to state the task clearly before anyone touches a file, which exposes the tasks I only thought I understood.