Every coding agent you use is writing things down.
Claude Code saves notes to ~/.claude/projects/<project>/MEMORY.md. Codex accumulates decisions in ~/.codex/memories/. Cursor stores rules in .cursor/rules/. Windsurf has its own Cascade memories. Cline, OpenCode, Goose, and most of the others do too. Each one keeps a separate record of what you have built, what you have decided, and how your project works.
None of them can read what the others wrote.
When you switch from Claude Code to Codex mid-sprint, Codex starts from zero. When you open Windsurf on a project your Claude Code session has been annotating for three months, Windsurf does not know any of it. Every agent you use maintains its own memory silo, and context you built up in one tool evaporates when you open another.
Docmancer now addresses this directly.
What the tool does
pipx install docmancer --python python3.13
docmancer setup --agent codex --agent claude-code
docmancer memory sync
docmancer memory query "why did we pick Railway over Fly?"
memory sync harvests the memory files your agents have already written: Claude Code project notes, Codex memories, Cursor rules, plus global instruction files from OpenCode, Cline, Windsurf, and eight other harnesses. Everything is processed locally, deduplicated by real path, and indexed into a single SQLite database under ~/.docmancer/. No cloud involved.
memory query runs hybrid retrieval over that index. The result is a grounded answer pulled from your own agents' accumulated notes, not from the model's training data. You are asking what you and your agents actually decided, not what the model guesses.
Seeing where the memory came from
docmancer memory sources
docmancer memory sources --agent claude-code
docmancer memory sources --type memory
memory sources lists every indexed file with its agent, type (auto-written memory vs user-authored instructions), scope (global vs project), title, path, and character count. It ends with a summary line showing total files and a per-agent breakdown.
The --preview flag runs a live harvest without writing to the index, which answers the question "what would be indexed right now?" before committing to a sync.
Consolidating with Mistral
The local index is useful on its own. The Mistral step is optional but turns months of scattered agent notes into something you can actually apply.
export MISTRAL_API_KEY=...
docmancer memory consolidate --output master-memory-draft.md
Before any text leaves the machine, the existing privacy filter redacts secrets and credentials. The command then prints a cloud-use notice so you can confirm before proceeding, unless you pass --yes.
Under the hood, consolidate calls client.chat.parse(model=..., response_format=<PydanticModel>, temperature=0) and reads the validated draft from response.choices[0].message.parsed. This is Mistral's structured output API, not freeform JSON parsing, so the draft schema is enforced at the call layer. The output is a review-only markdown file. Docmancer never writes to your agents' files automatically.
You review the draft. When it looks right:
docmancer memory apply --from master-memory-draft.md --agent codex --dry-run
docmancer memory apply --from master-memory-draft.md --agent codex
apply writes only inside a delimited managed block (<!-- docmancer:begin ... --> ... <!-- docmancer:end -->), takes a timestamped backup before touching anything, and confirms before writing. --dry-run shows the diff without writing. --remove strips the block for a clean uninstall.
Target resolution is straightforward: codex writes to ~/.codex/AGENTS.md, claude-code writes to ~/.claude/CLAUDE.md, cursor writes to ~/.cursor/AGENTS.md. Or pass --output <path> to write anywhere.
What gets harvested
The sync covers more than most developers expect. On a machine with several agents installed, a typical harvest finds:
- Claude Code: project memory files,
~/.claude/CLAUDE.md,~/.claude/rules/, projectCLAUDE.mdfiles - Codex:
~/.codex/memories/,~/.codex/AGENTS.md - Cursor:
.cursor/rules/,~/.cursor/AGENTS.md - OpenCode, Cline, Windsurf, Goose, and six more: global instruction files and agent-written memories at their documented paths
Each file is classified as auto-written agent memory, user-authored instructions, or project rules. The first three classes are indexed by default. Raw conversation transcripts (jsonl, sqlite, session logs) are excluded unless you explicitly opt in.
The pull path
setup also injects a recall instruction into each agent's always-loaded file so that the agent itself knows to query docmancer before answering questions about past decisions:
Before answering any question about past decisions, prior work, or project context,
you MUST first run `docmancer memory query "<the question>"` and ground your answer
in the returned entries.
This means the memory is available in two directions: you can query it directly from the terminal, and your agents query it automatically when the question is about something they should already know.
Local-first, offline by default
The default install requires no API key and makes no network calls. memory sync, memory query, memory sources, memory status, and memory apply all run locally with model2vec embeddings and sqlite-vec for retrieval.
The Mistral step (memory extract, memory consolidate) requires MISTRAL_API_KEY. Without it, both commands print a single clear message and exit non-zero. No traceback, no partial writes, no change to the local index.
If you want Mistral embeddings for the local index instead of model2vec:
docmancer init --embedding-provider mistral
docmancer memory sync --recreate
This uses mistral-embed at 1024 dimensions. It is off by default because the local model2vec provider works offline and requires no key.
Try it
pipx install docmancer --python python3.13
docmancer setup --agent codex --agent claude-code
docmancer memory sync
docmancer memory sources
docmancer memory query "what did we decide about the database schema?"
The index builds in seconds. The query returns grounded results from your own agents' accumulated notes. That context would otherwise be scattered across a dozen files in a dozen directories, readable by none of the agents that need it.