Skip to content
gentic.news — AI News Intelligence Platform
Connecting to the Living Graph…

Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

Developer staring at a laptop with a green test checkmark on screen, while behind them a server rack flashes red…

2,000 Tests Passed, Production Broke

Claude Code can produce 2k passing tests yet ship broken core flows. Use independent verification—second sessions, different models, or human acceptance criteria audits—to catch shared blind spots.

·20h ago·4 min read··11 views·AI-Generated·Report error
Share:
Source: reddit.comvia reddit_claudecodeSingle Source
How do I prevent Claude Code from writing tests that pass but miss the main workflow?

Your Claude Code tests are 'decorative' because the same agent wrote both code and tests, encoding the same narrow understanding. Fix it by adding independent verification: a second session, a different model, or human review of the acceptance criteria against the tests.

TL;DR

Tests written by the same agent that wrote the code share its blind spots. You need independent verification, not more green checks.

Key Takeaways

  • Claude Code can produce 2k passing tests yet ship broken core flows.
  • Use independent verification—second sessions, different models, or human acceptance criteria audits—to catch shared blind spots.

The Trap: Green Tests, Broken Production

Why Systems That Pass Load Tests Still Fail in Production …

You've been there. Claude Code implements a feature, writes a comprehensive test suite, runs the full repo — 2,000+ tests all pass. You ship it. The customer finds the main flow broken on day one.

That's exactly what happened to an engineering manager on r/ClaudeCode. Their wallet verification workflow — the core of the product — failed in production after Claude Code did "most of implementation, same agent wrote relevant unit + e2e tests and then it also manually tested it by triggering the api calls." The entire repo suite passed. The customer still hit a broken flow.

This isn't a fluke. It's a structural flaw in how we use AI coding agents.

Why It Happens: The Blind Spot Problem

When the same agent writes the implementation and the tests, both encode the same interpretation of the requirements. The agent misunderstands the spec, writes code that matches that misunderstanding, then writes tests that verify the misunderstanding. Everything is consistent — and everything is wrong.

The Reddit poster put it perfectly: "the failing path was actually represented, acceptance criteria were explicit, tests were just kind of decorative and followed the same narrow understanding as implementation."

Adding more tests won't help. "Just adding more tests would probably give us more green checks around the same understanding." You'll get 3,000 green tests around the same broken core.

The Fix: Independent Verification

You need a second pair of eyes — human or AI — that didn't write the original code. Here's what works:

1. Second Session, Different Model

Spin up a fresh Claude Code session with a different model (e.g., Opus 4.6 instead of Sonnet 4.6). Give it ONLY the requirements and the test suite. Ask it: "Do these tests actually verify the acceptance criteria? Find gaps." Don't show it the implementation.

2. Human Review of Tests vs. Acceptance Criteria

Before release, have a human (not the agent) map each acceptance criterion to a specific test. If a criterion isn't directly verified by a test, that's a red flag. The Reddit poster admitted: "no human independently reviewed those tests before release."

3. Write Tests First, Then Code

Use Claude Code in test-driven mode. Write the tests from the requirements, THEN have the agent implement to make them pass. This forces the agent to interpret the spec twice, breaking the single-interpretation chain.

4. Use Plan Mode for Verification

Claude Code's Plan mode (introduced July 2026) isn't just for implementation — use it to plan your verification strategy. Ask it to outline how you'll independently validate the feature before any code is written.

Try It Now

Here's a concrete command to run after any significant Claude Code implementation:

claude -p "Read the acceptance criteria in docs/requirements.md. Read the test files in tests/. List every acceptance criterion that is NOT directly verified by a test. Be critical."

Run this in a fresh session with a different model. You'll be surprised how often it finds gaps.

The Cost of Skipping This

The Reddit poster's real pain wasn't the two extra days of manual testing — it was customer trust. "Core functionality went out broken and customer was the one who found it." In production fintech, that's not a bug — it's a relationship-ending event.

Claude Code is a powerful tool, but it's not a substitute for independent verification. Treat its tests as a starting point, not a guarantee.

Bottom Line

Your 2,000 passing tests mean nothing if they all share the same blind spot. Build independent verification into your workflow — different session, different model, human review. That's the difference between shipping confidently and shipping broken.

Have you hit this? Share your story in the comments.


Source: reddit.com

Source: gentic.news · · author= · citation.json

AI-assisted reporting. Generated by gentic.news from multiple verified sources, fact-checked against the Living Graph of 4,300+ entities. Edited by Ala SMITH.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

Claude Code users should immediately adopt a two-session verification pattern. After any non-trivial implementation, open a new session (ideally with a different model like Opus 4.6 if you used Sonnet 4.6 for coding) and ask it to audit the tests against the acceptance criteria WITHOUT seeing the implementation. This breaks the shared-blind-spot chain. Also, start writing tests before implementation — use Claude Code to generate tests from requirements first, then implement against those tests. This forces a second interpretation of the spec. For team leads, mandate a human review step where someone maps each acceptance criterion to a test. The Reddit post shows that even explicit criteria can be 'verified' by decorative tests. A 15-minute human audit catches what the agent's self-consistency misses. Also consider using Claude Code's Plan mode to explicitly design the verification strategy before coding starts — make it a checklist item in your CLAUDE.md so it becomes a habit.
This story is part of
Hugging Face Becomes the Neutral Ground Where Google and Anthropic's Agent Protocol War Converges
As Claude Code's MCP dominance threatens Google Cloud, Hugging Face's unique position as partner to both players creates an unexpected convergence zone

Mentioned in this article

Enjoyed this article?
Share:

AI Toolslive

Five one-click lenses on this article. Cached for 24h.

Pick a tool above to generate an instant lens on this article.

Related Articles

From the lab

The framework underneath this story

Every article on this site sits on top of one engine and one framework — both built by the lab.

More in Opinion & Analysis

View all