feat(acp): honor managed-agent reasoning effort - #5507
Conversation
The Desktop exposes an effort selector, but it is not rendered for BYOH harnesses. BUZZ_AGENT_THINKING_EFFORT therefore had only one runtime consumer in buzz-agent, leaving managed Claude Code, Codex, and opencode agents pinned to each harness default. Teach buzz-acp to validate the shared setting and translate it per harness. Claude receives adaptive or manual thinking through session/new _meta.claudeCode.options, Codex receives a deep-merged model_reasoning_effort without losing approval or sandbox policy, and opencode fails explicitly rather than writing user configuration. The ThinkingEffort type and Anthropic family table move to buzz-core only as the means to keep the native runner and ACP path on one source of truth, not as a standalone refactor. Claude uses _meta instead of MAX_THINKING_TOKENS because the token budget collapses high, xhigh, and max to 32,768 tokens and would erase the user's selected distinction. Signed-off-by: rsaulo <rsaulo@me.com>
Signed-off-by: rsaulo <rsaulo@me.com>
|
Closing this in favour of #4625, and of #4557 which landed the ACP-side wire path. Both solve the problem this PR was aimed at, and solve it better. The thing I got wrong here was hardcoding an effort axis: #4625 routes the effective value through One narrow gap I'd like to file separately: models exposing a manual thinking budget rather than named effort ( Thanks for the thorough design here. |
Problem
Buzz Desktop exposes an effort selector (
EffortSelectField), but that field is not rendered for BYOH harnesses; I verified this in the UI with several models. Separately,BUZZ_AGENT_THINKING_EFFORThas exactly one runtime consumer today, incrates/buzz-agent/src/config.rs; nothing inbuzz-acpreads it. As a result, managed agents running Claude Code, Codex, or opencode stay at the harness default with no effort control.Why named effort through
_meta, notMAX_THINKING_TOKENSA token budget loses operator intent:
high,xhigh, andmaxall collapse to 32,768 tokens. The Claude Agent SDK exposes namedeffort, and the adapter spreads...userProvidedOptionsafter its defaults, so the client-provided value wins while preserving those distinctions.Why the model-family table lives in
buzz-coreThis is a means, not an end: both the native runner and the external ACP path need the same Anthropic model-family classification. Sharing it avoids two tables silently diverging when a new model family is added.
buzz-agentbehavior remains identical, and its existing suite remains intact.Harness-specific behavior
_meta.claudeCode.options(and retains manual token budgets for legacy model families).CODEX_CONFIG, preserving unrelated settings such asapproval_policyandsandbox_mode.[1m]is ignored for model-family classification.Tests
cargo test -p buzz-corecargo test -p buzz-agentcargo test -p buzz-acp