Stop Claude Code from saying "done" while the build is still red, with a Stop hook

Chronological Source Flow
Back

AI Fusion Summary

Claude Code users can implement a Stop hook to prevent the agent from announcing completion while type checkers still fail. By exiting with status 2, the hook blocks the stop and sends stderr feedback to the agent. Additionally, utilizing a CLAUDE.md file serves as an automatic onboarding document for every session. This file eliminates the need for repetitive project explanations, reduces incorrect assumptions, and ensures the agent adheres to specific testing and editing constraints.
Community Comments
Loading updates...
0