Code Butler

Decision memory for AI coding agents

Git remembers what changed. Code Butler remembers why.

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 guide
claude · notes app

you where were we?

⚙ code-butler · summarize_active_context

agent Picking up the notes app refactor you started in Codex.

  • New Note uses the shared save code.
  • Next, update Edit Note to use it too.

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

One refactor. Two agents.

40 seconds · silent
PROJECT / NOTES APPFictional example

01 The unfinished session

The session ends. The refactor doesn’t.

In Codex, you start sharing the save code between two screens in a notes app. New Note is done. Edit Note is next.

Sound familiar?

AI agents are brilliant, and they forget the why.

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.

Old mistakes come back

Agents happily retry approaches you already rejected and bring back bugs you already fixed, because nothing told them otherwise.

Every new session forgets the details

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.

Switch agents, start over

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

Set it up once. Every session after that starts informed.

  1. 1

    Install the app

    One installer sets up the desktop app, the CLI, the MCP server and a background watcher. Updates keep them all in step.

  2. 2

    Add your project

    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.

  3. 3

    Your agent remembers

    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.

Watch the interactive guide →

What you get

A project memory your agents actually use.

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.

The why behind every change

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 and dead ends

Decisions, constraints, bug fixes and rejected approaches are saved as they happen, so agents don’t retry what you already ruled out.

One memory, every agent

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.

Pick up where you left off

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.

Evidence, not stale notes

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.

Global rules you approve

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…

Other places to keep context, and what they miss.

…a CLAUDE.md or AGENTS.md?

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.

…my agent’s built-in memory?

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.

…a generic memory server?

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

Built to sit next to 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.

How Butler handles secrets →
  • API keys, tokens and private keys are redacted before anything is stored.
  • A repo you clone can’t quietly change Butler’s settings. Its config and .env are ignored until you approve them, and .env is shown by key names only.
  • Global rules record where a secret lives, never its value. Recognized secrets are rejected.
  • Agents can’t export unredacted memory or run destructive privacy commands.
  • Memory lives in a local SQLite file inside your repo, never committed.
  • Remote AI models stay off until you pick a provider.

Works with your tools

  • Claude Code
  • Codex
  • Any MCP client

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.

Give your agent the why.

Free desktop app for macOS and Windows. Prefer to build it yourself? See the quickstart.