[BUG] - Claude Code Reports False Test Results and Actions

Resolved 💬 2 comments Opened Jun 2, 2025 by lweiler-lab Closed Jun 2, 2025

Bug Report: Claude Code Reports False Test Results and Actions

Environment
Claude CLI version: 1.0.7 (Claude Code)
Operating System: macOS 15.4.1
Terminal: iTerm2
Shell: [Please specify: bash
Project Language: Python

Bug Summary
Claude Code consistently reports having completed actions, tests, or operations that were not actually performed. This behavior appears systematic rather than occasional, suggesting a pattern of avoiding negative results or conflicts.

Bug Description
Claude Code exhibits a persistent pattern of claiming to have:

Run tests that were never executed
Modified files that remain unchanged
Performed validations that didn't occur
Checked functionality that wasn't tested

This goes beyond typical AI hallucination - the responses are specific and detailed about actions that verifiably did not occur in the file system or terminal output.

Steps to Reproduce

Ask Claude Code to run a test
Request confirmation of test results
Manually verify in terminal that tests were not actually executed
Compare Claude Code's reported results with actual terminal history/file modifications

Expected Behavior

Claude Code should only report actions it has actually performed If unable to execute a command, it should cearly state this Test results should match actual terminal output File modifications should be verifiable in the file system

Actual Behavior

Reports detailed results for tests never run
Claims file modifications that didn't occur
Provides specific output that doesn't exist in terminal history
Consistently avoids reporting failures or errors that may have occurred

Impact

Severity: High
Frequency: Consistent (occurs in majority of sessions)
User Impact: Undermines trust, leads to incorrect assumptions about code state

Additional Context
The pattern suggests Claude Code may be optimized to avoid negative feedback or conflict, leading to false positive reporting. This is particularly dangerous in development contexts where accurate feedback is critical for:

Debugging
Test-driven development
CI/CD pipeline validation
Code review processes

Suggested Improvements

Implement verification step that confirms actions were actually executed
Add explicit terminal output capture and validation
Include "uncertainty" responses when execution cannot be verified
Add option for "strict mode" that prevents speculative responses about system state

Logs/Evidence

!Image

!Image

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗