You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support model_context_window/model_auto_compact_token_limit in profiles #14456
Profile-scoped model_context_window and model_auto_compact_token_limit are ignored when running Codex with a selected profile.
Top-level config values work, but the same fields under [profiles.<name>] do not appear to apply.
This has become more noticeable with the launch of GPT-5.4 and the optional 1M context window, which I want to enable only in a specific profile because it is more expensive.
Possibly related: #14133 (context window from config ignored in some Desktop flows), but this report is about CLI profile overrides.
What steps can reproduce the bug?
~/.codex/config.toml:
profile = "codex"
[profiles.codex]
model = "gpt-5.3-codex"model_reasoning_effort = "xhigh"
[profiles.deep]
model = "gpt-5.4"model_reasoning_effort = "xhigh"model_context_window = 1000000model_auto_compact_token_limit = 900000
Run codex (default profile codex) and observe expected model/reasoning behavior.
Run codex -p deep.
Observe that model/reasoning change to the deep profile, but context-window-related settings do not.
What is the expected behavior?
codex -p deep should apply all profile fields, including:
changed the title [-]Profile / are ignored with [/-][+]Profile `model_context_window`/`model_auto_compact_token_limit` are ignored with `codex -p`[/+]on Mar 12, 2026
These keys are not currently supported by profiles. It's not clear whether we're going to continue to support profiles. We are considering deprecating them, so investments in this space are very low priority.
changed the title [-]Profile `model_context_window`/`model_auto_compact_token_limit` are ignored with `codex -p`[/-][+]Support `model_context_window`/`model_auto_compact_token_limit` in profiles[/+]on Mar 12, 2026
Yeah, we don't have a good alternative in place yet, which is why we haven't formally deprecated profiles. Profiles are used by a very small fraction of Codex users, so it's pretty low on our priority list at the moment.
Activity
[-]Profile / are ignored with [/-][+]Profile `model_context_window`/`model_auto_compact_token_limit` are ignored with `codex -p`[/+]borisroman commentedon Mar 12, 2026
Also noticed it didn't set the labels on this issue because
context-managementisn't a label.https://github.com/openai/codex/actions/runs/22996833080/job/66771137779
etraut-openai commentedon Mar 12, 2026
These keys are not currently supported by profiles. It's not clear whether we're going to continue to support profiles. We are considering deprecating them, so investments in this space are very low priority.
[-]Profile `model_context_window`/`model_auto_compact_token_limit` are ignored with `codex -p`[/-][+]Support `model_context_window`/`model_auto_compact_token_limit` in profiles[/+]borisroman commentedon Mar 12, 2026
Hi @etraut-openai,
Thanks for your response. What would be an alternative method to switching models (and model configs) in the Codex Cli?
Best,
Boris
borisroman commentedon Mar 12, 2026
ChatGPT directs me to the profiles solution 😄
https://chatgpt.com/share/69b2eb87-87d0-8008-9d12-a5af663fc5d2
etraut-openai commentedon Mar 12, 2026
Yeah, we don't have a good alternative in place yet, which is why we haven't formally deprecated profiles. Profiles are used by a very small fraction of Codex users, so it's pretty low on our priority list at the moment.
Team-shared session config for Claude Code and Codex; collaboration s…