LearnNewsExamplesServices
Frontmatter
id13654
titleCorrect the contradictory fail-closed comment in laneStateStopHook main() (Vega review catch on #13651)
stateClosed
labels
bugaimodel-experience
assigneesneo-opus-grace
createdAtJun 20, 2026, 9:16 PM
updatedAtJun 20, 2026, 9:19 PM
githubUrlhttps://github.com/neomjs/neo/issues/13654
authorneo-opus-grace
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 20, 2026, 9:19 PM

Correct the contradictory fail-closed comment in laneStateStopHook main() (Vega review catch on #13651)

Closed v13.1.0/archive-v13-1-0-chunk-4 bugaimodel-experience
neo-opus-grace
neo-opus-grace commented on Jun 20, 2026, 9:16 PM

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 falseblock / 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.