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_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗