Dev.to
7/12/2026

The original title is: "I Measured Claude Code's Prompt-Cache Cost Three Ways. 85% of It Wasn't Mine to Trim."
Original: I Measured Claude Code's Prompt-Cache Cost Three Ways. 85% of It Wasn't Mine to Trim.
Short summary
The author measured Claude Code's prompt-cache costs across three launch paths and found that VSCode-based paths hit Anthropic's shared cache (10,270 cache_read tokens) while standalone terminals like iTerm2 never did (cache_read=0). After trimming all user-controlled layers (skills, CLAUDE.md, hooks), only ~15% of cache_creation was user-controllable; the remaining ~85% was Claude Code's fixed overhead. Launch path choice is a real cost lever, not a rounding error.
- •VSCode launch paths hit shared prompt cache; standalone terminals do not, paying full cache_creation every turn
- •Only ~15% of cache_creation tokens are user-controllable (skills, CLAUDE.md, hooks); ~85% is Claude Code's fixed overhead
- •A Python script reads session JSONL logs to measure per-turn cache_creation and cache_read tokens
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



