Skip to content

Watch Claude Code sessions from the background Stop hook again; make the hooks module's watch opt-in - #3512

Merged
max-sixty merged 1 commit into
mainfrom
cc-delivery
Oct 22, 2026
Merged

max-sixty merged 1 commit into
mainfrom
cc-delivery

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Claude Code's watch between turns goes back to the background asyncRewake Stop hook, and the hooks module's watch becomes opt-in again behind the plugin's hooks_module option. 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 of leaf: Leaf: … exit code 143 notices when the session's children are terminated while it is idle.

  • hooks/hooks.json gets the background Stop registration back, and hooks/scripts/background-watch.py gets its supervisor back. The supervisor stands down when CLAUDE_PLUGIN_OPTION_HOOKS_MODULE is true, which Claude Code exports to each of the plugin's hooks. This replaces the leaf_watch payload mark, which relied on the module's classic.Stop link, a link fix: keep Claude Code wake tracking on main turns #3511 found is bypassed in managed sessions.
  • hooks/claude-code.ts starts watches only while options.hooks_module is on, and draws the band either way.
  • leaf-dev journey claude-code --hooks-module is 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.
  • The shipped Claude Code reference, 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.

This was written by Claude Code on behalf of max-sixty

@max-sixty
max-sixty merged commit 2a61251 into main Oct 22, 2026
3 checks passed
@max-sixty
max-sixty deleted the cc-delivery branch October 22, 2026 00:26
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants