Description
When using OpenAI OAuth / Codex with openai/gpt-5.5, the effective context appears to behave closer to ~400k than 1M, and the UI/compaction behavior becomes inconsistent.
This looks related to closed issue #24171, but I am still reproducing the same mismatch in current OpenCode behavior.
Concrete observations:
- With GPT-5.5 via OAuth/Codex, the UI/context behavior suggests an effective window around ~400k
- Example: about 91k tokens showed as 23% usage, which implies a denominator around ~395k, not ~1.05M
- In previous longer sessions, auto-compaction triggered around ~250k–260k total tokens (roughly "~300k" from user perspective), far earlier than expected for a 1M-class model
- By contrast, GPT-5.4 appears to show the expected 1M-ish context behavior/UI
I also checked OpenCode’s local cached model metadata and both GPT-5.4 and GPT-5.5 report the same limits:
openai/gpt-5.4 -> context: 1,050,000 / input: 922,000 / output: 128,000
openai/gpt-5.5 -> context: 1,050,000 / input: 922,000 / output: 128,000
opencode/gpt-5.4 -> context: 1,050,000 / input: 922,000 / output: 128,000
opencode/gpt-5.5 -> context: 1,050,000 / input: 922,000 / output: 128,000
So this does not look like a simple stale local cache problem.
I also checked current OpenCode source behavior locally:
- UI percentage is calculated from
totalTokens / model.limit.context
- proactive overflow / compaction uses
model.limit.input - reserved
Given the metadata above, GPT-5.5 should not compact anywhere near ~250k. That makes this look like a runtime/provider-side mismatch between the metadata OpenCode thinks GPT-5.5 has and the effective Codex OAuth backend limit actually enforced.
Related issues:
Plugins
No third-party plugins required for reproduction. This was reproduced with OpenCode using OpenAI OAuth / Codex authentication.
OpenCode version
1.14.27
Steps to reproduce
- Authenticate OpenAI using OAuth / Codex (not API key)
- Start an OpenCode session with
openai/gpt-5.5
- Let the conversation grow naturally
- Observe the context percentage shown in the UI and when auto-compaction happens
- Compare the same flow with
openai/gpt-5.4
Screenshot and/or share link
No share link. Diagnosed from local observation, session behavior, cached model metadata, and source inspection.
Operating System
Linux
Terminal
OpenCode TUI on Linux using bash
Description
When using OpenAI OAuth / Codex with
openai/gpt-5.5, the effective context appears to behave closer to ~400k than 1M, and the UI/compaction behavior becomes inconsistent.This looks related to closed issue #24171, but I am still reproducing the same mismatch in current OpenCode behavior.
Concrete observations:
I also checked OpenCode’s local cached model metadata and both GPT-5.4 and GPT-5.5 report the same limits:
So this does not look like a simple stale local cache problem.
I also checked current OpenCode source behavior locally:
totalTokens / model.limit.contextmodel.limit.input - reservedGiven the metadata above, GPT-5.5 should not compact anywhere near ~250k. That makes this look like a runtime/provider-side mismatch between the metadata OpenCode thinks GPT-5.5 has and the effective Codex OAuth backend limit actually enforced.
Related issues:
Plugins
No third-party plugins required for reproduction. This was reproduced with OpenCode using OpenAI OAuth / Codex authentication.
OpenCode version
1.14.27
Steps to reproduce
openai/gpt-5.5openai/gpt-5.4Screenshot and/or share link
No share link. Diagnosed from local observation, session behavior, cached model metadata, and source inspection.
Operating System
Linux
Terminal
OpenCode TUI on Linux using bash