Codex Desktop local threads ignore ~/.codex/config.toml and stay at model_context_window=258400
Summary
Codex Desktop local GUI threads appear to ignore ~/.codex/config.toml for context window settings.
On the same macOS machine:
~/.codex/config.tomlhasprofile = "auto_precision"- that profile sets
model_context_window = 1050000 - terminal
codex execcan successfully process single-turn prompts with394kto402kinput tokens - but Codex Desktop GUI threads still report
model_context_window = 258400
This looks specific to the Desktop GUI thread-start path, not to the model itself and not to the embedded codex binary.
Environment
- macOS
- Codex Desktop app version:
26.305.950 - Desktop build:
863 - Embedded CLI in Desktop:
codex-cli 0.108.0-alpha.12 - Standalone CLI on same machine:
codex-cli 0.111.0 - model used in repro:
gpt-5.4
Repro
- Set the default profile in
~/.codex/config.tomlto:
profile = "auto_precision"model_context_window = 1050000
- Open Codex Desktop and start a local GUI thread using
gpt-5.4. - Hover the context indicator in the UI.
- Observe that the UI still shows
... / 258k tokens used. - Inspect the rollout JSONL for that Desktop session.
- Observe that
task_startedand subsequent token usage events still reportmodel_context_window = 258400. - On the same machine, run either:
- standalone
codex exec - or
/Applications/Codex.app/Contents/Resources/codex exec
- Feed a large single-turn prompt.
- Observe that CLI runs succeed with
394kto402kinput tokens.
Expected
Desktop GUI local threads should honor the effective config/profile from ~/.codex/config.toml, or at minimum the UI should reflect the actual effective context window.
Actual
Desktop GUI local threads stay at model_context_window = 258400, while terminal CLI paths on the same machine successfully handle much larger single-turn inputs.
Evidence
- Desktop rollout JSONL shows
model_context_window = 258400intask_startedand token usage updates. - standalone CLI run completed with
input_tokens = 394027 - Desktop-bundled CLI run completed with
input_tokens = 402401 Check for Updates…in Desktop reports that26.305.950is already the newest available version, so this is reproducible on the latest publicly available Desktop build on this machine.
Possible cause
After inspecting the installed Desktop bundle locally, it appears the GUI thread creation flow fetches config through mcp-codex-config, but the Electron-side handler currently returns config: null. If that is the code path actually used for local GUI threads, it would explain why the GUI path does not inherit the config/profile that the CLI path does.
I realize the last part is based on local bundle inspection rather than an official API contract, so the main bug report here is the externally observable mismatch:
- same machine
- same config
- same model family
- CLI honors large context
- Desktop GUI remains at
258400
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional technical detail from local Desktop bundle inspection on the same machine:
/Applications/Codex.app/Contents/Resources/codex exec) on the same machine, a single-turn run completed withinput_tokens = 402401.258400is an actual hard cap for the embedded binary.26.305.950, build863), the Electron main-process handler formcp-codex-configappears to returnconfig: null.buildNewConversationParams(...)fetches that value and then passesconfigthrough tothread/start/thread/resume.mcp-codex-configisnull, local GUI threads would not inherit config values such asmodel_context_windowfrom~/.codex/config.toml.258400locally.latestTokenUsageInfo.modelContextWindow.thread/tokenUsage/updatedevent payload.task_startedand token-usage events consistently reportmodel_context_window = 258400.So the externally visible behavior still looks like this:
258400The local bundle inspection suggests the mismatch may be caused by the GUI thread-start path not receiving the resolved Codex config/profile at all.
Quick clarification on the duplicate suggestions:
I agree this issue is likely related to some existing Desktop config-loading / config-honoring bugs, especially:
.codex/config.tomlMCP config)network_access = truefromconfig.toml)But this issue appears narrower/different in scope:
~/.codex/config.tomlmodel_context_window/ large-context behaviormodel_context_window = 258400So my current understanding is:
Adding another concrete data point from a ChatGPT Pro user on macOS.
Environment:
019d89b3-b6cf-7fd3-8b9f-292f471fc457originator=Codex Desktop,cli_version=0.119.0-alpha.28,model_provider=openaimodel = "gpt-5.4",model_reasoning_effort = "xhigh"Observed behavior:
model_context_window = 258400last input_tokens = 236952withcached_input_tokens = 234752Important clarification:
So the core question here is:
Is
258400in Codex Desktop local threads an intentional product/runtime cap, or is it still a bug/config-path mismatch?If intentional, it would help to document that Codex Desktop local threads do not expose the full raw model context window even when the underlying model supports more.