Skip to content

OAuth/Codex GPT-5.5 behaves like ~400k context while GPT-5.4 shows 1M #24561

Description

@SoyJohnXD

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

  1. Authenticate OpenAI using OAuth / Codex (not API key)
  2. Start an OpenCode session with openai/gpt-5.5
  3. Let the conversation grow naturally
  4. Observe the context percentage shown in the UI and when auto-compaction happens
  5. 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

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions