You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Computer Use changes context window from 258K to 760K, but auto-compaction still triggers around 230K #52440
appIssues related to the Codex desktop appbugSomething isn't workingcomputer-usecontextIssues related to context management (including compaction)windows-osIssues related to Codex on Windows systems
What version of the Codex App are you using (From “About Codex” dialog)?
26.1002.52244
What subscription do you have?
plus
What platform is your computer?
Windows
What issue are you seeing?
I encountered a reproducible context window inconsistency when using Computer Use in a GPT-6.1 Sol conversation.
The context window initially shows 258K tokens. After invoking Computer Use to operate Chrome, the displayed context window unexpectedly changes to 760K tokens within the same conversation, without changing the model or modifying any configuration.
The larger displayed window persists after the Computer Use task completes, even during subsequent ordinary text interactions.
Additionally, in longer sessions displaying a 760K context window, I have observed automatic context compaction occurring around 230K tokens, despite the UI indicating substantial remaining capacity.
This suggests a possible mismatch between the displayed context window and the effective runtime or auto-compaction threshold.
What steps can reproduce the bug?
Start a conversation using GPT-6.1 Sol (High).
Send a simple message, such as "Hi".
Observe that the context window shows approximately 31K / 258K tokens.
Ask the assistant to use Computer Use with Chrome, for example, "Search for ChatGPT using Chrome."
After the browser task completes, observe that the context window changes to approximately 44K / 760K tokens.
Send another simple text message.
Observe that the displayed context window remains 760K.
What is the expected behavior?
The displayed context window should accurately reflect the effective runtime context capacity.
If Computer Use intentionally enables a larger context window, the auto-compaction threshold should be consistent with that capacity.
Otherwise, the UI should retain the correct effective window size.
The numbers you're seeing line up exactly with how the 0.166.0 source computes these limits, which may help narrow this down:
The UI figure is the usable window, 95% of the context window (effective_context_window_percent defaults to 95). 258K is 95% of 272,000 (258,400), and 760K is 95% of 800,000.
Auto compaction triggers at 90% of the context window (ModelInfo::auto_compact_token_limit in codex-rs/protocol/src/openai_models.rs). On 272,000 that's 244,800; on 800,000 it would be 720,000.
So compaction "around 230K" after the display switched to 760K fits the compaction check still using the 272K window, while the indicator uses the 800K one. That suggests the Computer Use path changes the window the UI reads but not the one context_window_token_status (core/src/session/context_window.rs) resolves for the turn. I haven't reproduced it, so treat that as a pointer, not a diagnosis.
appIssues related to the Codex desktop appbugSomething isn't workingcomputer-usecontextIssues related to context management (including compaction)windows-osIssues related to Codex on Windows systems
Activity
its-tahir commentedon Nov 6, 2026
The numbers you're seeing line up exactly with how the 0.166.0 source computes these limits, which may help narrow this down:
effective_context_window_percentdefaults to 95). 258K is 95% of 272,000 (258,400), and 760K is 95% of 800,000.ModelInfo::auto_compact_token_limitin codex-rs/protocol/src/openai_models.rs). On 272,000 that's 244,800; on 800,000 it would be 720,000.So compaction "around 230K" after the display switched to 760K fits the compaction check still using the 272K window, while the indicator uses the 800K one. That suggests the Computer Use path changes the window the UI reads but not the one
context_window_token_status(core/src/session/context_window.rs) resolves for the turn. I haven't reproduced it, so treat that as a pointer, not a diagnosis.If you want to check your own values,
~/.codex/models_cache.jsonhascontext_windowandmax_context_windowper model. I wrote up the formulas here: https://www.its-tahir.com/blog/codex-auto-compact