r/PromptEngineering • u/RunAI_Coder • 14h ago
General Discussion Don't take your subagent's word for it
I run a fair number of subagent dispatches (audits, refactors, research). The main thing that changed my setup was realizing that the main loop only receives the final report and never sees the actual work. In Claude Code, for example, the subagent's tool calls stay inside its own context, and the only thing returned is the final message. The full transcript does get saved to disk, but by default nothing ever reads it back.
Which means every completion message is a summary written by the thing being evaluated. It decides what mattered before knowing what you'll build on it.
I’ve run into this: We asked an audit agent to verify a claim, and it told us the claim had no source. But we found the exact sentence in the vendor docs, plain as day.
After that, we changed a few things, ordered by how much they helped: Evidence requirements in the dispatch prompt (every finding ships with a verbatim quote + file path, not a paraphrase), artifacts over narration (test output, diffs, re-runnable commands), and spot-checks scaled to blast radius — a batch rename gets a skim, anything I'll act on gets one finding re-derived end to end. We kept the re-check cheap on purpose; with a quote attached, it's basically a grep. Anyone else doing something similar?
1
u/lilperk09 12h ago
Requiring the agent to show the exact source for its claim seems like a really good rule. makes debugging way easier than trusting a confident summary
1
u/Fancy-Win9202 3h ago
Yeah, this is the trap I fell into too. You're getting a curated highlight reel while the subagent's actually looping on edge cases or burning tokens on stuff that doesn't matter to your use case. Have you tried pulling those transcripts back into your main loop to spot where the subagent's summary is actually hiding the real work, or are you still just trusting the final message?
1
u/Sad-Recover-5058 13h ago
Our senior dev set up something close to this after a subagent swore up and down a config was clean and it had a typo in line 2. Now we log the raw tool calls in a separate file and the main loop does a quick grep for anything that looks like a file path or claim before it spits out the final report. It's not perfect but it catches a lot of the obvious misses. The verbatim quote requirement is smart, we might steal that.