Skip to content

feat(acp): negotiate persistent system prompts - #1

Closed
reinhold-ph wants to merge 4 commits into
validation/upstream-main-20260808from
fix/acp-persistent-system-prompt
Closed

feat(acp): negotiate persistent system prompts#1
reinhold-ph wants to merge 4 commits into
validation/upstream-main-20260808from
fix/acp-persistent-system-prompt

Conversation

@reinhold-ph

@reinhold-ph reinhold-ph commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Why

Buzz currently infers persistent system-prompt support from ACP protocol version or adapter name. Codex ACP reports protocol v1, so Buzz falls back to prepending Base/System/team/core/canvas material to ordinary user messages on every turn.

This adds explicit capability negotiation for the extension implemented by the companion Codex ACP change.

Companion validation PR: Peakhunter/codex-acp#1

Protocol

  • Agent advertises _meta.capabilities.persistentSystemPrompt: true in initialize.
  • Buzz records only an explicit boolean true; absent, false, and malformed values remain unsupported.
  • On session/new, Buzz sends the combined static prompt as string-valued _meta.systemPrompt.
  • Buzz then suppresses Base/System/team/core/canvas duplication in ordinary user turns.

Compatibility

  • Agents without the capability keep the legacy per-turn framing.
  • Claude ACP keeps its existing _meta.systemPrompt: { "append": ... } transport.
  • Existing protocol-v2 agents keep the top-level systemPrompt field.
  • Goose keeps its post-session custom method and fallback probe.
  • Explicit persistent metadata takes precedence over the protocol-v2 field for agents that advertise it.

Validation

RED SHA: 81895074d9fa0e580ddc7f41e037eb65f361a664

GREEN SHA: 282988ea71869e82f05131d88307c4fce3750e49

Local GREEN:

  • cargo test -p buzz-acp: 695 unit tests + 9 lifecycle integration tests passed
  • End-to-end fake-agent tests compare complete session/new and session/prompt JSON-RPC envelopes, exact prompt-block count/order, and capable/legacy content
  • cargo clippy -p buzz-acp --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Fork CI at exact SHA 282988ea71869e82f05131d88307c4fce3750e49:

  • Feature/source gates GREEN: Rust Lint, Unit Tests, Security, Windows Rust, both Linux cross-compiles, and Desktop umbrella
  • Exact-SHA run: https://github.com/Peakhunter/buzz/actions/runs/31280953723
  • The aggregate is red only because unchanged desktop/tests/e2e/onboarding.spec.ts:3172 fails its welcome-banner assertion and retry. The same upstream-base failure reproduced across four runs; this branch changes only crates/buzz-acp/src/acp.rs and pool.rs.
  • Two independent exact-SHA reviews: APPROVE; no blocking findings.

Base validation/upstream-main-20260808 is exact upstream block/buzz@f029deafae6ad3b63e13c29104f3be76122cb1df.

@reinhold-ph reinhold-ph changed the title test(acp): define persistent system prompt capability behavior feat(acp): negotiate persistent system prompts Aug 8, 2026
@reinhold-ph reinhold-ph closed this Aug 8, 2026
@reinhold-ph reinhold-ph reopened this Aug 8, 2026
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>
@reinhold-ph
reinhold-ph force-pushed the fix/acp-persistent-system-prompt branch from 282988e to 1db51a1 Compare August 9, 2026 09:57
@cmyk
cmyk marked this pull request as ready for review August 9, 2026 10:47
@cmyk cmyk closed this Aug 9, 2026
@cmyk

cmyk commented Aug 9, 2026

Copy link
Copy Markdown

Internal validation complete; upstream submission continues at block#5386.

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.

2 participants