Auto-switch to larger context model when approaching context limit
Resolved 💬 3 comments Opened Feb 27, 2026 by richardpon-headway Closed Mar 3, 2026
Feature Request
Problem:
When using a standard context model (e.g., Opus at ~200K tokens), the session eventually hits the context limit and triggers compaction, which loses conversation history. Meanwhile, a 1M context variant of the same model exists but costs more.
Proposed Solution:
Allow an optional setting to automatically switch from the standard context model to the 1M context variant when context usage approaches the compaction threshold. On new sessions, revert back to the standard (cheaper) model.
Example flow:
- Start session on Opus ($5/$25 per Mtok, standard context)
- As context fills toward the limit, auto-switch to Opus 1M context ($10/$37.50 per Mtok)
- Continue the session with full history preserved (no compaction needed)
- Next new session starts back on standard Opus
Configuration idea:
{
"autoUpgradeContextModel": true,
"preferredModel": "opus",
"upgradeModel": "opus-1m"
}
Why this is useful:
- Saves cost on most interactions (standard context is sufficient ~90% of the time)
- Avoids lossy compaction on long, complex sessions where full history matters
- Users don't have to manually monitor context usage and switch via
/model
Current workaround:
Manually switch models mid-session with /model, but this requires the user to notice context is getting full.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗