Self-GC: Self-Governing Context for Long-Horizon LLM Agents
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
Long-horizon LLM agents accumulate tool results, files, plans, and user constraints that are too structured to be treated as a disposable text suffix. Current systems mostly rely on in-run heuristics such as chronological pruning and tool-output masking, or on final self-summary near a context limit. Heuristics are cheap but blind to future dependencies; summaries preserve narrative state but often hide exact evidence, locators, and editable artifacts. We present Self-GC, where GC denotes self-governing context while deliberately echoing garbage collection: the system does not merely reclaim unused tokens, but governs the lifecycle of agent context objects. Self-GC turns user turns, tool spans, and skill state into indexed objects; asks a side-channel planner to propose fold, mask, and prune actions; and lets the harness enforce recoverable sidecars, safe commit boundaries, and cache-aware commit. On a 33-session Hard Set, Self-GC prunes 43.95% of prefix tokens while leaving 84.85% of future continuations unaffected, compared with no-impact rates of 54.55% to 69.70% for heuristic baselines. On a 332-session production-derived suite, three planner backbones reach no-impact rates of 91.27% to 94.58%, while baselines remain at 77.71% to 87.46%. In production, an online account-level split reduces daytime average input tokens by 10% to 15%, with peak reductions near 20%. These results point to context management as runtime lifecycle control over indexed, recoverable objects rather than post hoc text cleanup.
Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 20 of its 34 references that are in the map. First posted on arXiv 1 Jul 2026.
Builds on
20 of 34 references.
Closest ancestors · 5
Same direction, newest first
- 2026ContextBudget: Budget-Aware Context Management for Long-Horizon Search Agents2 Apr
- 2026TiMem: Temporal-Hierarchical Memory Consolidation for Long-Horizon Conversational Agents6 Jan
- 2025ACON: Optimizing Context Compression for Long-horizon LLM Agents1 Oct
- 2025MemGuide: Intent-Driven Memory Selection for Goal-Oriented Multi-Session LLM Agents26 May
- 2025A-MEM: Agentic Memory for LLM Agents17 Feb
Other references · 15
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2023G-Eval: NLG Evaluation using GPT-4 with Better Human Alignmentcited by 2,276
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 2,006
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,389
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 880
- 2023ExpeL: LLM Agents Are Experiential Learnerscited by 876
- 2023JudgeLM: Fine-tuned Large Language Models are Scalable Judgescited by 367
- 2025Reducing Cost of LLM Agents with Trajectory Reductioncited by 48
- 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agentscited by 44
- 2025LongCodeZip: Compress Long Context for Code Language Modelscited by 39
- 2025MCP-AgentBench: Evaluating Real-World Language Agent Performance with MCP-Mediated Toolscited by 32
Built on by
Citing papers per year: 2026: 11.
11 papers.
- 2026Memory Control Signals Emerge Before Action in Long Horizon Agentscited by 1
- 2026StateComp: Learning When to Compress History in Long Horizon Agentscited by 1
- 2026CommitKV: Lifecycle-Aware KV Cache Compression via Commit Transitions for Multi-Turn Agentscited by 0
- 2026DRSR: Learning Set-Level Deletion Risk for Efficient Long-Horizon Agentscited by 0
- 2026Stable Geometry with Divergent Task Evidence for Efficient Long-Horizon Agent Compressioncited by 0
- 2026When Can Agents Forget Their Reasoning? ICLR for Long-Horizon Agent Context Compressioncited by 0
- 2026CADOC: Cache-Aware Dynamic Object Context for Long-Horizon Agentscited by 0
- 2026ContextRender: From Execution Dependencies to Agent Contextcited by 0
- 2026MemTrace: State-Consistent Memory for Long-Horizon Coding Agentscited by 0
- 2026When Agent Context Goes Stale: Incoherence in Volatile Agent Contextcited by 0
- 2026ProgramGym: Scaling Training Environments for Long-Horizon Program Reproduction Agentscited by 0
- 2026ProgramGym: Scaling Training Environments for Long-Horizon Program Reproduction Agents9 Oct 2026
- 2026When Agent Context Goes Stale: Incoherence in Volatile Agent Context4 Oct 2026
- 2026MemTrace: State-Consistent Memory for Long-Horizon Coding Agents4 Oct 2026
- 2026ContextRender: From Execution Dependencies to Agent Context29 Sep 2026
- 2026CADOC: Cache-Aware Dynamic Object Context for Long-Horizon Agents29 Sep 2026
- 2026When Can Agents Forget Their Reasoning? ICLR for Long-Horizon Agent Context Compression24 Sep 2026
- 2026Stable Geometry with Divergent Task Evidence for Efficient Long-Horizon Agent Compression23 Sep 2026
- 2026StateComp: Learning When to Compress History in Long Horizon Agents23 Sep 2026
- 2026Memory Control Signals Emerge Before Action in Long Horizon Agents23 Sep 2026
- 2026DRSR: Learning Set-Level Deletion Risk for Efficient Long-Horizon Agents23 Sep 2026
- 2026CommitKV: Lifecycle-Aware KV Cache Compression via Commit Transitions for Multi-Turn Agents8 Aug 2026
Similar, not cited
Close in wording, no citation either way
- 2026LLM Agents Are Latent Context Managers: Eliciting Self-Managed Context via State Proprioception
- 2026GenericAgent: A Token-Efficient Self-Evolving LLM Agent via Contextual Information Density Maximization (V1.0)
- 2026Beyond Compaction: Structured Context Eviction for Long-Horizon Agents
- 2026Filesystem-Based Memory for LLM Agents: Organization, Evolution, and Sustainability
- 2026Beyond Semantic Organization: Memory as Execution State Management for Long-Horizon Agents
- 2026Agent libOS: A Runtime Substrate for Capability-Controlled Self-Evolving LLM Agents
- 2026Self-Designed Evaluators and Warm Memory for Long-Horizon Agents
- 2026The Hidden Footprint: Making Storage a First-Class Metric for LLM Agent Evaluation