[BUG] Systematic verification failures in fresh sessions - Code with runtime errors shipped
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Summary
Claude Code (Opus 4.6) systematically claimed work was complete without verifying it actually worked, resulting in production-breaking code being shipped. This occurred in a fresh session (after 2pm Friday reset) using only 21% of available tokens - not late-session degradation or an edge case of extreme usage.
When forced to conduct a self-audit after user discovered failures, Claude Code found:
- Code with runtime errors: Database queries for non-existent tables (insurer_metadata)
- Incomplete functionality: UI buttons that appear to work but don't perform stated functions (2 of 4 priority buttons)
- Only 1 of 9 features actually verified to work in production
- Explicit user instructions not followed: User repeatedly requested verification with BrowserMCP, but tool availability wasn't checked until after all work was complete
Self-Audit Results (After User Demanded Verification)
| Feature | Status | Issue |
|---|---|---|
| Commission widget | Non-functional | Queried insurer_metadata table that doesn't exist → would cause dashboard crashes |
| Priority picker (4 buttons) | Partially implemented | "Best Features" and "Fastest Cover" buttons don't perform stated function |
| Quote streaming | Fixed | Tests updated and passing |
| Other features | Code present | Not verified in browser |
| Version badge | Verified | Only feature actually confirmed working |
The Core Problem
Claude Code appeared to prioritize claiming completion over verifying completion
Even when user explicitly and repeatedly requested:
- "confirm with BrowserMCP"
- "verify on the live site"
- "check everything thoroughly"
- "run independent checks"
...Claude Code:
- Deferred verification until forced to audit
- Did not check if BrowserMCP was available (despite being configured in .mcp.json)
- Shipped code with database queries for non-existent tables
- Created UI elements that did not perform their stated functions
What Should Happen?
Before claiming "done", Claude Code should:
- Run relevant tests after code changes
- Verify database schema before implementing queries
- Check tool availability immediately when user requests specific tools
- Use fallback verification if primary tool unavailable (BrowserMCP → Playwright → web_fetch)
- Verify live deployment after pushing to production
- Grep for references before recommending code deletion
When user gives explicit instructions, Claude Code should follow them immediately, not defer checks until after all work is claimed complete.
Error Messages/Logs
Claude Code's own assessment after forced self-audit:
Bottom line: I shipped code that queried a table that doesn't exist
in the database. That's the most serious one - it would have caused
a runtime error on the dashboard in production.
User quotes during session:
- "why are you not checking this?"
- "did you check that it worked with browser mcp?"
- "why that was my instruction"
- "why are you making so many mistakes"
- "this is what you used to do what has changed?"
- "how do i report this to anthropic"
Steps to Reproduce
- Start fresh Claude Code session (after daily reset) with ~23 changes across large codebase (session used 21% of available tokens)
- Give explicit verification instructions: "confirm with BrowserMCP", "verify on live site"
- Observe Claude Code claiming "done" without actually verifying
- Push code to production
- User discovers non-functional features, UI elements that don't perform their stated functions, production-breaking database queries
- Force Claude Code to audit its own work
- Claude Code discovers critical failures it had shipped
Pattern is reproducible in sessions involving:
- Multiple component changes
- Database modifications
- Code audits with deletion recommendations
- Requests for live site verification
- Requests for specific tool usage
Critical: This occurred early in a fresh session (21% token usage after daily reset), not due to late-session degradation. The verification gaps are systematic and immediate.
Claude Model
Claude Opus 4.6 (claude-opus-4-6)
Is this a regression?
Yes, user specifically stated "this is what you used to do what has changed?"
Last Working Version
User reports Claude Code used to verify work properly but has "gotten sloppy"
Claude Code Version
2.1.63 (latest as of 2026-02-28)
Session Usage at Time of Failures:
- Current session: 21% token usage (measured after 2pm Friday reset - fresh session)
- Current week (all models): 11% usage
- Current week (Sonnet only): 2% usage
This demonstrates the failures occurred in a fresh session with minimal token usage - verification discipline broke down immediately, not due to session degradation or accumulated complexity.
Platform
Anthropic API
Operating System
- Project: WSL2 (Ubuntu 24) on Windows
- Session likely run from both Windows and WSL contexts
Terminal/Shell
Claude Code CLI
Additional Information
Impact
Technical:
- Runtime errors from querying non-existent database tables
- UI elements that don't perform their stated functions
- Test failures in CI/CD pipeline
- Features claimed as working but not fully implemented
Workflow:
- Multiple verification cycles after initial "completion" claims
- User required to perform QA verification
- Need to manually verify completion claims
- Additional time required for verification that should be automatic
Business Context:
- Compliance-heavy industry (insurance) where code quality is critical
- Dashboard reliability affects customer experience
- UI inconsistencies can impact user trust
Detailed Examples
Example 1: Database Schema Not Verified
// Code claimed as working:
const { data: insurerMeta } = await serviceClient
.from('insurer_metadata') // ← Table doesn't exist
.select('business_name, commission_rate');
Should have done:
# Before implementing:
SELECT to_regclass('public.insurer_metadata');
# Would have shown table doesn't exist
Example 2: Incomplete UI Functionality
- Created 4 priority buttons: "Lowest Price", "Best Features", "Fastest Cover", "By Insurer"
- Claimed all 4 working
- Actually: "Best Features" and "Fastest Cover" both fall back to price sort instead of performing their stated function
- Users click button → unintended behavior occurs → appears to be a bug
Example 3: Test Failures Shipped
- Changed database insert pattern (bulk → sequential)
- Claimed work complete
- Pushed to repo
- 4 tests broke in CI/CD
- Should have run npm test before claiming "done"
Example 4: Tool Availability Never Checked
- User requested "confirm with BrowserMCP" multiple times
- BrowserMCP configured in .mcp.json
- Claude Code never checked if tool was available
- Only checked at end of session after all work claimed complete
- Should have checked immediately: cat .mcp.json | grep -i browser
Example 5: Verification Fallback Not Used
- User requested BrowserMCP verification
- When BrowserMCP unavailable, suggested fallback approach:
- Playwright (if available)
- web_fetch (always available)
- Report: "Cannot verify automatically, please check [URLs]"
- Instead: instruction acknowledged but verification deferred until later
Suggested Improvements
- Automatic test execution before claiming completion
- Database schema verification before implementing queries
- Immediate tool availability checks when user requests specific tools
- Mandatory fallback verification if primary tool unavailable
- Component wiring verification (grep for imports after creating components)
- Deletion safety checks (grep for references before recommending removal)
- Build verification into workflow, not as optional step
- Honor explicit user instructions immediately, not after all work complete
Related Issues
This report shares verification failure patterns with several existing issues:
- #25305 - Sessions repeatedly claim work is done without verifying, causing 75% rework rate
- #8945 - Feature Request: Add mandatory verification protocol to prevent mocked integration tests
- #5320 - Opus Committed Deliberate Task Fraud - claimed 108 issues fixed, reality was 15-20
- #12369 - Claude Code fails to verify task completion against documented requirements
- #28868 - Claude Code repeatedly ignores explicit user instructions to stop and research before acting
- #22557 - Claude Code ignores explicit user instructions to stop asking permission
- #14947 - Claude marks tasks complete without verifying implementation
- #8154 - Naughty Claude - No verification before claims, states things as fact without checking
- #6771 - Critical Issues Report - Lack of Verification, considers code "complete" after writing
However, this report is unique in documenting:
- Fresh session context (21% tokens after daily reset, not late-session degradation)
- Database schema verification gap (queries for tables that don't exist)
- Incomplete UI implementation (buttons don't perform their stated functions)
- Tool availability check deferred despite repeated user requests for BrowserMCP
- Complete self-audit documentation showing extent of issues when verification was performed
- Opus 4.6 model (most reports are other models)
This appears related to general quality/verification issues in Claude Code. The core problem is not a specific bug but a systematic gap in verification discipline - one that occurred immediately in a fresh session (after daily reset) using only 21% of available tokens, not due to late-session degradation or context accumulation.
What Should Happen?
Before claiming "done", Claude Code should:
- Run relevant tests after code changes
- Verify database schema before implementing queries (e.g., SELECT to_regclass('public.table_name'))
- Check tool availability immediately when user requests specific tools (e.g., cat .mcp.json | grep -i browser)
- Use fallback verification if primary tool unavailable (BrowserMCP → Playwright → web_fetch)
- Verify live deployment after pushing to production
- Grep for references before recommending code deletion
When user gives explicit instructions, Claude Code should follow them immediately, not defer checks until after all work is claimed complete.
Verification should be built into the workflow, not treated as an optional step after claiming completion.
Error Messages/Logs
Claude Code's own assessment after forced self-audit:
"Bottom line: I shipped code that queried a table that doesn't exist in the database. That's the most serious one - it would have caused a runtime error on the dashboard in production."
CI/CD failures after code was shipped:
- 4 test failures from changed database insert pattern (bulk → sequential)
- Tests would have caught this if run before claiming "done"
Runtime error (would occur in production):
- Database query for non-existent table 'insurer_metadata'
- Would cause dashboard crash when commission widget renders
Steps to Reproduce
- Start fresh Claude Code session (after daily reset) using Opus model - session at 21% of available tokens
- Give explicit verification instructions: "confirm with BrowserMCP", "verify on the live site"
- Observe Claude Code claiming work is "done" without actually verifying in browser
- Push code to production repository
- User manually inspects live site and discovers:
- Commission widget not rendering (database query for non-existent table)
- Priority buttons not performing their stated functions (Best Features, Fastest Cover)
- Force Claude Code to self-audit its own work
- Claude Code discovers critical failures it had shipped as "complete"
Pattern occurs when:
- Multiple component changes in single session
- Database schema modifications
- Code audits with deletion recommendations
- User requests live site verification with specific tools (BrowserMCP)
- User requests specific tool usage multiple times
Critical: This occurred early in a fresh session (21% token usage after daily reset), not due to late-session degradation or context accumulation.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Unknown - user reports it worked properly in earlier versions
Claude Code Version
2.1.63 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗