Skip to content

buzz-acp: accept owner control commands with rendered mention text - #6101

Open
jhgaylor wants to merge 1 commit into
block:mainfrom
jhgaylor:buzz-acp/control-commands-with-mention-text
Open

buzz-acp: accept owner control commands with rendered mention text#6101
jhgaylor wants to merge 1 commit into
block:mainfrom
jhgaylor:buzz-acp/control-commands-with-mention-text

Conversation

@jhgaylor

@jhgaylor jhgaylor commented Aug 17, 2026

Copy link
Copy Markdown

Fixes #6014, fixes #6051.

Summary

!shutdown / !cancel / !rotate were unreachable from the desktop (and mobile) UI. is_owner_control_command required all of: kind:9, content.trim() == "!rotate" exactly, and a p tag mentioning the agent. But clients render a mention as literal text in the body alongside the p tag, so:

  • @Fountain Maintainer !rotate → has the p tag, but content ≠ "!rotate" → forwarded to the agent as a prompt (agent replies "not sure what !rotate should do here")
  • bare !rotate → content matches, but no p tag → dropped

This 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 !rotate also matches — documented in the fn doc and README.

Related work

Test plan

  • cargo test -p buzz-acp --lib owner_control_command — new owner_control_command_tolerates_rendered_mention_text covers the accepted and rejected shapes
  • cargo clippy -p buzz-acp --all-targets, cargo fmt
  • Manual: send @<agent> !rotate from desktop as owner; harness logs the rotate and does not reply conversationally

🤖 Generated with Claude Code

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
jhgaylor requested a review from a team as a code owner August 17, 2026 06:09
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant