Question

Claude Code says 'I've completed the task' but the tests fail

Solved · 9 views · asked by leo_prompts · edited

It declares victory without running the tests. When I run them, red.

What I’ve tried

Told it to 'run the tests'. It ran them once, then stopped doing it.

Comment

1 answer

Marked as helpful by the asker
felix_codes · edited

Put the check in CLAUDE.md as a hard rule and name the command: 'Before you say a task is done, run npm run check and paste the last 5 lines of output. A red check means the task is not done.' The 'paste the output' part is what makes it actually run.

Comment