arXiv cs.AI· Matthias Busch, Marius Tacke, Roland C. Aydin, Christian Feiler, Christian J. Cyron·· 17 小时前AI 评分58
CTXAgent:让 LLM 智能体自主管理上下文
CTXAgent - Self-Controlled Context Management of LLM Agents
AI 导读
arXiv 论文 CTXAgent 研究让模型自行决定何时压缩上下文、保留什么以及如何写交接内容,在 35-212 轮混合任务会话上对比七个前沿模型。多数最强模型能定期压缩与整理,混合会话的实时上下文大多保持在 100k token 以下,基准得分大多没有显著下降。
正文 · 原文
Abstract: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.
| Subjects: | Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2610.34425 [cs.AI] |
| (or arXiv:2610.34425v1 [cs.AI] for this version) | |
| https://doi.org/10.48550/arXiv.2610.34425 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Matthias Busch [view email]
[v1]
Sun, 25 Oct 2026 16:30:56 UTC (742 KB)
来源:arXiv cs.AI · arxiv.org