Skip to content

Set up memory with MemPalace

Persistent memory is an optional add-on, powered by MemPalace — a local, no-API-key engine that mines your projects and conversations into a searchable “palace,” scoped per project (a wing). Turn it on and cckit wires four hooks (SessionStart / Stop / PreCompact / SessionEnd) so each session wakes up with the right context and files its work back on its own.

Coding agents are stateless — every session starts from zero. Without memory, you re-explain the same architecture, re-derive decisions you already made, and watch the why behind past choices evaporate the moment the context window compacts. You become the agent’s memory, and that gets expensive fast.

With memory on, the agent wakes up already knowing your project — so it stops asking what it should already know. Concretely:

  • Continuity across sessions. Pick up where you (or another agent) left off, instead of rebuilding context each time.
  • Decisions that stick. ADRs, trade-offs, and “we tried that, it didn’t work” persist — so settled choices don’t get re-litigated a week later.
  • Cheaper and faster. Fewer tokens burned re-establishing context every session; the wake-up is ~600–900 tokens, leaving 95%+ of the window for actual work.
  • A searchable record. Everything mined is queryable by you and by future agents — a project brain that outlives any one conversation.

Memory isn’t a bolt-on — cckit treats it as first-class in the lifecycle. Flip it on and the kit does the remembering for you; you never have to say “remember this”:

  • Four hooks wire it into every session automaticallySessionStart loads a wing-scoped wake-up (identity header + recent decisions), Stop files the finished session, PreCompact sweeps to memory before the window compresses, and SessionEnd catches any unsynced work if a session ends abruptly.
  • One wing per project. Memories never bleed across repos, and each specialist agent gets its own diary wing for its notes.
  • A scaffolded protocol. .claude/rules/mempalace.md teaches Claude to recall before it answers and record after it decides — so it checks the palace instead of guessing, and writes decisions back when the work is done.
  • Kept healthy by cckit doctor. It installs the CLI, seeds this project’s wake-up header, and refreshes stale hooks — so the layer keeps working as the kit evolves.
  1. Enable memory when you initialize — say yes to memory at cckit init, or pass it explicitly:

    Terminal window
    cckit init --profile software --memory on
  2. Install the MemPalace CLIcckit doctor sees that memory is on and installs it for you into an isolated venv (pipx, falling back to uv), then points you at the MCP wiring:

    Terminal window
    cckit doctor # installs mempalace + seeds this project's wake-up header
    mempalace mcp # print the MCP-server setup line for Claude Code

    Rather do it by hand? pipx install mempalace.

  3. That’s it — every session now loads a wing-scoped wake-up header (.claude/mempal-identity.<wing>.txt, seeded by init/doctor) plus your project’s recent decisions. The full read/write protocol lives in the scaffolded .claude/rules/mempalace.md.

Independent, educational project — not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic PBC. Disclaimer & trademarks ·

From Mexico with love by josegtz