Explore/framework/The Compaction Cliff in Long-Running AI Agent Memory
T

Saber Zerhoudi, Jelena Mitrovic, Michael Granitzer/The Compaction Cliff in Long-Running AI Agent MemoryUnknown

A safety rule and an episodic log compete for the same tokens in an AI agent's context. When the budget overflows, both are summarized at the same rate; only the rule needs exact wording to remain enforceable. On 20 production agent configurations, Claude Code's /compact prompt on Sonnet 4.6 preserves 53\% of safety rules after one compaction round and 10\% after five. We name this the Compaction Cliff. We address it with Knowledge Triage, a framework that classifies each line of an agent's knowledge base by type and routes each type through its own retention policy. Three deterministic operators implement this triage across the three context-management operations: TypeCompact rewrites items in place under per-type fidelity, TypeDecompose partitions a topic too large to compact safely, replicating in-scope safety rules across partitions, and TypeRetrieve fetches items from external storage with in-scope rules pinned ahead of relevance. On five public corpora, TypeCompact preserves 2--4$\times$ more safety rules than the strongest single-shot LLM compactor at every ratio, with 96\% recall over five rounds. TypeDecompose reaches 0\% locality violations against 93\% under uniform partitioning. TypeRetrieve reaches 100\% recall@50 against 73\% for the best single-shot LLM retriever. On three downstream behavioral benchmarks, we outperform the production Sonnet compactor on medical compliance (paired McNemar $p < 10^{-8}$ on preservation, $N = 200$), the full-policy and hierarchical baselines on retail task pass rate ($p < 0.01$, $N = 115$), and the hierarchical compaction on the airline domain ($p = 0.024$). We release AgentArtifactCorpus (396{,}934 agent configurations from 54{,}628 public GitHub repositories), the classifier, and the reference implementation.

framework
GitHubCompare
Refreshed 7h ago
OverviewActivity52wAlternativesDocs
Stars0
Forks0
HF Downloads30d
Last commit
Refreshed7h ago
Project healthUnknownNo activity data.
Production readinessResearch / EarlyBest for exploration and prototyping.
Risk notesUnknown licenseVerify license before production use.
AgentHub Score
55 / 100
Composite score from 6 signals. How we score →
Active project
55Score
Growth
40C
Activity
30C
Documentation
70C+
Maturity
45C
Community
42C
Production
58C
GitHub stars · 5 days observed0 not enough history
snapshots
Repository activity · 5 days observedReal snapshots from pushed_at
inactivepushed
2026-08-262026-08-31
Practical assessment
Should you use it?

✓ Best for

  • Multi-agent orchestration
  • Production agentic workflows
  • Stateful long-running tasks

◎ Strengths

  • Stable API
  • Active release cadence
  • Strong GitHub community

✕ Not ideal for

  • Simple single-step automation
  • Teams without Python/ML expertise

⚠ Watch-outs

  • Breaking changes between minor versions
  • Ecosystem lock-in if tightly coupled
Technical details
What's inside
Language
License
Sourcearxiv
Open source✗ No
Commercial use
Docs
Demo

AgentHub Score

55
Score 55/100
Below average

Alternatives

C
CHAL: Council of Hierarchical Agentic Language
0 · framework
55
S
Structuring agentic AI for HPC code modernization
0 · framework
55
A
Agentic Language-to-Objective Synthesis for Optofluidic Assembly
0 · framework
55
M
MindZero: Learning Online Mental Reasoning With Zero Annotations
0 · framework
55
Compare all →

Recent activity

Latest commit —
Indexed by AgentHub crawler7h ago
Monitor for new releasesongoing