feat(acp): negotiate persistent system prompts - #5386
Conversation
Signed-off-by: Reinhold <310554180+reinhold-ph@users.noreply.github.com>
Signed-off-by: Reinhold <310554180+reinhold-ph@users.noreply.github.com>
Signed-off-by: Reinhold <310554180+reinhold-ph@users.noreply.github.com>
Signed-off-by: Reinhold <310554180+reinhold-ph@users.noreply.github.com>
|
Companion adapter PR is now submitted:
That PR advertises |
|
I like the capability-negotiated transport. It gives configured instructions the right authority and preserves the legacy fallback. Correction to my earlier review: I initially treated the memory and canvas lifecycle as a problem introduced here. It is not. This PR preserves the behavior already used for Claude and protocol-v2 agents, then adds the negotiated Codex path. The stale-revision risk is real, but it belongs in #3242 and should not block this PR. The portability boundary still matters for the follow-up: authored instructions belong to the agent definition, while memory and channel state need their own refresh lifecycle. No change requested here. |
Summary
Buzz-managed agents receive a sizeable block of static instructions: the managed-agent base prompt plus configured system, team/core, and channel-canvas context. For ACP adapters without a recognized persistent prompt transport, Buzz currently includes that static material in ordinary user prompts. This consumes context repeatedly and makes downstream conversation records harder to read and reason about.
This PR adds capability-negotiated persistent system prompts to
buzz-acp:_meta.capabilities.persistentSystemPromptfrom the adapter'sinitializeresponse;session/newas_meta.systemPrompt;_meta.systemPrompt.append, Goose, and protocol-v2 transports;The resulting path is:
Companion work
Hard dependency for the accepted Codex path: the companion
codex-acpcontribution advertises the capability and persists_meta.systemPromptas Codex developer instructions:https://github.com/agentclientprotocol/codex-acp/compare/main...Peakhunter:codex-acp:fix/buzz-persistent-developer-instructions?expand=1
The companion branch was live-tested at exact head
1cf677dbe2801c4dbab678fc9e479a4a7fd87aa6.Current Claude support remains on its existing provider-specific transport; this PR does not require a Claude adapter change.
Scope
This change owns prompt transport and repetition only. It does not add durable channel-to-ACP-session persistence across a Buzz Desktop restart, change Codex thread visibility in ChatGPT, alter lazy-pool sizing, or change outbound relay delivery/network policy.
Related work
pool.rsand may require mechanical reconciliation depending on merge order.No duplicate issue or pull request was found for the capability-negotiated transport introduced here.
Testing
Automated
buzz-acpverification:Supervised macOS acceptance used the coordinated frozen Buzz and
codex-acpcandidates:buzz-acpSHA-256:b5a2cb7113a9ddadd76d93679ca6df7eb1a4e0eca6a0e5a8ec6577f53c415be9;persistentSystemPrompt: true;The live-tested source head was
282988ea71869e82f05131d88307c4fce3750e49. The publication head is1db51a13a60e09f0876c41e163fc082453c45456; it differs only by required DCO trailers. Both heads have the identical Git treeae3312d03bc5bf757ccdb26c35b819194c378ba8, so the tested source and artifact are unchanged.There is no visual UI change. Acceptance relied on UI continuity plus protocol/downstream structural evidence rather than treating visible replies alone as proof.