Skip to content

feat(acp): deliver system prompt via _meta.systemPrompt for claude-agent-acp - #4395

Merged
wpfleger96 merged 1 commit into
mainfrom
duncan/claude-acp-system-prompt
Aug 2, 2026
Merged

feat(acp): deliver system prompt via _meta.systemPrompt for claude-agent-acp#4395
wpfleger96 merged 1 commit into
mainfrom
duncan/claude-acp-system-prompt

Conversation

@wpfleger96

Copy link
Copy Markdown
Member

claude-agent-acp (since v0.6.0 / PR #91) accepts _meta.systemPrompt: {append: text} on session/new to append to the adapter's native preset while keeping its tool-use prompt intact — the same non-standard extension pattern as _session/steering was before it was standardised.

What changes

Rust (crates/buzz-acp/)

  • Adds SystemPromptTransport enum to acp.rs: Field(&str) (ACP protocol v2, unchanged) vs ClaudeMeta(&str) (new _meta.systemPrompt: {append: text}). When both ClaudeMeta and session_title are present the two _meta members are merged into one object so neither clobbers the other.
  • Gates on exact adapter identity @agentclientprotocol/claude-agent-acp in pool.rs: session_new_system_prompt() routes that name to ClaudeMeta regardless of reported protocolVersion (CC declares v1). has_system_prompt_support() gains the same name check so user-message [Base]/[System] framing is suppressed for CC sessions.
  • All other paths — goose post-hoc method, protocol-v2 Field, legacy user-message framing — are byte-identical to before.

Desktop (desktop/src/features/agents/ui/)

  • agentSessionTranscript.ts: the session/new extractor now checks params._meta.systemPrompt.append as a fallback when bare params.systemPrompt is absent. Bare field takes precedence. Net line count stays at 1173 (ratchet limit).
  • agentSessionTranscript.test.mjs: two new tests — one verifying the _meta transport produces the identical standalone card (same five sections, same turnId: null, same placement before the first turn) as the bare-field transport; one proving bare field wins when both transports are present.

Gate claim

@agentclientprotocol/claude-agent-acp implies _meta.systemPrompt support because the feature landed in v0.6.0 (Oct 2025, commit ea796f3) before the @zed-industries/claude-code-acp@agentclientprotocol/claude-agent-acp package rename (Mar 2026, commit b409782). The new name is therefore a reliable capability gate; the old name falls through to the protocol-version gate (status quo, no regression).

Tests

  • Rust: Claude append serialization; _meta coexistence with sessionTitle; protocol-v2 bare field byte-identical; codex/old-zed omission; claude-name support/suppression gate; old @zed-industries name falls through to protocol-version gate.
  • Desktop: _meta transport → identical standalone card; bare field wins over _meta when both present.

Pre-existing failures

just mobile-check and just mobile-test fail identically on clean origin/main (5 compose_bar / channels_page tests + 3 Flutter lint warnings) — not caused by this change. All other just ci jobs are green.

@wpfleger96
wpfleger96 requested a review from a team as a code owner August 2, 2026 19:27
…ent-acp

claude-agent-acp (since v0.6.0 / PR #91) accepts a custom
_meta.systemPrompt: {append: text} field on session/new that appends to
the adapter's native preset rather than replacing it. This is the same
pattern as _session/steering -- a nonstandard extension available now,
before the RFD #1237 standard field lands.

Add SystemPromptTransport enum to acp.rs:
  Field(&str)       -- existing bare systemPrompt field (protocol v2)
  ClaudeMeta(&str)  -- new _meta.systemPrompt: {append: text}

session_new_full() now accepts Option<SystemPromptTransport> instead of
Option<&str>. When both ClaudeMeta transport and a session_title are
present the two _meta members are merged into a single object.

Gate in pool.rs: session_new_system_prompt() routes
@agentclientprotocol/claude-agent-acp to ClaudeMeta regardless of the
reported protocolVersion (CC declares v1). has_system_prompt_support()
gains the same name check so user-message [Base]/[System] framing is
suppressed for claude sessions. The old @zed-industries package name
falls through to the protocol-version gate (status quo, harmless).

All other paths -- goose post-hoc method, protocol-v2 Field, legacy
user-message framing -- are byte-identical to before.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96
wpfleger96 force-pushed the duncan/claude-acp-system-prompt branch from 924ad44 to 94bf8ba Compare August 2, 2026 20:33
@wpfleger96
wpfleger96 merged commit 7ff5fc3 into main Aug 2, 2026
33 checks passed
@wpfleger96
wpfleger96 deleted the duncan/claude-acp-system-prompt branch August 2, 2026 23:10
tlongwell-block pushed a commit that referenced this pull request Aug 3, 2026
Pulls in main as a new commit on top per Tyler's instruction before the
flicker fix and splash animation work. No rebase, no force.

* origin/main:
  fix(desktop): stop the create-agent provider config probe from erasing keystrokes (#4411)
  fix(mobile): recover and pace live subscriptions (#3053)
  feat(acp): deliver system prompt via _meta.systemPrompt for claude-agent-acp (#4395)

Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
joahg added a commit to joahg/buzz-dev-mode that referenced this pull request Aug 3, 2026
…-style

* origin/main:
  Polish mobile composer and messaging UI (block#3918)
  ci(linux): enable mesh-llm feature in Linux release and canary builds (block#4524)
  fix(desktop): stop the create-agent provider config probe from erasing keystrokes (block#4411)
  fix(mobile): recover and pace live subscriptions (block#3053)
  feat(acp): deliver system prompt via _meta.systemPrompt for claude-agent-acp (block#4395)
  fix(security): bump nostr crates for RUSTSEC-2026-0225..0232 + default sprig image to published digest (block#4392)
  fix(desktop): back/forward via keyboard chords, mouse X1/X2 buttons, and swipe gestures (block#3778)
  feat(k8s): Kubernetes backend plugin + desktop deploy path (block#4289)
  fix(git): allow deleting the default branch (block#4297)
  feat(projects): add buzz projects CLI commands (NIP-MP kind:30621) (block#4020)
  docs: formal spec for remote agents and their management (block#3748)
  fix(nip-oa): accept raw Nostr tag form in parse_json_array (block#4203)
  perf(relay): serve relay-membership checks from the read replica (block#4124)
  chore(deps): bump nostr-relay-pool for RUSTSEC-2026-0224 (block#4139)
  docs(nostr): document #h requirement for live reaction subscriptions (block#3487)

Signed-off-by: Joah Gerstenberg <joah@squareup.com>
wpfleger96 pushed a commit that referenced this pull request Aug 3, 2026
…ed-unread

* origin/main: (44 commits)
  chore(release): release Buzz Desktop version 0.5.4 (#4562)
  test(mobile): assert follow boundary semantics (#4559)
  docs(release): align desktop handoff instructions (#3988)
  fix: report agent usage per provider round, not once per turn (#4545)
  fix(desktop): harden Windows installs against Defender block and orphaned Node (#4382)
  feat(desktop): improve channel template discovery (#4549)
  fix(desktop): save key backups to authorized path (#4022)
  Add channel activity hover menu (#3935)
  feat(desktop): show saved Run on settings when editing an agent (#4539)
  fix(desktop): disambiguate provider API key labels and annotate mint key (#4406)
  fix(desktop): make OpenAI key re-enterable after first save in card mint dialog (#4140)
  fix(config-bridge): add harness-definition env tier and fix equal-value model override (#3580)
  Polish mobile composer and messaging UI (#3918)
  ci(linux): enable mesh-llm feature in Linux release and canary builds (#4524)
  fix(desktop): stop the create-agent provider config probe from erasing keystrokes (#4411)
  fix(mobile): recover and pace live subscriptions (#3053)
  feat(acp): deliver system prompt via _meta.systemPrompt for claude-agent-acp (#4395)
  fix(security): bump nostr crates for RUSTSEC-2026-0225..0232 + default sprig image to published digest (#4392)
  fix(desktop): back/forward via keyboard chords, mouse X1/X2 buttons, and swipe gestures (#3778)
  feat(k8s): Kubernetes backend plugin + desktop deploy path (#4289)
  ...

Signed-off-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
wpfleger96 added a commit that referenced this pull request Aug 3, 2026
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>

* origin/main: (40 commits)
  fix(mobile): recover stale relay sessions (#4372)
  chore(release): release Buzz Desktop version 0.5.4 (#4562)
  test(mobile): assert follow boundary semantics (#4559)
  docs(release): align desktop handoff instructions (#3988)
  fix: report agent usage per provider round, not once per turn (#4545)
  fix(desktop): harden Windows installs against Defender block and orphaned Node (#4382)
  feat(desktop): improve channel template discovery (#4549)
  fix(desktop): save key backups to authorized path (#4022)
  Add channel activity hover menu (#3935)
  feat(desktop): show saved Run on settings when editing an agent (#4539)
  fix(desktop): disambiguate provider API key labels and annotate mint key (#4406)
  fix(desktop): make OpenAI key re-enterable after first save in card mint dialog (#4140)
  fix(config-bridge): add harness-definition env tier and fix equal-value model override (#3580)
  Polish mobile composer and messaging UI (#3918)
  ci(linux): enable mesh-llm feature in Linux release and canary builds (#4524)
  fix(desktop): stop the create-agent provider config probe from erasing keystrokes (#4411)
  fix(mobile): recover and pace live subscriptions (#3053)
  feat(acp): deliver system prompt via _meta.systemPrompt for claude-agent-acp (#4395)
  fix(security): bump nostr crates for RUSTSEC-2026-0225..0232 + default sprig image to published digest (#4392)
  fix(desktop): back/forward via keyboard chords, mouse X1/X2 buttons, and swipe gestures (#3778)
  ...
wpfleger96 added a commit that referenced this pull request Aug 3, 2026
Syncs Cargo.lock and ci.yml updates from origin/main via the umbrella, which
resolves the RUSTSEC-2026-0225..0229 nostr advisory failures in the Security gate.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>

* commit 'ad9ae1dbb0c2d9b6839c1e18d6fd6a78238b61fb': (40 commits)
  fix(mobile): recover stale relay sessions (#4372)
  chore(release): release Buzz Desktop version 0.5.4 (#4562)
  test(mobile): assert follow boundary semantics (#4559)
  docs(release): align desktop handoff instructions (#3988)
  fix: report agent usage per provider round, not once per turn (#4545)
  fix(desktop): harden Windows installs against Defender block and orphaned Node (#4382)
  feat(desktop): improve channel template discovery (#4549)
  fix(desktop): save key backups to authorized path (#4022)
  Add channel activity hover menu (#3935)
  feat(desktop): show saved Run on settings when editing an agent (#4539)
  fix(desktop): disambiguate provider API key labels and annotate mint key (#4406)
  fix(desktop): make OpenAI key re-enterable after first save in card mint dialog (#4140)
  fix(config-bridge): add harness-definition env tier and fix equal-value model override (#3580)
  Polish mobile composer and messaging UI (#3918)
  ci(linux): enable mesh-llm feature in Linux release and canary builds (#4524)
  fix(desktop): stop the create-agent provider config probe from erasing keystrokes (#4411)
  fix(mobile): recover and pace live subscriptions (#3053)
  feat(acp): deliver system prompt via _meta.systemPrompt for claude-agent-acp (#4395)
  fix(security): bump nostr crates for RUSTSEC-2026-0225..0232 + default sprig image to published digest (#4392)
  fix(desktop): back/forward via keyboard chords, mouse X1/X2 buttons, and swipe gestures (#3778)
  ...
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