How much context costs for a code agent: grep vs graph vs LSP on a large project (936 runs)
Summary
This article benchmarks different ways to provide context to a code agent on a large project, comparing grep-based file access, graph-based retrieval, and LSP-based tooling. It tests the methods on Apache Superset with 936 runs and evaluates accuracy, cost, and round-trip efficiency across Claude Code model variants. The results show that graph-based approaches can improve performance and context quality on harder tasks, while grep remains competitive on simpler searches and some model/tool combinations. The write-up also highlights MCP setup, tool-call overhead, and practical tradeoffs for agent workflows in real codebases. The main takeaway is that context strategy should match task difficulty, model choice, and latency or cost constraints.