fix(desktop+acp): wake agents on edit-added @mentions - #2569
Open
Bartok9 wants to merge 1 commit into
Open
Conversation
Bartok9
force-pushed
the
bartok9/fix-edit-added-mention-wake
branch
3 times, most recently
from
July 25, 2026 18:20
10f7b18 to
e95a5c8
Compare
Issue block#2540: editing a kind-9 message to add @agent never fired a turn because (1) Mentions-mode ACP only subscribed to kind 9 (not 40003 edits) and (2) build_message_edit emitted `p` tags but not explicit `mention` reference tags that send already attaches. - Default Mentions subscription kinds include KIND_STREAM_MESSAGE_EDIT - build_message_edit emits matching `mention` refs with newly added `p`s - Unit test asserts mention ref on edit-added audience Closes block#2540 Signed-off-by: Bartok9 <danielrpike9@gmail.com>
Bartok9
force-pushed
the
bartok9/fix-edit-added-mention-wake
branch
from
July 28, 2026 13:17
e95a5c8 to
31a880e
Compare
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.
Closes #2540
Problem
Editing a channel message to add
@AgentNamedid not wake the agent. Fresh sends with the same mention worked.Root causes
KIND_STREAM_MESSAGE(+ approval/reminder). kind:40003 edits never matched the filter, so even a correctptag on the edit event could not start a turn.build_message_editonly attachedptags for newly added mention pubkeys (composer already diffs viadiffAddedMentionPubkeys). Send attaches bothpand explicitmentionreference tags (MENTION_REFERENCE_TAG). Edit lacked thementionrefs (parity / offline-notice / resolve paths).Fix
KIND_STREAM_MESSAGE_EDITin default Mentions kinds (crates/buzz-acp/src/lib.rs).require_mentionstill requires a matchingptag on the edit event (composer only addspfor newly added mentions — typo-fix edits stay quiet).build_message_editemits pairedmentionref tags for those same pubkeys.pandmention.Test
All 3 edit_mention tests passed.
Signed-off-by: Bartok9 <danielrpike9@gmail.com>