mlsanityData to 24 Nov 2026

CTXAgent - Self-Controlled Context Management of LLM Agents

arXiv 2610.34425 ↗Submitted 25 Oct 2026cs.AIcited by 1

On the map: LLM agents and tool use → Agent memory systems also fits: General LLM agent frameworks and benchmarks

Abstract (arXiv)

Agent harnesses keep long sessions inside the context window by compacting the history when a token threshold is crossed. We study an alternative in which the model manages its own context: it decides when to compact, what to keep and what to write as the hand-off, given two tools and one paragraph of guidance. Since earlier work found that open-weight models cannot manage their own context without scaffolding, we compare seven frontier models under identical conditions, with and without the context tools, on token cost and benchmark score, and we compare our harness with three widely used harnesses on two of these models. The benchmark is assembled from existing ones: coding exercises, multi-step SciCode problems and SWE-bench Pro and Terminal-Bench 4.0 tasks are interleaved with planted facts, ephemeral observations and standing instructions, all checked deterministically, in sessions of 35-212 turns that resemble a user working through different tasks in one chat. Most of the strongest models manage their context: they compact and curate regularly, the live context of the mixed sessions stays mostly below 100k tokens, and their benchmark scores mostly do not drop significantly. For the models that manage their context well, the cost reduction is substantial but varies between models, because some models compact so often that other costs increase. With Claude Opus 5.5, the self-managed harness matches Claude Code on task success at 34% lower cost than its explicit 200k-window configuration and 49% lower than its default, with no context window to choose. We release the agent, the benchmark and all result rows.

Key facts. Cited by 1 paper in the map (data through 24 Nov 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 38 of its 50 references that are in the map. Submitted 25 Oct 2026.

Builds on

38 of 50 references.

Closest ancestors · 8

Same direction, newest first

  1. 2026LLM Agents Are Latent Context Managers: Eliciting Self-Managed Context via State Proprioception29 Jun
  2. 2026Self-Compacting Language Model Agents22 Jun
  3. 2026MemoryArena: Benchmarking Agent Memory in Interdependent Multi-Session Agentic Tasks18 Feb
  4. 2026Active Context Compression: Autonomous Memory Management in LLM Agents12 Jan
  5. 2025AgentFold: Long-Horizon Web Agents with Proactive Context Management28 Oct
  6. 2025Scaling Long-Horizon LLM Agent via Context-Folding13 Oct
  7. 2025Evaluating Memory in LLM Agents via Incremental Multi-Turn Interactions7 Jul
  8. 2024Evaluating Very Long-Term Conversational Memory of LLM Agents27 Feb

Other references · 30

  1. 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 876
  2. 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 742
  3. 2025SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?cited by 363
  4. 2024AI Agents That Mattercited by 296
  5. 2024SciCode: A Research Coding Benchmark Curated by Scientistscited by 210
  6. 2025SWE-EVO: Benchmarking Coding Agents in Long-Horizon Software Evolution Scenarioscited by 80
  7. 2025The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Managementcited by 73
  8. 2025Context as a Tool: Context Management for Long-Horizon SWE-Agentscited by 56
  9. 2026Dive into Claude Code: The Design Space of Today's and Future AI Agent Systemscited by 48
  10. 2026Stop Comparing LLM Agents Without Disclosing the Harnesscited by 46
  11. 2026Don't Break the Cache: An Evaluation of Prompt Caching for Long-Horizon Agentic Taskscited by 24
  12. 2026Inside the Scaffold: A Source-Code Taxonomy of Coding Agent Architecturescited by 22
18 more
  1. 2026SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agentscited by 22
  2. 2026The Scaffold Effect in Coding Agents: Harness Choice as a Hidden Variable in Coding-Agent Evaluationcited by 19
  3. 2025LoCoBench-Agent: An Interactive Benchmark for LLM Agents in Long-Context Software Engineeringcited by 17
  4. 2025LoCoBench: A Benchmark for Long-Context Large Language Models in Complex Software Engineeringcited by 15
  5. 2026Harness Engineering: Anatomy, Architecture, and Evolution of Coding Agents -- A Source-Code Study of Eleven Systemscited by 15
  6. 2026Slipstream: Trajectory-Grounded Compaction Validation for Long-Horizon Agentscited by 13
  7. 2026Governance Decay: How Context Compaction Silently Erases Safety Constraints in Long-Horizon LLM Agentscited by 13
  8. 2026Toward Reliable Context Compression for Long-Horizon Agents: An Empirical Study of Execution Instabilitycited by 13
  9. 2026Context Language Modelscited by 12
  10. 2026Masking Stale Observations Helps Search Agents -- Until It Doesn't: A Regime Map and Its Mechanismcited by 8
  11. 2026Same Model, Different Harness: Different Coding-Agent Resultscited by 8
  12. 2026TokenPilot: Cache-Efficient Context Management for LLM Agentscited by 7
  13. 2026SciCode-Verified: How Benchmark Defects Underestimated the Scientific-Coding Ability of Language Modelscited by 5
  14. 2026Lost in Context Compaction: When LLM Systems Drop Side Constraintscited by 5
  15. 2026CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agentscited by 4
  16. 2026AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agentscited by 4
  17. 2026Beyond Token Savings: A Systematic Study of Context Compression in LLM Agentscited by 3
  18. 2026Identical Runs, Different Results: Benchmarking AI Coding Agents on Open-Weight Modelscited by 1

Built on by

Cited by year (2026 to 24 Nov)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Trained Agentic Context Management
  2. 2026CarryOn: Learning What to Keep in Context for Long-Horizon LLM Agents
  3. 2026Context as an Environment: Programmatic Context Management for Long-Horizon Agents
  4. 2026Beyond Compaction: Structured Context Eviction for Long-Horizon Agents
  5. 2026ACM: Agentic Context Management for Long Horizon Tasks
  6. 2026Bud ContextCompact 2.0: Context Compaction for Agent Success and Accuracy with Small Language Models and Constrained Context Windows
  7. 2026PACMS: Submodular Context Selection as a Pluggable Engine for LLM Agents
  8. 2026ContextWeaver: Selective and Dependency-Structured Memory Construction for LLM Agents