Development record
The comment above the session-start hook in internal/surface/cli/cli.go (around lines 2006-2015) still says the loud path deliberately exits 2, while the code below it exits 0 on every path and a later comment says so (iss-2608241115201044).
issueopenminoriss-2610161125118921
The comment above the session-start hook in internal/surface/cli/cli.go (around lines 2006-2015) still says the loud path deliberately exits 2, while the code below it exits 0 on every path and a later comment says so (iss-2608241115201044).
Frontmatter
| id | iss-2610161125118921 |
|---|---|
| type | issue |
| lifecycle | open |
| severity | minor |
.abcd/work/issues/open/iss-2610161125118921-the-comment-above-the-session-start-hook.md
open on GitHub ↗ · commit history ↗
mentions1
- iss-2608241115201044SessionStart exit-2-as-advisory no longer reaches the user. abcd hook session-start returns exitError{Code: 2} whenever it has notices to print (internal/surface/cli/cli.go:1289), on the documented assumption that a non-zero SessionStart surfaces stderr without blocking. Claude Code v2.1.241 instead renders it as 'SessionStart:startup hook error' followed by a truncated echo of the hooks.json command string; the stderr notice itself never reaches the user. Every session-start notice is therefore an opaque error banner: transcript-capture gaps, staged-drain failures, the remaining-backlog count, binary skew, dogfood staleness, and the version transition. The data-loss-adjacent ones matter most - a user told that a session transcript was not captured now sees only a hook error, with no way to learn what it was.