# Pensieve brings local code search to AI agents, cutting tool calls by 43%

Original title: Local Indexing to reduce tool calling and token usage

> Hacker News story 50049508 · language: en · submitted 2026-10-12
> Web version: https://zeli.app/story/50049508
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 127 · by [TedHaley](<https://news.ycombinator.com/user?id=TedHaley>) · 💬 52
[original](<https://tedhaley.ca/pensieve/>) · [HN discussion](<https://news.ycombinator.com/item?id=50049508>)

## Summary

Pensieve is a free, open-source Mac app that indexes your files, repos, and agent sessions locally. Connected via MCP, it gives coding agents one search that returns the few passages that matter, instead of grepping the whole disk. In a benchmark across four repos, agents with Pensieve used 43% fewer tool calls, cost 18% less per lookup, and were 21% faster. Everything stays on your Mac.

## Key quote

> Agents are only as good as the context they're given.

## HN discussion (52 comments)

### [ryuuseijin](<https://news.ycombinator.com/item?id=50054009>)

> OK, so, I too have built a local index tool called slopdex [1].
>
> It's very simple, parses the repo code and docs with treesitter, indexes it, vectorizes everything, then allows you do things like create a map of the codebase or do a semantic search.
>
> One cool trick that does work well is the cross-search command, which allows you to do a duplicate code search using the vector index. This gets rid of a blind spot that lots of LLMs have that make it create lots of dupliclate helper functions. This works quite well in practice.
>
> It has a few evals that I'm still working on, showing only modest improvements in token usage when using the map command, maybe around ~10% less. I think this can depend a lot on the type of task though.
>
> Would be happy to hear any feedback.
>
> [1]: https://github.com/ninjaxtools/slopdex

### [tinthedev](<https://news.ycombinator.com/item?id=50053446>)

> I feel a lot of these tools are barking up the wrong tree. Solving problems that are just symptoms of a deeper root cause. Index because my codebase is too big to grep. Index to paraphrase hard_decline via card retries. Reduce tool calling to save my agent YOLO search loops. etc. etc.
>
> It feels like trying to overcome bad codebase hygiene by throwing more tools at it, and wallpapering the mold over. I've found that codebases left entirely to LLMs suffer from this gravely, but with even a bit of effort - you'll get outsized returns. Don't let the agent smosh up everything into a giant ball of code. Separate concerns, build services, do the architecture step of the software design with a bit more care than vibe coding.
>
> A bit of a rant, yeah, but I don't see why tools like this exist (and ask you to curl a script into bash, no less). You're doing stuff a bit wrong if grepping is the bottleneck.

### [bentt](<https://news.ycombinator.com/item?id=50056560>)

> At some point if these types of front pages that are promoting a tool like this will be optimized for the agent itself to make the decision to install and use it. The human just says "please optimize for cost" and then the agent finds this thing and starts using it without the human even knowing or caring.

### [striking](<https://news.ycombinator.com/item?id=50051281>)

> https://github.com/huggingface/funes/ has been my go-to here (specifically for conversation search), but I do appreciate that there's a frontend on this one that can recall a session and open the correct agent for it (rather than my opening one agent, then opening another when I've gotten it wrong). Looks nice. Well done.

### [pcthrowaway](<https://news.ycombinator.com/item?id=50052352>)

> Is "instructing users to ask their agent to curl a script and pipe to bash" the new "instructing users to curl a script and pipe to bash"?
>
> If not for the rest of the page I would have assumed this was a joke.

---

## Cite

- Page: https://zeli.app/story/50049508
- Date: 2026-10-12
- Source: tedhaley.ca (https://tedhaley.ca/pensieve/)
- Hacker News: https://news.ycombinator.com/item?id=50049508

## Other languages

- zh: https://zeli.app/zh/story/50049508 · markdown: https://zeli.app/zh/story/50049508.md
- ja: https://zeli.app/ja/story/50049508 · markdown: https://zeli.app/ja/story/50049508.md
- ko: https://zeli.app/ko/story/50049508 · markdown: https://zeli.app/ko/story/50049508.md
- de: https://zeli.app/de/story/50049508 · markdown: https://zeli.app/de/story/50049508.md
- es: https://zeli.app/es/story/50049508 · markdown: https://zeli.app/es/story/50049508.md
- ru: https://zeli.app/ru/story/50049508 · markdown: https://zeli.app/ru/story/50049508.md
