October 13, 2026ToolMCPResearch

Agents Grep by Habit. Pensieve Says One Search Beats Forty Reads, and a Microsoft Paper Says That Is the Whole Problem.

Pensieve is a free, MIT-licensed Mac app from Ted Haley that indexes your files, repos and coding-agent sessions locally and exposes one search over MCP, so an agent asks a question in plain words and gets back the few passages that matter with file and line, instead of grepping the disk and reading forty files. It hit 117 points on Hacker News on Monday. The benchmark on the page is small but honest: Claude Code with Pensieve found the right file in 131 of 144 runs against 123 with grep alone, with 43 percent fewer tool calls, 18 percent lower cost per lookup, and over 1,000 searches the right file came first 67 percent of the time versus 22 percent for grep. One search takes about 80 milliseconds on an M4 Max. The scripts are in the repo.

The detail that shows the author understands agents: the install adds a search-before-you-grep section to the instructions files of Claude Code, Codex and Gemini CLI, plus a skill and two hooks for Claude Code, because agents grep by habit and will ignore a tool they are not told to prefer. With that in place the agent used Pensieve in all 144 runs. Everything runs on the Mac, the only cloud is optional AI insights you have to choose.

Now the paper that explains why this is not a nice-to-have. Code Understanding is a Bottleneck for Coding Agents, from Microsoft, builds 6,840 synthetic tasks as call-graph transformations with difficulty dialed on four axes, and runs eight models and six agents on them. Bare LLM accuracy falls as tasks grow. Agents stay near perfect, because they offload the work to grep. But the count of reading and analysis tool calls climbs with task size, and on SWE-bench Verified that tool-call count predicts an agent's accuracy better than lines of code edited does. When the authors build a task where understanding cannot be offloaded, comparing divergent logic across two classes, agent accuracy finally drops. Difficulty for agents lives in understanding the code, not in editing it.

Put the two together and the shape is clear. Tool calls are not just cost, they are the symptom of the agent not knowing where to look. Pensieve attacks the symptom at the retrieval layer, the paper says the disease is comprehension, and both point at the same product gap: a code-understanding layer under the agent that is neither the model nor grep. Harness, again.

Pensieve: https://tedhaley.ca/pensieve/
Repo: https://github.com/TedHaley/pensieve
Paper: https://arxiv.org/abs/2610.10610
← Previous
Agent37: Agent Sandboxes at 37 Cents a Month, Because Harnesses Idle
Next β†’
diagram-design Is Back on Top of GitHub Trending at 52,000 Stars. The Skill Is the Product.
← Back to all articles

Comments

Loading...
>_