CLASSEVE
RouteLearn
Learn / Context saving

What is context saving for coding agents?

Context saving is keeping a coding agent's context window for the actual change by serving structural answers — definitions, callers, dependencies, blast radius — from a persistent code graph instead of having the agent re-read source files. Across 955 jobs on 18 public repositories, a typical job took 2,221 tokens in one call, not 13,321 in two.

Also called:context savingsave context tokensreduce token usage of a coding agentcontext window optimizationtoken savings for AI coding agents

Where an agent's context goes

A coding agent's context window is its working memory, and most of it is spent on orientation rather than on the change: opening files to find a definition, reading more files to find the callers, reading again to judge what a change would break.

Every re-read costs tokens that are then unavailable for the work, and the structure it rediscovers is thrown away when the session ends.

That cost repeats on every task and every session, because file reading transfers source when the agent only needed an answer about it. A list of callers is a few hundred tokens; the files that contain those callers are tens of thousands.

What a code graph changes

Context saving replaces the re-reading with a query. The repository is indexed once into a code graph — symbols, references, dependencies, effects — and the agent asks it questions over MCP: where is this defined, who calls it, what does it depend on, what breaks if it changes. The answers are computed, so orientation becomes a one-time index cost.

Measured across 18 public repositories of 13,954 files and 2.7 million lines in 11 languages, over 955 repetitions of the job coding agents perform daily — change a function, which needs the function, the code it uses from other files and the code that calls it.

For a typical job, the file-by-file workflow opened 1 file and read 1,413 lines, 13,321 tokens. The same job through Context Zero Engine's code graph used 2,221 tokens in one call: 83% fewer, and 10.1× fewer pooled across the run. Method, numbers and limits are on the research page.

Where the savings come from

The graph answers the questions about structure, and the agent still reads the code it is about to edit. The saving is in the orientation phase, where most of a task's tokens go, and it varies by repository: 2.6× on Express up to 16.5× on Django.

From ClassEve

Context Zero Engine is ClassEve's free code-graph server: index a repository once, and any MCP-capable coding agent asks it for symbols, callers, dependencies and blast radius instead of reading files.

Context saving · FAQ

Common questions.

How much context does a code graph save?
In ClassEve's 955-job measurement across 18 public repositories, a typical job took 2,221 tokens in one tool call through the code graph against 13,321 tokens and 2 calls reading files — 83% fewer tokens. The saving comes from answering questions instead of transferring source.
Is context saving the same as prompt compression?
No. Compression shrinks text that is already in the context. Context saving avoids loading that text at all: the agent asks an index for the fact it needed — a caller list, a dependency, a blast radius — and never reads the files that contained it.
Does it work with my coding agent?
Any agent that speaks MCP can use it; support is the norm among serious coding agents. Context Zero Engine also answers over HTTP for tools that do not.
What does ClassEve build for context saving?
Context Zero Engine, a free, local code-intelligence engine: it indexes a repository into a code graph and serves symbols, effects, contracts, similar code and blast radius over MCP and HTTP, so agents stop re-reading files one at a time.