Repository navigation
Watch Claude Code sessions from the background Stop hook again; make the hooks module's watch opt-in - #3512
Merged
Conversation
leaf-agent
approved these changes
Oct 22, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 22, 2026
…p entry and an eval, mark deferred items (#3579) Applies the next round of answers from the TODO and notes decisions page. Prose, plus one comment in `runtime/sample.js` (which rebuilds the kernel). - **Samples stay off the clipboard**: `sample.js`'s header records the choice to delegate no `clipboard-write` to a sample's frame, so an authored sample script can't write the user's clipboard. - **Shadow-root chrome is no longer wanted**: its anchoring gap entry leaves `notes/browser-support.md` (the spike stays at `e7745b70d`). - **`long-read-beside-a-panel-is-a-document` eval goes**: it never discriminated, and three cases cover the same ground. - **TODO.md**: - the `lf-ask` heading check stays, so its item goes; - hook-delivery confirmation and owed-answer continuation wait on the Claude Code hooks module's rollout (#3512); - the thread appearance gate is wanted later; - the history rewrite waits on releases and a different kernel build; - multi-block sidebars should stick, blocked on a footer-overlap finding that now waits on the user's pick. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude Code's watch between turns goes back to the background
asyncRewakeStop hook, and the hooks module's watch becomes opt-in again behind the plugin'shooks_moduleoption. The band above the prompt stays on in both cases.Since #3399 the module has been the only watcher. It wakes an idle session with
$.prompt.submit, which Claude Code draws as a full user-styled prompt: "The leaf plugin sent a message: Leaf: has new input…" followed by the engine's paragraph on plugin prompts. The background hook's wake draws as one dim "Stop hook feedback" row. A survey of transcripts since 2026-10-13 also found two kinds of visible rows that only the module produces. One is a queued wake that fires as an empty turn after the user's own prompt has already taken the input (2 of 4 module wakes). The other is a pair ofleaf: Leaf: … exit code 143notices when the session's children are terminated while it is idle.hooks/hooks.jsongets the background Stop registration back, andhooks/scripts/background-watch.pygets its supervisor back. The supervisor stands down whenCLAUDE_PLUGIN_OPTION_HOOKS_MODULEistrue, which Claude Code exports to each of the plugin's hooks. This replaces theleaf_watchpayload mark, which relied on the module'sclassic.Stoplink, a link fix: keep Claude Code wake tracking on main turns #3511 found is bypassed in managed sessions.hooks/claude-code.tsstarts watches only whileoptions.hooks_moduleis on, and draws the band either way.leaf-dev journey claude-code --hooks-moduleis back, so both watchers run the same journey. On Claude Code 2.1.307 both pass every step. The default run shows 8 "Stop hook feedback" rows and 1 cross-session nudge. The module run shows 2 plugin prompts and 3 nudges, and its debug log shows no asyncRewake wake, which confirms the background hook stood down.session-lifetime.md, the harness declarations, the README and the site's integration notes describe the background watch as the default again.Comparing the two watchers properly, and cutting what the module shows, comes in a follow-up.