Skip to content

contox memory

Load the full project memory via the V2 brain system. This is the primary way to retrieve your project's accumulated knowledge for use with AI coding assistants.

Usage

bash
contox memory [options]

Options

FlagDescriptionRequiredDefault
-o, --output <file>Write memory to a file instead of stdoutNo--
--jsonOutput in JSON formatNofalse
--briefLoad Layer 0 only (minimal summary)Nofalse
--budget <tokens>Token budget for the memory documentNo6000
--layersShow layer breakdown informationNofalse
-q, --quietSuppress informational outputNofalse

Examples

Load memory to the terminal:

bash
contox memory

Save memory to a file for use with an AI tool:

bash
contox memory -o .contox-memory.md

Get a brief summary (Layer 0 only):

bash
contox memory --brief

Output as JSON for programmatic use:

bash
contox memory --json

Set a custom token budget:

bash
contox memory --budget 10000

Show layer breakdown:

bash
contox memory --layers

What it returns

The memory document is a structured markdown document assembled from all approved memory items in your project brain. It typically includes:

  • Architecture -- Tech stack, patterns, project structure
  • Conventions -- Coding style rules, naming patterns, team agreements
  • Implementation journal -- Features built, components created, APIs implemented
  • Decisions -- Key decisions with rationale and trade-offs
  • Bugs and fixes -- Known bugs and their resolutions
  • Todo -- Pending tasks, known issues, technical debt

Token budget

The --budget flag controls the approximate token count for the output document. The brain system prioritizes higher-tier items (architecture, conventions) and trims lower-priority content to fit within the budget. The default of 6000 tokens provides a good balance for most projects.

Notes

  • This command requires a valid .contox.json in your project directory (run contox init first).
  • For Claude Code with the MCP server, memory is loaded automatically via the contox_get_memory tool. This command is primarily for other AI tools or manual inspection.
  • The --quiet flag is useful when piping output to another command or file, suppressing status messages that would otherwise pollute the output.