Describe the bug
The contextTier setting in ~/.copilot/settings.json is persisted by the CLI but is not applied at session start. As a result, fresh sessions default to the 200k context window even when the user has explicitly opted in to the long-context tier via /model.
The model setting (model) and reasoning effort (effortLevel) from settings.json ARE applied on session start. Only contextTier silently gets dropped.
Affected version
GitHub Copilot CLI 1.0.55-1
Steps to reproduce the behavior
- Open
copilot and run /model. Select a model that supports a long-context tier (in my case Claude Opus 4.7 (1M context)(Internal only)) and choose the long-context option.
- Confirm
~/.copilot/settings.json now contains:
{
"model": "claude-opus-4.7-1m-internal",
"contextTier": "long_context"
}
- Exit the CLI (or run
/restart).
- Start a new session and run
/context.
Expected behavior
The new session honors the persisted contextTier: "long_context" setting and starts with the 1M token context window.
Actual behavior
The new session starts with the default 200k context window. The session.model_change event written at session start in ~/.copilot/session-state/<id>/events.jsonl looks like:
{"type":"session.model_change","data":{"newModel":"claude-opus-4.7-1m-internal"}}
Note the absence of contextTier. The model is applied from settings.json but the persisted context tier is not.
To get the long-context window back, I have to re-run /model and reselect the long-context tier every single session, which then emits a session.model_change event WITH contextTier: "long_context" and works correctly for that session only.
Additional context
- The CLI binary contains code paths that:
- Write
contextTier correctly to settings.json from /model: Rt.contextTier = lt === "long_context" ? "long_context" : void 0
- Apply
contextTier when a model change event includes it: "contextTier" in e.data && (this.contextTier = e.data.contextTier ?? void 0)
- But the session-start path that applies the persisted
model field to the new session does not appear to include the persisted contextTier. Looks like the load-and-apply step at session start needs to read contextTier from settings.json and forward it into the initial session.model_change event (or equivalent).
- OS: macOS (Darwin, ARM)
- Shell: zsh
- Terminal: Terminal.app
- I confirmed this against three fresh sessions created today (after a CLI restart). All three emitted
session.model_change events with the model but no contextTier.
Describe the bug
The
contextTiersetting in~/.copilot/settings.jsonis persisted by the CLI but is not applied at session start. As a result, fresh sessions default to the 200k context window even when the user has explicitly opted in to the long-context tier via/model.The model setting (
model) and reasoning effort (effortLevel) fromsettings.jsonARE applied on session start. OnlycontextTiersilently gets dropped.Affected version
GitHub Copilot CLI 1.0.55-1Steps to reproduce the behavior
copilotand run/model. Select a model that supports a long-context tier (in my caseClaude Opus 4.7 (1M context)(Internal only)) and choose the long-context option.~/.copilot/settings.jsonnow contains:{ "model": "claude-opus-4.7-1m-internal", "contextTier": "long_context" }/restart)./context.Expected behavior
The new session honors the persisted
contextTier: "long_context"setting and starts with the 1M token context window.Actual behavior
The new session starts with the default 200k context window. The
session.model_changeevent written at session start in~/.copilot/session-state/<id>/events.jsonllooks like:{"type":"session.model_change","data":{"newModel":"claude-opus-4.7-1m-internal"}}Note the absence of
contextTier. The model is applied fromsettings.jsonbut the persisted context tier is not.To get the long-context window back, I have to re-run
/modeland reselect the long-context tier every single session, which then emits asession.model_changeevent WITHcontextTier: "long_context"and works correctly for that session only.Additional context
contextTiercorrectly tosettings.jsonfrom/model:Rt.contextTier = lt === "long_context" ? "long_context" : void 0contextTierwhen a model change event includes it:"contextTier" in e.data && (this.contextTier = e.data.contextTier ?? void 0)modelfield to the new session does not appear to include the persistedcontextTier. Looks like the load-and-apply step at session start needs to readcontextTierfromsettings.jsonand forward it into the initialsession.model_changeevent (or equivalent).session.model_changeevents with the model but nocontextTier.