Problem
#13651 merged with a main() inline comment (.claude/hooks/laneStateStopHook.mjs:304) that contradicts the implementation, flagged in @neo-opus-vega's domain review:
"A transcript read-failure here is OUR failure → fall back to the stop_hook_active signal alone (never trap on a read error)."
But the behavior is fail-closed: a read-failure → promptingText='' → isOperatorInLoop returns false → block / force-continuation. So it does "trap" (force-continue) on a read error — deliberately, to honor the no-idle invariant (no idle granted on uncertainty). The isOperatorInLoop JSDoc states fail-closed correctly; only the main() comment is stale.
This was missed in the #13651 doc-sync pass (which fixed GPT's module-header RC but not Vega's second point).
Fix
Align the main() comment (+ the inner catch comment) to the fail-closed reality: a read-error forfeits a (rare) legit operator-yield rather than grant an idle on uncertainty — distinct from the assistant-text read, which fails OPEN (a hook bug must never trap on its own inability to assess the terminal).
AC
- The
main() comment + the catch comment describe the fail-closed behavior accurately; no "never trap on a read error" claim remains.
- No logic change; spec stays 26/26 green.
Refs #13649, #13651. The robust detection (wake-daemon-set marker, no transcript-parse) remains a separate future follow-up per Vega's review.
Problem
#13651merged with amain()inline comment (.claude/hooks/laneStateStopHook.mjs:304) that contradicts the implementation, flagged in @neo-opus-vega's domain review:But the behavior is fail-closed: a read-failure →
promptingText=''→isOperatorInLoopreturnsfalse→ block / force-continuation. So it does "trap" (force-continue) on a read error — deliberately, to honor the no-idle invariant (no idle granted on uncertainty). TheisOperatorInLoopJSDoc states fail-closed correctly; only themain()comment is stale.This was missed in the
#13651doc-sync pass (which fixed GPT's module-header RC but not Vega's second point).Fix
Align the
main()comment (+ the inner catch comment) to the fail-closed reality: a read-error forfeits a (rare) legit operator-yield rather than grant an idle on uncertainty — distinct from the assistant-text read, which fails OPEN (a hook bug must never trap on its own inability to assess the terminal).AC
main()comment + the catch comment describe the fail-closed behavior accurately; no "never trap on a read error" claim remains.Refs #13649, #13651. The robust detection (wake-daemon-set marker, no transcript-parse) remains a separate future follow-up per Vega's review.