Reduce AI Coding Session Costs by 90% with Graph-Based Code Indexing

A Reddit user reports spending $2-6 per query on Claude Code due to the model re-reading dozens of files every session. Even with caching (70% of tokens from cache at 90% discount), cache resets per session. The fix: a local server that indexes the codebase into a graph database, queried via the Model Context Protocol (MCP) instead of raw file reads.
How It Works
- Instead of AST parsing or vector embeddings, the tool uses an LLM to generate a purpose, summary, and business context for each file, plus links to its functions, classes, and imports.
- The graph is exposed through an MCP server; Claude queries the graph for targeted lookups (2-4 nodes per question) instead of dumping the entire repo into context.
- Session costs dropped from dollars to cents. The approach works equally well with open-source models like DeepSeek-V4 and Kimi-2.6 because retrieval (not model size) does the heavy lifting.
Setup Details
Everything runs locally, single-tenant, no cloud dependency. The project is open-sourced on GitHub: github.com/ByteBell/bytebell-oss. The user notes they aren't using AST parsing or vectors — the graph is LLM-generated file analyses.
Who This Is For
Developers using Claude Code (or any token-cost AI agent) on large codebases who want to slash costs by caching structural context across sessions.
📖 Read the full source: r/ClaudeAI
👀 See Also

XLI: Open-Source Python Library for Claude Code-Style Terminal UIs
Building a coding agent? Terminal UX is half the work. XLI is an open-source Python rendering engine that replicates Claude Code's streaming markdown, tool cards, inline approvals, and slash commands without hijacking your terminal scrollback.

Visual Studio 2022 Extension Adds Native Ollama Integration for Local LLMs
A free extension for Visual Studio 2022 connects directly to local Ollama endpoints, enabling private AI coding assistance without switching between tools. It supports models like DeepSeek and Llama 3 with cloud fallback options.

EsoLang-Bench: A Coding Benchmark Using Esoteric Languages to Test LLM Reasoning
Researchers created EsoLang-Bench, a coding benchmark using esoteric programming languages like Brainfuck and Whitespace to test whether LLMs can reason or just pattern-match. The best result across GPT-5.2, O4-mini, Gemini, Qwen, and Kimi was 11.2%.

Claude Code Rewrites PostHog's SQL Parser for 70x Speedup – How Property-Based Testing and Parallel Agents Worked
PostHog used multiple Claude Code sessions in parallel to rewrite their SQL parser, achieving a 70x speedup. The new parser is 16K lines of hand-rolled recursive-descent code with property-based testing.