Our tools are free. Help keep the research running.Buy us a coffee→
Minni AI
DemoEvidenceInterface
Products
Products
  • MinniMemoryMCPMemory for your AI agentSplits your agent’s memory into a small always-on part and files that load only when a task needs them.Flagship · early access
  • MinniCodeCoding agent on free modelsReads, edits, tests and opens pull requests in your project, on free AI models.Beta
  • MinniTunerWindows 11 PC tunerSee what your PC is doing, change only what you tick, and undo it.Beta · Windows 11
LearnGuidesCut Claude Code token usageMinniMemoryMCP docsInstall it, the commands, undoMinniCode docsInstall it, pick a model, the commandsEvidenceWhat we measured and how
See it workDemoThe full tour in one videoHow it worksPick a product, watch it run
FAQ

Guides

Why Claude Code sessions get expensive

Every Claude Code turn sends the whole session again: the system prompt, your memory files, the conversation and the tool results still in context. Prompt caching makes that repeated part cheaper per token, but never free, and it grows with every turn and every line added to memory. A session gets expensive when the repeated part gets big, not when you type a lot.

Updated 2026-10-21

Every turn sends everything again#

A model keeps nothing between requests. To carry a conversation forward, Claude Code sends the full history every time, and each tool call sends another request with its results attached. So a one-line question late in a long session still pays for the whole session behind it. Anthropic’s cost docs say the same.

Prompt caching softens this. The unchanged start of each request is stored and read back at a small fraction of the normal input price. A cache entry does expire, though: the first message after a long break misses the cache and pays to process the whole context again.

The four kinds of token#

  • Fresh input: text the model has not seen in this session, at the full input price.
  • Cache write: storing the start of a request for reuse. It costs more than fresh input, once.
  • Cache read: reusing what was stored. A small fraction of the input price, paid again on every turn.
  • Output: what the model writes, thinking included. The most expensive kind per token.

In a long session, cache reads are most of the tokens. Cache writes are fewer but cost more each. Both scale with how much is loaded at the start and kept in context.

Three things that make a session grow#

Context#

Every file read, command output and search result stays in the conversation until you clear or compact it, and it is sent again on every later turn.

Memory#

Your CLAUDE.md files, everything they import, and the start of Claude’s own MEMORY.md load at the start of every session. Each “remember this” adds lines that every future turn of every future session pays for. Memory files rarely shrink on their own.

Work you do not see#

Subagents, scheduled tasks and compaction each send requests of their own. A subagent starts with its own copy of your memory files.

A measured session, line by line#

We ran the same 27 coding tasks in Claude Code 2.1.292 on Claude Sonnet 5.5, three full sessions a side: once with a full-size test memory as it was, and once after MinniMemoryMCP sorted it.

BeforeAfterChange
Fresh input216240+11.1%
Cache write626,130391,988-37.4%
Cache read2,931,4822,609,556-11.0%
Output16,18117,752+9.7%
All tokens3,574,0093,019,536-15.5%
Cost, three sessions$2.31$1.68-27.4%

What moved. Cache writes fell by more than a third, because less memory was loaded and stored at the start of each session. Cache reads fell too, because that smaller start was read back on every turn. Output rose a little. The cost fell further than the token count because a large share of the drop was cache writes, which cost far more per token than cache reads.

What it is. One measured setup: a full-size test memory and these 27 tasks. A blind grader marked 74 of 81 answers correct before and 72 of 81 after. A memory with less in it has less to move. The method is in the Evidence section.

What to watch#

  • /usage: cache read and cache write tokens for the session, and an estimated cost.
  • /context: what fills the context window right now.
  • The length of your CLAUDE.md files, what they import, and Claude’s MEMORY.md.
  • How many turns since your last /clear.

The fixes are in How to reduce Claude Code token usage. How to keep memory small is in Claude Code memory: CLAUDE.md vs MinniMemoryMCP.

Try MinniMemoryMCP

Free, runs on your computer, and every change can be undone. One command installs it for Claude Code; the docs cover the rest.

install it for Claude Code
$ npx -y minnimemory install

More guides

  • How to reduce Claude Code token usageWhere the tokens go each turn, and eight ways to spend fewer.
  • Claude Code memory: CLAUDE.md vs MinniMemoryMCPWhat belongs in CLAUDE.md, and splitting the rest out by hand or with a tool.
GuidesMinniMemoryMCPHome
© 2026 Minni AI. All rights reserved.