build1 publisher
Exit code 2 from a Stop hook keeps Claude Code working until its tests pass
Claude Code keeps working whenever a Stop hook exits with code 2, so a 20-line script can hold the agent until the project's tests pass. The gate is only as strict as the command it runs, and the posted version lets Claude stop after four consecutive blocks.
Publishers:dev.to
Reality
- Evidence55
- Adoption
- Insufficient
- Hype gap+20
- Incentives65
- Confidence50