Equation 17 · Claude Code, From First Principles: The Agentic Loop, Permissions, and What Actually Executes
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 a bound: one expression must stay on the indicated side of the other 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 c_t
is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.
Symbol τ
τ is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.
Symbol C_max
ax is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.
Symbol hatc_t
hat is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.
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 growth is monotonic and the response is a threshold rule, which is worth writing down because it is the one piece of real mechanism in this section rather than product description. Treat || as the token size of the context at step t and as the model’s context limit. Compaction is triggered once accumulated context crosses a configurable fraction of that limit: . Concretely, Claude Code “clears older tool outputs first, then summarizes the conversation if needed,” preserving “requests and key code snippets” while allowing “detailed instructions from early in the conversation” to be lost [ 2 ] . This is a lossy operation by design, and what…
Read the full surrounding passage
The growth is monotonic and the response is a threshold rule, which is worth writing down because it is the one piece of real mechanism in this section rather than product description. Treat || as the token size of the context at step t and as the model’s context limit. Compaction is triggered once accumulated context crosses a configurable fraction of that limit: . Concretely, Claude Code “clears older tool outputs first, then summarizes the conversation if needed,” preserving “requests and key code snippets” while allowing “detailed instructions from early in the conversation” to be lost [ 2 ] . This is a lossy operation by design, and what survives it is uneven rather than uniform: a project-root CLAUDE.md is re-read from disk and re-injected after compaction, while nested CLAUDE.md files and path-scoped rules are not re-injected automatically and only reload the next time a matching file is touched [ 6 ] . The practical upshot — stated by Anthropic as a workaround, which is itself evidence of the failure mode it is a workaround for — is that persistent instructions belong in the project-root file rather than in conversation, “since detailed instructions from early in the conversation may be lost” otherwise [ 2 ] . A context window, in other words, is not a growing record of everything that happened; it is a budget under active, lossy management, and the compaction boundary is one of the more consequential pieces of unglamorous engineering in the whole system.
Sources cited in the surrounding passage
These citations give research context. Read each source to check which claims it supports.