memcode docs
CLI

Memory

memcode remembers your project and your past sessions. Here's how to use that.

memcode remembers your work. You can stop, come back later, and pick up where you left off, and it stays oriented across sessions instead of starting cold.

Resume where you left off

Continue the most recent session with its full history:

memcode --continue

Resume a specific session:

memcode --resume <id>

Inside a session, /resume switches to another one, /fork copies a session into a new one to branch off, and /rewind undoes the agent's edits back to an earlier point.

Look back at what happened

memcode records what each session did, so you can ask about past work:

CommandWhat it shows
memcode session recentRecent sessions.
memcode session show <id>What one session did.
memcode recapA summary of recent work.
memcode recall "<question>"Where something was decided or documented.

Give it rules to follow

Put rules memcode should always follow in a MEMCODE.md file at your repo root. See MEMCODE.md.

Share memory with your other tools

memcode sync writes a short summary of what memcode knows into the context files other assistants read, such as CLAUDE.md and AGENTS.md:

memcode sync

Where it's kept

All of this lives in a .memcode directory at your repo root. It ignores itself, so it never shows up in your commits. Treat it as project state: if you delete it, you lose the remembered model, the session history, and the undo checkpoints for that repo.

On this page