I stopped using single AI models to write concepts for complex code. I forced ChatGPT and Gemini to review Claude and let them discuss the outcome

Creating websites or scripts with Claude is easy. But the moment I use an LLM for complex architecture (like state management or database transactions), it confidently introduces subtle inefficiencies: sub-optimal workflows, race conditions, memory leaks, forgetting one detail, or edge cases that cost me hours to manually debug later. I realized that if you want an AI to catch a bug, you shouldn't ask the model that wrote the code. It will just defend its own work.

Instead, I started using a strict multi-agent workflow where I force the top frontier models into specific, hostile roles. The results have completely changed how I build.

The Workflow:
- The Builder (Claude): Writes the initial implementation based on my prompt.
- The senior engineer (ChatGPT): I ask it to be ruthless. 'You are a cynical senior engineer reviewing a junior’s PR. Your only job is to find security flaws, concurrency issues, unhandled edge cases, and architectural inefficiencies.'
- The CTO / Arbiter (Gemini): Reviews the code and Claude’s critique, decides if the critique is valid, and proposes the final, bulletproof refactor.

What happens when you do this: yesterday, I asked Claude to write a concept on how to handle the code for a new complex project. When it hit the 'senior engineer' agent, ChatGPT immediately flagged an essential detail (an API that proved to be incompatible with what we needed) that could have cost me weeks building the project before finding out that we had to re-do the whole project. Claude in a single chat window missed it entirely. ChatGPT, when forced into an adversarial role, caught it in 3 seconds.

Why this matters: we are reaching the limit of what a single prompt to a single model can do for complex knowledge work. If you are using AI for anything where a mistake costs you hours of time (or breaks production), letting one model generate and review its own work is a massive risk.

The automation: doing this manually by copy-pasting between three tabs got incredibly tedious. So for what it's worth, I built Rauno to automate this exact workflow. It puts the models in a shared chat and forces them to debate each other based on your prompt.

How are you currently catching these subtle AI hallucinations in your codebase? Do you just rely on your compiler/tests, or are you using any multi-agent setups to peer-review the output before it hits your IDE?

submitted by /u/capibara13
[link] [留言]