## Definition **Context** is what the model sees this turn — the [[Context Window]]. **Memory** is what survives the next compaction, the next session, the next teammate. They are different problems and need different tools. ## Context (Per-Turn) - System prompt. - [[AGENTS.md Convention File]] and `CLAUDE.md`. - Conversation history (compacted if needed — see [[Context Compaction]]). - Files explicitly read or attached. - Tool outputs from this turn. Ephemeral. Position N has no guaranteed influence on position N+10,000. ## Memory (Cross-Session) Anything **outside** the conversation an agent can re-load: - Files in the repo (`DECISIONS.md`, code comments). - Per-project memory stores managed by the harness. - External knowledge bases reached via MCP. - Structured stores like Engram that record decisions and relationships. Crucial property: **re-loadable**. If a future agent in a future session can't deterministically retrieve it, it isn't memory — it's hope. ## Failure Modes from Conflating Them - **Treating context as memory.** "I told you yesterday we decided on PostgreSQL." Yesterday's session is gone. - **Treating memory as context.** Loading a 100-page store into every session wastes tokens and triggers [[Lost in the Middle Effect]]. ## The Right Shape > Memory is a corpus you retrieve from. Context is the small, freshly-curated subset of memory you load right now. ## Related - [[Context Window]] - [[Layered Memory Architecture]] - [[Hierarchical Retrieval]] - [[Architecture Decision Record]] - [[Effective Context Engineering for AI Agents]]