You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 29e5af0
Browse filesBrowse the repository at this point in the historyBrowse files
fix(acp): require control commands at command position
An owner-authored message beginning with `@` armed a scan across all
remaining prose for the first whitespace-prefixed bang token. That made
asking an agent *about* a command indistinguishable from issuing it:
`@Agent explain what happens when I use !shutdown` parsed as `!shutdown`
and terminated the harness, and the same shape could cancel or rotate an
active turn mid-sentence.
Commands are now recognized only at command position — first in the
message, or immediately after the run of leading `@mention` tokens.
This deliberately reverses an earlier trade-off in this branch, which
accepted a bang anywhere after a leading mention so that
`@Agent please run !model haiku` would fire. That was too wide: the same
permissiveness is exactly what lets a question execute. `@Agent !model
haiku` still works; the prose form no longer does.
It also drops mentions holding spaces (`@Will Pfleger !rotate`), which
the previous scan tolerated by accident. The parser has no display-name
list, so where such a mention ends is genuinely ambiguous — and any rule
loose enough to end it at `Pfleger` also ends it at the last word of a
sentence. Not firing is the safe side of that ambiguity.
Signed-off-by: Troy Hoffman <[email protected]>
Copy file name to clipboardExpand all lines: crates/buzz-acp/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,7 +160,9 @@ Use `!cancel` to stop only the current turn; it is a no-op when the channel is i
160
160
161
161
`!model` matches model IDs exactly — adapters ship near-identical pairs (`opus[1m]` vs `claude-opus-5`, `gpt-5.3-codex` vs `gpt-5.3-codex/low`) where a prefix match would silently pick a different context lane and price point. An unknown ID is rejected with the list and leaves the current model untouched.
162
162
163
-
Owner control commands must be kind:9 stream messages from the owner, must mention this agent with a `p` tag, and are consumed by the harness instead of being forwarded to the agent. The command may be typed on its own (`!rotate`) or after a leading mention (`@Agent !rotate`).
163
+
Owner control commands must be kind:9 stream messages from the owner, must mention this agent with a `p` tag, and are consumed by the harness instead of being forwarded to the agent. The command may be typed on its own (`!rotate`) or immediately after the leading `@mention` tokens (`@Agent !rotate`, `@Sol @Eva !rotate`).
164
+
165
+
The bang must be at that command position. A bang appearing later in the message is ordinary text, so asking an agent *about* a command — `@Agent what happens if I use !shutdown` — is delivered as a normal message rather than executed. Since the harness has no display-name list, a mention holding spaces (`@Will Pfleger !rotate`) does not reach command position either; address such an agent with a single-token handle to use control commands.
164
166
165
167
> **Note:** The default mode is `owner-only`. Agents without a registered `agent_owner_pubkey` will not respond to any events until the owner is resolved. Set `--respond-to anyone` to disable the gate entirely.
0 commit comments