Better HN
topnewbestaskshowjobs
Log inSign up

TedHaley

47 karma · joined Jul 5, 2021 (5y ago) · 2 submissions

Submissions

comment 1mo ago · link · parent

I don't know if you've noticed, but when Claude Code, Codex, or any other agent needs to find code, it runs grep. It searches your files for an exact string, reads a few results, and greps again until it finds what it wants. You pay tokens and wait for every round.

That worked fine when repos were small. But codebases are growing fast, partly because agents now write so much of the code. Every grep round costs more than it did last month, whether you notice it or not.

There's a second problem: grep only finds what you already know how to name. Ask it for "where we handle rate limits from the billing provider" and it gets 0% right on the first try, because it needs the exact string.

So I built Pensieve. It's a local index of your code, documents, and past agent sessions. Any agent can query it over MCP and get the few files that matter on the first try. A few cents saved per lookup doesn't sound like much. It adds up over hundreds of lookups a day.

Check out Pensieve!

2.

Local Indexing to reduce tool calling and token usage(tedhaley.ca ↗)

127 points · by TedHaley · 1mo ago · 52 comments