← Back to article

Equation 8 · How Claude Code's Memory Actually Persists Across Sessions

What does this equation mean?

cc

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 against a per-token base price. 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

cc

Symbol c

the against a per-token base price.

Understand this part →

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 TpT_p tokens reused across n turns of a session, against a per-token base price c , the total cost of that prefix is

Read the equation in its article →

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

Browse the mathematical compendium →