Why is input_cache_read so large?
What version of Codex CLI is running?
codex-cli 0.104.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.2-codex
What platform is your computer?
Microsoft Windows NT 10.0.22000.0 x64
What terminal emulator and version are you using (if applicable)?
vscode
What issue are you seeing?
*I had Codex commit code once (add, commit, push), and it cost approximately 500,000 tokens!!!
*When I examined the cost more closely with tools, I found a large number of input_cache_read statements. A typical conversation had a cost structure like {prompt: 184, input_cache_read: 102272, output completion: 172}.
*Upon further investigation, I discovered that each conversation included extensive Agent and Skill descriptions, such as {## Skills A skill is a set of local instructions to follow that is stored in a SKILL.md file. Below is the list of skills that can be used. Each entry includes a name, description, and file path so you can open the source for...}, as well as some system-level settings like {You are a deeply pragmatic, effective software engineer...}.
*I know this is normal, but the problem is that the injection of this contextual information in every interaction is causing the token cost to explode. Is there any way to solve this?
What steps can reproduce the bug?
Each conversation
What is the expected behavior?
Only during the first conversation is this relevant agent, skill, and other information injected.
Additional information
_No response_
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Please use
/feedbackto upload your logs and session details, then post the thread ID here.Upload logs?
The following files will be sent:
• codex-logs.log
• rollout-2026-03-03T09-12-05-019cb140-9516-7a33-a478-ad4acdf12ec9.jsonl
Tell us more (other)
▌
▌ https://github.com/openai/codex/issues/13239
mention your thread ID 019cb140-9516-7a33-a478-ad4acdf12ec9 in an existing issue.
I received your logs but not your rollout file. That sometimes happens if there are network issues — especially if the file is exceptionally large. I'll need the session details (or the rollout file from another session that exhibits the problem you're seeing) to investigate further.
You said "each conversation included extensive Agent and Skill descriptions". Those descriptions are injected into every thread at the start. They are not injected on every turn (interaction). If your entire thread consumed 500,000 tokens, then those descriptions were completely negligible.
You mentioned that you were seeing
input_cache_read. I don't think it's coming from Codex. You said that you examined the rollout with "tools". Can you expand on what tools you were using? I'm guessing that you're using some tools that are providing information that is misleading or at best confusing.