CLASSEVE
RouteResearch
Research note · measured Jan 1, 2026 · published Aug 9, 2026

Code-graph context vs. file-by-file reading for coding agents: a five-task measurement

Across five repository-analysis tasks on one codebase (91 files, 4,374 symbols), a conventional file-by-file agent workflow opened 43 files, read 28,963 lines, and consumed 115,852 tokens over 65 tool calls. The same investigation answered through Context Zero Engine's code graph opened zero files directly and used 22,056 tokens over 6 MCP calls — roughly an 81% token reduction on this workload.

Setup

One TypeScript codebase — 91 files, 4,374 indexed symbols — and five repository-analysis tasks of the kind coding agents perform daily: locating definitions, tracing callers, assessing the impact of a change, finding related code, and summarizing a subsystem.

Two conditions. In the file-reading condition, the agent investigated by opening files and searching text, the default workflow of current coding agents. In the code-graph condition, the same questions were put to Context Zero Engine over MCP, which serves computed answers — symbols, callers, dependencies, blast radius — from a local PostgreSQL code graph.

Results

MetricFile-by-file workflowCode-graph workflow
Files opened430 (served from the graph)
Lines read28,963
Tool calls656
Tokens consumed115,85222,056

The reduction comes from answering questions instead of transferring source: a caller list is a few hundred tokens, while the files containing those callers are tens of thousands.

Why this matters

An agent's context window is its working memory. Tokens spent re-reading source to rediscover structure are tokens unavailable for the actual change. Persisting that structure in a queryable graph converts orientation from a per-session cost into a one-time index.

Limitations.

  • One selected workload on one codebase — savings will differ by repository, task mix, and agent.
  • ClassEve-run measurement, not an independent benchmark.
  • The complete task set, environment, and raw run logs are not yet published; reproduce the workflow before generalizing the numbers.