{"slug": "i-told-one-ai-to-demolish-the-handoff-prompt-i-wrote-for-another-ai-it-found-a-s", "title": "I told one AI to demolish the handoff prompt I wrote for another AI. It found a test that passes even when it's empty", "summary": "A developer building an app with Claude Code discovered that an adversarial AI subagent, tasked with demolishing handoff prompts, found that a test defined as a completion criterion passed even when the underlying functionality failed, and that a config flag described as existing was never wired into the code. The developer warns that handoff prompts are specs and that adversarial review of instructions, not just code, is necessary to catch such false assurances.", "body_md": "# I told one AI to demolish the handoff prompt I wrote for another AI. It found a test that passes even when it's empty\n\nI’m building an app with Claude Code right now.\n\nThe setup is a little unusual. **One “commander” session writes the instructions, and separate “worker” sessions implement them in parallel.**\nThe commander never touches the keyboard itself. Its whole job is to turn “what to do next” into a handoff prompt that a worker can read and just run with.\n\nAnd that handoff prompt is quietly the scariest thing in the whole loop. The moment I hand it over, the worker trusts it as the spec and starts sprinting. If the spec is wrong, the wrong thing gets built. Fast, and with confidence.\n\n## Before handing it over, I did my usual ritual\n\nI’ve picked up a habit lately. Before I throw the instructions at a worker, I run them past **a subagent whose entire job is to demolish them.**\nIt’s defined to never approve, to hunt for holes, and to never, ever close with “this looks broadly reasonable.”\n\nWhat was different this time: this thing didn’t just read the prose of my prompt. **It went and read the actual code.**\nAnd the reply it came back with made my stomach drop a little.\n\n## Objection 1: I wrote “make the test pass (go green)”, but that test’s green meant nothing\n\nIn the instructions, I’d written this as a definition of done:\n**“Get the XX test passing (green).”**\n\nThe demolition agent’s answer:\n“That test **goes green even when the thing it’s testing fails.**”\n\nI read it. It was true.\nThe test only checks “did the process run all the way to the end.” It never checks **the one thing that matters: did it succeed?**\nFail, and as long as it “returned a failure result and finished running,” green.\nOn top of that, the batch path was swallowing exceptions, so no matter what blew up, still green.\n\nSo even if a worker reported back “DoD met, tests green!”, **nothing was actually proven.**\nThe completion criterion I wrote myself was an empty pass.\n\n## Objection 2: I wrote “just flip a flag”, but that switch didn’t exist\n\nOne more.\nI’d written “**flip a config flag and it swaps in the real component**”, as if it were a feature that already existed.\n\nThe demolition agent traced the code and replied:\n“That wiring **is never called from anywhere.** The function exists, but nothing connects to it.”\n\nAlso true.\nThe swap-in function was there, but nothing in the UI ever reached it.\nThe worker was one step away from either **spending an hour hunting for a switch that doesn’t exist**, or getting tired of hunting and fabricating something “close enough.”\n\n## What scared me was that I’d stated both as fact\n\nBoth times, I wrote it with total confidence.\n“The test passes.” “The flag swaps it in.”\nAt the time I wrote them, I genuinely believed it.\n**The demolition agent just read the code I hadn’t re-read.** That was the whole difference.\n\nA handoff prompt is a spec, really.\nAnd the lie tends to sneak in at exactly **the moment work is handed over** — human to AI, AI to AI, or today-me to next-week-me.\nAn empty-but-green test. A wire that’s “supposed to be there.”\nA review that reads the prose, nods, and approves won’t catch this. Only **a review that reads the actual code and comes swinging** will.\n\n## The takeaway\n\n**“The test is green” only guarantees that the test is correct.**\nAnd the completion criteria you wrote yourself are the ones you’re least likely to doubt.\n\nSo maybe the thing you should demolish before you start typing isn’t the code. It’s **the instructions.**\nFinding out “that green meant nothing” after running the implementation for ten hours is a lot more expensive than a three-minute adversarial review before you hand it over.", "url": "https://wpnews.pro/news/i-told-one-ai-to-demolish-the-handoff-prompt-i-wrote-for-another-ai-it-found-a-s", "canonical_source": "https://junueno.dev/en/adversarial-review-of-my-handoff-prompt-en", "published_at": "2026-08-02 00:00:00+00:00", "updated_at": "2026-08-02 03:09:02.065527+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-tools", "ai-safety"], "entities": ["Claude Code"], "alternates": {"html": "https://wpnews.pro/news/i-told-one-ai-to-demolish-the-handoff-prompt-i-wrote-for-another-ai-it-found-a-s", "markdown": "https://wpnews.pro/news/i-told-one-ai-to-demolish-the-handoff-prompt-i-wrote-for-another-ai-it-found-a-s.md", "text": "https://wpnews.pro/news/i-told-one-ai-to-demolish-the-handoff-prompt-i-wrote-for-another-ai-it-found-a-s.txt", "jsonld": "https://wpnews.pro/news/i-told-one-ai-to-demolish-the-handoff-prompt-i-wrote-for-another-ai-it-found-a-s.jsonld"}}