Skip to content

fix(buzz-acp): accept id-keyed config options when resolving model switch - #2795

Merged
wpfleger96 merged 1 commit into
block:mainfrom
chillerno1:fix/acp-model-configid-fallback
Jul 28, 2026
Merged

fix(buzz-acp): accept id-keyed config options when resolving model switch#2795
wpfleger96 merged 1 commit into
block:mainfrom
chillerno1:fix/acp-model-configid-fallback

Conversation

@chillerno1

Copy link
Copy Markdown
Contributor

Summary

Fixes #2794. Related: #2692.

resolve_model_switch_method() reads the configId key from each session/new configOptions entry and skips entries that lack it. claude-agent-acp (v0.61.0) keys its entries with id, so every model-category entry was skipped, the desired model never matched, and Claude Code sessions fell back to the CLI default from the user's ~/.claude/settings.json. The only trace was a pool::model WARN that never reaches the per-agent log files.

This is the ACP-side half of the symptom reported in #2692. The open desktop-side PRs (#2695, #2701, #2696) inject ANTHROPIC_MODEL at spawn, which masks the problem for spawn-time selection but leaves the config-option switch path broken.

Changes

  • resolve_model_switch_method() accepts either configId or id when extracting the config id. The set request is unchanged: the ACP SDK schema takes configId as the request param and the adapter resolves it against its id-keyed entries, so only the read side needed fixing.
  • Regression test with an id-keyed configOptions payload mirroring the real adapter response (including models: null, so the unstable fallback path cannot rescue the match).
  • Doc comment on extract_model_config_options() notes the key drift.

Testing

cargo test -p buzz-acp --lib: 599 passed, 0 failed. The new test fails on main and passes with this change.

Verified against the real adapter: a stdio JSON-RPC probe of the bundled claude-agent-acp 0.61.0 confirms session/new returns id-keyed config options with opus[1m] present as a value, and the SDK's SetSessionConfigOptionRequest schema accepts {sessionId, configId, value} as sent by session_set_config_option().

🤖 Generated with Claude Code

…itch

resolve_model_switch_method only read the configId key from session/new
configOptions entries. claude-agent-acp keys its entries with id, so every
entry was skipped, the desired model was never matched, and sessions fell
back to the CLI default model. Accept either spelling and cover the
id-keyed shape with a test mirroring the real adapter response.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: chillerno1 <gh.chiller@pm.me>
@wpfleger96
wpfleger96 force-pushed the fix/acp-model-configid-fallback branch from e003191 to 09901dd Compare July 28, 2026 01:55
@wpfleger96
wpfleger96 enabled auto-merge (squash) July 28, 2026 01:59
@wpfleger96
wpfleger96 merged commit 925a9a7 into block:main Jul 28, 2026
32 checks passed
johnmatthewtennant added a commit that referenced this pull request Jul 28, 2026
* origin/main:
  Publish symbol-bearing debug relay images (#3250)
  feat(tracing): add datastore tracing plumbing (#2760)
  fix(buzz-acp): accept id-keyed config options when resolving model switch (#2795)
  fix(desktop): probe legacy Goose install dir on Windows (#3248)
  refactor(desktop): extract install command execution into install_exec (#3251)

Signed-off-by: John Tennant <jtennant@squareup.com>
troyhoffman-oss added a commit to troyhoffman-oss/buzz that referenced this pull request Jul 28, 2026
Brings 47 upstream commits onto the fork. Eight files conflicted; each
resolution keeps both sides' intent rather than picking a winner.

crates/buzz-acp/src/pool.rs — upstream block#3028 (session titling via
`_meta.sessionTitle`) landed on top of this fork's reworked pool. The fork
had extracted the create-session block into `resolve_channel_session` (which
also resumes durable sessions), so the new `title_channel` argument threads
through that function instead of the inlined block upstream still has.
`channel_name` is deliberately unused on the reuse and resume paths: those
sessions already carry the title they were created with, and nothing in ACP
retitles a live session. Upstream's `resolve_new_session_channel_context`
single-resolve and its `UNKNOWN_CHANNEL_NAME` sentinel are kept verbatim.

crates/buzz-acp/src/acp.rs — upstream block#2795 taught the model-switch resolver
to accept `id`-keyed config options; this fork already had `config_option_id`
doing the same with the opposite precedence (responses carry `id`, `configId`
is request-only). Kept the fork's helper, carried upstream's rationale into
the comment. Upstream's regression test passes unchanged.

desktop/src/features/onboarding/ui/RuntimeIcon.tsx — upstream block#3093 moved
Goose and Cursor from bitmap logos to inline `RUNTIME_MARKS`; this fork had
added base-id fallback so a variant id (`hermes-matt`) inherits its base's
artwork. Resolving these naively would have regressed the fork's feature for
exactly the two harnesses upstream moved, since `resolveHarnessLogo` only
consulted the bitmap maps. Replaced it with `resolveHarnessArtworkId`, which
resolves against marks and logos together, so `goose-nightly` inherits
goose's mark rather than falling through to the terminal glyph. Lookups into
the artwork tables are own-property only: harness ids are catalog data, and a
bare index resolves `constructor` to Object itself, which throws when it
lands in the `<Mark />` slot.

desktop/src/features/settings/ui/SettingsPanels.tsx — upstream consolidated
DoctorSettingsPanel + HarnessManagementCard into HarnessesSettingsPanel; the
fork's RemoteServersCard sits after it.

desktop/scripts/check-file-sizes.mjs — override bookkeeping. Reconciled both
sides' line-count ratchets against the merged files (runtime.rs 986,
discovery.rs 1843) and dropped upstream's duplicate AgentCreationPreview key,
which this branch already carried.

scripts/check-file-sizes-core.mjs — both sides independently added the same
posix-normalization helper under different names; kept one.

desktop/src/features/onboarding/ui/presetLogos.test.mjs,
desktop/tests/e2e/harness-management.spec.ts — disjoint additions, both kept.
Replaced the now-stale `cursor-nightly` case (cursor is mark-backed upstream,
no longer unmapped) with a guard that mark-backed bases keep their marks.

Gates: cargo fmt --all --check, cargo clippy --workspace --all-targets
-D warnings, just test-unit, Tauri clippy, cargo test (1839 passed), desktop
pnpm check + typecheck + test (3969 passed) all green.

Follow-up (not merge scope): the fork's remote SSH deploy path
(crates/buzz-backend-ssh/src/deploy.rs) builds its own env set and does not
carry BUZZ_ACP_SESSION_TITLE, so remotely deployed agents get untitled
sessions. Its Agent struct has no display_name to compose from.

Signed-off-by: Troy Hoffman <troy.hoffman@icloud.com>
troyhoffman-oss added a commit to troyhoffman-oss/buzz that referenced this pull request Jul 28, 2026
47 upstream commits including block#3028 session titling, block#3093 harness
settings redesign, and block#2795 id-keyed config options. Eight conflicts
resolved preserving both sides; session titling threaded through the
reworked pool's resolve_channel_session.

Signed-off-by: Troy Hoffman <troy.hoffman@icloud.com>
tlongwell-block pushed a commit that referenced this pull request Jul 28, 2026
* origin/main: (70 commits)
  feat(relay): make Postgres pool size configurable, default 50 (#3191)
  Publish symbol-bearing debug relay images (#3250)
  feat(tracing): add datastore tracing plumbing (#2760)
  fix(buzz-acp): accept id-keyed config options when resolving model switch (#2795)
  fix(desktop): probe legacy Goose install dir on Windows (#3248)
  refactor(desktop): extract install command execution into install_exec (#3251)
  Polish composer activity layout and transitions (#3151)
  feat(invites): add use-limited invite links (#3141)
  fix(node): bump Buzz-supplied Node runtimes past OpenClaw's >=24.15.0 floor (#3218)
  fix(desktop): preserve thread anchor through layout reflow (#3212)
  feat(search): parse from:/in:/after:/before: and pass them in the filter (#2871)
  fix(desktop): fetch join policies through native networking (#2862)
  fix(desktop): republish agent identity records when a persona rename propagates (#2607)
  fix(desktop): keep project Inbox previews compact (#3193)
  Inbox refactor (#2045)
  Fix composer selection formatting and drop overlay (#3172)
  Refine pending message status (#3153)
  feat(admin): show reported message content in report detail (#3149)
  fix(desktop): recover full local storage on startup (#3182)
  Replace mobile reconnect banners with skeleton shimmer (#3143)
  ...

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
cameronhotchkies pushed a commit to cameronhotchkies/buzz that referenced this pull request Jul 28, 2026
…y-to-env

* origin/main: (22 commits)
  Polish mobile message and search layouts (block#3121)
  Add mobile message image galleries (block#3312)
  chore(release): release Buzz Desktop version 0.5.0 (block#3213)
  feat(relay): make Postgres pool size configurable, default 50 (block#3191)
  Publish symbol-bearing debug relay images (block#3250)
  feat(tracing): add datastore tracing plumbing (block#2760)
  fix(buzz-acp): accept id-keyed config options when resolving model switch (block#2795)
  fix(desktop): probe legacy Goose install dir on Windows (block#3248)
  refactor(desktop): extract install command execution into install_exec (block#3251)
  Polish composer activity layout and transitions (block#3151)
  feat(invites): add use-limited invite links (block#3141)
  fix(node): bump Buzz-supplied Node runtimes past OpenClaw's >=24.15.0 floor (block#3218)
  fix(desktop): preserve thread anchor through layout reflow (block#3212)
  feat(search): parse from:/in:/after:/before: and pass them in the filter (block#2871)
  fix(desktop): fetch join policies through native networking (block#2862)
  fix(desktop): republish agent identity records when a persona rename propagates (block#2607)
  fix(desktop): keep project Inbox previews compact (block#3193)
  Inbox refactor (block#2045)
  Fix composer selection formatting and drop overlay (block#3172)
  Refine pending message status (block#3153)
  ...

Signed-off-by: npub1x4hk035p3p9q39a3fcrd2fe30lpkrhr5dwe0cqzzjphxyyh8m0gsq4vqap <356f67c681884a0897b14e06d527317fc361dc746bb2fc0042906e6212e7dbd1@buzz.block.builderlab.xyz>
Co-authored-by: npub1x4hk035p3p9q39a3fcrd2fe30lpkrhr5dwe0cqzzjphxyyh8m0gsq4vqap <356f67c681884a0897b14e06d527317fc361dc746bb2fc0042906e6212e7dbd1@buzz.block.builderlab.xyz>
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.

buzz-acp model switch never matches claude-agent-acp config options: expects configId, adapter sends id

2 participants