Equation 6 · How Claude Code's Memory Actually Persists Across Sessions
What does this equation mean?
Read the formula alongside the article passage below. Each part has a deeper page with its role in the equation, the supporting passage and nearby citations.
the number of tokens. Read the equation part by part below; each part has a contextual explanation and a link to its mathematical background.
Read it piece by piece
subscript
The lower label selects a particular version, component, or indexed member of the quantity. For example, x₀ and xₜ can be values at different positions.
How to interpret it
Read this expression with the definitions, units, and assumptions supplied by the article.
What the article says around this equation
The dollar cost of re-reading the same CLAUDE.md content every turn is close to solved. Anthropic’s prompt caching system lets a stable prefix — system prompt, memory files, tool definitions, anything identical from one request to the next — be written to a cache once and then reused. A cache write costs a documented 1.25 times the base price of an input token; a cache read, on every subsequent turn that reuses it, costs a documented one-tenth of that base price [ 5 ] . For a stable prefix of tokens reused across n turns of a session, against a per-token base price c , the total cost of that prefix is
Sources cited in the surrounding passage
These citations give research context. Read each source to check which claims it supports.
Return to How Claude Code's Memory Actually Persists Across Sessions