[MODEL] Compiler errors incorrectly treated as satisfying TDD RED gate
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Other unexpected behavior
What You Asked Claude to Do
Any bug fix or feature using a TDD workflow
What Claude Actually Did
- Claude wrote tests first
- Claude tried to run the tests and got compiler errors
- Claude concludes that "tests fail" and proceeds to the implementation phase
Expected Behavior
Compiler errors and failing tests are not the same, if there are compiler errors, Claude should fix those first and try running the tests again. Only when the tests have actually been run and confirmed to fail for the right reason should Claude proceed to the next TDD phase. I should not have to explain how TDD works in my CLAUDE.md file, this should be common sense.
Files Affected
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
Ask for TDD in CLAUDE.md or in your prompt, without specifying how to execute TDD. It's a common workflow, so Claude should know how to apply it properly.
Claude Model
Opus
Relevant Conversation
Impact
High - Significant unwanted changes
Claude Code Version
2.1.273 (Claude Code)
Platform
Anthropic API
Additional Context
This happens with Fable too