buzz-acp: accept owner control commands with rendered mention text - #6101
Open
jhgaylor wants to merge 1 commit into
Open
buzz-acp: accept owner control commands with rendered mention text#6101jhgaylor wants to merge 1 commit into
jhgaylor wants to merge 1 commit into
Conversation
Desktop and mobile insert a mention into the message body as literal text
("@Fountain Maintainer !rotate") alongside the p tag, but
is_owner_control_command required content.trim() to equal the command
exactly. So a mentioned command fell through to the agent as a prompt, and
a bare command had no p tag and was dropped — the commands were unreachable
from every product surface (already noted in
docs/welcome-kickoff-silent-failures.md §5).
Match the command when it is the whole content, or when it is the last or
first token with only @name / nostr: mention text on the other side. Content
that continues past the command is still forwarded as an ordinary message.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Jake Gaylor <jhgaylor@gmail.com>
jhgaylor
added a commit
to BinaryBourbon/fountain
that referenced
this pull request
Aug 17, 2026
…nds with mention text) (#787) buzz-acp.source -> jhgaylor/buzz@0bb9e5af (fountain-pin branch: the #6088 resume-sessions commits plus #6101, which lets is_owner_control_command match !rotate/!cancel/!shutdown when the client renders the @mention into the message body). Release name bumps to buzz-acp-v0.5.14-fountain.2 so the image pulls the new build rather than a clobbered asset. Signed-off-by: Jake Gaylor <jhgaylor@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 17, 2026
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.
Fixes #6014, fixes #6051.
Summary
!shutdown/!cancel/!rotatewere unreachable from the desktop (and mobile) UI.is_owner_control_commandrequired all of: kind:9,content.trim() == "!rotate"exactly, and aptag mentioning the agent. But clients render a mention as literal text in the body alongside theptag, so:@Fountain Maintainer !rotate→ has theptag, but content ≠"!rotate"→ forwarded to the agent as a prompt (agent replies "not sure what!rotateshould do here")!rotate→ content matches, but noptag → droppedThis was already called out in
docs/welcome-kickoff-silent-failures.md§5 as mutually exclusive on every real surface.Fix
New
control_command_content_matches: a command matches when the trimmed content is the bare command, or the command is the last/first token with only mention text (@…/nostr:…, spaces allowed since display names are multi-word) on the other side. Content that does not begin with a mention, or that continues past the command (please !rotate,!rotate now), is still forwarded as an ordinary message. Owner +p-mention + kind:9 checks are unchanged.Since the harness doesn't know its own rendered display name,
@Fountain Maintainer please !rotatealso matches — documented in the fn doc and README.Related work
!rotateis unreachable from the Desktop composer — mention text breaks the exact-match gate #6051 (@jeff-theta) — both report exactly this: the exact-content andp-tag requirements are jointly unsatisfiable from the Desktop composer. This PR is the harness-side fix for both.@before comparing. That handles single-word names (@zai !cancel) but, as its own doc comment notes, a multi-word display name (@Fountain Maintainer !rotate→Maintainer !rotate) still fails to match. This PR instead treats everything from the leading@/nostr:up to the trailing command as mention text, so multi-word names work, and it's scoped to just this fix so it can land independently. Happy to defer to feat(acp): auto-publish replies, @mention-tolerant owner commands, extra MCP servers, glm-5.3 effort table #5866 if that lands first — the two would conflict onis_owner_control_command.!rotatePR.Test plan
cargo test -p buzz-acp --lib owner_control_command— newowner_control_command_tolerates_rendered_mention_textcovers the accepted and rejected shapescargo clippy -p buzz-acp --all-targets,cargo fmt@<agent> !rotatefrom desktop as owner; harness logs the rotate and does not reply conversationally🤖 Generated with Claude Code