Equation 1 · 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.
This equation states an equality: the expressions on both sides have the same value under the article’s assumptions. 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
Symbol T_sys
ys is one of the signed contributions combined to compute the quantity on the left.
Symbol T_mem
em is one of the signed contributions combined to compute the quantity on the left.
Symbol T_env
nv is one of the signed contributions combined to compute the quantity on the left.
Symbol T_tools
ools is one of the signed contributions combined to compute the quantity on the left.
Symbol i
i appears in the bound of this sum. The bound states where the repeated operation starts, ends, or which values it includes.
Symbol k
k appears in the bound of this sum. The bound states where the repeated operation starts, ends, or which values it includes.
Symbol M_i
the token count of the i -th memory file discovered along the walk from the filesystem root to the working directory, summed over however many, k , are found.
=
The expressions on both sides represent the same quantity under the stated assumptions.
See an illustrated explanation →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.
superscript
A raised number can be a power. When it is a label or bound, it selects a case or the upper limit of a sum; the formula’s structure distinguishes these uses.
See an illustrated explanation →Starting index or lower bound: i=1
This label says where the repeated addition, multiplication, or accumulation starts. Read its value or condition together with the article’s description of the index.
Ending index or upper bound: k
This label says where the repeated addition, multiplication, or accumulation stops. It sets the last term or end of the range.
How to interpret it
Read it with the definitions, units, and assumptions supplied by the article.
What the article says around this equation
Anthropic ships an interactive walkthrough of a representative session specifically to make this loading concrete, breaking startup context down by component with illustrative token counts: a system prompt around 4,200 tokens, an auto-memory index around 680 tokens, environment information around 280 tokens, MCP tool names around 120 tokens with full schemas deferred until needed, then a global CLAUDE.md around 320 tokens and a project CLAUDE.md around 1,800 tokens in that particular worked example [ 4 ] . The documentation is careful to call these “representative numbers” rather than fixed constants — actual figures move with every project’s own files — but the shape they describe is stable…
Read the full surrounding passage
Anthropic ships an interactive walkthrough of a representative session specifically to make this loading concrete, breaking startup context down by component with illustrative token counts: a system prompt around 4,200 tokens, an auto-memory index around 680 tokens, environment information around 280 tokens, MCP tool names around 120 tokens with full schemas deferred until needed, then a global CLAUDE.md around 320 tokens and a project CLAUDE.md around 1,800 tokens in that particular worked example [ 4 ] . The documentation is careful to call these “representative numbers” rather than fixed constants — actual figures move with every project’s own files — but the shape they describe is stable and worth writing down as an identity: . where is the token count of the i -th memory file discovered along the walk from the filesystem root to the working directory, summed over however many, k , are found. Every term is committed before the developer types a word. The point is not the specific numbers; it is that is arithmetic settled at launch, and every additional CLAUDE.md file anyone commits to a repository is a term someone chose to add to it, permanently, for the rest of that session.
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