Conversation Memory and Compaction — Surviving the Long Session
The first memory problem every agent hits is the humblest: the conversation itself outgrows the window. Tool outputs pile up, reasoning accumulates, and somewhere past the first hour the agent must start forgetting parts of its own session — the only question is whether it forgets with judgment or at random. Compaction is where memory engineering starts, and it's harder than it looks because the thing doing the summarizing is the thing that needs the summary.
The strategy ladder — buffer, sliding window, selective eviction, compaction — and why the top rung needs engineering: a preservation contract for what survives verbatim, structured rolling summaries, boundary-triggered timing, and the architectural rule that compaction should demote to episodic storage, never delete.