CarryOn:学习为长时程大语言模型智能体在上下文中保留哪些内容

arXiv cs.CL 论文

摘要

CarryOn 是一款面向长周期 LLM 智能体的轻量级上下文管理器,通过学习得到的选择器和自适应保留策略,将紧凑的执行状态与关联来源的证据相结合,在 AppWorld、OfficeBench 和 Tau2 Telecom 上实现了 75.7% 的宏平均任务成功率。

arXiv:2611.17808v1 Announce Type: new Abstract: Long-horizon LLM agents can coordinate tools and applications to complete complex, multi-step tasks. As their interaction histories grow, effective context management becomes essential for reliable and efficient execution. Existing methods reduce context through summarization, pruning, or history selection. However, shorter contexts do not necessarily support better decisions: summaries can omit exact details needed for later actions, while retaining entire interactions can carry substantial irrelevant information. We propose CarryOn, a lightweight context manager that pairs compact execution state with fine-grained, source-linked evidence. A learned selector and adaptive retention policy keep relevant evidence available without additional LLM calls for context management. We introduce two complementary evaluation metrics: $S_\alpha$ prioritizes task success while accounting for resource use, and normalized cost per success (NCS) measures the resources spent per successful task. Across AppWorld, OfficeBench, and Tau2 Telecom with three LLM Actors, CarryOn achieves 75.7% macro-averaged task success, exceeding the strongest baseline by 6.7 percentage points. It also achieves the best average scores on both metrics.
查看原文
查看缓存全文

缓存时间: 2026/11/16 08:21

# Learning What to Keep in Contextfor Long-Horizon LLM Agents
Source: [https://arxiv.org/html/2611.17808](https://arxiv.org/html/2611.17808)
## ![[Uncaptioned image]](https://arxiv.org/html/2611.17808v1/carryon_logo.png)CarryOn: Learning What to Keep in Context for Long\-Horizon LLM Agents

Lihuan LiRuiyi Yang††thanks:Ruiyi Yang and Jiru Wang contributed equally as co\-second authors\.Affiliation:University of New South Wales, Sydney, AustraliaEmail:[ruiyi\.yang@unsw\.edu\.au](mailto:[email protected])Jiru Wang[![[Uncaptioned image]](https://arxiv.org/html/2611.17808v1/carryon_logo.png)CarryOn: Learning What to Keep in Context for Long\-Horizon LLM Agents](https://arxiv.org/html/2611.17808#Hfootnote.1)Affiliation:University of New South Wales, Sydney, AustraliaEmail:[jiru\.wang@unsw\.edu\.au](mailto:[email protected])Yifan DuanAffiliation:University of New South Wales, Sydney, AustraliaEmail:[yifan\.duan@unsw\.edu\.au](mailto:[email protected])Xiachong LinAffiliation:University of New South Wales, Sydney, AustraliaEmail:[xiachong\.lin@unsw\.edu\.au](mailto:[email protected])Hao XueAffiliation:The Hong Kong University of Science and Technology \(Guangzhou\), Guangzhou, ChinaEmail:[yang\.song1@unsw\.edu\.au](mailto:[email protected])Yang SongAffiliation:University of New South Wales, Sydney, AustraliaEmail:[flora\.salim@unsw\.edu\.au](mailto:[email protected])Flora SalimAffiliation:University of New South Wales, Sydney, AustraliaEmail:[haoxue@hkust\-gz\.edu\.cn](mailto:[email protected])

###### Abstract

Long\-horizon LLM agents can coordinate tools and applications to complete complex, multi\-step tasks\. As their interaction histories grow, effective context management becomes essential for reliable and efficient execution\. Existing methods reduce context through summarization, pruning, or history selection\. However, shorter contexts do not necessarily support better decisions: summaries can omit exact details needed for later actions, while retaining entire interactions can carry substantial irrelevant information\. We propose CarryOn, a lightweight context manager that pairs compact execution state with fine\-grained, source\-linked evidence\. A learned selector and adaptive retention policy keep relevant evidence available without additional LLM calls for context management\. We introduce two complementary evaluation metrics:SαS\_\{\\alpha\}prioritizes task success while accounting for resource use, and normalized cost per success \(NCS\) measures the resources spent per successful task\. Across AppWorld, OfficeBench, and Tau2 Telecom with three LLM Actors, CarryOn achieves 75\.7% macro\-averaged task success, exceeding the strongest baseline by 6\.7 percentage points\. It also achieves the best average scores on both metrics\. Project repository:[https://anonymous\.4open\.science/r/CarryOn\-0816/](https://anonymous.4open.science/r/CarryOn-0816/)\.

## 1Introduction

![Refer to caption](https://arxiv.org/html/2611.17808v1/intro.png)Figure 1:CarryOn: carry what matters\.Left:Context\-management challenges and CarryOn’s separation of compact task state from fine\-grained evidence\.Right:Success–efficiency comparison \(top\) and task\-success gains over the strongest baseline, averaged by benchmark or Actor \(bottom\)\.Long\-horizon agents built on large language models \(LLMs\)\([Yao et al\., 2022](https://arxiv.org/html/2611.17808#bib.bib29);[Hu et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib4);[Wang et al\., 2024c](https://arxiv.org/html/2611.17808#bib.bib24)\)have made substantial progress in solving complex, multi\-step tasks\. These capabilities support applications ranging from everyday digital tasks\([Trivedi et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib16)\)to office workflows\([Wang et al\., 2024b](https://arxiv.org/html/2611.17808#bib.bib23)\)and customer support\([Barres et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib1)\)\. The payment task in the upper left of Figure[1](https://arxiv.org/html/2611.17808#S1.F1), for example, requires an agent to identify coworkers, check and refill a balance, and send payments\. As such tasks progress, observations and intermediate results accumulate, increasing the cost of repeatedly processing history\. Yet later actions may depend on details obtained many steps earlier\. This has motivated context\-management methods that limit context growth while preserving information needed for continued execution\([Hu et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib4);[Kang et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib8);[Zhou et al\., 2026](https://arxiv.org/html/2611.17808#bib.bib31)\)\.

Some approaches fine\-tune the acting LLM to manage its own memory during task execution\([Zhou et al\., 2026](https://arxiv.org/html/2611.17808#bib.bib31);[Jiang et al\., 2026](https://arxiv.org/html/2611.17808#bib.bib5);[Wang et al\., 2026b](https://arxiv.org/html/2611.17808#bib.bib22)\)\. External context managers instead construct the Actor’s input by summarizing, pruning, or selecting interaction histories, without fine\-tuning the Actor\([Kang et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib8);[Pan et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib13);[Zhang and Sun, 2026](https://arxiv.org/html/2611.17808#bib.bib30)\)\. As illustrated in the middle left of Figure[1](https://arxiv.org/html/2611.17808#S1.F1), retaining all history increases input cost, while compression or selection can omit evidence needed later\. Selecting complete interactions may also retain unrelated records\. The challenge is to keep task progress concise while making the specific evidence needed for each action available\.

We proposeCarryOn, a lightweight context manager that separates progress tracking from evidence selection\. Like carry\-on luggage, it keeps essential evidence within reach for the actions ahead\. The Actor records progress and next steps in a compact control state, while an evidence manager selects fine\-grained units from original observations and preserves their source references\. A learned selector and adaptive retention policy determine which evidence the Actor receives at each step, allowing earlier records to be brought back when they become relevant\. In the lower left of Figure[1](https://arxiv.org/html/2611.17808#S1.F1), the compact state tracks progress toward the payments, while coworker records obtained at step 9 are available at step 33 to complete the transfers after a balance refill\.

We evaluate CarryOn on AppWorld, OfficeBench, and Tau2 Telecom with three LLM Actors\. Averaged equally across benchmarks and Actors, CarryOn achieves 75\.7% task success, exceeding Full History by 13\.3 percentage points and the strongest overall baseline, SWE\-Pruner, by 6\.7 percentage points\. In the upper right of Figure[1](https://arxiv.org/html/2611.17808#S1.F1), CarryOn achieves the highestS0\.8S\_\{0\.8\}, a score defined in Section[4\.3](https://arxiv.org/html/2611.17808#S4.SS3)that emphasizes task success while accounting for token and Actor\-call costs\. CarryOn also achieves the lowest mean normalized cost per success \(NCS\), at 0\.792\. The lower right shows higher mean success than the strongest baseline when results are averaged by benchmark or by Actor\.

Our main contributions are:

1. 1\.We introduce CarryOn, a lightweight external context manager that supports reliable long\-horizon task execution with compact working context, without fine\-tuning the Actor\.
2. 2\.We separate persistent progress tracking from action\-specific evidence selection\. Fine\-grained original observations can be revisited as action requirements change, preserving task continuity and access to exact details without additional LLM calls for context management\.
3. 3\.Experiments on three benchmarks demonstrate CarryOn’s effectiveness and cross\-Actor generalization\. We support this evaluation with two complementary metrics:SαS\_\{\\alpha\}prioritizes success while accounting for cost, and NCS measures resource cost per successful outcome\.

## 2Related Work

### 2\.1Long\-Horizon LLM Agents

Reliable long\-horizon execution requires agents to turn goals into sequences of actions and adjust them using environment feedback\. Agents interleave reasoning and action\([Yao et al\., 2022](https://arxiv.org/html/2611.17808#bib.bib29)\)and use executable code to compose tool calls and respond to feedback\([Wang et al\., 2024a](https://arxiv.org/html/2611.17808#bib.bib20)\)\. Reflection on previous attempts and state\-driven workflows further structure execution\([Shinn et al\., 2023](https://arxiv.org/html/2611.17808#bib.bib15);[Wu et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib27)\)\. A complementary direction reuses successful experience as executable skills or reusable workflows\([Wang et al\., 2023](https://arxiv.org/html/2611.17808#bib.bib17);[Wang et al\., 2024c](https://arxiv.org/html/2611.17808#bib.bib24)\)\. Hierarchical working memory further organizes ongoing execution around subgoals\([Hu et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib4)\)\. Evaluations that measure task length by human completion time highlight the difficulty of sustaining reliable execution\([Kwa et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib10)\)\. CarryOn supports long\-horizon execution by adapting the Actor’s context to the information needed at each decision step\.

### 2\.2Context Management for LLM Agents

Context management aims to keep useful information accessible within a limited working context\. One approach uses a context manager separate from the Actor to construct its input through compression, selection, or structured memory\. Prompt compression removes less informative content using language\-model scores or learned token classifiers\([Li et al\., 2023](https://arxiv.org/html/2611.17808#bib.bib12);[Jiang et al\., 2023](https://arxiv.org/html/2611.17808#bib.bib6);[Pan et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib13)\), while query\-aware compression prioritizes information relevant to the current question\([Jiang et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib7);[Xu et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib28)\)\. Dialogue systems also maintain memory by recursively summarizing previous exchanges\([Wang et al\., 2025b](https://arxiv.org/html/2611.17808#bib.bib19)\)\. For agents, learned observation processing and history summarization reduce the material passed to the Actor\([Lee et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib11);[Kang et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib8)\), whereas learned retention preserves selected action–observation steps\([Zhang and Sun, 2026](https://arxiv.org/html/2611.17808#bib.bib30)\)\. Dependency\-structured memory additionally connects past steps to the earlier information they rely on, supporting selective retrieval and summarization\([Wu et al\., 2026](https://arxiv.org/html/2611.17808#bib.bib26)\)\.

Another line trains the acting LLM to manage and use memory through recurrent consolidation, progress\-aware retention, or indexed retrieval\([Zhou et al\., 2026](https://arxiv.org/html/2611.17808#bib.bib31);[Jiang et al\., 2026](https://arxiv.org/html/2611.17808#bib.bib5);[Wang et al\., 2026b](https://arxiv.org/html/2611.17808#bib.bib22)\)\. ReSum\-GRPO trains the Actor to continue from summarized contexts\([Wu et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib25)\)\. Our work focuses on external context management\. CarryOn selects fine\-grained fragments from original observations and can revisit previously omitted evidence, while maintaining a separate compact state for task progress\.

## 3Method: CarryOn

CarryOn maintains an execution context that combines compact task state with selected evidence from the interaction history\. The control state provides a concise account of progress and next steps, while selected evidence preserves the concrete details needed for action\. An evidence manager adapts this working context to the current decision, and the Actor uses it to act and update its state\. Figure[2](https://arxiv.org/html/2611.17808#S3.F2)organizes the method into four regions:*History*\(1\),*Evidence selection*\(2\),*Acting*\(3\), and*Selector training*\(bottom\)\. Experimental configurations appear in Section[4\.2](https://arxiv.org/html/2611.17808#S4.SS2)\.

![Refer to caption](https://arxiv.org/html/2611.17808v1/method.png)Figure 2:CarryOn overview\.\(1\) History:The archive supplies fine\-grained observation units\.\(2\) Evidence selection:The selector ranks units using the task and latest observation\.\(3\) Acting:The Actor combines selected evidence, recent history, and compact state to act and update its state\.Selector training \(bottom\):Annotation citations and later evidence use supervise ranking of action–observation blocks\. The frozen selector scores finer evidence units at test time\.### 3\.1Problem Formulation

At decision steptt, letqqdenote the task,HtH\_\{t\}the interaction archive,oto\_\{t\}the current public observation, andmtm\_\{t\}the current control state\. LetWtW\_\{t\}be the selected older evidence andRtR\_\{t\}the recent interactions always included in context\. The Actor receives

Xt=Compose⁡\(q,mt,Wt,Rt\)\.X\_\{t\}=\\operatorname\{Compose\}\(q,m\_\{t\},W\_\{t\},R\_\{t\}\)\.\(1\)Here,Compose\\operatorname\{Compose\}also includes system instructions and tool definitions\. The Actor jointly produces an actionata\_\{t\}and a proposed state updatem~t\+1\\widetilde\{m\}\_\{t\+1\}\. The accepted update carries progress forward, while the action and its observation extendHtH\_\{t\}\.

### 3\.2History and Evidence Units

Summarizing observations can omit exact details, while retaining whole interaction steps can include many unrelated records\([Kang et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib8);[Zhang and Sun, 2026](https://arxiv.org/html/2611.17808#bib.bib30)\)\. CarryOn therefore selects observation fragments independently\. In region 1 \(*History*\) of Figure[2](https://arxiv.org/html/2611.17808#S3.F2), the*Archive*stores raw action–observation steps, and*Split \[i\]*divides observations into units such as individual records\. Each unit retains its original content, a reference to its source interaction, and the action that produced the observation\. Unselected evidence remains in the archive for later decisions\.

### 3\.3Evidence Selection

Evidence can be essential even when its wording differs from the task\. In region 2 \(*Evidence selection*\) of Figure[2](https://arxiv.org/html/2611.17808#S3.F2), the*Learned selector*evaluates historical units through relevance ranking and next\-action use prediction\.

#### Selector scores\.

The selector uses the taskqqand current observationoto\_\{t\}, shown as*Task \+ Latest obs\.*, to assess each historical unituu\. It receives two scores:

rt​\(u\)\\displaystyle r\_\{t\}\(u\)=fϕ​\(q,ot,u\),\\displaystyle=f\_\{\\phi\}\(q,o\_\{t\},u\),\(2\)pt​\(u\)\\displaystyle p\_\{t\}\(u\)=σ⁡\(gϕ​\(q,ot,u\)\)\.\\displaystyle=\\sigma\\bigl\(g\_\{\\phi\}\(q,o\_\{t\},u\)\\bigr\)\.Here,ϕ\\phidenotes the selector parameters\. The functionfϕf\_\{\\phi\}produces the relevance scorert​\(u\)r\_\{t\}\(u\)for ordering candidates\. The functiongϕg\_\{\\phi\}produces a raw next\-action use score, and the sigmoidσ\\sigmamaps it topt​\(u\)∈\[0,1\]p\_\{t\}\(u\)\\in\[0,1\], the predicted probability thatuuwill be used in the next action\.

#### Temporary evidence expansion\.

Evidence needs change as a task progresses\. A fragment excluded from the base evidence pack may still be needed for the next action\. Temporary evidence expansion makes it available for the current decision, helping the Actor proceed without repeating earlier interactions\. The*Pack within budget*stage forms a base packPtP\_\{t\}by ranking older units withrt​\(u\)r\_\{t\}\(u\)under budgetBB, after reserving space for recent interactionsRtR\_\{t\}\. The next\-action use probabilitypt​\(u\)p\_\{t\}\(u\)then identifies additional units to retain:

Dt\\displaystyle D\_\{t\}=\{u∈Ut∖Pt:pt​\(u\)≥τ\},\\displaystyle=\\\{u\\in U\_\{t\}\\setminus P\_\{t\}:p\_\{t\}\(u\)\\geq\\tau\\\},\(3\)Wt\\displaystyle W\_\{t\}=Pt∪Dt,\\displaystyle=P\_\{t\}\\cup D\_\{t\},whereUtU\_\{t\}contains older candidates outsideRtR\_\{t\},τ\\tauis the expansion threshold, andDtD\_\{t\}contains the additional units\. This expansion can exceed the base budget and is recomputed at each decision step as evidence needs change\. The final evidenceWtW\_\{t\}follows the green arrow into region 3 \(*Acting*\) of Figure[2](https://arxiv.org/html/2611.17808#S3.F2)\. Appendix[B\.1](https://arxiv.org/html/2611.17808#A2.SS1)gives the budget accounting and full algorithm\.

### 3\.4Acting with State and Evidence

A compact state tracks what to do next, while evidence supplies the concrete values needed to act, such as account identifiers, file paths, or user\-provided facts \(Appendix[F](https://arxiv.org/html/2611.17808#A6)\)\. In the payment example in region 3 \(*Acting*\) of Figure[2](https://arxiv.org/html/2611.17808#S3.F2), the state records that seven coworkers have been found and should each receive $20, while evidence supplies the recipients’ account identifiers\.

#### Context and state update\.

The*Actor context*brings these representations together with the task and*Latest step*\(Eq\.[1](https://arxiv.org/html/2611.17808#S3.E1)\)\. The*LLM Actor*jointly produces*Action*and*New state*\. In our implementation, the Actor’s boundedMEMORYupdate has five fields:donerecords completed work,openremaining obligations,nextthe next operation,answer\_modewhether a returned value is required, andknown\_apispreviously inspected APIs\. The blue*Next call*arrow carries the accepted state into the next decision\. Executing the action in the*Environment*adds new evidence through the*Action \+ observation*return path\.

#### Adaptive recent retention\.

Recent interactions provide the context needed to continue execution and correct invalid responses\. CarryOn always retains the latest interaction and extends this recent window when the Actor produces an invalid action or state update\. This adjusts the*Latest step*input in region 3 of Figure[2](https://arxiv.org/html/2611.17808#S3.F2)\. Interactions outside this window remain candidates for selection\. Appendix[B\.1](https://arxiv.org/html/2611.17808#A2.SS1)specifies the acceptance and retention rules\.

### 3\.5Selector Training

Successful trajectories show how earlier evidence supports later actions\. The bottom*Selector training*region of Figure[2](https://arxiv.org/html/2611.17808#S3.F2)uses these trajectories from official training splits to supervise selection\. At the*Future\-use labels*stage, evidence cited in state annotations or used in later actions provides positive ranking examples\. Candidates with neither signal serve as weak negatives\. Next\-action use labels identify evidence used in the immediately following action\.

The*LoRA fine\-tuning*stage\([Hu et al\., 2021](https://arxiv.org/html/2611.17808#bib.bib3)\)first adapts a pretrained reranker for pairwise ranking\. For a positive blocku\+u^\{\+\}and a weak negative blocku−u^\{\-\}from the same decision step, the loss is

ℓrank=log⁡\(1\+exp⁡\(γ\+r−−r\+\)\),\\ell\_\{\\mathrm\{rank\}\}=\\log\\\!\\left\(1\+\\exp\(\\gamma\+r^\{\-\}\-r^\{\+\}\)\\right\),\(4\)wherer\+=rt​\(u\+\)r^\{\+\}=r\_\{t\}\(u^\{\+\}\)andr−=rt​\(u−\)r^\{\-\}=r\_\{t\}\(u^\{\-\}\)are their relevance scores, andγ\\gammais the ranking margin\. We then jointly optimize this ranking objective and binary cross\-entropy for next\-action use prediction:

ℓuse=−y​log⁡p−\(1−y\)​log⁡\(1−p\),\\ell\_\{\\mathrm\{use\}\}=\-y\\log p\-\(1\-y\)\\log\(1\-p\),\(5\)wherep=pt​\(u\)p=p\_\{t\}\(u\)andy∈\{0,1\}y\\in\\\{0,1\\\}labels whether blockuuis used in the immediately following action\. Both stages use complete action–observation blocks, matching the evidence references in the annotations\. At test time, the*Frozen selector*scores individual fragments in region 2\. Appendix[B\.2](https://arxiv.org/html/2611.17808#A2.SS2)gives the labeling and optimization details\.

### 3\.6CarryOn\-E: Local Deployment

As a local deployment extension, CarryOn\-E distills a 27B CarryOn Actor into a 9B student while keeping the context manager fixed, with the training procedure and results in Appendix[I](https://arxiv.org/html/2611.17808#A9)\.

## 4Experimental Setup

### 4\.1Datasets and Baselines

We evaluate CarryOn on AppWorld\([Trivedi et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib16)\), OfficeBench\([Wang et al\., 2024b](https://arxiv.org/html/2611.17808#bib.bib23)\), and the Telecom domain of Tau2\-Bench\([Barres et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib1)\), covering cross\-application tasks, office workflows, and conversational customer support\. The evaluation sets contain 168, 95, and 40 tasks, respectively, with success determined by each benchmark’s official evaluator\.

We compare against Full History, FIFO\-5, and Retrieval, as well as LLMLingua\-2\([Pan et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib13)\), ACON\([Kang et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib8)\), and SWE\-Pruner\([Wang et al\., 2026a](https://arxiv.org/html/2611.17808#bib.bib21)\)for compression and pruning\. AGORA\([Zhang and Sun, 2026](https://arxiv.org/html/2611.17808#bib.bib30)\)provides a learned history\-selection baseline\. Dataset splits and baseline configurations are given in Appendix[A](https://arxiv.org/html/2611.17808#A1)\.

### 4\.2Experimental Configuration

We evaluate Claude Sonnet 5,111[https://www\.anthropic\.com/news/claude\-sonnet\-5](https://www.anthropic.com/news/claude-sonnet-5)Qwen3\.8\-27B,222[https://huggingface\.co/Qwen/Qwen3\.8\-27B](https://huggingface.co/Qwen/Qwen3.8-27B)and Gemma\-4\-31B\.333[https://huggingface\.co/google/gemma\-4\-31B\-it](https://huggingface.co/google/gemma-4-31B-it)For each benchmark, we reuse the same trained CarryOn selector across all three Actors\. ACON transfers prompts optimized with Claude as the Actor\. AGORA transfers Claude\-labeled scorers to Qwen and Gemma on all three benchmarks\. LLMLingua\-2 and SWE\-Pruner, like CarryOn, use external models without Actor\-specific retraining\. The CarryOn selector uses Qwen3\-Reranker\-0\.6B, with offline state annotations and evidence references generated by Claude Sonnet 5\. Context budgets, training settings, and execution interfaces are detailed in Appendix[A](https://arxiv.org/html/2611.17808#A1)\.

### 4\.3Evaluation Metrics

Context management should support successful task completion while controlling execution cost\. Success alone does not reveal the resources required\([Kapoor et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib9)\), while low total cost can reflect early failure\. We therefore report Success with two complementary measures:SαS\_\{\\alpha\}emphasizes task capability while accounting for cost, and normalized cost per success \(NCS\) measures the resources spent per successful outcome\. Task Goal Completion \(TGC\), reported as Success \(%\) in the tables, is100​s/N100s/N, wheressis the number of successful tasks among allNNevaluation tasks\. All cost measures include successful and failed tasks\. Tokens count submitted inputs and returned outputs, including inputs rejected for exceeding the context limit\.

#### Success–efficiency score\.

Motivated by joint quality–efficiency evaluation\([Chi et al\., 2026](https://arxiv.org/html/2611.17808#bib.bib2)\), we defineSαS\_\{\\alpha\}to emphasize task success while rewarding efficient execution\. We first discount success by normalized mean token and Actor\-call costs, then combine this score with Success:

S0\\displaystyle S\_\{0\}=TGC1\+12​T¯/BT\+12​C¯/BC,\\displaystyle=\\frac\{\\mathrm\{TGC\}\}\{1\+\\tfrac\{1\}\{2\}\\bar\{T\}/B\_\{T\}\+\\tfrac\{1\}\{2\}\\bar\{C\}/B\_\{C\}\},\(6\)Sα\\displaystyle S\_\{\\alpha\}=α​TGC\+\(1−α\)​S0\.\\displaystyle=\\alpha\\,\\mathrm\{TGC\}\+\(1\-\\alpha\)\\,S\_\{0\}\.\(7\)HereT¯\\bar\{T\}andC¯\\bar\{C\}are mean system request tokens and Actor calls over allNNtasks\. The reference valuesBTB\_\{T\}andBCB\_\{C\}are the corresponding Full History means on the same task set\. We reportS0\.8S\_\{0\.8\}, assigning 80% weight to Success and 20% to its cost\-discounted counterpart\. This keeps task completion central while rewarding lower resource use\. Higher scores are better\.

#### Normalized cost per success\.

Averaging costs only over successful trajectories omits the resources spent on failures\. Following the cost\-of\-pass perspective\([Wang et al\., 2025a](https://arxiv.org/html/2611.17808#bib.bib18)\), we define NCS by dividing total costs by the number of successes and normalizing these ratios against Full History \(FH\):

NCS=12​C/sCFH/sFH\+12​T/sTFH/sFH\.\\mathrm\{NCS\}=\\frac\{1\}\{2\}\\frac\{C/s\}\{C^\{\\mathrm\{FH\}\}/s^\{\\mathrm\{FH\}\}\}\+\\frac\{1\}\{2\}\\frac\{T/s\}\{T^\{\\mathrm\{FH\}\}/s^\{\\mathrm\{FH\}\}\}\.\(8\)HereCCandTTare total Actor calls and system request tokens over allNNtasks, including failures, andssis the successful\-task count\. NCS equally weights relative calls and tokens per success\. Lower values are better, with Full History equal to 1\. NCS emphasizes resource efficiency and is interpreted alongside Success\.

Scores are calculated within each dataset–Actor setting before averaging settings equally\. Token components and additional accounting details appear in Appendix[D\.1](https://arxiv.org/html/2611.17808#A4.SS1)\.

## 5Results and Analysis

### 5\.1Main Results

Table[1](https://arxiv.org/html/2611.17808#S5.T1)compares CarryOn with seven baselines across three benchmarks and three Actors\. CarryOn achieves the highest mean Success \(75\.7%\) andS0\.8S\_\{0\.8\}\(68\.45\), together with the lowest mean NCS \(0\.792\)\. It ranks first in Success in seven comparisons and ties for first in one, achieves the highestS0\.8S\_\{0\.8\}in eight, and has the lowest NCS in six\. The same frozen selector is reused within each benchmark \(Section[3\.5](https://arxiv.org/html/2611.17808#S3.SS5)\)\.Separating evidence selection from action generation enables cross\-Actor reuse:one frozen selector supports gains across different Actors\. CarryOn also retains the highest meanSαS\_\{\\alpha\}and lowest mean NCS as their respective weights vary over\[0,1\]\[0,1\]\(Appendix[D\.2](https://arxiv.org/html/2611.17808#A4.SS2)\)\.

Table 1:Main results across three benchmarks and three Actors\. Bold marks the best result for each benchmark and Actor, including ties\.On AppWorld, CarryOn leads in Success andS0\.8S\_\{0\.8\}for all three Actors\. The largest improvement over the strongest baseline occurs with Qwen, where Success rises from SWE\-Pruner’s 68\.5% to 84\.5%\. This is consistent with the state–evidence division in Section[3\.4](https://arxiv.org/html/2611.17808#S3.SS4): compact state tracks unfinished work, while selected evidence supplies exact values for tool calls\. The drop in Success when state is removed \(Section[5\.4](https://arxiv.org/html/2611.17808#S5.SS4)\) supports the role of progress tracking alongside evidence selection\. Section[5\.2](https://arxiv.org/html/2611.17808#S5.SS2)shows how earlier records remain available for later actions\.

OfficeBench shows the clearest gains in resource efficiency\. CarryOn achieves the highestS0\.8S\_\{0\.8\}and lowest NCS for every Actor, while leading in Success for Claude and Gemma and matching Full History for Qwen\. Both methods complete 66\.3% of Qwen tasks, but CarryOn raisesS0\.8S\_\{0\.8\}from 59\.68 to 62\.04 and lowers NCS from 1\.000 to 0\.476\. This is the intended benefit of selecting individual observation fragments \(Section[3\.2](https://arxiv.org/html/2611.17808#S3.SS2)\): limiting repeated history while keeping the source records needed for ongoing work\. Compact state preserves progress as the selected evidence changes \(Section[3\.4](https://arxiv.org/html/2611.17808#S3.SS4)\), supporting continued execution with a smaller working context\.

On Tau2 Telecom, CarryOn leads all three metrics with Qwen and Gemma\. For Gemma, Success reaches 77\.5%, compared with 65\.0% for the strongest baseline, SWE\-Pruner, while NCS falls from 0\.864 to 0\.782\. Here the state–evidence division supports dialogue: state tracks pending diagnostic steps, while evidence preserves customer reports and tool\-returned account facts\. The recorded example in Appendix[F](https://arxiv.org/html/2611.17808#A6)shows these two inputs guiding the next response\. With Claude, LLMLingua\-2 achieves higher Success \(80\.0% vs\. 75\.0%\)\.

Gains also appear across different task groups\. Averaged across Actors, CarryOn exceeds the strongest baseline within each group by 12\.28 and 9\.72 percentage points on AppWorld easy and medium tasks, 8\.60 points on OfficeBench L3, and 6\.25 points on Tau2 MMS tasks\. Performance in the remaining groups is broadly comparable to their strongest baselines, with the complete breakdown in Appendix[H](https://arxiv.org/html/2611.17808#A8)\.

Figure 3:Mean calls per task, averaged equally across benchmarks and Actors\. Failed tasks are included\.
### 5\.2Evidence Retention for Long\-Term Dependencies

The ranking objective in Eq\.[4](https://arxiv.org/html/2611.17808#S3.E4)teaches the selector to favor evidence cited in state annotations or used in later actions\. At each decision, CarryOn recomputes the relevance scorert​\(u\)r\_\{t\}\(u\)using the task and current observation \(Section[3\.3](https://arxiv.org/html/2611.17808#S3.SS3)\), allowing previously omitted evidence to be selected again\. Figure[4](https://arxiv.org/html/2611.17808#S5.F4)shows that evidence obtained at least ten Actor steps earlier accounts for 30\.7% of selections in AppWorld, 31\.2% in OfficeBench, and 48\.8% in Tau2 Telecom\. In 40\.2% of task runs, evidence is selected again after being omitted for one or more steps\. The payment case in Appendix[G\.1](https://arxiv.org/html/2611.17808#A7.SS1)illustrates the role of relevance ranking: a previously omitted card record returns to the base evidence pack, and the Actor uses its details to add the card and refill the balance\.Relevance ranking brings earlier evidence back when action requirements change\.

Temporary evidence expansion adds records predicted to be used in the next action \(Eq\.[3](https://arxiv.org/html/2611.17808#S3.E3)\)\. It supplements the base pack in 4\.4% of Actor steps on AppWorld and 12\.2% on OfficeBench\. In an AppWorld example, expansion restores an omitted contact record, and the Actor immediately uses its phone number to send a message \(Appendix[G\.3](https://arxiv.org/html/2611.17808#A7.SS3)\)\.

Figure 4:Age of evidence selected by CarryOn, excluding automatic recent retention\. Percentages pool selection events across Actors within each benchmark\.
### 5\.3More Efficient Agent Trajectories

CarryOn completes more tasks with fewer tool calls on average\.It has the lowest mean Actor and tool calls \(Figure[3](https://arxiv.org/html/2611.17808#S5.F3)\), using 10\.1% fewer tool calls than Full History with comparable Actor calls and higher Success \(Table[1](https://arxiv.org/html/2611.17808#S5.T1)\), consistent with state tracking pending work and selection enabling evidence reuse \(Section[3\.4](https://arxiv.org/html/2611.17808#S3.SS4)\)\.

### 5\.4Key Component Ablations

Table[2](https://arxiv.org/html/2611.17808#S5.T2)compares four variants on AppWorld with Claude\.w/o MEMORYremoves control state and reduces Success most, from 79\.8% to 66\.1%\.Ranking onlyremoves next\-action training and temporary evidence expansion, yielding 76\.8%\.Fine\-grained traininguses individual units labeled by later API\-call reuse, without state\-annotation citations, and achieves 73\.2%\.Recency packingreplaces learned selection and temporary expansion with the most recent units under the same base budget, yielding 76\.2%\.CarryOnleads all three metrics\.Compact state and learned evidence selection are complementary,outperforming either state removal or recency\-based selection\.

Table 2:Component and training variants on AppWorld with Claude Sonnet 5\. Bold marks the best result\.
### 5\.5MEMORY Capacity Sensitivity

On AppWorld, capacities of 64, 128, and 256 proxy tokens yield 130, 134, and 131 successes, respectively \(Table[3](https://arxiv.org/html/2611.17808#A3.T3)\)\. The 128\-token setting achieves the highest Success andS0\.8S\_\{0\.8\}, while 256 tokens achieve the lowest NCS\. The smaller 64\-token state is truncated more often\.A larger state does not consistently improve task success\.Appendix[C](https://arxiv.org/html/2611.17808#A3)provides the full results\.

## 6Conclusion

CarryOn separates compact progress tracking from fine\-grained evidence selection, keeping exact observations available as action requirements change\. Experiments across three benchmarks and three Actors demonstrate its effectiveness and cross\-Actor generalization\. CarryOn achieves 75\.7% mean task success, exceeding the strongest baseline by 6\.7 percentage points, and leads bothS0\.8S\_\{0\.8\}and NCS on average\. These results support adapting evidence to each decision while maintaining concise task state for long\-horizon execution\.

## Limitations

Our evaluation covers three benchmarks with text\-based interactions\. Extending CarryOn to visual or multimodal observations would require adapting how evidence is represented and selected\. We train a separate selector for each benchmark and reuse it across Actors\. Generalization to new environments, particularly those with different tool interfaces and observation structures, remains to be explored\.

In real\-world applications, retained observations may contain sensitive information, while missing or misinterpreted evidence may lead to incorrect actions\. Deployment therefore requires appropriate access controls for stored history and user confirmation for consequential actions\.

## References

- Barres et al\. \(2025\)Victor Barres, Honghua Dong, Soham Ray, Xujie Si, and Karthik Narasimhan\. 2025\.τ2\\tau^\{2\}\-Bench: Evaluating conversational agents in a dual\-control environment\.*arXiv preprint arXiv:2506\.07982*\.
- Chi et al\. \(2026\)Han Chi, Jiaxin Qi, Yan Cui, Baisheng Lai, and Jianqiang Huang\. 2026\.Agentmeter: Evaluating model\-cli matching for cli\-based local task\-solving agents\.*arXiv preprint arXiv:2606\.21140*\.
- Hu et al\. \(2021\)Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen\-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen\. 2021\.Lora: Low\-rank adaptation of large language models\.*arXiv preprint arXiv:2106\.09685*\.
- Hu et al\. \(2025\)Mengkang Hu, Tianxing Chen, Qiguang Chen, Yao Mu, Wenqi Shao, and Ping Luo\. 2025\.Hiagent: Hierarchical working memory management for solving long\-horizon agent tasks with large language model\.In*Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)*, pages 32779–32798\.
- Jiang et al\. \(2026\)Haitao Jiang, Lin Ge, Hengrui Cai, and Rui Song\. 2026\.Pabu: Progress\-aware belief update for efficient llm agents\.*arXiv preprint arXiv:2602\.09138*\.
- Jiang et al\. \(2023\)Huiqiang Jiang, Qianhui Wu, Chin\-Yew Lin, Yuqing Yang, and Lili Qiu\. 2023\.Llmlingua: Compressing prompts for accelerated inference of large language models\.In*Proceedings of the 2023 conference on empirical methods in natural language processing*, pages 13358–13376\.
- Jiang et al\. \(2024\)Huiqiang Jiang, Qianhui Wu, Xufang Luo, Dongsheng Li, Chin\-Yew Lin, Yuqing Yang, and Lili Qiu\. 2024\.Longllmlingua: Accelerating and enhancing llms in long context scenarios via prompt compression\.In*Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)*, pages 1658–1677\.
- Kang et al\. \(2025\)Minki Kang, Wei\-Ning Chen, Dongge Han, Huseyin A Inan, Lukas Wutschitz, Yanzhi Chen, Robert Sim, and Saravan Rajmohan\. 2025\.Acon: Optimizing context compression for long\-horizon llm agents\.*arXiv preprint arXiv:2510\.00615*\.
- Kapoor et al\. \(2024\)Sayash Kapoor, Benedikt Stroebl, Zachary S Siegel, Nitya Nadgir, and Arvind Narayanan\. 2024\.Ai agents that matter\.*arXiv preprint arXiv:2407\.01502*\.
- Kwa et al\. \(2025\)Thomas Kwa, Ben West, Joel Becker, Amy Deng, Katharyn Garcia, Max Hasin, Sami Jawhar, Megan Kinniment, Nate Rush, Sydney Von Arx, et al\. 2025\.Measuring ai ability to complete long tasks\.*arXiv preprint arXiv:2503\.14499*, 352\.
- Lee et al\. \(2025\)Dongjun Lee, Juyong Lee, Kyuyoung Kim, Jihoon Tack, Jinwoo Shin, Yee Whye Teh, and Kimin Lee\. 2025\.Learning to contextualize web pages for enhanced decision making by llm agents\.In*International Conference on Learning Representations*, volume 2025, pages 81039–81072\.
- Li et al\. \(2023\)Yucheng Li, Bo Dong, Frank Guerin, and Chenghua Lin\. 2023\.Compressing context to enhance inference efficiency of large language models\.In*Proceedings of the 2023 conference on empirical methods in natural language processing*, pages 6342–6353\.
- Pan et al\. \(2024\)Zhuoshi Pan, Qianhui Wu, Huiqiang Jiang, Menglin Xia, Xufang Luo, Jue Zhang, Qingwei Lin, Victor Rühle, Yuqing Yang, Chin\-Yew Lin, et al\. 2024\.Llmlingua\-2: Data distillation for efficient and faithful task\-agnostic prompt compression\.In*Findings of the Association for Computational Linguistics: ACL 2024*, pages 963–981\.
- Ross et al\. \(2011\)Stéphane Ross, Geoffrey Gordon, and Drew Bagnell\. 2011\.A reduction of imitation learning and structured prediction to no\-regret online learning\.In*Proceedings of the fourteenth international conference on artificial intelligence and statistics*, pages 627–635\. JMLR Workshop and Conference Proceedings\.
- Shinn et al\. \(2023\)Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao\. 2023\.[Reflexion: language agents with verbal reinforcement learning](https://doi.org/10.52202/075280-0377)\.In*Advances in Neural Information Processing Systems*, volume 36, pages 8634–8652\. Curran Associates, Inc\.
- Trivedi et al\. \(2024\)Harsh Trivedi, Tushar Khot, Mareike Hartmann, Ruskin Manku, Vinty Dong, Edward Li, Shashank Gupta, Ashish Sabharwal, and Niranjan Balasubramanian\. 2024\.Appworld: A controllable world of apps and people for benchmarking interactive coding agents\.In*Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)*, pages 16022–16076\.
- Wang et al\. \(2023\)Guanzhi Wang, Yuqi Xie, Yunfan Jiang, Ajay Mandlekar, Chaowei Xiao, Yuke Zhu, Linxi Fan, and Anima Anandkumar\. 2023\.Voyager: An open\-ended embodied agent with large language models\.*arXiv preprint arXiv:2305\.16291*\.
- Wang et al\. \(2025a\)Ningning Wang, Xavier Hu, Pai Liu, He Zhu, Yue Hou, Heyuan Huang, Shengyu Zhang, Jian Yang, Jiaheng Liu, Ge Zhang, et al\. 2025a\.Efficient agents: Building effective agents while reducing cost\.*arXiv preprint arXiv:2508\.02694*\.
- Wang et al\. \(2025b\)Qingyue Wang, Yanhe Fu, Yanan Cao, Shuai Wang, Zhiliang Tian, and Liang Ding\. 2025b\.Recursively summarizing enables long\-term dialogue memory in large language models\.*Neurocomputing*, 639:130193\.
- Wang et al\. \(2024a\)Xingyao Wang, Yangyi Chen, Lifan Yuan, Yizhe Zhang, Yunzhu Li, Hao Peng, and Heng Ji\. 2024a\.Executable code actions elicit better llm agents\.*arXiv preprint arXiv:2402\.01030*\.
- Wang et al\. \(2026a\)Yuhang Wang, Yuling Shi, Mo Yang, Rongrui Zhang, Shilin He, Heng Lian, Yuting Chen, Siyu Ye, Kai Cai, and Xiaodong Gu\. 2026a\.Swe\-pruner: Self\-adaptive context pruning for coding agents\.*arXiv preprint arXiv:2601\.16746*\.
- Wang et al\. \(2026b\)Zhenting Wang, Huancheng Chen, Jiayun Wang, and Wei Wei\. 2026b\.Memex \(rl\): Scaling long\-horizon llm agents via indexed experience memory\.*arXiv preprint arXiv:2603\.04257*\.
- Wang et al\. \(2024b\)Zilong Wang, Yuedong Cui, Li Zhong, Zimin Zhang, Da Yin, Bill Yuchen Lin, and Jingbo Shang\. 2024b\.Officebench: Benchmarking language agents across multiple applications for office automation\.*arXiv preprint arXiv:2407\.19056*\.
- Wang et al\. \(2024c\)Zora Zhiruo Wang, Jiayuan Mao, Daniel Fried, and Graham Neubig\. 2024c\.Agent workflow memory\.*arXiv preprint arXiv:2409\.07429*\.
- Wu et al\. \(2025\)Xixi Wu, Kuan Li, Yida Zhao, Liwen Zhang, Litu Ou, Huifeng Yin, Zhongwang Zhang, Xinmiao Yu, Dingchu Zhang, Yong Jiang, et al\. 2025\.Resum: Unlocking long\-horizon search intelligence via context summarization\.*arXiv preprint arXiv:2509\.13313*\.
- Wu et al\. \(2026\)Yating Wu, Yuhao Zhang, Sayan Ghosh, Sourya Basu, Anoop Deoras, Jun Huan, and Gaurav Gupta\. 2026\.Contextweaver: Selective and dependency\-structured memory construction for llm agents\.*arXiv preprint arXiv:2604\.23069*\.
- Wu et al\. \(2024\)Yiran Wu, Tianwei Yue, Shaokun Zhang, Chi Wang, and Qingyun Wu\. 2024\.Stateflow: Enhancing llm task\-solving through state\-driven workflows\.*arXiv preprint arXiv:2403\.11322*\.
- Xu et al\. \(2024\)Fangyuan Xu, Weijia Shi, and Eunsol Choi\. 2024\.Recomp: Improving retrieval\-augmented lms with context compression and selective augmentation\.In*International Conference on Learning Representations*, volume 2024, pages 43478–43502\.
- Yao et al\. \(2022\)Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao\. 2022\.React: Synergizing reasoning and acting in language models\.*arXiv preprint arXiv:2210\.03629*\.
- Zhang and Sun \(2026\)Haoran Zhang and Zhaohua Sun\. 2026\.Agora: Adapter\-grounded observation\-action retention for inference\-free prompt compression in llm agents\.*arXiv preprint arXiv:2605\.26596*\.
- Zhou et al\. \(2026\)Zijian Zhou, Ao Qu, Zhaoxuan Wu, Sunghwan Kim, Alok Prakash, Daniela Rus, Bryan Kian Hsiang Low, and Paul Liang\. 2026\.Mem1: Learning to synergize memory and reasoning for efficient long\-horizon agents\.In*International Conference on Learning Representations*, volume 2026, pages 58413–58438\.

## Appendix AExperimental Details

This appendix provides the dataset splits, configuration settings, and execution interfaces summarized in Section[4](https://arxiv.org/html/2611.17808#S4)\.

### A\.1Benchmarks and Task Splits

AppWorld\([Trivedi et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib16)\)uses the officialtest\_normalsplit of 168 tasks, comprising 57 easy, 48 medium, and 63 hard tasks\. OfficeBench\([Wang et al\., 2024b](https://arxiv.org/html/2611.17808#bib.bib23)\)uses the ACON\-public test set of 95 tasks, comprising 42 L1, 22 L2, and 31 L3 tasks with 209 planned evaluator conditions\. Tau2 Telecom\([Barres et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib1)\)uses the official 40\-task test set\. We retain the benchmarks’ native tasks, tools, and official success criteria\. CarryOn selector training uses successful trajectories from the official training splits, as described in Appendix[B\.2](https://arxiv.org/html/2611.17808#A2.SS2)\.

### A\.2CarryOn and Execution Configuration

#### Models and computation\.

Each local training job uses one NVIDIA H100 GPU\. The selector has 0\.6B parameters, while the Qwen and Gemma Actors have 27B and 31B, respectively; CarryOn\-E uses a 9B student\. For the reported selectors, the two training stages together take approximately 4\.87, 0\.59, and 0\.79 hours on AppWorld, OfficeBench, and Tau2, respectively, estimated from training logs\. These are single\-GPU wall times, excluding trajectory generation and evaluation\. We report a single run per setting\.

#### Context construction\.

We use a base evidence budget ofB=16,384B=16\{,\}384characters and a temporary evidence expansion threshold ofτ=0\.5\\tau=0\.5\. The MEMORY capacity is 128 proxy tokens, counted locally as words and punctuation symbols\. The recent\-evidence window retains the newest interaction after an accepted response and the two newest otherwise, limited to available history\. Handling of public interaction boundaries follows Appendix[B\.1](https://arxiv.org/html/2611.17808#A2.SS1)\. The budget covers the base evidence pack\.

#### Selector training\.

The selector backbone is Qwen3\-Reranker\-0\.6B\. We use Claude Sonnet 5 to generate the offline state annotations and their evidence references\. The pairwise ranking margin isγ=0\.2\\gamma=0\.2\. Training objectives and label construction are specified in Appendix[B\.2](https://arxiv.org/html/2611.17808#A2.SS2)\.

#### Execution interfaces\.

Actors use benchmark\-specific action and output interfaces\. Tau2 pairs the Actor with a Haiku 4\.5 User simulator\. The Actor and selector receive only public interactions, excluding private simulator state\.

### A\.3Baseline Configurations

We retain each method’s context construction and evaluate the resulting systems on the same task sets\. Cost accounting is described in Appendix[D\.1](https://arxiv.org/html/2611.17808#A4.SS1)\.

#### Simple history baselines\.

Full History retains the complete interaction history\. FIFO\-5 retains the five most recent action–observation pairs\. Retrieval selects four historical interactions usingtext\-embedding\-3\-largeand includes the latest interaction\. FIFO\-5 and Retrieval follow the implementations in ACON\([Kang et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib8)\)\.

#### LLMLingua\-2\.

We use LLMLingua\-2\([Pan et al\., 2024](https://arxiv.org/html/2611.17808#bib.bib13)\)as a local history compressor with a fixed keep rate of 0\.3\.

#### ACON and AGORA\.

ACON\([Kang et al\., 2025](https://arxiv.org/html/2611.17808#bib.bib8)\)uses LLM\-based context compression\. AGORA\([Zhang and Sun, 2026](https://arxiv.org/html/2611.17808#bib.bib30)\)uses a learned scorer to select historical interactions\.

#### SWE\-Pruner\.

We use benchmark\-adapted SWE\-Pruner models\([Wang et al\., 2026a](https://arxiv.org/html/2611.17808#bib.bib21)\)with a pruning threshold of 0\.4\. Observations are pruned when the Actor provides a focus and otherwise retained\.

## Appendix BExecution and Selector Training Details

This appendix expands the execution and training procedures in Section[3](https://arxiv.org/html/2611.17808#S3)\.

### B\.1Context Assembly and Recent Retention

#### Base budget accounting\.

With base evidence budgetBBand rendered character countc⁡\(⋅\)c\(\\cdot\), recent interactionsRtR\_\{t\}leave the following capacity for older units:

Btold=max⁡\{0,B−c⁡\(Rt\)\}\.B\_\{t\}^\{\\mathrm\{old\}\}=\\max\\\{0,B\-c\(R\_\{t\}\)\\\}\.\(9\)After reserving space for recent interactions, CarryOn selects older evidence in order of relevance, skipping units that exceed the remaining budget\. If several selected fragments come from the same observation, the action that produced it is included only once\. Recent interactions are always retained, even when they exceed the base budget\. Temporary expansion can add further evidence\. CarryOn rebuilds the evidence pack at each step to reflect changing needs\.

#### Adaptive recent retention\.

CarryOn always retains the latest interaction\. At the next decision, it extends the recent window if the action fails validation or the MEMORY update is invalid or truncated\. Otherwise, it uses the standard window\. Unparseable updates preserve the previous state\. Interactions leaving the window remain available for learned selection\. Window lengths are given in Appendix[A\.2](https://arxiv.org/html/2611.17808#A1.SS2)\.

#### Execution loop\.

Algorithm[1](https://arxiv.org/html/2611.17808#alg1)summarizes the three upper regions of Figure[2](https://arxiv.org/html/2611.17808#S3.F2)\. Valid state updates are bounded by the state capacity, while invalid updates preserve the previous state\.

Algorithm 1CarryOn execution loop1:Task

qq, frozen selector

ϕ\\phi, budget

BB, threshold

τ\\tau
2:Initialize archive

H0H\_\{0\}, state

m0m\_\{0\}, observation

o0o\_\{0\}
3:

t←0t\\leftarrow 0
4:whiletask execution continuesdo

5:

Rt←R\_\{t\}\\leftarrowrecent interactions under adaptive retention

6:

Ut←U\_\{t\}\\leftarrowevidence units from

HtH\_\{t\}outside

RtR\_\{t\}
7:Compute

rt​\(u\),pt​\(u\)r\_\{t\}\(u\),p\_\{t\}\(u\)for

u∈Utu\\in U\_\{t\}
8:using

q,otq,o\_\{t\}\(Eq\.[2](https://arxiv.org/html/2611.17808#S3.E2)\)

9:

Btold←max⁡\{0,B−c⁡\(Rt\)\}B\_\{t\}^\{\\mathrm\{old\}\}\\leftarrow\\max\\\{0,B\-c\(R\_\{t\}\)\\\}
10:

Pt←P\_\{t\}\\leftarrowunits selected by decreasing

rt​\(u\)r\_\{t\}\(u\)
11:within

BtoldB\_\{t\}^\{\\mathrm\{old\}\}, skipping units that do not fit

12:

Dt←\{u∈Ut∖Pt:pt​\(u\)≥τ\}D\_\{t\}\\leftarrow\\\{u\\in U\_\{t\}\\setminus P\_\{t\}:p\_\{t\}\(u\)\\geq\\tau\\\}
13:

Wt←Pt∪DtW\_\{t\}\\leftarrow P\_\{t\}\\cup D\_\{t\}
14:

Xt←Compose⁡\(q,mt,Wt,Rt\)X\_\{t\}\\leftarrow\\operatorname\{Compose\}\(q,m\_\{t\},W\_\{t\},R\_\{t\}\)
15:

\(at,m~t\+1\)←Actor⁡\(Xt\)\(a\_\{t\},\\widetilde\{m\}\_\{t\+1\}\)\\leftarrow\\operatorname\{Actor\}\(X\_\{t\}\)
16:Set

mt\+1m\_\{t\+1\}to the bounded update, or

mtm\_\{t\}if invalid

17:Submit

ata\_\{t\}and observe public feedback

ot\+1o\_\{t\+1\}
18:Extend

HtH\_\{t\}with

\(at,ot\+1\)\(a\_\{t\},o\_\{t\+1\}\)to form

Ht\+1H\_\{t\+1\}
19:

t←t\+1t\\leftarrow t\+1
20:endwhile

### B\.2Selector Supervision and Optimization

#### Training examples and labels\.

We construct examples at intermediate decision boundaries of successful trajectories from the official training splits\. In the block\-supervised path, each candidate is an earlier complete action–observation block\. Ranking positives combine evidence references in offline state annotations with observed evidence\-use signals\. AppWorld traces which earlier observations supply values to the next tool call\. OfficeBench matches earlier evidence to arguments of the next action\. Tau2 tracks evidence reuse in subsequent public interactions\. For next\-action use prediction, positive labels are restricted to evidence linked to the immediately following action\.

Uncited and unused evidence is treated as a weak negative\. Offline labels use subsequent public interactions, while selector inputs contain the task and observations available at the current decision\.

#### Scoring architecture and objectives\.

The functionsfϕf\_\{\\phi\}andgϕg\_\{\\phi\}in Eq\.[2](https://arxiv.org/html/2611.17808#S3.E2)share a pretrained backbone with separate instructions for relevance ranking and next\-action use prediction\. The latter uses a learned linear head\. The sigmoid isσ⁡\(z\)=1/\(1\+exp⁡\(−z\)\)\\sigma\(z\)=1/\(1\+\\exp\(\-z\)\)\. The initial training stage adapts the reranker with LoRA using the pairwise ranking loss in Eq\.[4](https://arxiv.org/html/2611.17808#S3.E4)\. The backbone and margin are specified in Appendix[A\.2](https://arxiv.org/html/2611.17808#A1.SS2)\. The subsequent stage jointly optimizes this ranking objective and the next\-action use loss in Eq\.[5](https://arxiv.org/html/2611.17808#S3.E5)\. This stage updates the ranker adapter as well as the new head\.

Whole\-block training preserves the units referenced by the offline annotations\. At deployment, the same query and candidate interface scores the finer units from Section[3\.2](https://arxiv.org/html/2611.17808#S3.SS2), each paired with the action that produced its source observation\. This transfers block\-level supervision to fragment selection without requiring a separate annotation for every fragment\.

## Appendix CMEMORY Capacity Sensitivity

Figure[5](https://arxiv.org/html/2611.17808#A3.F5)and Table[3](https://arxiv.org/html/2611.17808#A3.T3)compare control\-state capacities of 64, 128, and 256 proxy tokens on AppWorld with Claude\. Each setting is evaluated once on all 168 tasks, with the evidence budget, selector, and retention policy held fixed\.

The default capacity of 128 tokens achieves the highest Success andS0\.8S\_\{0\.8\}\. Increasing capacity to 256 gives the lowest NCS and reduces calls and token use, while the 64\-token state is truncated more often\. The results illustrate how state capacity affects both task completion and resource use\.

Figure 5:MEMORY capacity sensitivity on AppWorld with Claude\. Dashed lines mark the default capacity of 128 proxy tokens\.Table 3:MEMORY capacity sensitivity on AppWorld with Claude\. Capacity is measured in proxy tokens\.
## Appendix DDetailed Results and Resource Use

The following tables expand Table[1](https://arxiv.org/html/2611.17808#S5.T1), with results grouped by benchmark and Actor\.

### D\.1Evaluation and Cost Accounting

TGC and Success report completed tasks out of all evaluated tasks\. Requirements reports passed checks out of all task requirements in AppWorld\. Conditions reports passed checks out of the conditions evaluated in OfficeBench\. Tau2’s average reward equals its success rate under single\-run evaluation\.

Calls reports Actor calls in AppWorld and OfficeBench\. For Tau2, A/U/C denotes Actor, User, and compressor calls\. Token counts are reported in millions\. AppWorld and OfficeBench report Actor tokens under Input and Output, while Total also includes compression and retrieval\-embedding requests\. Tau2 token counts additionally include the User simulator\. Tokens processed by the local models used for selection or pruning in CarryOn, AGORA, LLMLingua\-2, and SWE\-Pruner are excluded\.

### D\.2Metric Weight Sensitivity

To assess whether the overall ranking depends on metric weights, we vary each weight from 0 to 1\. Figure[6](https://arxiv.org/html/2611.17808#A4.F6)\(a\) varies the success weightα\\alphainSαS\_\{\\alpha\}, keeping the token and call weights withinS0S\_\{0\}fixed\. Panel \(b\) varies the token weightwwin NCS, assigning weight1−w1\-wto calls in Eq\.[8](https://arxiv.org/html/2611.17808#S4.E8)\. Task outcomes and resource totals remain fixed throughout\. CarryOn retains the highest meanSαS\_\{\\alpha\}and lowest meanNCSw\\mathrm\{NCS\}\_\{w\}across both ranges, showing that its overall lead is stable under these weight changes\.

Figure 6:Sensitivity to metric weights\. Scores are averaged equally across benchmarks and Actors\. Dashed lines mark the default weights\.Table 4:Detailed AppWorld results with Claude Sonnet 5\.Table 5:Detailed AppWorld results with Qwen3\.8\-27B\.Table 6:Detailed AppWorld results with Gemma\-4\-31B\.Table 7:Detailed OfficeBench results with Claude Sonnet 5\.Table 8:Detailed OfficeBench results with Qwen3\.8\-27B\.Table 9:Detailed OfficeBench results with Gemma\-4\-31B\.Table 10:Detailed Tau2 Telecom results with Claude Sonnet 5\. A/U/C denote Actor, User, and compressor calls\.Table 11:Detailed Tau2 Telecom results with Qwen3\.8\-27B\. A/U/C denote Actor, User, and compressor calls\.Table 12:Detailed Tau2 Telecom results with Gemma\-4\-31B\. A/U/C denote Actor, User, and compressor calls\.

## Appendix EContext and Execution Cost Across Actors

Figure 7:Claude Sonnet 5: Success and resource use across three benchmarks, averaged over fixed\-order task prefixes\.Figures[7](https://arxiv.org/html/2611.17808#A5.F7)–[9](https://arxiv.org/html/2611.17808#A5.F9)compare all eight methods using the runs in Table[1](https://arxiv.org/html/2611.17808#S5.T1)\. Each point averages the firstnntasks in a fixed benchmark order, including failures, and the final point gives the full\-set mean\. The horizontal axis shows the number of evaluated tasks\.

A task’s peak input is its largest submitted Actor input, including fixed prompts\. Task\-level peaks are averaged arithmetically and plotted on logarithmic axes, with matching scales across Actors\. Tool calls follow Appendix[D\.1](https://arxiv.org/html/2611.17808#A4.SS1)\.

Over the complete OfficeBench task set, CarryOn matches or exceeds the best baseline Success while using the fewest Actor and tool calls per task for each Actor\. On AppWorld, it improves Success and lowers mean peak input relative to Full History for all three Actors\. On Tau2 with Qwen, it increases Success from 80% to 90% while reducing mean Actor calls from 19\.05 to 15\.00 relative to Full History\.

On Tau2, CarryOn has higher mean peak input than Full History\.

Figure 8:Qwen3\.8\-27B: Success and resource use across three benchmarks, with the same metrics and task order as Figure[7](https://arxiv.org/html/2611.17808#A5.F7)\.Figure 9:Gemma\-4\-31B: Success and resource use across three benchmarks, with the same metrics and task order as Figure[7](https://arxiv.org/html/2611.17808#A5.F7)\.Figure 10:Control state and evidence across environments\. \(a\) An earlier calendar record supplies a spreadsheet value\. \(b\) Account information and a new user report support the next diagnostic reply\. Text and timestamps are abbreviated\.

## Appendix FControl State and Evidence Across Environments

The following examples from recorded Claude Sonnet 5 trajectories show how control state and evidence support actions in OfficeBench and Tau2 \(Figure[10](https://arxiv.org/html/2611.17808#A5.F10)\)\.

### F\.1OfficeBench: Transferring a Calendar Agenda to a Spreadsheet

In Figure[10](https://arxiv.org/html/2611.17808#A5.F10)\(a\), the Actor is transferring a calendar agenda to a spreadsheet\. The control state records completed headers and rows 2–3, with row 4 still in progress\. The evidence pack retains the calendar record obtained at step 2, which gives 14:10 as the start time of “Strategy by Charlie\.” At step 21, the Actor uses this value to fill row 4, column 2\.

### F\.2Tau2: Continuing a Customer\-Service Diagnosis

In Figure[10](https://arxiv.org/html/2611.17808#A5.F10)\(b\), a customer cannot send MMS messages while abroad\. The control state records that the customer has been verified, roaming is enabled, and the MMS issue remains open\. It identifies checking the status bar as the next diagnostic step\. The available evidence includes the account record and the customer’s new report of an airplane icon\. This report lets the Actor advance the diagnosis: at step 6, it asks the customer to turn off Airplane Mode\.

## Appendix GEvidence Reuse and Case Studies

### G\.1Long\-Term Evidence Retention and Reselection

#### Coverage and counting\.

We use the designated CarryOn runs reported in the main table, including successful and unsuccessful trajectories\. All 909 trajectories and 14,419 Actor calls have complete selection records\. Each occurrence of a selected unit at an Actor decision is counted once\. Figure[4](https://arxiv.org/html/2611.17808#S5.F4)pools these occurrences within each benchmark\. Age is the number of Actor steps since the source interaction, so the latest observation has age one\. For Tau2, we map a unit to the first Actor boundary at which it enters the archive\. The distribution includes older evidence selected by the learned manager, including temporary expansion, and excludes automatically retained recent evidence\. On Tau2, these age statistics cover the 13 of 120 trajectories that invoke learned selection\. The remaining trajectories retain the full history within the base budget\.

#### Evidence reselection\.

We count a reselection when previously visible evidence is omitted from the evidence pack for at least one decision and later selected again\.

#### Retention and reselection statistics\.

Table[13](https://arxiv.org/html/2611.17808#A7.T13)reports the share of selected evidence originating at least ten Actor steps earlier and the number of task runs in which evidence is selected again after leaving the pack\. Such reselection occurs in 365 of 909 trajectories \(40\.2%\), showing that evidence can return to the working context after being omitted\. The following payment example shows how the Actor uses a reselected card record to add a payment card and refill the balance\.

Table 13:Long\-term evidence retention and reselection\. Evidence age is measured in Actor steps, with repeated selections counted separately\. The last column reports runs with evidence selected again after leaving the pack, out of all runs, including failures\. “–” indicates no learned\-selection events\.
#### Payment case\.

Figure[11](https://arxiv.org/html/2611.17808#A7.F11)traces a payment\-card record from its initial observation to its later selection and use\. For taskf861c32\_2, the Discover record \(E021/$/2\) is obtained at step 21 and visible at steps 22–25\. It is absent at steps 26–28 and returns through learned ranking at step 29, outside both recent retention and temporary expansion\. The saved action at step 29 selects the Discover entry from the previously stored card list and passes its six fields toadd\_payment\_card\. The tool returns card ID 479, which the next action uses to add $100 to the balance\. Seven successful payment receipts follow at step 33, and the trajectory passes the official completion check\.

Figure 11:A payment\-card record returns to the evidence pack and is used to add a card, refill the balance, and complete the payments\.

### G\.2Comparative Case Studies

We examine three AppWorld tasks, comparing CarryOn with ACON using Claude Sonnet 5 in Cases 1 and 3, and with SWE\-Pruner using Gemma\-4\-31B in Case 2\.

#### Case 1: preserving a complete payment\-request list\.

The task is to approve all payment requests from roommates in the current month\. Nine of the 47 pending requests qualify \(Figure[12](https://arxiv.org/html/2611.17808#A7.F12)\)\. ACON’s compressed summary omits IDs 6137 and 6131, and the Actor approves only the remaining seven requests, passing six of seven requirements\. CarryOn retains the filtered nine\-ID list as evidence and corrects the expected request count in its state from eight to nine\. It ultimately approves all nine requests and passes all seven requirements\.

Figure 12:Case 1 \(AppWorld, Claude Sonnet 5\)\. ACON’s summary omits two qualifying requests, shown with dashed outlines, while CarryOn retains the complete list\.
#### Case 2: preserving note details\.

The task is to copy yesterday’s habit log into a new note for today, changing only the homemade\-meals entry from no to yes \(Figure[13](https://arxiv.org/html/2611.17808#A7.F13)\)\. SWE\-Pruner filters the tags and pinned status from the returned note\. The Actor updates the meal entry correctly but omits these two fields when creating the new note, passing seven of nine requirements\. CarryOn retains the original note with both fields and copies them alongside the updated content, passing all nine requirements\.

Figure 13:Case 2 \(AppWorld, Gemma\-4\-31B\)\. Dashed outlines mark fields filtered by SWE\-Pruner and preserved by CarryOn\. Fractions report passed task requirements\.
#### Case 3: updating an expense note\.

The task is to add the current month’s expenses to a note whose entries are ordered newest first\. CarryOn keeps the original note as evidence, inserts the new month directly below the header, and passes all ten requirements\. ACON also updates the note correctly but fails the final answer check, passing nine of ten\.

### G\.3Temporary Evidence Expansion

In this AppWorld example with Gemma, the Actor must text a favorite recipe’s name to the user’s husband\. The earlier contact record does not fit within the remaining base budget, but the selector predicts that it is needed for the next action\. Temporary evidence expansion therefore adds it beyond the base budget \(Section[3\.3](https://arxiv.org/html/2611.17808#S3.SS3)\)\.

```
[26] Observe husband’s contact
     phone_number = <number>

[31] Base budget: nearly full
     [=================== ]
     Base pack: contact omitted
     Next-action use: 0.695 > 0.5
     Expansion: add contact record
     Action: send recipe name to <number>
     Feedback: "Text message sent."

Outcome: task completed successfully
```

The expansion restores the contact record for the current decision, and the Actor uses its phone number in the same step\.

## Appendix HPerformance Across Task Groups

Figure[14](https://arxiv.org/html/2611.17808#A8.F14)summarizes Success across task groups\. Tables[14](https://arxiv.org/html/2611.17808#A8.T14)–[16](https://arxiv.org/html/2611.17808#A8.T16)report all methods and Actors, retaining each dataset’s original denominators\. AppWorld difficulty, OfficeBench level, and Tau2 persona describe different task properties\. Tau2 issue type and persona are two partitions of the same 40 tasks\.

Figure 14:Success by task group, averaged across Actors\. The strongest baseline is selected separately for each group\.Δ\\Deltadenotes the difference in percentage points\.Table 14:Successful tasks by AppWorld difficulty\.Table 15:Successful tasks and evaluator coverage by OfficeBench level\. Unchecked conditions were not evaluated\.Table 16:Successful Tau2 tasks by user persona and issue type\.
## Appendix ICarryOn\-E

Table 17:CarryOn\-E \(9B\) results across benchmarks and task groups\.CarryOn\-E explores local deployment by replacing the*LLM Actor*in region 3 of Figure[2](https://arxiv.org/html/2611.17808#S3.F2)with a smaller model while keeping the selector and retention policy fixed\. We distill a frozen Qwen3\.8\-27B CarryOn Actor into a Qwen3\.5\-9B student using supervised fine\-tuning followed by DAgger\-style distillation\.

### I\.1Training Procedure

Given Actor contextXX, the student policyπθ\\pi\_\{\\theta\}learns the teacher’s visible responsev=\(v1,…,vL\)v=\(v\_\{1\},\\ldots,v\_\{L\}\), containing the MEMORY update and an action in the environment’s required format\. We minimize the response loss

ℓactor=−1L∑j=1Llogπθ\(vj∣X,v<j\),\\ell\_\{\\mathrm\{actor\}\}=\-\\frac\{1\}\{L\}\\sum\_\{j=1\}^\{L\}\\log\\pi\_\{\\theta\}\(v\_\{j\}\\mid X,v\_\{<j\}\),\(10\)whereθ\\thetadenotes the student’s LoRA parameters,LLis the response length in tokens, andv<jv\_\{<j\}contains the preceding response tokens\. Initial supervised fine\-tuning uses context–response pairs𝒟0\\mathcal\{D\}\_\{0\}from successful teacher trajectories on training tasks to obtainθ0\\theta\_\{0\}\. The loss is computed only over response tokens\.

A student can reach states that are absent from successful teacher trajectories\. To train on these states, we apply DAgger\-style distillation\([Ross et al\., 2011](https://arxiv.org/html/2611.17808#bib.bib14)\)\. In each round, the student performs training tasks using CarryOn to construct its context\. The teacher provides a response for each visited context, including those from unsuccessful rollouts\. These context–response pairs formℬk\\mathcal\{B\}\_\{k\}, which is added to the accumulated dataset to further train the student:

𝒟k\\displaystyle\\mathcal\{D\}\_\{k\}=𝒟k−1∪ℬk,\\displaystyle=\\mathcal\{D\}\_\{k\-1\}\\cup\\mathcal\{B\}\_\{k\},\(11\)θk\\displaystyle\\theta\_\{k\}←FineTune⁡\(θk−1,𝒟k\)\.\\displaystyle\\leftarrow\\operatorname\{FineTune\}\(\\theta\_\{k\-1\},\\mathcal\{D\}\_\{k\}\)\.Here,FineTune\\operatorname\{FineTune\}continues the student’s LoRA adapter on the accumulated data using Eq\.[10](https://arxiv.org/html/2611.17808#A9.E10), which averages over target tokens\. Training balances examples across tasks or source trajectories\.

### I\.2Training and Evaluation Settings

The student is initialized from Qwen3\.5\-9B and evaluated on all three datasets\. Each aggregation round trains for one epoch over the accumulated data\. The reported models use six rounds on AppWorld, seven on OfficeBench, and five on Tau2\. Student inference uses non\-thinking mode, and distillation uses only training\-split tasks\. Estimated cumulative training wall times, including initial supervised fine\-tuning and all aggregation rounds leading to the reported models, are 54\.00, 23\.06, and 54\.28 hours on AppWorld, OfficeBench, and Tau2, respectively, using one H100 GPU per training job\. These estimates exclude rollout collection and teacher labeling\.

### I\.3Local Deployment Results

CarryOn\-E offers a smaller\-model deployment option by reducing the Actor from 27B to 9B parameters while reusing CarryOn’s selector and retention policy\. Distillation trains the local Actor to generate actions and update task state from the same state–evidence interface\.

Table[17](https://arxiv.org/html/2611.17808#A9.T17)reports 47\.0%, 46\.3%, and 67\.5% Success on AppWorld, OfficeBench, and Tau2 Telecom, respectively\. On AppWorld, the 9B Actor completes 70\.2% of easy tasks and 62\.5% of medium tasks, showing that it can handle many tasks at these difficulty levels\. On Tau2, it completes 75\.0% of MMS tasks and 88\.9% of mobile\-data tasks\.

## Appendix JPrompt Templates

We provide the Actor instructions, annotation prompts, and selector input formats in the accompanying code\. Braced placeholders below denote runtime inputs\. Benchmark task descriptions, tool documentation, and domain policies are supplied by the corresponding environment\.

### J\.1AppWorld Actor

The benchmark’s task prompt is followed by selected action–observation messages in chronological order\. The following instruction is appended to the last user message, with the current state substituted for\{working\_memory\}\(\(empty\)initially\)\.

\*\*Boundedworking\-memoryprotocol\*\*

YourentireresponsemustremainvalidPython\.

Onthefirstline,writeexactlyonesingle\-linePythoncommentinthisform:

\#MEMORY:done=\.\.\.;open=\.\.\.;next=\.\.\.;answer\_mode=none\|value;known\_apis=\.\.\.

Replacethismemoryeveryturnandkeepthetextafter‘\#MEMORY:‘within128tokens\.Preservetaskprogress,thenextintendedoperation,whetherthetaskasksforareturnedvalue,andAPIendpointnamesalreadyinspected\.Donotcopypasswords,accesstokens,longIDs,lists,ortoolreceiptsintomemory;exactvaluesremainavailableinretainedrawevidence\.Afterthememorycomment,outputonesmallexecutablePythonaction\.

DonotaddproseorMarkdownoutsidePython\.

Currentworkingmemory:

\{working\_memory\}

### J\.2OfficeBench Actor

The system message supplies the environment configuration and available apps\. The task workspace replaces the default path at runtime\.

#### System message\.

Todayis\{date\}\(\{weekday\}\)\.Thecurrenttimeis\{time\}\.YouareanAIassistantforuser\{username\}\.

Youcanhelpsolvethetaskstepbystep\.

Youcaninteractwithanoperationsystemanduseappstosolvethetask\.

YoumustfollowtheinstructionsandusethegivendictionaryformattocallAPIs\.

Youcanonlygenerateoneactionatatime\.

Youcanfindfilesforyourtaskin‘/testbed/data‘\.Ifyoudonotknowthefilenames,switchtoshellandlistthedirectory\.

Youhavefollowingappsinstalledinthesystem:

\{introductions\}

#### User message layout\.

\#\#Task

\{task\}

\#\#Selectedexactexecutionevidence

\{evidence\}

\#\#Currentactionspace

\{action\_instructions\}

\{execution\_context\}

\#\#Outputprotocol

\{output\_protocol\}

#### Evidence format\.

\[\{evidence\_id\}\]ACTION:\{action\}

\[\{evidence\_id\}\]OBSERVATION:\{observation\}

For a partially selected observation, the second line is:

\[\{evidence\_id\}\]SELECTEDOBSERVATION:

\{fragments\}

An empty history is rendered as\(no prior evidence\)\.

#### Action space before selecting an app\.

Availableapps:\{available\_apps\}

Chooseoneapp:\{’app’:’system’,’action’:’switch\_app’,’target\_app’:APP\}

#### Action space within an app\.

Currentapp:\{current\_app\}

Availableactions:

\{action\_demos\}

\-switchapp:\{’app’:’system’,’action’:’switch\_app’,’target\_app’:APP\};otherapps=\{alternatives\}

\-finishnon\-question:\{’app’:’system’,’action’:’finish\_task’,’answer’:’None’\}

\-finishquestion:\{’app’:’system’,’action’:’finish\_task’,’answer’:ANSWER\}

#### Execution context\.

\#\#Executioncontext

Taskworkspace/defaultoutputdirectory:

"\{default\_directory\}"

Currentworkingdirectory:

"\{current\_directory\}"

Foranoutputrequestedbyfilenameonly,usethetaskworkspaceunlessthetaskspecifiesanotherlocation\.Relativefilesystempathsresolvefromthecurrentworkingdirectory\.

App\-managedstoragestillfollowsitstoolschema\.

Treatfilepaths,accountnamesandotheridentifiersascase\-sensitive\.Copytheexactidentityfromthetaskorpublicevidence;donotsubstitutethecurrentassistantuserforapersonnamedinthetask\.Ifunresolved,useanavailabletooltocheckratherthanguessornormalizespelling\.

Asuccessfultoolreceiptconfirmsthatoperation,notalltaskrequirements\.Keepuncertainrequirementsinopen\.Donotmarktheactionyouareabouttoexecuteasalreadydone\.Beforefinish\_task,comparetherequestedoutcomeswithpublicreceipts:object,locationandcontent\.Checkmissingevidencewithexistingtools;donotblindlyrereadeveryresult\.

KeepallfiveMEMORYfieldsinsideoneJSONstring\.Neverplacedone/open/next/answer\_mode/known\_apisattheouterJSONlevel\.

Forshellcommands,astring\(orsingletonstringlist\)isashellprogram;amulti\-elementstringlistisliteralargv\.

Redirectionandpipesbelonginaprogramstringoranexplicitshellcommand,notasliteralargventries\.

#### Output protocol\.

ReturnexactlyonevalidJSONobjectandnoprose,Markdown,XMLtags,orcodefences\.

Usethisexactouterschema:

\{

"memory":"done=\.\.\.;open=\.\.\.;next=\.\.\.;answer\_mode=none\|value;known\_apis=\.\.\.",

"action":\{"app":"\.\.\.","action":"\.\.\."\}

\}

‘action‘MUSTbeanestedJSONobject,neveraquotedstring\.IncludeeveryargumentrequiredbyonecurrentlyavailableOfficeBenchaction\.

Exampleswitchaction:

\{

"memory":"done=none;open=completethetask;next=openshell;answer\_mode=none;known\_apis=shell",

"action":\{"app":"system","action":"switch\_app","target\_app":"shell"\}

\}

Thememorymustbeatmost128proxytokens\.

Replaceiteachturn\.Keepprogress,openwork,nextoperation,answermode,andrecentlyneededappactions\.NeverputlongIDs,files,lists,orrawreceiptsinmemory;exactvaluesstayinevidence\.

Currentmemory:\{working\_memory\}

The initial memory value isnone yet\. Without MEMORY, the output instruction is:

ReturnexactlyonenativeOfficeBenchactiondictionaryandnoproseorMarkdown\.

### J\.3Tau2 Actor

The Actor uses Tau2’s system instructions and domain policy, followed by the three CarryOn instruction blocks below\. Tool schemas are provided through the model’s native tool interface\.

#### Benchmark system message\.

<instructions\>

Youareacustomerserviceagentthathelpstheuseraccordingtothe<policy\>providedbelow\.

Ineachturnyoucaneither:

\-Sendamessagetotheuser\.

\-Makeatoolcall\.

Youcannotdobothatthesametime\.

Trytobehelpfulandalwaysfollowthepolicy\.AlwaysmakesureyougeneratevalidJSONonly\.

</instructions\>

<policy\>

\{domain\_policy\}

</policy\>

#### State update\.

Usingworkingmemorywithoutlosingtheuser’sgoal

MEMORYisarevisableindexintothepublichistory,notasubstituteforthedomainpolicyoracompleteprocedure\.Keeptheexistingfivefieldswithin128tokens,usinginformationavailablebeforethecurrentresponse\.

\-done:Notecompletedworkanditsobservedscope\.Givinginstructionsisnotthesameastheusercarryingthemout\.Attributeuserreportsasreports\.

\-open:Preservetheunresolveduseroutcome,therelevantpendingprerequisiteorresult,andwhomustact\.Finishingyourplannedchecksdoesnotresolvetheoutcome\.Donotdropthegoalmerelybecauseyourpreviousplanisempty\.

\-next:Stateonerevisablenextstep,notacommitmenttothepreviousplan\.Ifanattemptedfixleavestheoutcomeunresolved,reconsidertheapplicablepolicyanditsprerequisitereferences\.AcauseabsentfromMEMORYhasnottherebybeenruledout\.Beforedeclaringtheavailableprocedureexhausted,distinguishadocumentedlimitfromastepyouhavenotchecked\.

\-answer\_modeandknown\_apis:Keeptheiroriginalmeanings\.Knowinganendpointdoesnotmeanitwascalledorthatitsoperationsucceeded\.

Usepublicresultstorevisethenote\.Guideuser\-ownedactionsthroughthedocumentedprocedure;donotinferaccesstoprivateusertoolsorreceipts\.

Keepusableconfirmationsinsteadofrestartingcompletedchecks\.Whentheevidenceissufficient,actdirectly\.Followthepolicywhenresolutionisconfirmedortherequestneedstransfer;donotloopjusttokeepopennonempty\.

Keeptheoriginalreply/tool\-callprotocol\.Noextrafields,callsorseparateverificationpassarerequired\.

#### Historical statements\.

AGENT\_STATEMENTrecordswhatyoupreviouslyrequestedorcommittedto;itdoesnotcertifywhetherthatworkispendingorcompleted\.Usethepublicrepliesandactualtoolreceiptstoupdateyourexistingworkingmemory,retainingthesourceandscopeofconfirmations\.

#### Output protocol\.

BoundedCarryOnworking\-memoryprotocol:

Everyresponsemustprovidethesamefivefields:done,open,next,answer\_mode,known\_apis\.Replacethestateeachturn\.Use’none’foranemptyfield\.

Keepthecompleteserializedstatewithin128tokens\.Preservetaskprogress,thenextintendedoperation,whetherareturnedvalueisneeded,andnamesoftoolendpointsalreadyinspected\.Donotcopypasswords,accesstokens,longIDs,lists,ortoolreceiptsintomemory\.Exactvaluesremaininrawevidence\.

TherearetwooutputchannelsforthisSAMEprivatecontrolstate:

1\.Customerreply:startvisibletextwithexactlyoneline:

\#MEMORY:done=\.\.\.;open=\.\.\.;next=\.\.\.;answer\_mode=none\|value;known\_apis=\.\.\.

Thenprovidethenormalcustomer\-facingreply\.AMEMORYlinealoneisinvalid\.

2\.Nativetoolcall:providetherequired\_carryon\_memorySTRINGinsidethetoolarguments,alongsidethetool’snormalarguments\.Itsvalueis:

done=\.\.\.;open=\.\.\.;next=\.\.\.;answer\_mode=none\|value;known\_apis=\.\.\.

DonotrepeatMEMORYinatextblockanddonotincludecustomer\-facingproseonatoolturn\.Callexactlyonesuppliedfunctionusingitsnativechannel\.

Theruntimeremovesprivatecontrolmetadatabeforegivingareplytothecustomerorexecutingtheunchangedenvironmenttool\.MEMORYisnotcustomerprose,aseparatetoolaction,anobservation,orevidencethatworksucceeded\.

DonotoutputtoolcallsasPython,JSONtext,Markdown,oracodefence\.

AllexistingTau2policyandtool\-ownershiprulesapplytothepublicaction\.

#### Tool argument description\.

Requiredprivatecontrolstate:done=\.\.\.;open=\.\.\.;next=\.\.\.;answer\_mode=none\|value;known\_apis=\.\.\.\.Allfivefieldsnonempty;usenonewhenempty\.Singleline,atmost128tokens\.Removedbeforetoolexecution\.

Selected evidence is supplied as alternating action and observation messages\. The final message also includes:

Currentworkingmemory:

\{working\_memory\}

The initial memory is\(empty\)\. Control metadata is removed before a response reaches the user or a tool executes\.

### J\.4Offline State Annotation

These prompts produce the state annotations and evidence citations used for selector training\. The annotation schema is richer than the Actor’s bounded five\-field MEMORY\. The following is the shared AppWorld template\.

#### Annotation instruction\.

YoulabelVERIFIEDEXECUTIONSTATEforatool\-usingagentfromanofficiallysuccessfulAppWorldtrajectory\.Thetrajectoryisvisibleinhindsight,butthestateaftersteptmustcontainonlyclaimssupportedbythetaskandtoolevidenceatsteps<=t\.Returnonecompletestateforeverysuppliedexternalaction,inthesameorder\.ReturnJSONonly,withnomarkdown\.

Usethesetermsprecisely:

\-execution\_invariants:long\-livedtaskrules,scopepredicates,completenessconditions,preconditions,postconditions,andterminationconditions\.

\-open\_obligations:concreteworkthatremainsatthispointintheepisode\.

\-verified\_facts:environmentfactsactuallysupportedbytoolevidence\.

\-tool\_evidence:concisereceiptstyingastateclaimtooneormorestepIDs\.

Maintainstatesequentiallyratherthanindependentlysummarizingeachstep\.

ProcessedIDsandcompletedworkaccumulateunlessalaterreceiptexplicitlyinvalidatesthem\.Neverreplaceanaccumulatedsetwithonlythenewestitem\.

RemainingIDsshrinkonlywhenthereisevidencethatanitemisprocessedoroutofscope\.PreserveexactentityIDs,recordIDs,filenames,paginationcursors,collectionmembers,errors,andmutationreceiptswhenfutureexecutioncandependonthem\.AsuccessfulAPIresponseisevidencethatthecallreturnedsuccessfully;itisnotautomaticallyproofthattheoverallgoalorallsideeffectsarecomplete\.Markunverifiedeffectsuncertain\.

Forpaginationorenumeration,donotmarkexhaustedmerelybecauseonepagewasreturned\.Exhaustionrequiresevidencesuchasanemptyterminalpage,adocumentedterminalcursor,orthetrajectory’sAPIsemanticsprovingthereisnonextpage\.KeepthecurrentcursorandcollectedIDs\.Formutations,distinguishintendedtargets,processedtargets,remainingtargets,andeffectsthathavebeenre\-queriedorotherwiseverified\.Foranswertasks,preservetheevidenceneededtocomputetheanswerandtherequiredanswerformat\.

Anexecutioninvarianthasstatusopen,satisfied,violated,orunknown\.

"satisfied"requirescitedevidence;"unknown"isrequiredwhenevidenceisinsufficient\.required\_beforenamestheactionclassorconditionthatcannotsafelyoccurfirst\.Openobligationsaredynamic:addnewlydiscoveredwork,updateitasevidencearrives,andremoveorcloseitonlywhensupported\.

state\_updatedescribesthetransitionfromtheprecedingstate:

\-initialize:thefirststate;

\-update:materialstatewasadded,changed,orclosed;

\-preserve:thelatestactionaddsevidencebutdoesnotmateriallychangethemaintainedstate;

\-abstain:theobservationdoesnotjustifyastateclaim;

\-reject:atemptingclaimiscontradictedbytheavailableevidence\.

Theadded,updated,closed,andrejectedarrayscontainshortfield\-leveldescriptions,nothiddenreasoning\.

termination\_supportedistrueonlywhennorequiredobligationremainsopen,allnecessarycollectionsareexhausted,requiredmutationsoranswersareverified,uncertaineffectscannotinvalidatesuccess,andthecurrenthistorycontainsevidenceforthetask’scompletionconditions\.Donotinferitjustbecausethenextexpertactionwouldcompletethetask\.

Theresponseshapeisexactly:

\{

"task\_id":"\.\.\.",

"initial\_state":\{

"step\_id":0,

"state\_update":\{

"mode":"initialize","added":\[\],"updated":\[\],

"closed":\[\],"rejected":\[\]

\},

"execution\_invariants":\[\],

"verified\_facts":\{"items":\[\]\},

"tool\_evidence":\[\],

"collection\_state":\{

"processed\_ids":\[\],"remaining\_ids":\[\],

"next\_cursor":null,"exhausted":false

\},

"open\_obligations":\[\],

"uncertain\_effects":\[\],

"termination\_supported":false

\},

"transitions":\[

\{

"step\_id":1,

"state\_update":\{

"mode":"initialize\|update\|preserve\|abstain\|reject",

"added":\[\],"updated":\[\],"closed":\[\],"rejected":\[\]

\},

"execution\_invariants":\[

\{

"invariant":"\.\.\.",

"status":"open\|satisfied\|violated\|unknown",

"evidence\_step\_ids":\[1\],

"required\_before":"\.\.\."

\}

\],

"verified\_facts":\{

"items":\[

\{

"fact":"humanreadablefactname",

"value":"exactcompactJSONortextvalue",

"evidence\_step\_ids":\[1\]

\}

\]

\},

"tool\_evidence":\[

\{"evidence":"\.\.\.","evidence\_step\_ids":\[1\]\}

\],

"collection\_state":\{

"processed\_ids":\[\],

"remaining\_ids":\[\],

"next\_cursor":null,

"exhausted":false

\},

"open\_obligations":\[\],

"uncertain\_effects":\[\],

"termination\_supported":false

\}

\]

\}

Useemptyarrays/objectswhenacategoryisinapplicable\.Keepstatescompactbutexecution\-sufficient\.Everyevidence\_step\_idsvaluemustbeanintegernolargerthanthetransition’sstep\_id\.Produceexactlyonetransitionforeachsuppliedstepandcopyitsintegerstep\_idexactly\.

initial\_stateisz0=f\(task\):inferonlytask\-derivedexecutioninvariantsandopenobligations\.Itsverified\_factsandtool\_evidencemustbeempty,anditmustnotciteanytoolstepbecausenotoolactionhasexecutedyet\.Ifaninitialinvariantusesanevidence\_step\_idsfieldforschemaconsistency,thatlistmustbeempty\.Representinitialverified\_factsexactlyas\{"items":\[\]\}\.

For OfficeBench,AppWorldis replaced byOfficeBench, and the following instruction is appended:

OfficeBenchadaptation:eachsuppliedstepisoneactuallyexecutednativeOfficeBenchactionanditscompletepublicenvironmentobservation\.CitethesestepIDs,notinternallinesorlistitems\.Donotinventfilecontentsoreffectsthatthepublicobservationsdonotestablish\.Nativefinish\_taskisnotproofthatthetaskrequirementsaresatisfied\.

For Tau2,AppWorldis replaced byTau2 Telecom, followed by:

Tau2public\-conversationadaptation:eachstepcontainsoneactualActorpublicresponseornativetool\-callmessage,followedbyallitspublictoolreceiptsandpublicuserrepliesuptothenextActordecision\.Astepisoneindivisibleevidenceblock\.CitewholestepIDs,neverinternallistitems\.Thefirstpublicrequestistheonlytaskinstructionsupplied\.Userstatementsareclaims,notverifiedtoolfacts\.Toolexecutiondoesnotprovethatauserperformedaninstructeddeviceaction\.Donotinferhiddendevicestate,privateuseractions,identitycorrectness,tasksuccess,orevaluatorrequirements\.Useonlythepublicprefixthrougheachlabeledstep\.Futureresponsesmustnotjustifyanearlierstate\.Distinguishunresolvedobligations,userreports,anddirecttoolobservations\.Terminaldialogueisnotverificationofsuccess\.

#### Annotation input\.

The user message is a JSON object containingtask\_id,task\_instruction, andofficial\_success\_trajectory\. The trajectory containssteps; Tau2 also includesinitial\_public\_prefix\. AppWorld includestool\_schemaswhen available\. These fields are filled from the training trajectory\. Output fields and types follow the JSON structure specified above\.

### J\.5Selector Input Format

The reranker receives a system instruction and a query–document pair\. The query contains the task and current observation; the document contains the candidate action and observation\. The next\-action head uses the same input format with its own task instruction\.

#### Shared system instruction\.

JudgewhethertheDocumentmeetstherequirementsbasedontheQueryandtheInstructprovided\.Notethattheanswercanonlybe"yes"or"no"\.

#### User input\.

<Instruct\>:\{instruction\}

<Query\>:task:\{task\}

currentobservation:\{current\_observation\}

<Document\>:action:\{candidate\_action\}

observation:\{candidate\_observation\}

OfficeBench reverses the action and observation lines in the document\. The input uses Qwen chat delimiters and ends with:

<\|im\_end\|\>

<\|im\_start\|\>assistant

<think\>

</think\>

#### Ranking: AppWorld and OfficeBench\.

Foralong\-horizontoolagent,rankwhetherthisexactprioraction\-observationblockshouldremainvisibleforcorrectfutureexecution\.

#### Ranking: Tau2\.

Foralong\-horizontoolagent,rankwhetherthisexactpriordialogueortool\-evidenceunitshouldremainvisibleforcorrectfutureexecution\.

#### Next\-action use: AppWorld and OfficeBench\.

Foratool\-usingagent,judgewhetherthisexactpriorevidencesuppliesanAPIspecification,credential,ID,cursor,path,orruntimevalueneededbytheagent’simmediatelynextexecutableaction\.

#### Next\-action use: Tau2\.

Foradual\-controldialogueagent,judgewhetherthisexactpriorvisibleevidenceisneededbytheimmediatelynextdecision:toparameterizeanagenttoolcall,issueorcompleteauser\-sideinstructionorcommitment,verifyanauthoritativeeffect,orresolveanopenobligation\.Donotpredictgeneralfutureusefulness\.

### J\.6CarryOn\-E Teacher Context

The teacher receives the student’s saved context before the action, using the same Actor instructions and state–evidence interface\. Its response is appended as the supervised assistant target\. Initial supervised examples similarly pair the teacher’s recorded context with its response\. Training uses the model’s chat template and supervises only the selected assistant responses\.

相似文章

面向长周期任务的智能体兼容上下文管理

arXiv cs.AI

介绍AdaCoM,一种基于外部LLM的上下文管理器,适用于冻结的智能体。通过保留任务约束和修剪过时内容,利用强化学习提升长周期任务性能,并在网络搜索和深度研究基准上进行了实验。

轻装前行:为长时程智能体构建面向对象的上下文

Hugging Face Daily Papers

论文提出 CarryOn,一种面向长时程智能体的对象导向上下文运行时,让智能体从可复用的任务进度继续工作而非反复压缩交互历史。在 OSWorld 2.0 和 BrowseComp-Plus 上分别提升 5.8 和 7.0 个百分点,同时 token 用量减少 51.9% 和 22.9%。

RECAP:通过上下文压缩训练长时程 LLM 智能体

Hugging Face Daily Papers

RECAP 提出了一种用于训练长时程 LLM 智能体的强化学习(RL)方案,通过上下文压缩实现,将任务奖励与一种衡量摘要保留智能体行为程度的指标相结合,在 BrowseComp-Plus(58.2%→62.8%)和 SWE-bench Verified(46.8%→51.1%)上取得提升,同时使用更少的工具调用和更短的轨迹。

KEEPER:面向长时程大语言模型智能体的控制充分性文本记忆学习

arXiv cs.CL

该论文介绍了 KEEPER,这是一项针对四种辅助目标的比较研究,旨在为长时程大语言模型智能体构建足以支持控制的文本记忆。研究发现,与奖励相关的预测能带来最佳任务表现,并提出自一致性偏差,用于衡量递归记忆更新中错误的持续程度。