A large context window is not the same as persistent memory in AI agents. Every API call is stateless — the model re-reads the entire conversation from scratch each time, leading to snowballing token costs, latency, and attention degradation. The post breaks down four distinct layers of an agent's cognitive stack: the context window (a stateless scratchpad), retrieval via RAG (just-in-time document fetching with conflict resolution), compression (token reduction while preserving data), and summarization (irreversible abstraction with forked cold storage). True memory persistence requires the agent to act as a database administrator — querying a state machine at the start of each turn and committing updates at the end — rather than treating the context window as a database.