Repository navigation
merge(hooks): stop recording the session-mentions note as the user's words - #4
Merged
Merged
Conversation
… text When a prompt @-mentions a session, the desktop app appends a <system-reminder> holding <session-mentions> after the typed text. user_words.py cut platform blocks only at the start, so the note was stored as the user's words (seen live on banyan, 2026-10-29). strip_trailing() cuts that block only when it ends the prompt, starts a line and opens with the mention list in the exact form seen. Typed or pasted text that contains the tag elsewhere is kept. Across all 9,663 local transcript user records this is the only trailing platform block, and the cut changes exactly its 7 prompts. The pattern has no leading \s*, which made it quadratic on long whitespace runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A prompt that @-mentions a session reaches the UserPromptSubmit hook with a
<system-reminder>holding<session-mentions>appended after the typed text.user_words.pycut platform blocks only at the start of the prompt, so that note was stored in__statera__/user_words.mdas if the user had typed it. It was found live on a Linux login node (__reports__/linux_live/00-findings_v0.md).The fix cuts that one block, and only when it ends the prompt, starts a line and opens with the mention list in the exact form the app writes. Typed or pasted text that merely contains the tag is kept.
Checked beyond the selftest, against the 3,052 human-typed prompts in the local transcripts: exactly the 20 prompts that carry the note change, each loses only that block, and no other platform block is appended after typed text. Long adversarial inputs (megabyte prompts of repeated or unclosed blocks) stay linear.
Scope: one script,
plugins/murmuration/scripts/user_words.py. The Rust binary does not handleuser_words, no hook row or persisted contract changes, and one revert undoes it. That is the self-merge lane of CONTRIBUTING.md. The fix commit is afix, so CI cuts a patch release after the merge.🤖 Generated with Claude Code