Summary
The native Codex route uses an openai/gpt-* model ref plus agents.defaults.agentRuntime.id: "codex", but the Codex OAuth/runtime context metadata and user overrides are exposed under the openai-codex provider.
That creates a confusing split for context configuration. A user can configure:
{
models: {
providers: {
"openai-codex": {
models: [
{
id: "gpt-5.5",
contextWindow: 1050000,
contextTokens: 1000000,
},
],
},
},
},
agents: {
defaults: {
model: { primary: "openai/gpt-5.5" },
agentRuntime: { id: "codex" },
},
},
}
but the native harness context calculation still resolves against provider openai, so it can keep the runtime model's default contextTokens value such as 272000. In practice, /status may show a larger configured/catalog window while agentMeta.contextTokens reports the smaller default runtime cap.
Expected behavior
For openai/gpt-* running through the codex harness, context-window resolution should use openai-codex as the context config provider. That lets models.providers.openai-codex.models[].contextTokens override the Codex runtime cap consistently for the actual run and for /status.
Impact
Users following the recommended native Codex route can otherwise see contradictory context numbers and have no obvious way to make their configured Codex OAuth context cap affect the actual run.
Summary
The native Codex route uses an
openai/gpt-*model ref plusagents.defaults.agentRuntime.id: "codex", but the Codex OAuth/runtime context metadata and user overrides are exposed under theopenai-codexprovider.That creates a confusing split for context configuration. A user can configure:
but the native harness context calculation still resolves against provider
openai, so it can keep the runtime model's defaultcontextTokensvalue such as272000. In practice,/statusmay show a larger configured/catalog window whileagentMeta.contextTokensreports the smaller default runtime cap.Expected behavior
For
openai/gpt-*running through thecodexharness, context-window resolution should useopenai-codexas the context config provider. That letsmodels.providers.openai-codex.models[].contextTokensoverride the Codex runtime cap consistently for the actual run and for/status.Impact
Users following the recommended native Codex route can otherwise see contradictory context numbers and have no obvious way to make their configured Codex OAuth context cap affect the actual run.