Git shows what, not why
“Why is this check here?” The commit says “fix edge case”. The reasoning was in a conversation that’s gone.
Decision memory for AI coding agents
Code Butler picks up the decisions, rejected approaches and bug fixes from your commits and your Claude Code and Codex sessions, without you writing a note. Your agent checks them before it edits, so it stops asking you again and stops repeating old mistakes.
See it in action: the 2-minute guideyou where were we?
⚙ code-butler · summarize_active_context
agent Picking up the notes app refactor you started in Codex.
you why wait before clearing the draft?
⚙ code-butler · explain_code_change
agent The save can fail. Waiting keeps the note in the editor so the user can try again.
you could we clear the editor as soon as someone clicks Save?
⚙ code-butler · find_memories
agent We tried that. A failed save erased the user’s writing, so we rejected it.
Product film
01 The unfinished session
In Codex, you start sharing the save code between two screens in a notes app. New Note is done. Edit Note is next.
02 The missing reason
The code waits for the note to save before clearing the draft. The reason is in the earlier Codex conversation.
03 Build project memory
Code Butler links the Git change and the Codex conversation in a local project memory, with both sources attached.
04 The agent handoff
Claude Code asks Butler where work stopped. New Note uses the shared save code. Edit Note still needs the same update.
05 The rejected fix
Butler finds what happened when the editor was cleared as soon as someone clicked Save. If the save failed, their writing disappeared.
06 Keep the reason
Claude Code updates Edit Note. When a save fails, the note stays on screen so the user can try again.
Sound familiar?
“Why is this check here?” The commit says “fix edge case”. The reasoning was in a conversation that’s gone.
Agents happily retry approaches you already rejected and bring back bugs you already fixed, because nothing told them otherwise.
A new chat or a context compaction, and your agent has lost the plan, the half-finished refactor and the reason you picked this approach. So you explain it all again.
Planned it in Codex, building it in Claude Code? Each one starts from zero, and what you decided is split across two chat histories.
How it works
One installer sets up the desktop app, the CLI, the MCP server and a background watcher. Updates keep them all in step.
Code Butler reads your Git history and your Claude Code and Codex conversations, and writes a project brief plus memory into the repo’s own .code-butler/ folder.
Claude Code and Codex are set up to check Butler for the brief, recent changes, decisions and rules before they start work. Any other MCP client can query it too.
What you get
You don’t write anything down. A background watcher learns from your commits and agent sessions as you work, and keeps the project brief up to date.
Ask why a file looks the way it does and get the decision behind it, tied to the commits and conversations it came from.
Decisions, constraints, bug fixes and rejected approaches are saved as they happen, so agents don’t retry what you already ruled out.
Claude Code and Codex share the same project memory. Start in one, continue in the other, and nothing gets lost. Any MCP client can read it too.
Ask “where were we?” after a break, a compaction or a switch of agent, and get the active task, open questions and recent work back.
Every memory links to its sources, and the ones you’ve checked are marked human-verified. Replaced decisions are marked out of date, and unused candidates expire.
Write conventions once instead of copying them into every CLAUDE.md. Agents read them and record checks they’ve verified, so they aren’t repeated. Only you can change them.
Why not just use…
You write it by hand, it drifts, and it rarely says why. Code Butler keeps those files short and points agents at memory that updates itself.
It’s tied to one tool and to whatever the agent chose to save. Code Butler’s memory belongs to the project and works across Claude Code, Codex and any MCP client.
Someone has to decide what to save, and the notes rarely say where they came from. Code Butler pulls decisions from your commits and sessions, with sources, and retires them when they change.
Safe with your secrets
Code Butler reads your commits, chats and config, so it’s local-first and built so none of that leaks. Memories are extracted by a model you pick: a local one like Ollama or LM Studio, or a cloud provider that only ever sees redacted text.
Early access Encrypted secrets/ sync keeps a project’s secrets in step across your computers. It’s end-to-end encrypted, kept out of Git, and never mixed into memory.
Works with your tools
Code Butler sets up CLAUDE.md and AGENTS.md for you, so agents know how to use it from the first session. It learns from your Git history and your Claude Code and Codex sessions; any MCP client can read the memory. The memory engine is open source under Apache-2.0.
Free desktop app for macOS and Windows. Prefer to build it yourself? See the quickstart.