wrong display result of context window after adjusting gpt5.4 to 1M context window size
What version of Codex CLI is running?
v0.111.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.4
What platform is your computer?
Linux 6.17.0-14-generic x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
ssh
What issue are you seeing?
I viewed the release article https://openai.com/index/introducing-gpt-5-4/.
So I changed the context window by editing the config.toml:
model_context_window = 1000000
model_auto_compact_token_limit = 900000
I tested some sessions already. None of them estimated the correct context window.
Some of them showed like this after a medium run:
<img width="906" height="51" alt="Image" src="https://github.com/user-attachments/assets/dd4491f7-427e-49a7-9366-5b227fa62fa6" />
It output the used token upon exit. But I think the result is wrong.Token usage: total=12,840 input=11,897 (+ 3,456 cached) output=943 (reasoning 516)
Some of them showed like this after a short run
<img width="807" height="38" alt="Image" src="https://github.com/user-attachments/assets/5a1db73d-c91b-4065-b988-192d5673a733" />
And no used token info after exiting the cli.
What steps can reproduce the bug?
Change the config.toml, then start a session and run any command.
What is the expected behavior?
I'm setting the correct window size for gpt5.4. I think all things should work as usual.
Additional information
_No response_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I used it to apply a small fix.
Seems that fixing the window size before the first
TokenCountworks as expected.This is its summary:
It seems worked, though I don't think the summary is correct.
Thanks for the bug report. This will be fixed in the next release.