codex exec creates gpt-5.6-sol sessions with ~258K context, while interactive Codex sessions show 1.05M
What version of Codex CLI is running?
codex-cli 0.144.4
What subscription do you have?
chatgpt plus
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Darwin 25.3.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
iterm2 tmux
Codex doctor report
What issue are you seeing?
When using gpt-5.6-sol, sessions created through the interactive Codex CLI report a context window of approximately 1.05M tokens.
However, sessions created through codex exec report only approximately 258K tokens.
The issue reproduces directly with codex exec, without any third-party wrapper, so it appears to be a difference in model metadata or session initialization between the interactive TUI and the exec command.
What steps can reproduce the bug?
Start an interactive Codex session:
codex -m gpt-5.6-sol
Check the session status:
/status
Observe that the context window is approximately:
1.05M
Exit and create a session using codex exec from the same shell, working directory, and configuration:
codex exec --json \
-m gpt-5.6-sol \
"Reply only with OK"
Inspect or resume the session created by codex exec.
Observe that its context window is approximately:
258K
What is the expected behavior?
Interactive Codex and codex exec should resolve the same model configuration and create sessions with the same context-window limit.
For gpt-5.6-sol, both entry points should report approximately:
1.05M
Additional information
This was initially noticed while using cc-connect, because it invokes codex exec.
However, the same reduced context window is reproduced by running codex exec directly:
codex exec --json \
-m gpt-5.6-sol \
"Reply only with OK"
Therefore, the behavior does not appear to be caused by cc-connect.
Both tests were performed using:
The same Codex installation
The same shell environment
The same working directory
The same user configuration
The same explicitly selected model: gpt-5.6-sol
It looks like the interactive TUI and codex exec may be resolving different model metadata, model catalogs, profiles, or effective context-window settings.
cat ~/.codex/config.toml
model = "gpt-5.6-sol"
model_reasoning_effort = "xhigh"
model_context_window = 1050000
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗