Supercharges you and your agents
Search your files, repos and agent sessions, locally, and give your agents the best context for the job. One search points them to the few passages that matter, instead of grepping the whole disk. Less time, fewer tokens.
One search. Every file, repo and session.
Press Control+Shift for a glass panel over your documents, folders, git repositories and conversations with coding agents. Search by meaning or by the exact words. Pick a result, tap Control, and choose what to do with it without touching the mouse.
By meaning
Plain words find what you meant, even when the file never uses them.
Exact words
Quotes match the phrase exactly. Mix both to rank exact hits by meaning.
Leave things out
A minus sign excludes a word or a quoted phrase.
Narrow it down
Filter to files, code or sessions, a file type, or a folder or repo with in:.
The right context. Not the whole disk.
Agents are only as good as the context they're given. Connected over MCP, your coding agent asks Pensieve one question and gets back the few passages that matter, with file and line. It reads less, spends fewer tokens and starts on the right code.
› Why do card retries stop after a decline? ● Grep "retry" in acme-app 212 matches ● Read payments/retry.py ● Read payments/gateway.py ● Read billing/invoices.py ● Read tests/test_payments.py … 36 more files Still looking for the backoff rule…
› Why do card retries stop after a decline? ● pensieve · search "card retry after decline" payments/retry.py:42 stop on hard_decline payments/gateway.py:118 decline codes Incident review.md why we changed it ● pensieve · read payments/retry.py:42 Hard declines skip the retry queue. Maya Rivera owns this; see the Mar 4 review.
Illustrative example. Savings depend on the question and the repo.
~/code/acme-app $ claude mcp add pensieve -- pensieve mcp Added stdio MCP server pensieve # scoped to acme-app automatically
Scoped to the job
An agent started in a repo sees that repo, its worktrees and its sessions. Name a scope to give it a few repos and a folder of specs.
Exact or by meaning
Agents use the same search you do: by meaning, by the exact identifier, or both, across code, docs and past sessions.
Works with your agent
Claude Code, Codex, or any MCP client, over stdio with pensieve mcp or over HTTP. pensieve integrate adds a “search before you grep” block and skills, including optional ones that point you to teammates who know the code.
Fewer searches. Right file first.
We gave Claude Code the same code-finding tasks with and without Pensieve: held-out tasks across real repos from 500 to 33,000 files, asked five ways, from plain descriptions to exact names and error messages. It solves more of them with fewer tool calls, and the bigger the repo, the more it saves.
Right file, first result
One search, before any agent: how often the answer is the top result.
Agent cost per code lookup
Claude Sonnet in Claude Code, by repo size. Dots are measured; lines are fitted, dashed where projected.
Method: Claude Sonnet run headless through Claude Code, one run per task and setup; tasks are generated from the code and graded on the file found. “With Pensieve” is the default agent tool set plus the instructions block from pensieve integrate. The 66 / 72, tool-call and 33,000-file figures were measured with Pensieve 0.4.3 across four repos; the 1,500 and 2,100-file costs with 0.4.4’s compact results (the 483-file repo wasn’t re-measured; with 0.4.3’s longer results it cost 6% more than grep). Costs are Claude Code’s reported API costs at list prices. The calculator fits savings against log(repo size) from those three repos, so beyond 33,000 files it is a projection, not a measurement. The benchmark is open source in bench/; run it on your own repos.
See who owns what.
Every repo as a map, with git blame for every line. Ask about any topic and get the people with the most domain knowledge, plus what each teammate has been working on lately. The fastest answer is often a conversation.
Ownership from blame
Who wrote each area, weighted by the lines that are still there today.
Domain knowledge
Ask about a topic, not a file, and get the people whose code is most about it.
Team activity
What each teammate shipped in the last 90 days, and the areas next to your work you haven't explored.
Know where the knowledge left.
When the people who wrote a part of the codebase are no longer active in it, that knowledge is at risk. Pensieve flags those areas, shows how few people still know them, and who knows them best today.
vat.py.Bus factor at a glance
For every area of a repo: how much of the code was written by people still active there, and how many of them there are.
Who still knows it
The active people with the most lines in that area, so you know who to pull in before you change it.
Plan the handover
Spot gaps before an incident does. Point your agent at the area to draft the missing docs.
Example with fictional names and numbers.
Edit a file. Search it seconds later.
Pensieve watches your folders, repos and agent sessions and re-indexes what changed. Uncommitted edits count, and every worktree is tracked by branch, so your agents never work from stale context.
Your work stays on your Mac.
Indexing and search run locally. You decide what gets indexed, and AI is entirely optional.
Runs locally
An on-device embedding model and a local index in ~/.pensieve. No account, no server.
Switch any source off
Agents, folders, repos and apps each have a switch. Turning one off removes what it indexed.
Secrets skipped
Password-manager exports, keys, .env files and credentials are never indexed.
AI if you want it
Summaries and insights are optional. Pick who writes them, or leave it off:
Get Pensieve.
Free and open source. Set up in a minute.
Download for Mac
Drag Pensieve to Applications and open it. It sets itself up on first launch.
Download Pensieve.dmgInstall with Terminal
Builds the app and adds the pensieve command for agents. Needs the Xcode command-line tools.
curl -fsSL https://tedhaley.ca/pensieve/install.sh | shOr ask your coding agent
Paste this into Claude Code or Codex:
Questions.
What does Pensieve search?
Your files and folders (Documents, Desktop, Downloads and any folder you add), your git repositories including uncommitted changes and worktrees, and your Claude Code, Codex and Qwen Code sessions. Optionally Obsidian and Apple Notes too. Everything is indexed and searched on your Mac.
How does Pensieve save tokens?
Without it, a coding agent often greps the repo and reads many whole files to find what matters, and every file it reads costs tokens. With Pensieve connected over MCP, the agent asks one question and gets back the few most relevant passages with their file and line, so it reads less and starts on the right code. How much you save depends on the question and the repo; see the measured results above.
Does Pensieve make Claude Code cheaper?
In our benchmark, Claude Code with Pensieve solved 66 of 72 code-finding tasks against 62 with grep alone, with 40% fewer tool calls. Each lookup cost 9–10% less in 1,500–2,100-file repos and 21% less in a 33,000-file monorepo. Savings grow with repo size; the benchmark is open source so you can run it on your own code.
How do I get my agent to use Pensieve instead of grep?
Agents grep by habit. Run pensieve integrate recommended (or switch it on in Settings → Search & Agents) to add a short “search before you grep” section to ~/.claude/CLAUDE.md and a search skill. With it, agents searched with Pensieve in 83% of lookups in our benchmark; without it, 26%.
Which agents work with Pensieve?
Any MCP client: Claude Code, Codex, Cursor, Claude Desktop and others, over stdio with pensieve mcp or over HTTP. Optional skills also suggest which teammates know an area and help plan new code around what already exists.
How does it find knowledge gaps?
Pensieve reads git blame and recent commit history for each area of a repo. Areas where most lines were written by people with no recent commits there are flagged, along with how many active people know the area and who among them knows it best.
Does anything leave my Mac?
No. Indexing and search run on your Mac. The only exception is if you choose Claude Code or Codex to write optional AI insights; those are labelled Cloud. The built-in model, a local server like LM Studio, or no AI at all keep everything local.
Do I need an AI model?
No. Search, agent context, ownership and knowledge gaps all work without one. AI insights are optional: choose the built-in Qwen 3.5 9B, LM Studio, Claude Code, Codex, or leave it off.
Is Pensieve free?
Yes. It's free and open source under the MIT license. The code is on GitHub.
Why does macOS ask before opening it?
The app isn't notarized yet. The first time, open System Settings → Privacy & Security and click Open Anyway. You only do this once.
Does it work on Intel Macs or Linux?
The app needs Apple Silicon. The backend and the browser visualizer also run on Linux and Intel Macs through the Terminal install, without the search panel.
How do I uninstall it?
Quit Pensieve, drag it to the Trash, and delete ~/.pensieve. If you used the Terminal install, also run uv tool uninstall pensieve.