Skip to content

feat(buzz-acp): route goose systemPrompt via ACP+ _meta extension#1290

Draft
wpfleger96 wants to merge 1 commit into
mainfrom
wpfleger/goose-acp-plus-system-prompt
Draft

feat(buzz-acp): route goose systemPrompt via ACP+ _meta extension#1290
wpfleger96 wants to merge 1 commit into
mainfrom
wpfleger/goose-acp-plus-system-prompt

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Reference implementation of RFD #1237, which is not yet merged. The RFD proposes systemPrompt as a first-class session/new field in ACP. Until it lands, buzz passes systemPrompt to goose agents via _meta["systemPrompt"] — the ACP extensibility mechanism — matching the goose-side implementation in aaif-goose/goose#9971.

For goose agents, systemPrompt must be passed via _meta["systemPrompt"] rather than as a first-class session/new field, because goose reads it from _meta until RFD #1237 lands. Buzz-agent native agents continue to use the top-level systemPrompt field unchanged. When the RFD merges, both this PR and the goose companion can be updated to use the first-class field directly.

Changes

  • crates/buzz-acp/src/acp.rs — adds session_new_full_goose, which puts systemPrompt inside _meta instead of at the top level. Two new unit tests verify the goose path: session_new_full_goose_includes_system_prompt_in_meta_when_some and session_new_full_goose_omits_meta_when_none. Existing session_new_full and its tests are unchanged.
  • crates/buzz-acp/src/config.rs — promotes normalize_agent_command_identity to pub(crate) so pool.rs can use it for goose detection.
  • crates/buzz-acp/src/pool.rs — adds agent_command: String to PromptContext; create_session_and_apply_model dispatches to session_new_full_goose when normalize_agent_command_identity(&ctx.agent_command) == "goose", otherwise falls through to session_new_full.
  • crates/buzz-acp/src/lib.rs — populates agent_command in the PromptContext constructor from config.agent_command.

Related

For goose agents, systemPrompt must be passed via _meta["systemPrompt"]
rather than as a first-class session/new field, per the ACP extensibility
convention (ACP+ / _meta approach). Buzz-agent native agents continue to
use the top-level systemPrompt field unchanged.

Add session_new_full_goose to AcpClient, which puts systemPrompt inside
_meta instead of at the top level. Add agent_command to PromptContext so
create_session_and_apply_model can detect goose (via
normalize_agent_command_identity) and dispatch to the correct variant.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.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

Development

Successfully merging this pull request may close these issues.

1 participant