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
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗