One-Line Summary: Cross-session memory strategies decide what an agent remembers between conversations — the durable artifacts (configuration files, summaries, trajectories, adapters) and the policies for writing, retrieving, and aging them; this is one of the highest-leverage UX dimensions of any harness.
Prerequisites: Harness-owned memory, AgentDB and vector stores in harnesses, ReasoningBank
What Is Cross-Session Memory?
A session is bounded: it begins, you talk, it ends. Cross-session memory is everything that survives that boundary. The categories:
- Configuration / declared memory (
CLAUDE.md,.cursorrules): the user writes these; the harness reads them on every session. - Conversation transcripts: the harness keeps the raw transcript; later sessions can resume or grep.
- Compacted summaries: the harness summarizes long sessions into short notes to fit future contexts.
- Vector-indexed memories: extracted facts, decisions, error→fix pairs.
- Trajectory store (ReasoningBank): full rollouts indexed by signature.
- Parametric adapters (micro-LoRA): patterns baked into model weights.
A mature harness uses all of them, with explicit policies about what flows where.
How It Works
Consider a typical day's pipeline:
- Session ends: Trigger compaction. The harness writes a 1–3-paragraph summary plus extracted facts to the per-project memory.
- Outcome labeled: User signal or test result tags the trajectory.
- Trajectory writes to ReasoningBank: With outcome label.
- Periodically: SONA pattern extractor runs; new patterns emerge from clustered trajectories.
- Periodically: LoRA adapters are retrained from cumulative trajectories.
Next session:
- Read configuration:
CLAUDE.mdfiles concatenated into system prompt. - Resume option: User chooses to continue or start fresh.
- Per-turn retrieval: Vector store and ReasoningBank are queried; relevant memories injected.
- Adapter loaded: If available for this project.
Why It Matters
Cross-session memory is what makes an agent feel like a coworker rather than a tool. Coworkers remember what you talked about last week; tools don't. A harness with strong cross-session memory carries continuity — patterns the user didn't have to re-explain, decisions that didn't have to be re-justified, errors that don't have to be re-debugged.
The cost: cross-session memory is the hardest engineering surface in a harness. What to remember, what to forget, when to retrieve, how to summarize, how to age — every choice has a UX cost if wrong.
Key Technical Details
- Forgetting is essential: Memory that grows without bound becomes noise. Aging policies (delete after N days unless reinforced; summarize older entries) are part of the design.
- Per-project scoping is the safe default: Cross-project leakage of memories is a privacy and confusion liability.
- Resume-vs-new decision: Users want both. A resume that replays the wrong session is worse than starting fresh; starting fresh on a 20-message conversation is also bad. Harness should default smartly and let user override.
- Compaction quality matters: A bad summary is worse than no summary because it confidently misremembers. Test summaries against original trajectories periodically.
- Conflict resolution: Memory says X; current observation says not-X. The agent has to decide which to trust. Usually current observation wins, but flagging conflicts to the user is the better UX.
- User-visible memory controls: A user should be able to inspect, edit, and delete memories. Without this, memory is opaque and untrustable.
How Harnesses & Frameworks Implement This
| Harness / Framework | Cross-session memory |
|---|---|
| Claude Code | CLAUDE.md + transcript persistence + --continue/--resume |
| Claude Agent SDK | All layers programmatically |
| ruflo | All six categories first-class |
| LangGraph | Checkpointers + MemoryStore pattern |
| AutoGen | Add-ons (mem0, memori) for the latter categories |
| CrewAI | Built-in short-term + long-term memory |
| OpenAI Agents SDK | Conversation state + DIY for rest |
| Codex CLI | AGENTS.md + transcript |
| Cursor | .cursorrules + chat history + codebase index |
Connections to Other Concepts
harness-owned-memory.md— The category.agentdb-and-vector-stores-in-harnesses.md,reasoning-bank.md,sona-self-learning-neural-patterns.md,micro-lora-adapters-at-the-harness-layer.md— The memory layers.memory-portability-across-harnesses.md— Cross-harness rather than cross-session.../../ai-agent-concepts/03-memory-systems/long-term-memory.md— Foundational coverage.
Further Reading
- ruvnet, ruflo USERGUIDE — Memory pipeline overview.
- LangGraph, Memory Patterns — Practical guide to memory in LangGraph.