← Back to article

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

What does this equation mean?

Tstart=Tsys+Tmem+Tenv+Ttools+∑i=1kMiT_{\mathrm{start}} = T_{\mathrm{sys}} + T_{\mathrm{mem}} + T_{\mathrm{env}} + T_{\mathrm{tools}} + \sum_{i=1}^{k} M_i

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.

Inputs and operationsT_sys + T_mem + T_env + T_tools + sum_i=1^k M_i
Result or conditionT_start
How to read the two sides of this formula. Follow the article passage for the meaning of each quantity.

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

TstartT_{\mathrm{start}}

Symbol T_start

arithmetic settled at launch, and every additional CLAUDE.

Understand this part →

TsysT_{\mathrm{sys}}

Symbol T_sys

TsT_sys is one of the signed contributions combined to compute the quantity on the left.

Understand this part →

TmemT_{\mathrm{mem}}

Symbol T_mem

TmT_mem is one of the signed contributions combined to compute the quantity on the left.

Understand this part →

TenvT_{\mathrm{env}}

Symbol T_env

TeT_env is one of the signed contributions combined to compute the quantity on the left.

Understand this part →

TtoolsT_{\mathrm{tools}}

Symbol T_tools

TtT_tools is one of the signed contributions combined to compute the quantity on the left.

Understand this part →

ii

Symbol i

i appears in the bound of this sum. The bound states where the repeated operation starts, ends, or which values it includes.

Understand this part →

kk

Symbol k

k appears in the bound of this sum. The bound states where the repeated operation starts, ends, or which values it includes.

Understand this part →

MiM_i

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.

Understand this part →

=

=

The expressions on both sides represent the same quantity under the stated assumptions.

Understand this part →

See an illustrated explanation →
addition

addition

Add the term after the plus sign to the term or group before it.

Understand this part →

subscript

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.

Understand this part →

superscript

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.

Understand this part →

See an illustrated explanation →
i=1i=1

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.

Understand this part →

kk

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.

Understand this part →

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: Tstart=Tsys+Tmem+Tenv+Ttools+∑i=1kMiT_{\mathrm{start}} = T_{\mathrm{sys}} + T_{\mathrm{mem}} + T_{\mathrm{env}} + T_{\mathrm{tools}} + \sum_{i=1}^{k} M_i. where MiM_i 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 TstartT_{\mathrm{start}} 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.

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

See this formula across 1 published context →

Browse the mathematical compendium →