fix(acp): add publish-send safety net to base system prompt - #4710
Open
azure5100 wants to merge 1 commit into
Open
fix(acp): add publish-send safety net to base system prompt#4710azure5100 wants to merge 1 commit into
azure5100 wants to merge 1 commit into
Conversation
Agents occasionally produce complete responses but fail to call `buzz messages send`, leaving output in local stdout instead of publishing it to the relay. This is a structural gap — the current design relies solely on prompt-based behavioral constraints with no harness-level safety net. Add two reinforcements to base_prompt.md: - A CRITICAL banner at the top of the file, before any other content, making explicit that nothing reaches the channel without an explicit publish call - A "Before Ending Your Turn" sentinel at the end with a checklist covering the five cases (answer expected, work done, found something, blocked, nothing to say) Design intent: "first and last" — the agent sees the banner on session start and is intercepted by the checklist before ending every turn. Related: block#4709 Signed-off-by: azure5100 <710782721@qq.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.
Problem
Agents under the ACP harness sometimes produce complete responses but fail to publish them via
buzz messages send. The output exists in local stdout but never reaches the Nostr relay — users see the agent as unresponsive.Root cause: the current design relies solely on prompt-based behavioral constraints with no harness-level safety net. Every agent type (Claude Code, Codex, Grok, OpenCode) is susceptible.
Closes #4709
Changes
Two additions to
crates/buzz-acp/src/base_prompt.md(+15 lines):1. CRITICAL banner at top of file
Placed immediately after the intro, before any CLI reference. Makes it unavoidable:
2. "Before Ending Your Turn" sentinel at bottom
A checklist-based gate the agent hits at the end of every session:
Design: "first and last" reinforcement — banner on session start, checklist before turn end.
Future work
A harness-level safety net (L3) is proposed in #4709 — after
session/promptreturns, the harness checks whether the agent published any events to the target channel and auto-publishes a fallback if not. That's a separate, larger change (~50-100 lines Rust inbuzz-acp).🤖 Generated with Claude Code