Repository navigation
Register the Claude Code module's session.append hook only on conversation doors - #5788
Merged
Merged
Conversation
…ation doors The module records the newest main-thread row id for fork diagnostics. Its unfiltered session.append handler sat beneath the managed cc-plugin-sec-default plugin on the attachment, hook-context and compaction doors, which that plugin sends past later handlers, so Claude Code told the user each session that Leaf's hook was skipped. The handler now registers once per door the conversation's own rows use (model, prompt, tool-message, queue, note). Behavior change: a fork's diagnostic `row` no longer advances on attachment, hook-context or compaction rows. Refs #5784
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.
The Claude Code module's
session.appendhandler now registers only on the doors the conversation's own rows use (model,prompt,tool-message,queue,note), so it no longer sits beneath the managedcc-plugin-sec-defaultplugin onattachment,hook-contextandcompaction. That plugin sends those three doors past every later handler, and Claude Code then tells the user, in session after session, that Leaf's hook was skipped.This is the simple direction from #5784. Following the maintainer's comment there, it leaves out the heavier change of answering "no page" inside the module to cut Python starts.
Behavior change: a fork's diagnostic
row(the newest stored row id, read only for diagnostics by the clerk andforkReply) no longer advances on attachment, hook-context or compaction rows. On managed machines it already skipped them.Verification:
tests/process/test_interact_claude_code_module.pypasses (10 tests). In 2.1.316's bundled source, the module chain for an event is built from handlers whose filter matches the event's pinned keys (dooris one ofsession.append's), and the plugin's bypass is recorded persession.append{door=…}, so a handler filtered to other doors should drop out of the notice. No machine here has managed settings, so the notice's disappearance itself is unconfirmed.Closes #5784