Claude model picker offers models the ACP adapter rejects ("Invalid value for config option model")
Bug
The Claude Code model picker can offer a model id that the Claude ACP adapter rejects. The mismatch only surfaces at spawn/send time as an opaque error, and the session cannot start until the user picks a different model.
chat controller: configure ACP session: set ACP session option "model":
{"code":-32603,"message":"Internal error","data":{"details":"Invalid value for config option model: claude-haiku-5-5"}}
Source: live observation (session agent-orchestrator-219) | Analyzed against: d786b311d
Confidence: Medium — the code path is traced; what the installed adapter actually advertises was not inspected.
Reproduction
- Use a Claude Code account whose provider model list includes a model newer than the installed Claude CLI / ACP adapter knows (here
claude-haiku-5-5, which appeared in the project-scope catalog refresh). - Select that model in the model picker and spawn / send in a Claude chat session.
- The chat controller fails with
Invalid value for config option model: <id>. Queued messages are kept, but retrying fails the same way.
Root Cause
Two model lists disagree and nothing reconciles them:
- The picker is populated from the provider's live model list:
discoverClaudeCatalog(backend/internal/adapters/agent/modelcatalog/catalog.go:327,Source = "provider"at:346). It lists everything the account can use. - The ACP adapter validates
modelagainst its own advertised config-option choices. - In
backend/internal/adapters/chatdriver/acp/conversation.go, the legacy path checks the model against the session's advertised choices (resolveLegacyModelChoice,:453) and returnsACP session model does not offer .... The modern config-option path (applyOption,:475→SetSessionConfigOption:482) sends the value unchecked, so the adapter's rejection is the first signal and surfaces asset ACP session option "model"(:492).
Fix
- Before
SetSessionConfigOptionformodel, check the value against the session's advertisedmodelchoices (as the legacy path does) and return a typedErrChatConfigOptionInvalid("model not offered by this ACP session") with a user-facing message. - Optionally intersect the picker with the adapter-advertised models (or mark unsupported entries), so an unusable model is not selectable.
- Consider falling back to the configured default model instead of failing the whole spawn.
Impact
- Session cannot start / send until the user manually changes model; the error is opaque (
-32603 Internal error). - Workaround: pick another model (e.g.
claude-sonnet-5-5or thesonnetalias) or update the Claude CLI / ACP adapter.
Still reproducible on main (1fc31db844), but in a new form: since #6588 the Invalid value error is gone, and a mid-chat switch to a full ID like claude-opus-5-5 is now silently dropped instead. AO shows Opus 5.5 while Claude's transcript shows claude-haiku-5-5 still answering. The adapter lists that model only as opus ("Opus 5.5 · …"), and AO's name match missed it.
The fix is in #8624. It maps the full ID to the alias by its description label, refuses an unmatched switch with a clear error, and makes ao send report it as 400 CHAT_CONFIG_OPTION_INVALID. I tested it live on a daemon built from that branch: after the switch, Claude's transcript shows claude-opus-5-5 answering.