GPT-5.5 context window oscillates between 258400 and 353400 effective tokens in Codex Desktop
What version of the Codex App are you using (From "About Codex" dialog)?
Codex Desktop app version: 26.623.5546.0
Installed Windows package:
OpenAI.Codex_26.623.5546.0_x64__2p2nqsd0c76g0
Desktop runtime checked locally:
codex-cli 0.142.3
What subscription do you have?
ChatGPT Plus / Codex Desktop shows full access.
What platform is your computer?
Windows x64.
What issue are you seeing?
Codex Desktop is reporting different effective context-window sizes for the same gpt-5.5 model across different launches and threads on the same Windows installation.
The same installation has recently reported both:
258400 effective tokens = 272000 * 95%
353400 effective tokens = 372000 * 95%
Right now, fresh/new threads report the smaller value:
17k / 258k tokens
This does not appear to be caused by an active local config override. The active global and project config files do not contain:
model_context_window
model_auto_compact_token_limit
model_catalog_json
Fresh check from the Desktop runtime currently returns:
codex-cli 0.142.3
slug: gpt-5.5
display_name: GPT-5.5
context_window: 272000
max_context_window: 272000
effective_context_window_percent: 95
effective_context_window: 258400
comp_hash: 2911
checked_at: 2026-07-02 01:54:45 +03:00
The current models_cache.json also contains the smaller catalog value:
context_window: 272000
max_context_window: 272000
effective_context_window_percent: 95
comp_hash: 2911
However, recent rollout logs from the same machine contain both effective window values:
2026-06-27T20:00:41Z -> model_context_window: 353400
2026-06-28T04:54:21Z -> model_context_window: 353400
2026-06-30T18:40:03Z -> model_context_window: 353400
2026-07-01T11:07:26Z -> model_context_window: 258400
2026-07-01T12:26:00Z -> model_context_window: 353400
2026-07-01T22:45:45Z -> model_context_window: 258400
One long-running rollout contains both values:
rollout-2026-06-27T21-56-17-019f0a70-7e54-7b23-a839-100347b54895.jsonl
258400 count: 1075
353400 count: 1422
Another rollout also contains multiple values:
rollout-2026-06-25T19-25-40-019eff99-f610-7693-8766-6637de02a8ff.jsonl
258400 count: 88
260300 count: 13
353400 count: 34
So this looks like a model-catalog / rollout stability issue rather than a UI-only issue. The Desktop runtime's own debug models output and models_cache.json currently report the lower value.
What steps can reproduce the bug?
This is intermittent, so I cannot force a deterministic repro yet. The observable pattern is:
- Start Codex Desktop on Windows.
- Use model
gpt-5.5. - Start a new thread or resume an existing one.
- Hover the context-window indicator in the composer.
- Observe that the effective context limit is sometimes around
258k, while recent sessions on the same installation reported around353k. - Run
codex debug modelsagainst the Desktop runtime and inspect thegpt-5.5entry. - Compare with rollout logs: recent sessions contain both
258400and353400asmodel_context_window.
Diagnostic command used:
$desktop = 'C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\aec6b7c6fcdfb66a\codex.exe'
$json = & $desktop debug models | ConvertFrom-Json
$m = $json.models | Where-Object slug -eq 'gpt-5.5' | Select-Object -First 1
[pscustomobject]@{
codex_version = ((& $desktop --version) -join ' ')
slug = $m.slug
display_name = $m.display_name
context_window = $m.context_window
max_context_window = $m.max_context_window
effective_context_window_percent = $m.effective_context_window_percent
effective_context_window = [int]($m.context_window * $m.effective_context_window_percent / 100)
comp_hash = $m.comp_hash
checked_at = (Get-Date).ToString('yyyy-MM-dd HH:mm:ss zzz')
}
Config verification:
$paths = @(
'C:\Users\<user>\.codex\config.toml',
'C:\Users\<user>\Documents\6_Work\1_codex\.codex\config.toml'
)
foreach ($p in $paths) {
if (Test-Path -LiteralPath $p) {
$text = Get-Content -LiteralPath $p -Raw
[pscustomobject]@{
Path = $p
HasContextOverride = ($text -match '(?m)^\s*model_context_window\s*=')
HasCompactOverride = ($text -match '(?m)^\s*model_auto_compact_token_limit\s*=')
HasCatalogOverride = ($text -match '(?m)^\s*model_catalog_json\s*=')
Model = ([regex]::Match($text,'(?m)^\s*model\s*=\s*"([^"]+)"').Groups[1].Value)
}
}
}
Current result:
HasContextOverride: false
HasCompactOverride: false
HasCatalogOverride: false
Model: gpt-5.5
What is the expected behavior?
For the same installed Codex Desktop version, same account, same model slug (gpt-5.5), and no active local model override:
- the model catalog should be stable, or
- if the account is being moved between rollout cohorts / catalog variants, Codex should expose enough diagnostic information to explain the change, and
- a new thread should not unpredictably alternate between lower and higher effective context windows without a visible reason.
Additional information
Related issues I found before filing:
- #29039
- #29142
- #29426
Those look related to context-window instability / mismatch, but this report is specifically for Codex Desktop on Windows where the same gpt-5.5 slug oscillates between 258400 and 353400 effective context tokens, with the current local catalog back at:
272000 * 95% = 258400
comp_hash = 2911
There was an earlier local experiment with manual context/catalog overrides while trying to diagnose this, but those overrides have been removed. The current active config is clean:
no model_context_window
no model_auto_compact_token_limit
no model_catalog_json
Screenshots are available showing the UI reporting 258k effective tokens in multiple sessions, including a case where auto-compaction was displayed around 135k / 258k.
Could you clarify whether gpt-5.5 is expected to have multiple active context-window catalog variants in Codex Desktop?
If this is expected rollout behavior, it would help if Codex surfaced the active catalog/variant reason somewhere in diagnostics. If not expected, this looks like a stale or oscillating model catalog/cache issue for gpt-5.5.
10 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
no dublicate.
Clarification: the main issue here is not auto-compaction.
The core issue is that the same Codex Desktop installation/account receives different model catalog entries for the same
gpt-5.5slug.Current lower catalog:
Previously observed higher catalog on the same machine:
Question: why is this account/session currently assigned the
272kcatalog variant while other users and earlier sessions on the same machine get the372kvariant?The request is for clarification/fix around model catalog assignment / rollout stability for
gpt-5.5, not compaction behavior.Config clarification: no active local context/window override is set.
To remove ambiguity around local configuration, here are the relevant active config settings from this Windows install.
Global config, sanitized excerpt from
~/.codex/config.toml:Project config, full relevant content from
.codex/config.toml:I also checked the active config files for context/catalog overrides:
The only file nearby that contains old override-like text is a Markdown note in the workspace:
That file is not a Codex config file and is not loaded as
config.toml. The active config files above do not set:So the current
272000 -> 258400 effectivecatalog result is not coming from an active local context-window override.Additional diagnostic: regenerating
models_cache.jsondid not change the result.I tested whether this was caused by a stale local model cache.
I did not delete any session/history data. I only renamed the local model catalog cache:
to a backup file:
Then I ran the Desktop runtime diagnostic again:
Codex recreated
~/.codex/models_cache.jsonimmediately.Before renaming the cache:
After regenerating the cache:
So this is not a stale local
models_cache.jsonissue. After forcing the cache to be regenerated, the backend/catalog still returns the lowergpt-5.5entry:This strengthens the suspicion that the issue is server-side catalog assignment / rollout state for this account/session, not local cache corruption.
Additional context:
272000appears to be an official GPT-5.5 input-budget boundary, but that does not explain the Codex Desktop oscillation.OpenAI Help Center currently describes GPT-5.5 Thinking Pro tier as:
OpenAI API docs for GPT-5.5 also mention a long-context pricing threshold above:
So
272000does not look like a random corrupted local value.However, the unresolved Codex Desktop question is that the same
gpt-5.5slug on the same Windows Desktop installation/account has previously received this higher Codex catalog entry:and currently receives:
Could you clarify which
gpt-5.5catalog entry is expected for Codex Desktop, and why this account/session can move between the272000and372000raw context-window variants?The main ask is still not about API context limits or auto-compaction. It is about Codex Desktop model catalog assignment for the same
gpt-5.5slug.Additional isolation test: clean
CODEX_HOMEstill gets the 272k catalog entry.I tested whether the reduced GPT-5.5 context window could be caused by local Codex state/config under
~/.codex.Procedure:
The temporary home contained only these files after the command ran:
Result for
gpt-5.5:I also tested these runtime overrides separately, and they did not change the catalog result:
Both still returned:
This makes a normal local configuration issue unlikely. In this clean environment there was no
config.toml, no project config, no oldmodels_cache.json, nomodel_catalog_json, nomodel_context_window, and nomodel_auto_compact_token_limit.The only meaningful shared input left in that test was
auth.json, so the current evidence points toward an account/backend model-catalog assignment or entitlement path rather than stale local Codex configuration.I found a reproducible workaround for the reduced context-window issue on my machine.
This may be related to the auto-compaction behavior reported here, but in my case the root cause was more basic: Codex was reading a model catalog where
gpt-5.5had a reduced context window.Symptom
On the same account/client,
gpt-5.5sometimes showed only about258keffective context in the Desktop hover:Expected / working value:
The raw/effective values behind this were:
This happened in both new and old threads. It also reproduced in the VS Code Codex extension, so it did not look like only one old Desktop conversation was corrupted.
Important detail:
gpt-5.4still shows around258k, which appears normal for that model. The issue here is specifically whengpt-5.5is selected but still receives the272000 / 258kcatalog values.Things that did not fix it
models_cache.json; Codex recreated it with the same reduced272000value.CODEX_HOMEcontaining only auth data; the reduced catalog value still came back.That made it look like the client was receiving, caching, or selecting a different model-catalog entry for
gpt-5.5, rather than the thread history itself being the primary cause.Workaround that fixed it
I pinned Codex to a local model catalog file via
model_catalog_json.In
config.toml:Use a real absolute Windows path there. I did not rely on
%USERPROFILE%expansion.Then in
models_cache.local.json, thegpt-5.5entry must contain the larger context-window values:The critical part is not only
context_window.use_responses_litealso mattered. A local catalog I tested originally had:With that value,
gpt-5.5failed in Codex Desktop with:Changing it to:
fixed that error.
Verification
After restarting Codex and selecting
gpt-5.5,codex debug modelsshowed:The Desktop hover then showed:
I also tested an older existing thread. After switching that thread from
5.4to5.5and sending a new message, the same old thread started showing the larger353keffective window. So old threads were not permanently broken in my case.Practical steps for anyone hitting this
gpt-5.5, notgpt-5.4.codex debug modelsand check thegpt-5.5entry.gpt-5.5showscontext_window: 272000, the client/catalog is in the reduced state.model_catalog_jsontoconfig.tomlwith the absolute path to that file.gpt-5.5entry has:gpt-5.5.codex debug models.Expected result:
Caveats
This is a workaround, not a clean product fix.
Pinning
model_catalog_jsonmeans Codex will use the local model catalog instead of the live server-provided one. That can hide future official catalog updates until the local file is removed or updated.Once the upstream catalog consistently returns the correct
gpt-5.5values, the safer long-term fix is to remove themodel_catalog_jsonoverride and go back to the live catalog.Also, do not paste a full
config.tomlpublicly without checking it first. Mine contained unrelated MCP/server settings and private keys. Only themodelandmodel_catalog_jsonlines were relevant here.Questions for maintainers
gpt-5.5receive272000context-window metadata on one install/account/session while another setup receives372000?gpt-5.5ever be served withuse_responses_lite: trueif Desktop then rejects it withX-OpenAI-Internal-Codex-Responses-Lite?debug models, plus a supported catalog refresh/reset command?Additional detail about the
X-OpenAI-Internal-Codex-Responses-Liteerror:In my case the context-window value and the request channel were two separate parts of the failure.
The local catalog entry had to satisfy both conditions:
If
context_windowis still272000, Codex works but the UI shows only about258keffective context.If
context_windowis changed to372000butuse_responses_literemainstrue, Codex Desktop tries to routegpt-5.5through the Lite responses channel and fails with:So the working state was not just "set the larger context window". It was:
I also applied the same fix to an isolated VS Code Codex profile with its own
CODEX_HOME. Before the fix, that separate profile's generatedmodels_cache.jsonalso had:After adding
model_catalog_jsonto that profile'sconfig.tomland pointing it at a local catalog with the correctedgpt-5.5entry,codex debug modelsreported:This suggests two likely catalog-side problems:
gpt-5.5catalog entry with272000 / comp_hash 2911.use_responses_lite=trueforgpt-5.5, even though Desktop then rejects that route for this model.For anyone debugging this locally, check both values. Looking only at
context_windowis not enough.THX ### --_-