Skip to main content
Mythos

Claude Code Memory is 📝Claude Code's file-based persistence layer at ~/.claude/projects/<project>/memory/, indexed by MEMORY.md, so durable facts survive across conversations and load automatically into future sessions.

Memory exists because Claude Code's per-session conversations would otherwise start blank — every user preference, correction, and project detail would have to be re-explained each time a new terminal opens. The persistence layer closes that gap by giving the agent a markdown-file store that ships into the system prompt at the start of every new conversation.

Memory is for practitioners who want Claude Code to retain user preferences, accepted corrections, ongoing project state, and pointers to external systems across sessions without manually re-onboarding the agent each time.

My setup uses the local memory directory as a hot cache and forwards every durable write into MythOS via the skill. Local memory wins on latency; MythOS wins on cross-device continuity and survives a laptop swap. Two layers, not a choice between them.

Key Capabilities

  • File-based persistence — every memory is a plain markdown file under ~/.claude/projects/<project>/memory/; no database, no cloud sync, and no extra service to install or configure.
  • Indexed system promptMEMORY.md is a one-line-per-entry index that ships into every session's system prompt, capped near 150 lines so it stays under the context budget.
  • Categorized memory types — files typed by filename prefix: user_*.md for preferences, feedback_*.md for corrections, project_*.md for initiatives, reference_*.md for external system pointers.
  • Slash-command and autonomous writes — the user invokes /remember to save a fact explicitly; Claude also writes autonomously when it detects a durable, non-obvious fact worth preserving.
  • On-demand reads — full memo files load automatically when their index descriptions match the live conversation, so only relevant context enters the working memory budget.

Getting Started

  1. Memory is built into Claude Code — no flag, no plan tier, no setup required.
  2. Use /remember to save a fact; Claude also writes durable facts autonomously.
  3. Inspect or edit memories at ~/.claude/projects/<project>/memory/ — plain markdown files.
  4. Layer an external knowledge system on top for cross-device continuity if needed.

Related

Contexts

Created with 💜 by One Inc | Copyright 2026