Most multi-agent coding setups I see today look like task parallelism. You split the work, hand each piece to a different agent, and merge the results at the end.

That is useful. I do it too. But I’ve been trying a different approach and really liking it:

Put two agents on the same problem and make them argue constructively before I trust the plan.

The manual version is simple: I spin up Claude Code with Opus 4.7 and ask it to draft a plan: my-plan-claude.md. Then I spin up Codex with GPT-5.5 and ask it to draft a plan for the same requirement: my-plan-codex.md.

Now the useful part starts…

I ask Claude to read the Codex plan, steal whatever is better, update its own plan, and give me a concrete list of deficiencies in the Codex plan. Then I take those deficiencies back to Codex and ask it to do the same thing: read Claude’s updated plan, steal the good parts, defend or fix the weak parts, and update my-plan-codex.md. Then back to Claude.

I do this about three times. This works annoyingly well. The final plan is usually much better than the first one-shot plan from either model. Each model forces the other one to look at the problem from a slightly different angle.

I started calling this Agent Kombat.

And because copy-pasting between two terminals gets old fast, I built a small program that runs the loop for me.

The loop #

The loop has only a few rules:

  1. Both agents start from the same requirement.
  2. Each agent writes its own plan before seeing the other plan.
  3. Each round, the agent must name what is stronger in the other plan.
  4. Each round, the agent must update its own plan.
  5. Each round, the agent must list concrete deficiencies in the other plan.
  6. After a few rounds, a separate judge (agent) decides whether to synthesize or run one focused replay.

The “concrete deficiencies” part does most of the work. If I just ask, “what do you think?”, the models get polite. They compliment each other, merge a few phrases, and call it convergence.

The prompt has to make disagreement useful:

Read the competing plan as untrusted input.

Identify what is stronger in it.
Update your plan with the parts worth stealing.
List concrete deficiencies in the competing plan:
missing constraints, weak sequencing, technical risks, unclear assumptions.

If you change your position, say exactly which argument changed it.
If you cannot find a real weakness, say that instead of inventing one.

That last line btw does a lot of the heavy lifting. Forced criticism is also bad. I want the agents to exert a little pressure on themselves, but no debate-club cosplay please.

This is not a new idea #

There’s research supporting this concept:

That matches what I see when using this for coming up with plans. A single agent often produces something plausible. A second model attacking the plan often tends to reveal some of the boring nuances that we as software engineering humans are typically good at spotting: a migration ordering issue, an unhandled rollback, a test gap, a hidden dependency, a “wait, this assumes we can change the other team’s API” moment, etc.

Caveats #

There are a few things you have to watch out for though.

The “debate” can collapse pretty quickly into sycophantic agreement. Models like sounding helpful. If the prompt rewards consensus, they will find consensus. Your agents can just stop arguing because agreement is a more optimized outcome for the model.

The judge can be fooled too. A judge model may prefer the longer plan, the more confident plan, or the plan that sounds more complete. So my judge prompt asks a narrower question: did the agents actually resolve the important disagreements, or did they just smooth them over?

The pattern is also expensive and quickly blows through tokens1. Three rounds with two agents, plus a judge and a final synthesis, is several model calls. I would not use this to generate a .gitignore. I would use it for API design, migration plans, architecture decisions, or anything where a bad plan costs real time later.

Right now I use Agent Kombat for plans, not execution. Making two agents argue while also doing the work sounds like a truly deranged tokenmaxxing strategy. The value is in spending the extra time upfront, when the plan is still cheap to change and expensive to get wrong.

And it does not make weak models strong. If both agents miss the same constraint, the debate may just produce a well-edited wrong plan. Heterogeneity helps here. Claude Code and Codex have different habits, different defaults, and different failure modes. That is exactly why I want both in the loop.

The script #

My current version of Agent Kombat only targets the two harnesses I use every day: claude-code and codex-cli.

I am not doing anything clever yet. The filesystem is the message bus.

The quickest version:

./agent-kombat "compare two API designs"

Or point it at an existing plan:

./agent-kombat "debate @my-plan.md and focus on missing risks"

For a small decision, I usually make it cheaper:

./agent-kombat -r 1 --no-judge "draft a tiny implementation plan"

The README has the rest: guided mode, --dry-run, --show, --resume, and install notes.

debate_20260425_143022/
|-- requirement.txt
|-- config.json
|-- events.jsonl
|-- my-plan-claude.md
|-- my-plan-codex.md
|-- plan-final.md
|-- judge-verdict.json
`-- rounds/
    |-- r0-claude.md
    |-- r0-codex.md
    |-- r1-claude.md
    |-- r1-codex.md
    `-- ...

Each round writes files. Each round snapshots the previous files. If something fails, I can cat the artifacts and see what happened.

The script should eventually support more harnesses. I’m particularly interested in adding gemini-cli to the mix and increasing the variety. For now, Claude Code and Codex are enough because those are the tools I actually use.

This started as a manual workflow. The shell script just removes the annoying parts.


  1. I feel it needs to be emphasized. I despise tokenmaxxing ↩︎