feat(composer): context window selector follows native defaults, adds custom window - #318
Merged
Merged
Conversation
… custom window
Claude models now default the Context Window option to their native window
(200k for Sonnet 4.6 / Opus 4.6, 1M for Fable 5/5.1, Opus 5, Sonnet 5,
Opus 4.7/4.8; the latter two gain the option). Selecting the default emits no
launch flags; a smaller window is passed as `--settings {"autoCompactWindow":N}`
and `[1m]` is only appended to expand a native-200k model.
The picker gains a Custom row with an inline input (500k / 500000 / 500,
100k–1M). Changing the window while the provider is live restarts it before
the next turn and records a `ContextWindowChanged` timeline divider under the
user message. The composer's context meter is clamped to the selected window.Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
contextWindowoption defaults to the model's native window (200k: Sonnet 4.6 / Opus 4.6; 1M: Fable 5 / 5.1, Opus 5, Sonnet 5, Opus 4.7 / 4.8 — the last two gain the option).--settings {"autoCompactWindow":N};[1m]is only appended to expand a native-200k model.500k,500000,500; 100k–1M, inline validation error).ContextWindowChangeddivider ("Context window set to 200k") directly under the user message. Not emitted for the first message of a conversation or an idle session.Verification
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspacepass locally.TCODE_DATA_DIR: Opus 5 shows1Mby default; entering500klaunchesclaude --model claude-opus-5 --settings {"autoCompactWindow":500000}(no[1m]); switching to 200k mid-session relaunches withautoCompactWindow: 200000and renders the divider under the second user message.