What version of Codex CLI is running?
codex-cli 0.139.0
What subscription do you have?
API Provider
Which model were you using?
gpt-5.5
What platform is your computer?
Darwin 24.6.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
iTerm2
Codex doctor report
What issue are you seeing?
I'm using Codex with an API Provider configuration. I have explicitly set the context window size to 1M tokens through environment variables, and the configuration appears to be loaded correctly at startup.
However, after I send any prompt, the context window immediately drops back to approximately 258k tokens. This happens consistently across sessions.
What steps can reproduce the bug?
Step 1

Step 2

What is the expected behavior?
No response
Additional information
No response
What version of Codex CLI is running?
codex-cli 0.139.0
What subscription do you have?
API Provider
Which model were you using?
gpt-5.5
What platform is your computer?
Darwin 24.6.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
iTerm2
Codex doctor report
What issue are you seeing?
I'm using Codex with an API Provider configuration. I have explicitly set the context window size to 1M tokens through environment variables, and the configuration appears to be loaded correctly at startup.
However, after I send any prompt, the context window immediately drops back to approximately 258k tokens. This happens consistently across sessions.
What steps can reproduce the bug?
Step 1

Step 2

What is the expected behavior?
No response
Additional information
No response