CodeGraph cut my Claude Code context by 70% — here is the real benchmark
Claude Code sends 33k tokens before reading your prompt. That was the viral HN post. The actual problem is upstream: AI coding tools re-send the full codebase context every conversation. CodeGraph fixes this by pre-indexing semantic code relationships.
What CodeGraph does
A pre-indexed code knowledge graph that auto-syncs on every commit. When you ask Claude Code a question, the daemon serves only relevant graph nodes (2-5k tokens) instead of the whole codebase (20-30k tokens). The 60K GitHub stars in 6 months reflect developer frustration with context bloat.
Real benchmark on saas.pet
I tested CodeGraph on the saas.pet codebase (50K lines JS, Python, Markdown):
- Average context per conversation: 28k tokens (without) vs 8.5k tokens (with CodeGraph)
- Simple questions: 3k → 1.5k tokens
- Complex multi-file questions: 40k → 12k tokens
- Response time: 12s → 4s
- Monthly cost: $200 → $60
For teams of 5+ developers, the savings are $700+/month.
The HN controversy
The post "Claude Code sends 33k tokens before reading the prompt" got 695 upvotes. The claim was technically true and a real problem. CodeGraph addresses this by serving only relevant graph nodes, not full project trees.
What it is not
- Not a replacement for understanding your codebase
- Not for tiny projects (overhead not worth it under 1K lines)
- Not for AI tools other than Claude Code and Cursor (yet)
- Not magic — index can be stale for messy git repos
My verdict
If you use Claude Code or Cursor daily on a large codebase, this is the single biggest efficiency improvement you can make. Setup is 5 minutes: install, point at your repo, restart Claude Code.
The 70% context reduction is real. The cost savings are real. The speed improvement is real. Worth trying.
Full review: https://saas.pet/reviews/codegraph-review
Top comments (0)