End a Claude Code turn on StopFailure, not only on Stop
main·
Commit

Claude Code fires StopFailure instead of Stop when a turn ends on an API error (rate limit, overload, auth, billing, max output tokens, ...). Entire only listened for Stop, so such a turn never ended: the session stayed ACTIVE until the next prompt or session end, the turn's step was not saved, commit hooks treated the session as still live, and status/doctor reported it active while Claude Code sat idle. StopFailure now maps to TurnEnd like Stop. The hook is installed and uninstalled with the others, a config without it reads as outdated, and the dogfood settings carry it.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M45X5QZFV9FQCR8V510QNEVQ
Checkpoints
Checkpoint 1
Checkpoint 1