GPT-5.5 model context length is unstable

Resolved 💬 3 comments Opened May 8, 2026 by 642671 Closed May 8, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

latest

What subscription do you have?

gpt-plus

What platform is your computer?

win11

What issue are you seeing?

上下文长度为1M时候显示为950K,但是切换聊天后就变成了258k,Codex 重启后会把 models_cache.json 自动刷新回 272000,会导致上下文直接异常,从大于258被迫变为了258以下的,上下文被打断非常影响使用!

What steps can reproduce the bug?

不写步骤了,很明显的问题,Codex 当前版本不是单纯读取 models_cache.json,还可能有客户端内部限制、服务端下发限制,或者前端显示的是有效压缩窗口而不是最大模型窗口。

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #20761
  • #20132
  • #20107

Powered by Codex Action

etraut-openai contributor · 3 months ago

GPT-5.5 model context length is unstable

What version of the Codex App are you using (from the “About Codex” dialog)?

latest

What subscription do you have?

gpt-plus

What platform is your computer?

win11

What issue are you seeing?

When the context length is 1M, it is displayed as 950K. However, after switching chats, it changes to 258K. After restarting Codex, models_cache.json is automatically refreshed back to 272000. This causes the context to become abnormal directly, forcing it from greater than 258K down to below 258K. The interruption to the context has a serious impact on usage!

What steps can reproduce the bug?

I’m not going to write steps. This is a very obvious issue. The current version of Codex is not simply reading models_cache.json; there may also be an internal client-side limit, a server-issued limit, or the frontend may be displaying the effective compressed window rather than the model’s maximum window.

What is the expected behavior?

No response

Additional information

No response

etraut-openai contributor · 3 months ago

We do not currently support 1M token context window in GPT 5.5. We support the standard 400K context window, of which 128K is reserved for output tokens. That leaves 272K for input, or 258K once a 5% compaction buffer is applied.

It sounds like you're attempting to override the defaults for the model, but this won't work. Support for 1M-token context must be enabled on the server side. If you'd like to see this feature, please upvote #19464.