One Agent Writes, One Agent Reviews: Splitting Claude and Codex Without Doubling the Bill
One Agent Writes, One Agent Reviews: Splitting Claude and Codex Without Doubling the Bill The most useful setup I keep hearing about from people who code with AI every day is not a single super-agent. It is two agents with boring, clearly separated jobs. One writes the code. The other only reads it and gives a second opinion. A human approves anything that actually ships. It sounds simple. In practice it falls apart in two predictable places. The two tools do not share the same picture of the
One Agent Writes, One Agent Reviews: Splitting Claude and Codex Without Doubling the Bill
The most useful setup I keep hearing about from people who code with AI every day is not a single super-agent. It is two agents with boring, clearly separated jobs.
One writes the code. The other only reads it and gives a second opinion. A human approves anything that actually ships.
It sounds simple. In practice it falls apart in two predictable places. The two tools do not share the same picture of the work, so the reviewer reviews a plan the writer has already moved past. And the whole thing gets expensive fast, because now every routine task runs through two models, often the expensive ones, even when the task stopped being interesting three runs ago.
Both problems showed up in recent conversations with indie developers and people running scheduled automation. The fixes they landed on are worth stealing.
Why split the jobs at all?
A single agent reviewing its own work has an obvious weakness. It already believes the plan. It wrote the code to match the plan, so when it checks the code, it mostly checks whether the code matches its own assumptions. The mistakes that matter live in the assumptions.
A second model, from a different family, reads the same work cold. It has no attachment to the approach. Developers describe the value in plain terms: one person put it as letting Claude effectively call on a Codex agent to give second opinions on plans and review code. The reviewer catches the thing the writer walked straight past, not because it is smarter, but because it is not the author.
There is a second benefit that matters just as much. When the reviewer is read-only, it cannot make things worse. It never touches writes. It cannot half-fix a file, revert someone else's change, or leave the repo in a state nobody remembers choosing. Its whole output is opinion, and a human decides what to do with that opinion. That constraint feels limiting for about a day. Then you realise it is the reason the setup is safe to run on real work.
The part everyone gets wrong first: shared context
Two agents with separate jobs are still two agents. Each one starts its session knowing only what it can see. If the writer works from a plan in one place and the reviewer reads a status file somewhere else, they will disagree, and both of them will sound confident while doing it.
The workaround that actually holds up is unglamorous. Keep one shared instruction file both tools read, the agents.md pattern, and keep the state of the work in the repo itself: specs, plans, and a status file, pushed to GitHub where both tools and the human all see the same version. Make the repo self-explanatory to an agent that has never seen it before. If a fresh session cannot work out what is being built, what is done, and what is still open from the repo alone, the setup is not finished yet.
What goes in those files matters more than where they live:
- The plan, in enough detail that a reviewer can check code against it instead of against vibes.
- A status file that says what is done, what is in progress, and what got rejected and why. The rejected part is the one people skip, and it is the one that saves you, because without it the next session cheerfully proposes the rejected idea again.
- The rules both agents follow, written once, in one place, instead of pasted into each tool separately where the copies drift apart.
None of this needs special tooling. Markdown files in a repo do the job. The discipline is the tooling: update the status file when the work changes, not at the end of the week when you have forgotten half of it.
The cost problem nobody budgets for
Here is the second finding, and it comes from people running scheduled automation rather than interactive coding. Once a task is well specified and routine, the expensive model's extra capability almost never changes the output. The run produces the same result it would have produced on a cheaper model. Paying the premium anyway, on every run, forever, is just a habit with an invoice attached.
Scheduled work makes this worse because it multiplies quietly. An interactive session costs what it costs once. A scheduled job runs every hour, every day, whether or not anyone is watching. Two premium models on every run of a routine job is the fastest way to turn a useful automation into something you cancel in a cost-cutting mood, even though the automation itself was fine.
The discipline that works is per-run, not per-project:
- Routine, well-specified runs go on the cheaper model by default. Not as a punishment tier. Because the output genuinely does not change.
- The expensive model gets called when the run is not routine: a new kind of task, a failure the cheap model could not explain, a plan that needs real judgement before anyone writes code.
- The reviewer role is a natural fit for the cheaper default in many setups, with one exception. Reviewing a routine diff is pattern matching. Reviewing a new architecture is not. Match the spend to which one you are actually doing.
The same logic applies to context, and this is the part people miss. Anything that loads context on every run spends money on every run. A memory step that dumps an entire archive into every session is the context version of running the flagship model on a cron job. Context has to earn its place per run: load what is relevant to this task, leave the rest where it is.
Where shared memory tools fit, honestly
The repo-files approach works well inside one project. It gets strained when your work spans tools that do not share a repo, or when the context you need is not code at all: decisions from last month's chat session, the rule you set in one tool that the other tool has never heard of, the status of work that lives outside any single project folder.
That is the gap shared memory layers aim at. Vilix AI is one option in that category: you connect each AI client to the same account, and each tool can load relevant saved context at the start of a session and save the exchange at the end. Retrieval there is selective rather than a full dump, it searches by meaning and by exact keyword, and when two tools save conflicting information the most recent save is the one that wins, so you correct a fact once instead of once per tool. It supports the tools in this setup, Claude and Codex among them, along with others like Cursor.
It is not the only way to solve it, and for a single repo with a tidy status file it may be more than you need. Plenty of people run the two-agent split on plain markdown and GitHub and never want more. The honest dividing line is whether your context lives in one repo or is scattered across tools, chats, and machines. The first case is a filing problem. The second one is where a shared layer starts paying for itself.
A starter version you can set up today
If you want to try the split without buying or building anything:
- Write one shared instruction file both tools read. Keep it short. Rules, not essays.
- Add a status file to the repo: done, in progress, rejected and why. Update it as part of finishing a task, not as a separate chore.
- Give the writer full access and the reviewer read-only access. Enforce it with permissions where the tool allows, not with a polite request in a prompt.
- Set the human approval point explicitly. The reviewer produces opinions. Nothing merges on an agent's say-so.
- Put routine runs on the cheaper model. Write down what counts as non-routine, in advance, so the exception does not swallow the rule.
- After two weeks, look at what the reviewer actually caught. If the answer is nothing, your writer's tasks are too routine to need a reviewer at all, and you can cut the second agent and keep the money.
That last step is the real test. The two-agent setup is not a religion. It earns its place the same way the expensive model has to: per run, with evidence. When the reviewer is catching real problems and the routine work is running cheap, the setup feels almost unfair. When it is not, you will know exactly which part to drop, because each part has a job you can point to.
Two agents, one shared picture of the work, and a strict rule about what each run is allowed to cost. That is the whole trick, and it survives contact with real projects because none of it depends on either model being magic.