Memory & Context Architecture

Build Claude Workflows That Remember Between Sessions

Your first project. 20 minutes.

Claude does not have persistent memory by default — every new conversation starts blank. But there are five distinct mechanisms for giving Claude the memory it needs. Understanding which to use transforms good AI interactions into reliable AI workflows.

Claude memory refers to persistent context that carries across conversations. In Claude.ai, this includes project knowledge and user preferences. In Claude Code, CLAUDE.md files provide session-persistent context about your project. Claude Academy teaches a comprehensive memory system architecture for production use.

Six Memory Mechanisms

The complete Claude memory architecture

In-Context Memory
Everything in the active conversation window. Claude reads every prior message on each turn. The limit is the context window — currently up to 200K tokens.
CLAUDE.md Files
Markdown files that Claude Code reads automatically at session start. Acts as persistent, project-scoped memory for development workflows.
Projects Knowledge Base
Uploaded files inside a Claude Project persist across all conversations. The closest thing Claude has to long-term memory for individual users.
System Prompts
Instructions injected before the conversation begins. Used in API integrations and Claude Projects custom instructions to set permanent behavioral rules.
External Memory Tools
When building with the Claude API, you can retrieve facts from a vector database and inject them into each prompt — giving Claude access to arbitrarily large memories.
Agent Memory Patterns
Multi-agent architectures can pass state between agents using structured files, databases, or message queues — enabling memory that survives across agent sessions.

CLAUDE.md: The Developer Memory System

CLAUDE.md is a Markdown file you place at the root of your project. When Claude Code starts a session, it reads this file before anything else — making it the primary memory mechanism for developer workflows.

CLAUDE.md
# Project Memory

## Commands
- Build: `npm run build`
- Test: `npm test`
- Deploy: `vercel --prod --no-wait`

## Code Style
- TypeScript strict mode enabled
- Prefer named exports over default
- No `any` types — use `unknown` + narrowing

## Architecture Decisions
- Auth: Supabase with RLS on every table
- Database: explicit column selects, no select("*")
- API routes: per-IP rate limiting on all mutations

## Context
Reid is the solo developer. Prioritize shipping
speed over perfect abstractions. Note open TODOs
with `// TODO(reid):` comments.

What makes CLAUDE.md powerful is specificity. Vague instructions like "write clean code" are useless. Specific instructions like "no select('*') in Supabase queries" or "per-IP rate limiting on all POST routes" become automatic constraints Claude enforces every session.

Which Memory Mechanism Should You Use?

You need Claude to remember project facts across CLI sessions
CLAUDE.md — add it to your repo root.
You want Claude.ai to remember files between conversations
Claude Projects — upload files to the Project knowledge base.
You want consistent behavior for a team
Claude Projects with custom instructions — share the Project with teammates.
You're building an API-powered app and need long-term user memory
External vector database — retrieve relevant facts and inject into each prompt.
You need memory that survives across multiple AI agents
Structured files or database — write state to disk, pass between agents explicitly.

Frequently Asked Questions

What is the best Claude memory system?

The best Claude memory system uses a layered approach: CLAUDE.md for project rules, session-level context for conversation state, and structured memory files for persistent knowledge. Claude Academy teaches this architecture in detail.

Does Claude remember between conversations?

By default, Claude does not retain memory between separate conversations. Persistent memory requires explicit systems like CLAUDE.md files, Claude Projects (in claude.ai), or custom memory architectures using the API.

How do I set up Claude Code memory?

Create a CLAUDE.md file in your project root with your tech stack, coding conventions, and project rules. Claude reads this automatically at the start of every session. Add ~/.claude/CLAUDE.md for global preferences.

What is the difference between Claude memory and Claude Projects?

Claude Projects (in claude.ai) let you upload files and set a system prompt that persists across conversations within that project. Claude Code memory (CLAUDE.md) serves a similar purpose for terminal-based development. Both provide persistent context, but Projects are web-based while CLAUDE.md is file-based.

How much context can Claude remember in one session?

Claude's context window holds 200,000 tokens (approximately 150,000 words) per session. Within that window, Claude remembers everything discussed. For longer sessions in Claude Code, use /compact to compress earlier context and free up space for new information.

Build AI workflows that actually remember

Learn memory architecture hands-on in Claude Academy's free tracks.