Pensieve 0.5.9 builds a local index of repositories, documents and previous agent conversations, then returns relevant passages with file and line references through the Model Context Protocol, or MCP. Coding agents can search for the meaning of code before guessing which strings to grep.
For Anthropic’s Claude Code, Codex and other coding clients, the proposed benefit is less exploratory reading. An agent can ask where a behavior lives and retrieve a narrower starting point, saving repeated searches for identifiers and file openings.
The Pensieve product page reports fewer tool calls, lower token use and faster lookups in the author’s benchmark. Those results deserve attention, though they measure a specific code-finding workload, not completed engineering tasks. They also come from Pensieve 0.5.6, while the advertised release is 0.5.9.
Meaning Search Meets Exact Matches
According to the project README, Pensieve embeds text using Qwen3-Embedding-0.6B and stores it in SQLite, with a trigram full-text index for exact matches and turbovec indexes for vector search.
Exact search works well when an agent knows an identifier or error message. Semantic search offers another route when the request describes behavior without naming its implementation, such as finding code responsible for retrying a failed payment.
Pensieve supports both approaches. Plain language searches by meaning; quoted phrases request exact matches. Queries can combine them, exclude terms with a minus sign, and filter by content type, extension or location.
The indexed sources extend beyond committed code:
- Local documents and folders, including Obsidian vaults and optionally Apple Notes.
- Git repositories, including uncommitted edits and worktrees.
- Claude Code, Codex and Qwen Code sessions.
The documentation says Pensieve watches these sources and reindexes changes, with worktrees tracked by branch. Agents can therefore search changes that do not yet exist in the main branch.
Past sessions add earlier investigations and decisions alongside their implementation. They also require judgment: a previous conversation may contain a rejected approach or an outdated explanation. Retrieval should lead the agent back to current code, without making historical discussion authoritative.
Scopes Keep Retrieval Attached to the Job
MCP supplies the connection between the index and the coding client. Pensieve supports stdio through pensieve mcp and a local HTTP endpoint.
The documented integrations include Claude Code, Codex, Cursor, Google’s Gemini CLI, Qwen Code, Windsurf, Claude Desktop and VS Code. Other MCP clients can use a generic configuration.
How Pensieve limits context is more important than the client list. With the default automatic scope, a stdio connection uses the agent’s working directory. It selects the first named scope containing that repository, or otherwise restricts access to that repository, its worktrees and associated agent sessions.
Named scopes can combine sources, such as two repositories and a folder of specifications. The README says scope restrictions apply across tools, including search and read, and requests for items outside the scope are refused. Sources remain in one index, with no need to embed them again for each scope.
There are two defaults worth checking:
- Outside a repository, automatic scope means everything.
- HTTP connections cannot infer the agent’s working directory, so an HTTP connection without a named scope also means everything.
Launching an agent from the wrong directory can therefore change its context boundary. For sensitive work, explicitly named scopes are easier to audit than automatic detection.
Install, Select Sources, Then Restart the Agent
The packaged 0.5.9 app targets Apple Silicon Macs running macOS 14 or later. The author describes Pensieve as free and open source; its public repository includes a license file, whose terms developers should check before redistribution.
The documented installation path starts with:
curl -fsSL https://tedhaley.ca/pensieve/install.sh | sh
pensieve integrate recommended
pensieve setup
The installer downloads the Mac app and installs its backend. The README says this packaged route does not require Git, Python or the Xcode tools. Because the command executes a downloaded script, readers should inspect it before running it on a machine containing valuable credentials or proprietary code.
pensieve integrate recommended detects supported clients and configures their MCP connections. It also adds instructions and skills intended to make agents search Pensieve before reaching for grep. Making a search tool available does not ensure an agent will use it, so this behavioral guidance has a role in the integration.
pensieve setup lists discovered sources. Finish source selection in the app or run setup with the source identifiers you approve. Nothing is indexed until setup is completed, according to the documentation, and the app’s setup flow asks permission before scanning the relevant folders.

Initial setup downloads an embedding model of roughly 1.2 GB. The author warns that the first indexing pass uses substantial energy, so plugging in is sensible. Search becomes available while indexing continues.
Restart coding clients after integration, because they load MCP servers when starting. For a manual Claude Code connection, the documented command is:
claude mcp add --scope user pensieve -- pensieve mcp
Here, --scope user controls where Claude Code registers the MCP server. Pensieve’s own retrieval scope still depends on its configuration and the working directory.
The README also describes backend installation on Linux and Intel Macs. That does not imply availability of the packaged Apple Silicon app on those platforms.
Local Indexing Has a Clear Privacy Boundary
Pensieve says embedding and search run locally, with the index stored in ~/.pensieve. Its documentation describes a server accessible only from the same Mac, no required account, and switches for individual sources. Turning a source off is documented as removing what it indexed.
The privacy controls also include skipping password-manager exports, keys, .env files and credentials. This is a useful stated safeguard, though it does not guarantee that every sensitive string in an otherwise ordinary document or source file will be detected.
When Pensieve returns proprietary passages to a cloud-connected coding client, those passages can enter that client’s model context. Local retrieval avoids a separate cloud search service; it does not make the downstream agent local. That agent remains part of the data-handling decision.
AI-written summaries and insights are optional. Documented choices include built-in or separately hosted local models, as well as Claude Code or Codex. Readers should distinguish the local embedding pipeline from whichever provider they enable for optional generation.
The local index itself remains sensitive because it concentrates information that was previously scattered. Start with a limited source set, verify connection scopes, and check source-removal behavior before adding session archives or broad document folders.
Git History Adds Context, Not Proof of Expertise
Pensieve also uses Git blame to show ownership by surviving lines, identify people associated with a topic, summarize recent activity and flag areas whose contributors are no longer active. Beyond retrieving files, an agent can help identify a person to consult.
Blame measures recorded authorship, however, and cannot capture complete organizational knowledge. Reviewers, maintainers and colleagues who explained a system without committing its code may be absent. Refactors and contributor identity changes can also complicate interpretation.
Treat ownership and knowledge-gap views as prompts for investigation. They can suggest whom to ask, but should not become definitive employee expertise scores.
The Benchmark Supports a Trial, Not Guaranteed Savings
The published benchmark methodology describes Claude Sonnet running headlessly through Claude Code on 72 held-out code-finding tasks across four repositories. Each task ran twice per configuration, producing 144 runs for each setup. Repository sizes ranged from 504 to 34,847 files.
The author reports:
| Measure | With Pensieve | Grep-based baseline |
|---|---|---|
| Runs finding the target file | 131/144 | 123/144 |
| Average tool calls per lookup | 2.0 | 3.4 |
| Reported API cost per lookup | $0.041 | $0.050 |
| Average lookup time | 8.6 seconds | 10.9 seconds |
The accompanying claims are 43% fewer tool calls, 16% fewer tokens, 18% lower cost and 21% less elapsed time. Costs use Claude Code’s reported API costs at list prices, and the author says both configurations ran in one batch because prompt-cache state affects cost.
Several limits affect how those figures should be read. The Pensieve configuration included both the tool and its integration instructions, so the experiment evaluates the combined package. Tasks were generated from code and graded on the file found, not implementation correctness. The measurements used version 0.5.6, and no independent reproduction is supplied.
In the author’s single-search comparison, grep wins on exact error messages. That supports keeping exact search and using semantic retrieval selectively.
Benchmark scripts are available in the repository’s bench/ directory. A useful next step is to run representative lookups on your own repositories, including exact identifiers, architectural questions and questions requiring session history. Then assess whether better retrieval improves actual changes and validation. Finding the right file is a promising intermediate result; it is not yet evidence of cheaper, more reliable software delivery.