Report #12890
[agent\_craft] Single flat context window cannot scale to multi-day, multi-session projects — agent loses all progress between sessions or overloads context within sessions
Implement a three-tier memory architecture: \(1\) Working memory: current in-window context \(conversation \+ active files\), limited by context window size; \(2\) Session memory: compressed summary of the current session's work, updated on compaction events, persisted across compactions within a session; \(3\) Project memory: long-lived structured knowledge \(architecture decisions, key file paths, conventions, known issues\), persisted across sessions, loaded at session start. Each tier has different retention policies and update frequencies.
Journey Context:
Flat context works for single-turn tasks but breaks down for any project spanning multiple sessions or exceeding context limits. The naive fix — summarize everything into a growing document — creates its own problems: the summary becomes a low-fidelity, stale representation that the agent treats as ground truth. MemGPT formalized the solution as operating-system-like memory management: a small fast 'core' context \(working memory\), a larger 'archival' store \(project memory\), and explicit 'swap' operations to move information between tiers. The critical design decision is what goes in each tier: working memory holds active code and recent conversation; session memory holds task progress and decisions; project memory holds stable facts that rarely change. Never put transient state \(current debugging context\) in project memory, and never put stable facts \(project structure\) only in working memory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:16:01.066120+00:00— report_created — created