Skip to content

Keep the ACP model config error instead of guessing session/set_model - #6474

Merged
ymichael merged 2 commits into
mainfrom
bb/2925-acp-bridge-retries-model-config-errors-thro-thr_ypdnzpir2p
Oct 28, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/2925-acp-bridge-retries-model-config-errors-thro-thr_ypdnzpir2p

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The ACP bridge discarded an advertised model config option's error and tried the optional session/set_model extension without evidence that the agent supported the selected model through that interface. This could hide the actionable error behind OMP's unsupported-method error. Confirmed on main by running the regression test with main's production bridge: the promise resolved with selected-model:fake/strong instead of rejecting with the original config error.

What changed

Preserve the original config error unless the session's advertised models include the requested model. Keep fallback for agents that advertise that model, and teach the dynamic integration fixture to implement its advertised config option.

The only intended visible change is that failed model configuration no longer invokes an unadvertised model extension and instead reports its original error. Successful configuration, advertised fallback, and model selection through session models remain supported. No server/daemon wire changes or new CLI/SDK surfaces.

How you verified

  • Negative control: regression test fails against current main's production bridge for the expected swallowed-error behavior.
  • pnpm exec turbo run lint typecheck test --filter=@bb/provider-bridge-acp: passed; 545 tests passed, 4 skipped, 25 test files. Includes the regression, advertised fallback, and recorded conformance.
  • pnpm exec turbo run test --filter=@bb/integration-tests -- fake/smoke/dynamic-acp-agent.test.ts: passed, one integration smoke test.
  • Formatting and git diff --check passed.
  • Default parity comparison reported stale historical allowlist entries with identical output; affected-provider parity rerun with an empty allowlist passed: 10 cells passed, 0 failed, 1 process-scoped cell skipped. No event or row differences.
  • Real OMP was not rerun in this checkout; this verification uses the subprocess bridge fixture and recorded ACP traffic.

Fixes #2925

🤖 Generated with Claude Code

AGENT GENERATED

ymichael and others added 2 commits October 28, 2026 13:11
When an agent advertises a model config option and
session/set_config_option fails, the bridge swallowed the error and
retried with session/set_model, an optional extension omp does not
implement, so thread start failed with "Unknown ACP ext method:
session/set_model" instead of the agent's real reason. set_model is now
used only when the agent advertises session models that include the
selection; otherwise the config option's own error is returned.

Fixes #2925

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael merged commit be6ec62 into main Oct 28, 2026
50 checks passed
@ymichael
ymichael deleted the bb/2925-acp-bridge-retries-model-config-errors-thro-thr_ypdnzpir2p branch October 28, 2026 21:17
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.

ACP bridge retries model config errors through unsupported session/set_model

1 participant