Skip to content

feat: add fast mode session config support#518

Open
jsgrrchg wants to merge 5 commits intoagentclientprotocol:mainfrom
jsgrrchg:feature/fast-mode
Open

feat: add fast mode session config support#518
jsgrrchg wants to merge 5 commits intoagentclientprotocol:mainfrom
jsgrrchg:feature/fast-mode

Conversation

@jsgrrchg
Copy link
Copy Markdown

@jsgrrchg jsgrrchg commented Apr 7, 2026

Summary

This PR exposes fast_mode as a session config option for ACP clients and keeps that state synchronized with the Claude Agent SDK.

It also preserves the derived effort levels behavior already carried in this branch and wires both features together so model changes rebuild the available config options correctly.

What changes

  • add fast_mode as a selectable session config option when the current model supports it
  • initialize the session config from SDK model metadata and fast_mode_state
  • sync fast_mode_state back from streamed SDK result messages so ACP clients reflect transitions like cooldown
  • apply fastMode flag settings when clients update the fast_mode config option
  • rebuild session config options on model changes so effort and fast_mode stay aligned with model capabilities
  • preserve or clamp effort values when switching models, and clear them when the new model does not support effort levels
  • allow effortLevel in merged settings

Why

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 levels work, 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.ts

Result:

  • 3 test files passed
  • 115 tests passed
  • 6 tests skipped

Notes

This PR depends on the Support effort levels work introduced in commit b578b41 by 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.

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.

2 participants