Local code index for coding agents: Pensieve vs Graphicle vs plain ripgrep As of 19 October 2026, no benchmark has shown that a local code index reliably cuts token use for coding agents, though Pensieve's own benchmark measured 43% fewer tool calls than grep (1.97 versus 3.44 per lookup) while tying grep on accuracy, and Graphicle's own tests tied plain Claude Code and used 16% more tokens when the agent never called it. Pensieve, a local semantic-plus-lexical index by Ted Haley released as v0.11.0 on 18 October 2026 under the MIT licence, ran its benchmark on Claude Sonnet across 72 tasks in four repositories of 504 to 34,847 files at $0.041 per lookup versus $0.050 for grep. A PointFive paper analyzing 1,212 Claude Code sessions found the system prompt and tool definitions made up 74.7% of cost, tool outputs 3.3% and files read 0.8%, so the article's recommendation is to keep the agent's built-in grep on a frontier model and try Pensieve only on large repositories searched by description rather than by name. Local code index for coding agents: Pensieve vs Graphicle vs plain ripgrep A local code index cuts the number of search calls a coding agent makes, and as of 19 October 2026 nobody has shown that it reliably cuts tokens. Pensieve https://stackness.dev/tools/pensieve 's own benchmark measured 43% fewer tool calls than grep, then tied grep on accuracy in its clean runs. Graphicle https://stackness.dev/tools/graphicle 's own tests tied plain Claude Code https://stackness.dev/tools/claude-code and used 16% more tokens when the agent never called it. On a frontier model, keep the agent's built-in grep. Try Pensieve on a large repository you search by description rather than by name. | | Pensieve | Graphicle | ripgrep | |---|---|---|---| | Kind of index | Semantic plus lexical hybrid embeddings and a trigram index in SQLite | Code graph of files, functions, calls and imports, plus agent memory | None: scans files at query time | | Reaches the agent through | MCP server, skills, a CLAUDE.md block, hooks | MCP server, CLI, hooks, an AGENTS.md section | The agent's own search tool or shell | | Licence | MIT | Apache-2.0 | MIT or Unlicense | | Platform | Mac app on Apple Silicon, macOS 14+; backend and browser app on Linux | macOS, Linux, Windows preview | Everywhere | | First index | About 500 files a minute; a little over an hour for 35,000 files | Kubernetes code in 1 min 8 s | None | | Vendor's headline | 43% fewer tool calls, 18% cheaper | "No token saving against plain Claude Code" | n/a | | Latest release | v0.11.0, 18 October 2026 | v0.1.2, 18 October 2026 | 15.2.0, 15 July 2026 | Release dates and licences are from each GitHub repository on 19 October 2026. Does a local code index cut your coding agent's tokens? A local code index for coding agents mostly cuts tool calls, and tokens only sometimes. Each search an agent skips saves a model turn, and every turn re-sends the cached prefix. But the index adds its own tool definitions and setup text to every request, and its results can be longer than a grep hit. In Pensieve's and Graphicle's own benchmarks, the two effects roughly cancelled. Without an index, an agent loops: search, read a file, search again. ripgrep https://stackness.dev/tools/ripgrep is the usual engine. Claude Code's Grep tool "is built on ripgrep", though on macOS, Linux and WSL the tools reference https://code.claude.com/docs/en/tools-reference says Claude Code now leaves Glob and Grep out by default and searches with find and grep through Bash, which run embedded bfs and ugrep . OpenAI Codex https://stackness.dev/tools/codex-cli 's system prompt tells the model to "prefer using rg ". Anthropic tried the other way first. Boris Cherny wrote https://x.com/bcherny/status/2017824286489383315 on 1 February 2026 that early Claude Code "used RAG + a local vector db, but we found pretty quickly that agentic search generally works better". Search output is a small share of the bill. A PointFive paper https://arxiv.org/abs/2607.12161 split the cost of 1,212 Claude Code sessions: the system prompt and tool definitions made up 74.7%, tool outputs 3.3% and files read 0.8%. An index pays off by removing turns, not by shrinking text. That is where it differs from the context compression tools https://stackness.dev/blog/agent-context-compression-tools-headroom-rtk-engram-attic-compared , which shrink what was already fetched. The same paper found that the heaviest compression cut tool-output tokens 38.4% and raised the bill 6.8%, through extra diagnosis, testing and re-retrieval turns. Pensieve cuts tool calls by 43% and ties grep on accuracy Pensieve, a local index by Ted Haley that reached the Hacker News front page on 12 October 2026, measured 1.97 tool calls per lookup against 3.44 for grep, glob and read. That is 43% fewer. The run used Claude Sonnet, with no version stated, on 72 tasks in four repositories of 504 to 34,847 files, each run twice. It cost $0.041 per lookup against $0.050. The author's README https://github.com/TedHaley/pensieve does-it-help-the-benchmark also reports tasks solved: 131 of 144 against 123 for grep. His own strategy notes https://github.com/TedHaley/pensieve/blob/main/bench/STRATEGIES.md undercut that gap, tracing it to runs that loaded his personal settings. Runs that loaded only repository settings on 13 October tied at 129 of 144: "Accuracy is level with grep; cost and time are not." Those clean runs were 23-25% cheaper and 25-29% faster with Pensieve. Tokens are less clear. The README's headline run reports 16% fewer tokens per lookup, 57k against 67k. In the first two strategy batches, median tokens per answer rose from 46k with grep to 51k with Pensieve. Only a hook that injects search results into the prompt brought them down, to 30k, and it cost the same per answer as the recommended Pensieve setup without the hook $0.0374 each , since the tokens it saved were cheap cache reads. In the README's headline run, the savings were largest in the 34,847-file monorepo 28% cheaper , 15% in the 504-file repository and 6-14% in the two mid-size ones. I found no outside repeat of the test. Graphicle ties plain Claude Code and costs 16% more tokens when unused Graphicle, a Rust port of the Graphify https://stackness.dev/tools/graphify code graph by KarLex AI released on 14 October 2026, ran the most careful benchmark of the three. It registered every test before scoring and reported 95% confidence intervals, using Claude Code 2.1.287 and Claude Opus https://stackness.dev/tools/claude-opus 5.5. Its results https://github.com/graphicle-ai/graphicle/blob/main/docs/benchmarks.md show a tie. On 100 SWE-bench Verified tasks, Graphicle and plain Claude Code each found every file to change in 95. Graphicle used 27,133 tokens per task against 23,348, 16% more. The benchmark notes say why: "In none of the 100 Graphicle runs did the agent call a Graphicle tool, so its extra tokens are the text that setup adds to every request." On 30 questions about Graphify's showcase corpus, Graphicle found 99.2% of the facts against 94.7% for plain Claude Code, which the vendor counts as a tie. It used a median of 69.2k tokens against 60.8k. Graphify itself found 87.8% at 87.1k. The benchmark notes state it outright: "No token saving against plain Claude Code." Graphicle 0.1.1 benchmark summary. Image: graphicle-ai/graphicle https://github.com/graphicle-ai/graphicle by KarLex AI, Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0 . Semantic search finds what you cannot name, a code graph finds who calls it Semantic search and a code graph answer different questions. Semantic search, Pensieve's kind, finds code from a plain-English description when you do not know the identifier. A code graph, Graphicle's kind, answers relational questions: who calls this function, what breaks if it changes, how two modules connect. Grep answers neither well, and both lose to grep on an exact string. Pensieve's retrieval test on 2,377 queries shows the split. On plain-English questions, grep put the right file first 0% of the time and Pensieve 47.9%. On exact strings they were level, 85.2% against 84.6%. Embeddings alone did no better than grep overall 36.6% against 37.1% ; the hybrid with lexical matching reached 65.9%. For graphs, the Codebase-Memory paper https://arxiv.org/abs/2603.27277 , written by that tool's own authors, found the graph matching or beating an agent that explores files in 19 of 31 languages, mostly on ranking callers and hubs. Its answers, graded by the first author, scored 0.83 against 0.92, at about a tenth of the tokens. An independent CodeGrep paper https://arxiv.org/abs/2608.05886 puts a number on when retrieval saves money at all. BM25 at 0.375 precision made the agent worse. A retriever at 0.677 precision was the first to cut rollout cost. Both indexes reach the agent through MCP, and the agent ignores both without a push Pensieve and Graphicle both run as local MCP servers, and both vendors found that connecting the server is not enough. Agents keep grepping by habit. Pensieve's pilot recorded 0 index calls in 10 tasks without instructions, and Graphicle's agent never called its tools in 100 runs. What worked was text: an instructions block, or a hook that puts results in the prompt. So each tool edits your configuration. Pensieve writes a "search before you grep" block into ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md , plus hooks and skills, and pensieve integrate claude --remove takes them out. Graphicle writes .mcp.json , hooks and an AGENTS.md section, backs each file up as