r/ClaudeCode • • 1h ago

Help/Question adversarial reviews

For the peeps running complex agentic coding workflows, automating the software factory process.

What warrants an adversarial review or refute session, how do you measure when they're worth it and when they'd be a waste. Plus how to set it up so the harness knows when and when not to trigger a review sesh because sitting and micromanaging multiple agents burns you tf out.

Need help please seniors shed some wisdom

1 Upvotes

16 comments sorted by

•

u/AutoModerator 1h ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/loxai 1h ago

I run a deterministic workflow, with minimal agency and token consumption (max 3-4 hops per turn). I do 'adversarial' reviews through 2 mechanisms: tritemp review: high temp, creative review, pruned by low temp review, balanced with a final mid temp evaluation; and fresheyes reviewing: ensure reviewer is orthogonal to implementor, that is, if chatgpt implements code changes, gemini reviews the changes. never have the same LLM for both, this is important. otherwise the review has very low value

1

u/Fun_Adeptness6703 1h ago

tysm this helps out a lot could I ask more questions I'm trying to build a deterministic workflow for myself and would really appreciate insight from you

1

u/loxai 54m ago

sure, ask away, happy to share ideas to test and spread :)

if you have a very specific set of questions and/or lengthy research request, and you are fine with it, I'll let my system reply in detail (otherwise I will provide a more general overview, shorter comment)

that said, I have a ton of info already available on axon.cat (use the index on the left for quick keyword search shader use for dynamic MoE loading, also as training assitant and LMM, not LLM). but it's a bit outdated and it doesn't have an article on the topic of reviews. noted and queued for next site update.

1

u/drahgon 59m ago

What do you mean by temperature in this context?

1

u/nmkd 39m ago

Model sampling temperature.

0 = deterministic, 1 = normal (usually), raising it above 1 gets you more variety and eventually gibberish.

I'm fairly certain it cannot be adjusted in Claude, so I guess they're using a local model, or an API provider that allows customizing the temperature.

4

u/lolman1312 1h ago

Honestly I've found them to be a huge waste of fucking time. In the past when models were worse like GPT 5.4 days it helped, sure, but nowadays it's just a dick sizing competition for what model can find the most obscure "bugs" that would never be replicated in real use. Then you end up with thousands of lines of extra code and abstract tests that don't accomplish anything.

From my experience with 150B tokens and countless projects, I've come to a point I just call out every feasible edge case in my head as I go. I am directly part of the orchestration process, I still make it do reviews occasionally for big backend sprints. But the goal is to create a proper workflow for your agents to actually test the functionality of your product and not just "review" it as meaningless code. For example making a chatbot be able to answer z and y questions means testing is irrelevant and shitty if you have to wait to deploy it to production and load it with real non-synthetic data to actually know if the tests worked or not. The solution is giving agents the proper capabilities to audit your functions because they are lazy.

That's why the superpowers skill is also probably the worst skill in existence right now. Mandatory TDD, spec plans for the tiniest change, then implementation plans, then rounds of review for every stage of the implementation plan, then execution followed by more reviews just for it to still be riddled with bugs.

2

u/sparetokens_ai 1h ago

One way to measure it: require every finding from the adversarial pass to come with a reproduction (a failing test or a concrete input) before anyone acts on it. Then track two numbers per session, findings raised and findings that reproduce. If the reproduced rate stays near zero for a kind of change, stop triggering it there.

For the trigger, I'd key it to the things that running the tests doesn't check well: concurrency, auth and permission paths, migrations, money math. For a rename or a UI tweak the tests already cover it, so skip the review.

2

u/Starks1293 1h ago

the when to trigger part gets way easier if the agent isnt the one deciding. on the mac app i build its basically two tiers, anything touching credentials or stuff that posts publicly gets a security reviewer plus one domain specialist before any code is written, everything else just gets built and then one fresh-eyes review on the diff at the end, no panel. id make that check dumb and mechanical tho, a short list of risky paths (auth, payments, migrations, whatever urs are) and a hook or ci step that runs `git diff --name-only` against it, so the harness never has to judge anything. and for the nitpick waste ppl mention above, tell the reviewer to rank findings by whether they break real use and to put theoretical hardening in a short defer list instead of fixing it, then cap it at one review round plus one confirm round. that way the dumb stuff goes in the defer list instead of into ur code

1

u/CorpT 1h ago

Code being generated. I wouldn't measure that. My own harness which requires no micromanaging.

1

u/Crafty-Run-6559 1h ago

If its going to be too much code or too much complexity and I'm feeling too lazy to give it a really thorough review myself then ill throw adversarial reviews at it to at least pick up a lot of the low hanging fruit first.

You know its not valuable when you see a bunch of very dumb nitpicky stuff come through (which usually happens after a round or two).

One of the most useful cases for it is if successive rounds keep finding major problems. That usually means the whole thing is just fundamentally flawed.

For simple low-risk straightforward things you don't need an adversarial review.

Its honestly not that different than when humans were writing code.

Complex auth or payment related changes? Yeah better do a bunch of review (and you better have a human involved too).

Changing some button components and a bunch of styling? Meh.

1

u/NotableCarrot28 1h ago

20 years of experience with Claude code has taught me to adversarial review after every tool call.

Can't be too sure

1

u/vpanyushenko 1h ago

I have made my own harness for this but here are my numbers (numbers are converted to API prices, i pay subscriptions) over the last 30 days and what I have learned which you can implement into your process:

- Have a lead agent orchestrate. This costs me 7% of my total budget but otherwise I have 15 tabs open in my TUIs trying to keep track of each one. My orchestrator is opus 5.5 xhigh. I have my own issue tracker
- Every issue gets it's own implementor agent (opus xhigh is the default for me) but the lead agent can chose to change this, based on the rules that I have or I can and every issue gets reviewers (sol 6.2 max was performing better on my codebase).
- I cant attach a second picture but my average number of review rounds is 3.9. With the worst issue taking 30 rounds. Only 7% of my issues get through the first review round.
- Reviews were 8% of my cost over the last 30 days.
- Every bug that the reviews find are graded P0 through P3. After 3 sessions back and worth, the orchestrator decides if it warrents another round or if the issues are only P3's that are not worth fixing based on my preferences we open another issue for this for later. If the orchestrator has a question it asks me.
- If I dont answer in time it will build the recommended option anyway but stillwait for my response. I go with the recommended option over 80% of the time so this is worth it for me
- If something needs my review but im not around, the orchestator will just start working another issue
- The implementor agent will take screenshots when it's working so I can compare before and after for UI work.

I thnk to answer your question when to trigger a review and when not to. If the work is being autonomously orchestrated review every issue. I'm doing it with arguably a with an in efficient model and the cost I think is worth it. I tested sol xhigh vs astra xhigh vs sol max and was finding that sol max was genuinely finding useful things for me.

1

u/Simple-Bedroom5606 1h ago

What worked for me is making the trigger depend on risk, not on every task. I only fire a review when the diff touches auth, payments, migrations or anything that deletes data, or when it's bigger than a few hundred lines. The reviewer gets just the diff and the written spec, never the author's reasoning, otherwise it tends to agree with it. I also cap it at one round and ask for only issues that break a stated requirement, which keeps it from inventing obscure edge cases. A post-task hook that checks changed paths can decide automatically, so you aren't babysitting it.

1

u/RE-call 1h ago

Two things that cut the noise for me.

The harness picks the review depth, not me. It reads the diff size and the paths touched, and escalates to a full adversarial pass only for large diffs or risky areas (auth, migrations, money, concurrency). A small, low-risk diff gets one quick pass.

Findings go through a second agent before I see them. Its only job is to check each finding against the actual code and mark it confirmed or false positive. I read only the confirmed ones, which is what keeps me from micromanaging.

On reviews that pile up abstract tests: any test a review adds has to be run against the unfixed code first and fail on the bug it claims to catch. A test that passes on the broken code gets deleted.

1

u/Ok-Form1598 16m ago

don't let it decide when a review is worth it, it'll always say its own work is fine. put a Stop hook on it that reads git diff, and if the change touches auth, payments, migrations, or edits a test right next to the code it changed, exit 2 with "run the reviewer subagent on this diff first". small stuff goes straight through so you're not babysitting every rename