Launch 1M-capable Claude models with the [1m] window suffix#8
Merged
Merged
Conversation
Claude Code only switches its context meter and auto-compaction to the 1M window (and sends the context-1m beta) when the session model id carries the [1m] suffix. The selector and config.json advertise bare ids (claude-opus-4-8), so the launchers started Claude Code on a 200k window even for Opus 4.8 / Sonnet 4.6, which serve 1M natively -- the /context meter filled ~5x too fast and pinned at 100%, and auto-compaction was keyed to the wrong limit. Append [1m] to 1M-capable Claude base ids in both the POSIX (bin/ultracode) and Windows (Start-UltraCode.ps1) launchers, for the selector pick and the default settings model. Scoped so Haiku 4.5, claude-auto, and non-Claude routes (Gemini/GPT/Composer) are never suffixed. Configurable via UC_FORCE_1M (set 0 to disable) and UC_1M_MODELS (override the capable set). Symptom and toggles documented in docs/TROUBLESHOOTING.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
OnlyTerp
pushed a commit
that referenced
this pull request
Jun 3, 2026
Companion to #8. That PR makes the launchers append a "[1m]" suffix to 1M-capable Claude model ids so Claude Code sizes its context meter (and auto-compaction) to the 1M window. The suffix is a client-side convention -- the 1M window itself is carried by the context-1m beta header -- not an Anthropic model id. The proxy looks up routes (and orchestrator/worker picks) by exact id, so once a pick carries "[1m]" a configured route like "claude-opus" no longer matches "claude-opus[1m]" and routing falls through / breaks. This strips a trailing "[1m]" from the request model id up front, so "<id>[1m]" behaves exactly like "<id>" everywhere downstream. The 1M window is unaffected (the beta header is left untouched), and the strip is universal so stock-traffic remap and the Auto Router stay consistent too. Depends on #8: with #8 not merged nothing emits the suffix, so this is a no-op on its own and only earns its keep once #8 lands. Includes a unit test. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
Picking Opus 4.8 (or Sonnet 4.6) through the launcher, the
/contextmeterfills ~5× faster than expected and pins at 100%, and auto-compaction is keyed to
the wrong limit.
/contextshows the window as… / 200k, not/ 1M:Root cause
Claude Code only switches its context meter and auto-compaction to the 1M
window (and sends the
context-1mbeta) when the session's model id carries the[1m]suffix (e.g.claude-opus-4-8[1m]). The selector andconfig.jsonadvertise bare ids (
claude-opus-4-8), and the launchers pass those straightto
claude --model, so the client defaults to the 200k window — even thoughOpus 4.8 / 4.7 / 4.6 and Sonnet 4.6 serve 1M natively on the Anthropic API.
Nothing is lost upstream; the window is just mis-sized client-side. Verified that
claude --model 'claude-opus-4-8[1m]'is accepted and, after this change,/contextreads/ 1M.Fix
Both launchers now append
[1m]to 1M-capable Claude base ids before launch, forthe selector pick and the default settings model:
bin/ultracode—uc_add_1mhelperwindows/Start-UltraCode.ps1—Add-Uc1mfunctionScoped so Haiku 4.5,
claude-auto, and non-Claude routes(Gemini / GPT / Composer) are never suffixed.
Config:
UC_FORCE_1M=0— disable (back to bare ids)UC_1M_MODELS— comma-separated override of the capable set(default
claude-opus-4-8,claude-opus-4-7,claude-opus-4-6,claude-sonnet-4-6)Testing
bash -n bin/ultracodeclean;uc_add_1munit-tested across opus/sonnet (→suffixed), haiku/auto/gemini/already-suffixed/empty (→ unchanged), and
UC_FORCE_1M=0(→ disabled).windows/Start-UltraCode.ps1reviewed (${ModelId}[1m]interpolation; nopwshavailable in the dev env to run it)./contextnow shows/ 1M.Note
If an Anthropic-passthrough deployment can fall back to a backend capped at 200k,
a conversation that grows past 200k may then fail there — the new
TROUBLESHOOTING entry calls this out.
🤖 Generated with Claude Code