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
First message in fresh session consumes ~100k input tokens immediatly, no matter how trivial the input #18526
You must have a very large AGENTS.md or a large number of MCPs. You should look at the rollout file (you can ask codex to find it for you under ~/.codex/sessions).
When I try to repro the problem (with relatively few MCPs and a minimal AGENTS.md file), I see a value of about 22K tokens usage for the first prompt.
I reproduced this issue in a freshly initialized empty repo with no AGENTS.md and with my MCPs removed from Codex.
I went ahead and downgraded Codex to 0.115 and the problem is gone. Looking at the rollout file I see nothing corresponding to 100k tokens.
The issue showed up immediately after upgrade to 0.121 with no other changes in my setup.
Could it be the "memories" feature? I noticed that after enabling "memories", codex tries to summarize past sessions into memories, which consumed a lot of tokens. The raw_memories.md is also 3.4k+ lines, which seems to be too long to be injected in context. I have to disable the memories feature entirely.
@afolkest, are you still seeing this with the latest version of the CLI? We did discover a regression that made it in to 0.121 that could have explained what you were seeing. We fixed it shortly after, and the fix was in 0.122.0 and all subsequent versions.
Activity
github-actions commentedon Apr 19, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Apr 19, 2026
You must have a very large AGENTS.md or a large number of MCPs. You should look at the rollout file (you can ask codex to find it for you under ~/.codex/sessions).
When I try to repro the problem (with relatively few MCPs and a minimal AGENTS.md file), I see a value of about 22K tokens usage for the first prompt.
afolkest commentedon Apr 19, 2026
I reproduced this issue in a freshly initialized empty repo with no AGENTS.md and with my MCPs removed from Codex.
I went ahead and downgraded Codex to 0.115 and the problem is gone. Looking at the rollout file I see nothing corresponding to 100k tokens.
The issue showed up immediately after upgrade to 0.121 with no other changes in my setup.
quark-zju commentedon Apr 19, 2026
Could it be the "memories" feature? I noticed that after enabling "memories", codex tries to summarize past sessions into memories, which consumed a lot of tokens. The
raw_memories.mdis also 3.4k+ lines, which seems to be too long to be injected in context. I have to disable the memories feature entirely.etraut-openai commentedon Apr 24, 2026
@afolkest, are you still seeing this with the latest version of the CLI? We did discover a regression that made it in to 0.121 that could have explained what you were seeing. We fixed it shortly after, and the fix was in 0.122.0 and all subsequent versions.
afolkest commentedon Apr 24, 2026
@etraut-openai It appears to be fixed now! Many thanks for getting back to me.