petit-poucet
One memory for every agent you switch between
Your rules, decisions and verified facts live in a Markdown folder you own, served by a small MCP memory server. One command wires it into each coding agent on your machine, and every session starts with it: switch from Claude Code to Codex, Copilot or Cursor, and none of them starts from zero.
- Claude Code
- Copilot CLI
- Copilot in VS Code
- Copilot in IntelliJ
- GitHub Copilot app
- Codex
- Cursor
- Antigravity CLI
- OpenCode
- omp
- any MCP client
The problem
Your agents forget, each in its own way
Every session starts from zero
You explain your commit rules, the database quirk and the deploy steps again, to a new session that never heard them.
Every tool keeps its own memory
What Claude Code learned stays in Claude Code. Switch to Codex, Copilot or Cursor and you teach it all over again, in another format, in another place.
Memory you can't really check
Built-in memories are written for you, not with you: hard to review, easy to drift, and sometimes gone after a few weeks.
What makes it different
Memory that follows you, not one tool
Built-in memories are tied to one agent. A memory server on its own waits for the model to decide to call it. petit-poucet is wired into each agent, so the memory is already there when the session starts.
One vault, every agent
Claude Code, Copilot, Codex, Cursor, Antigravity CLI, OpenCode and omp read and write the same notes. A rule you gave one of them, the others follow.
Loaded, not just available
A session-start hook hands the agent your rules and the Index before your first message: there's no tool call for the model to forget.
One command to set up
petit-poucet setup finds your agents and writes their config: MCP server, hooks, skills. --check and --uninstall do what they say.
How it works
A short Index at the start, the details on demand
In the French tale, Le Petit Poucet drops white pebbles to find his way home. petit-poucet leaves pebbles for your agents: one line per fact, the full note only when a task needs it.
Session starts
A hook gives the agent the memory rules and the Index of what applies here: your preferences and this repo's notes.
Agent works
It opens only the notes the task needs, and searches the rest, including topics tied to no repo.
Agent learns
A decision, a correction or a verified fact is saved on purpose, with where it came from, and committed to git.
๐ชจ petit-poucet ยท 20 notes loaded (preferences + chargepath-api) ## Preferences (all repos) - [[Preferences/commit-rules]] โ commit locally per step, never push - [[Preferences/never-read-secrets]] โ pipe secret values, never print them ## Projects / chargepath-api - [[Projects/chargepath-api/prod-db-no-postgis]] โ spatial queries must work without PostGIS Topics (searched on demand): homelab (8), work-mac (3) โบ memory_save saved Projects/chargepath-api/deploy-needs-vpn
Compared with built-in memory
What petit-poucet adds to your agent's own memory
Claude Code, Copilot and Codex now remember things on their own, and that's useful. They differ in where the memory lives, who can read it, and how much say you have in it.
| Claude Code auto memory | GitHub Copilot Memory | Codex memories | petit-poucet | |
|---|---|---|---|---|
| Where it lives | Markdown in ~/.claude/projects/<repo>/memory/, on this machine | Stored by GitHub (in VS Code: local memory files) | Generated files in ~/.codex/memories/ | A folder you choose, plain Markdown, Obsidian-compatible |
| Other agents | Claude Code only | Copilot only | Codex only | Claude Code, Copilot, Codex, Cursor, Antigravity CLI, OpenCode, omp, any MCP client |
| Scope | One repo; rules for all repos go in CLAUDE.md, by hand | One repo | Global | Preferences for every repo, notes per repo (matched by git remote), and topics tied to no repo |
| How notes are made | Claude decides what to save | The agent saves while working | Summarised in the background from past chats | Saved on purpose, one fact per note, each with its source |
| Your say | Edit the files yourself | Review and delete in repository settings | Docs advise against editing them by hand | Rules you stated change only with your confirmation; your edits are never overwritten |
| History | Last-modified time | No version history | No version history | A git commit for every change: diff, revert, blame |
| Lifetime | Until edited; only the first 200 lines of the index load | Unused memories expire after 28 days | Off by default; managed by Codex | Until you or a confirmed cleanup removes it |
From each vendor's documentation, October 2026: Claude Code memory, Copilot Memory, memory in VS Code, Codex memories. These features change often: check the links for the current behaviour.
Built-in memory is enough when
- you use one agent, and are happy with what it remembers;
- you don't need to review or undo what it learned.
petit-poucet helps when
- you switch between Claude Code, Copilot, Codex, Cursor, Antigravity, OpenCode or omp, or use several;
- you want one place to read, edit and correct what agents know;
- your rules must not drift, expire or be rewritten silently.
Already have built-in memory? The migrate-memory skill moves it in, one confirmed fact at a time, and leaves the old files untouched.
What you get
Small, plain, and on your side
Plain Markdown
A folder of short notes you can read and edit in Obsidian or any editor. No database, no cloud, nothing pushed anywhere.
Curated, not recorded
Agents save a decision, a correction or a verified fact on purpose, with its source. Nothing is scraped from transcripts.
Rules enforced in code
Note format, sources and the Index are checked by the server. Secrets are refused. Your stated rules need your OK to change.
Every change in git
A local commit after each change: inspect or undo any agent edit. Several agents at once never clobber each other.
Keeps itself tidy
The tidy-memory skill has a read-only agent propose merges, fixes and deletions. You confirm, it applies.
One small binary
A Rust MCP server and its hooks, for macOS, Linux and Windows. No runtime, no service to keep running; it tells you when a new release is out.
The vault
A folder you can read
Claude Code โโ
Copilot โโค
Codex โโค
Cursor โโผโ MCP tools + hooks โโถ petit-poucet โโถ ~/agent-memory/ (Markdown + git)
Antigravity โโค โโ Index.md generated
OpenCode โโค โโ Preferences/ every repo
omp โโ โโ Projects/<repo>/ that repo
โโ Topics/<topic>/ searched on demand
Want to know more? How it works: a session step by step, the note format, how the memory stays clean, and the settings.
Install
Two commands, then start a session
macOS or Linux
curl -fsSL https://raw.githubusercontent.com/areguig/petit-poucet/main/install.sh | sh petit-poucet setup
Windows (PowerShell)
irm https://raw.githubusercontent.com/areguig/petit-poucet/main/install.ps1 | iex petit-poucet setup
The script installs the binary in ~/.local/bin after checking its checksum; on Windows, open a new terminal before setup. setup creates your vault in ~/agent-memory and wires every agent it finds, keeping a backup of each file it changes. Restart your agents; in Codex, trust the new hooks once with /hooks. Needs git.
Questions
Good to know
Does my memory leave my machine?
petit-poucet sends none of it anywhere: the vault is a local folder and a local git repository, never pushed. Its only network call is a daily look at the latest release on GitHub (PETIT_POUCET_NO_UPDATE_CHECK=1 turns it off). Like any file your agent reads, the Index and the notes it opens become part of the conversation with its model.
Do I need Obsidian?
No. Obsidian is a nice way to browse and edit the vault, but petit-poucet doesn't need it running. Your edits are picked up on the next tool call.
What stops an agent from saving nonsense, or a secret?
Every note needs a type, a one-line summary and a source; tokens, keys and passwords are refused; a near-duplicate is reported so the agent updates the existing note. Rules you stated can't be changed without your confirmation.
What does setup change on my machine?
Only petit-poucet's own entries in each agent's user-level config (MCP server, hooks, skills, the memory-cleanup subagent), with a .petit-poucet.bak copy of each file it changed. petit-poucet setup --uninstall takes them out again and keeps your vault.
I use the 0.2 plugin for Claude Code or Copilot
Install the binary and run petit-poucet setup: it removes the plugin with the agent's own command and wires the agent directly. Your vault doesn't change.
How do I update?
Run petit-poucet update (before 0.6, run the install script again). Once a day, session start checks for a new release in the background and tells you when one is out.
My agent isn't supported yet
Any MCP client can already use the tools: point it at petit-poucet serve. For hooks and skills in yours, open an issue: the votes decide what comes first.
Can my team share one memory?
Not by design: each person keeps their own vault. Knowledge the whole team needs belongs in the repository, in AGENTS.md or CLAUDE.md.