Skip to main content

Memory

Cody CLI has a built-in memory system that persists context, facts, and preferences across sessions.

How It Works

Memory is stored as markdown files in .cody/agent-memory/ (project) or ~/.cody/agent-memory/ (global). Cody reads and writes these files automatically during sessions.

Memory Commands

/memory          # open memory panel
/memory show     # display all stored memories
/memory clear    # clear all memories

You can also ask Cody directly: "Remember that we use Postgres, not MySQL" or "Forget what you know about my API keys."

Memory Types

  • Project memory — stored in .cody/agent-memory/, shared across team if committed.
  • User memory — stored in ~/.cody/agent-memory/, personal to you across all projects.
  • Local memory — stored in .cody/agent-memory-local/, gitignored and private.

ZeroDB Memory (Cloud)

When connected to ZeroDB via MCP, Cody can store and retrieve memories using semantic search — enabling recall across large memory sets that wouldn't fit in context.

Configure via the zerodb-memory MCP server.

CODY.md

Place a CODY.md file at your project root to give Cody persistent instructions — coding standards, architecture notes, team conventions. Cody reads this file automatically at the start of every session.