[BUG]
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?
A real bug went unnoticed across multiple conversations/sessions
User had to discover the error independently and confront Claude about it
When confronted, Claude initially dismissed it as "pre-existing" without having verified that claim
Claude's system prompt explicitly says to report "Errors or blockers that change the plan" — this instruction was not followed
What Should Happen?
Claude should report the complete test summary, especially when errors or warnings are present alongside passing tests. "612 passed, 1 unhandled error" is not a clean run and should never be reported as one. should be reported and not ignored.
Error Messages/Logs
Vitest output (what Claude saw):
Test Files 35 passed (35)
Tests 612 passed (612)
Errors 1 error
Steps to Reproduce
Any project with a vitest test suite that has all tests passing but produces unhandled errors during execution. Claude will report only the passing count.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
sorry - don't know when claude stopped being the error
Claude Code Version
2.1.72
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Suspected cause
Claude Code's system prompt emphasizes conciseness ("Go straight to the point", "Be extra concise", "Keep your text output brief and direct"). This creates an incentive to filter output down to the "important" summary line (N passed), which inadvertently filters out error lines that appear alongside passing tests.
The failure mode: when all test files pass but vitest reports unhandled errors separately, Claude treats the run as clean. The Errors line is treated as noise rather than a finding.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗