feat: add fast mode session config support#518
Open
jsgrrchg wants to merge 5 commits intoagentclientprotocol:mainfrom
Open
feat: add fast mode session config support#518jsgrrchg wants to merge 5 commits intoagentclientprotocol:mainfrom
jsgrrchg wants to merge 5 commits intoagentclientprotocol:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR exposes
fast_modeas a session config option for ACP clients and keeps that state synchronized with the Claude Agent SDK.It also preserves the derived
effort levelsbehavior already carried in this branch and wires both features together so model changes rebuild the available config options correctly.What changes
fast_modeas a selectable session config option when the current model supports itfast_mode_statefast_mode_stateback from streamed SDK result messages so ACP clients reflect transitions likecooldownfastModeflag settings when clients update thefast_modeconfig optioneffortandfast_modestay aligned with model capabilitieseffortvalues when switching models, and clear them when the new model does not support effort levelseffortLevelin merged settingsWhy
ACP clients can already control session configuration such as mode and model, but they currently cannot expose or manage fast mode directly.
This change makes fast mode available through the same config surface and keeps the ACP-side state consistent with SDK responses. Because this branch is already carrying the derived
effort levelswork, this PR also includes the integration needed to keep both behaviors coherent during model switches.Testing
Ran:
npm test -- src/tests/session-config-options.test.ts src/tests/acp-agent-settings.test.ts src/tests/acp-agent.test.tsResult:
Notes
This PR depends on the
Support effort levelswork introduced in commitb578b41by Ben Brandt.The fast mode changes in this branch were integrated on top of that work, so this PR is not a clean fast-mode-only diff against
main.