acceptodds
Under review as a conference paper at ICLR 2027

ACM: Agentic Context Management for Long Horizon Tasks

Abstract

Agentic tasks are inherently long-horizon and multi-turn, constantly accumulating context through interactions with the environment. Existing context compression methods inevitably incur information loss and are triggered by rigid heuristic rules, leaving them misaligned with the agent’s evolving reasoning focus. We propose Agentic Context Management(ACM), a framework that equips agents with purpose-built context editing tools for lossless context management. Inspired by the interaction between short-term and long-term human memory, the agent autonomously decides when to compress its context, offloads discarded content to an external memory system, and queries it on demand for later retrieval. Building on this framework, we further develop a post-training pipeline that constructs high-quality demonstrations of context management and improves model performance on both search and coding tasks. Further analysis reveals that effective context management reduces peak token pressure, enables extended explorations, and yields more consistent solutions across independent trials. Code, data, and model checkpoints are available at https://anonymous.4open.science/r/agentic-context-management-4DE5.

Primary area:
foundation or frontier models, including LLMs
Keywords:
Agentic Task, Context Management, General Agent, Long Horizon

Reviews

Among:
Shape:
1234this paper, Top 17%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.75 over 4 reviews, above 83% of the others.
Reviewer_vWCKOpenReview ↗
Rating
2
Confidence
3
Informativeness
3
Presentation
2
Soundness
3
Read review
Paper summary

ACM uses manage_context and query_memory to compress working context while preserving raw messages in external memory for later retrieval. Its teacher-guided data generation pipeline uses dual constraints, Injection and Refinement, to teach when to use context management tools and when not to call them. Experiments use Qwen3.5-9B on BrowseComp-Plus, DeepSearchQA, and SWE-Bench Verified. On BrowseComp-Plus, Table 2 reports a Pass@1 increase from 57.0 to 72.7 percent over ReAct, with lower peak token usage and more tool calls.

Critical strengths
  1. The context management tools address a practical limitation of summarization: a discarded detail can be needed later. Preserving raw messages in external memory allows the agent to query that evidence through query_memory. The reported results also separate several stages of the system. On BrowseComp-Plus, adding the ACM tools improves accuracy by 6.5 percentage points over ReAct, and ACM training adds a further 9.2 points. Gains after training are smaller on DeepSearchQA and SWE-Bench Verified, at 2.0 and 1.6 points over the base ACM agent. This is more informative than reporting only a comparison between the final system and ReAct. The appendix provides tool schemas and teacher prompts that help explain the implementation.

  2. The distillation ablation is useful and shows that the effect depends on the task. In Table 3, GPT-5.5 distillation reaches 62.3, 38.1, and 64.2 percent on the three benchmarks, whereas ACM training reaches 72.7, 42.5, and 63.0 percent. ACM training is stronger on the search tasks, while GPT-5.5 distillation is stronger on coding. Combining them gives the highest reported values in that table, at 78.5, 43.0, and 65.6 percent. This suggests that the teacher-annotated data provides a different training signal from GPT-5.5 distillation, although it does not isolate which changes within those trajectories produce the gain.

Critical weaknesses
  1. Refinement can replace context management calls with search queries or final answers, so the training data changes search and answer behavior as well as context management. Table 3 compares this combined supervision with GPT-5.5 distillation, but does not isolate which changes produce the gain. A control retaining the same search and answer corrections while omitting context management supervision would help determine how much of the improvement comes from learning when to manage context.

  2. The SWE-Bench Verified evaluation needs clarification. The AI use statement says that final answers in all evaluations are graded by an LLM, but the grading description covers only the search tasks and does not specify whether repository tests were used for coding. Tables 2 and 3 also report 72.7 percent Pass@1 on BrowseComp-Plus, while Figure 5 gives a four trial average of 76.2 percent. These values may come from different runs, but the relationship is not explained. The scoring procedure and aggregation rules should be stated explicitly for each reported result.

Questions for authors
  1. What evidence separates context management from improved search and answer supervision? Is there a comparison using the same targeted corrections and search instructions while omitting context management actions, or an ablation that removes query_memory while retaining manage_context?

  2. Which runs and aggregation rules produced the 72.7 percent value in Tables 2 and 3 and the 76.2 percent average in Figure 5? Can you report paired uncertainty for the gains over the base ACM agent, particularly the smaller gains on the two out-of-domain benchmarks?

4 comments

We thank the reviewer for the detailed review. We address the weaknesses and questions with new experiments, including the suggested control.

W1 / Q1: Separating context management from search and answer supervision

The suggested control. The teacher sees the gold answer and evidence when annotating, but Injection only inserts manage_context / query_memory calls, so Refinement is the only path through which gold evidence can shape the training data.

Table R1 implements the control the reviewer suggested: the masked variant retains exactly the same targeted search and answer corrections and omits only the context-management supervision. We also train on Injection-only and Refinement-only data, generating additional demonstrations with the same pipeline so that every variant uses the same number of demonstrations. All trained variants use 1,880 teacher-annotated demonstrations and share the student, teacher, NLL objective and hyperparameters. The masked variant trains on exactly our trajectories, with the loss zeroed on every assistant turn that calls manage_context or query_memory, including its reasoning.

Table R1. Training-data ablation.

Training dataTeacher editsLoss on context-management turnsBrowseComp-PlusDeepSearchQASWE-Bench Verified
None (ACM Base)––63.540.561.4
Injection onlyInjectionKept67.341.662.2
Refinement onlyRefinementKept70.042.160.2
Injection + Refinement (ours)BothKept72.742.563.0
Injection + Refinement, context-management loss maskedBothMasked70.741.160.8
  • The masked variant loses accuracy on all three benchmarks, and on SWE-Bench Verified it falls below the untrained Base. Without context-management supervision, the out-of-domain gain over Base shrinks from +2.0 to +0.6 on DeepSearchQA and from +1.6 to −0.6 on SWE-Bench Verified. Context-management supervision is therefore what makes the training transfer; in-domain, the search and answer supervision also helps, and context-management supervision adds a further 2.0 points.
  • Injection-only contains no teacher-written search query, yet improves all three benchmarks.
  • Both constraints help in-domain, and their combination is best. On SWE-Bench Verified, Injection helps while Refinement does not: Refinement replaces a compression with search-specific actions, which do not carry over to coding. Larger coding gains would call for demonstrations synthesized on coding tasks, which the same pipeline can produce.

Removing query_memory while retaining manage_context. Compression is still decided by the agent but becomes lossy.

Table R2. Effect of removing query_memory.

Policyquery_memoryBrowseComp-Plus Pass@1DeepSearchQA Pass@1
ACM Base✓63.540.5
ACM Base✗62.040.1
ACM-Post-Trained✓72.742.5
ACM-Post-Trained✗70.741.9

Removing recall lowers BrowseComp-Plus accuracy by 1.5 points for ACM Base and 2.0 points for ACM-Post-Trained, with smaller drops on DeepSearchQA. Most of ACM's gain comes from agent-initiated compression, and query_memory complements it. The agent recalls only about once per episode (Fig. 4), yet these few recalls are worth 1.5–2.0 points. Together, the two tools give the agent a short-term working context and a long-term store it can return to, a combination we see as promising for longer tasks.

The search instructions. Compared with the ReAct prompt, the ACM prompt adds the following strategy instructions:

Strategy:
- If you are not confident in a result, search more --- issue additional queries with different terms to corroborate or contradict your best candidate. Do not settle on a low-confidence answer when more searches are still cheap.
- Only commit to a final answer when you have confident evidence.

Table R3 adds exactly these instructions to ReAct, without the context-management tools.

Table R3. Strategy-prompt control.

AgentContext-management toolsStrategy instructionsBrowseComp-Plus Pass@1DeepSearchQA Pass@1
ReAct✗✗57.036.7
ReAct + strategy prompt✗✓59.337.9
ACM Base✓✓63.540.5

The instructions improve accuracy somewhat, but the context-management tools contribute the larger share of the gain.

W2 / Q2: Scoring, aggregation and uncertainty

SWE-Bench Verified scoring. We thank the reviewer for pointing out this oversight. SWE-Bench Verified is graded entirely by execution, not by an LLM. We follow the official SWE-bench harness and host each instance's environment on Modal to run its tests; an instance counts as resolved only if all FAIL_TO_PASS and PASS_TO_PASS tests pass. The LLM judge in App. B.6 is used only for BrowseComp-Plus and DeepSearchQA. We will correct the AI-use statement.

Aggregation, and 72.7% vs. 76.2%. All Pass@1 values are mean accuracy over 4 independent trials on the same test set (150 held-out questions for BrowseComp-Plus). Pass@4 counts a question as solved if any of the 4 trials is correct. The 72.7% in Tables 2–3 is the 4-trial mean of our released checkpoint. The 76.2% in Figure 5 comes from a different checkpoint: we first trained with LLaMA-Factory and later moved to a custom Transformers trainer, the version in our released code, and Figure 5 was drawn by mistake from the earlier checkpoint. We apologize for the inconsistency. Figure 5 will be regenerated from the released checkpoint, which we share through a newly created anonymous Hugging Face account: https://huggingface.co/anonymous-openreview/acm-post-trained-qwen3.5-9b.

Paired uncertainty. Table R4 reports paired 95% confidence intervals for every gain.

Table R4. Paired uncertainty of the gains.

ComparisonBenchmarkΔ Pass@195% CI
ACM Base − ReActBrowseComp-Plus+6.5[5.2, 7.6]
ACM Base − ReActDeepSearchQA+3.8[2.1, 5.3]
ACM Base − ReActSWE-Bench Verified+3.4[2.5, 3.9]
ACM-Post-Trained − ACM BaseBrowseComp-Plus+9.2[7.3, 11.4]
ACM-Post-Trained − ACM BaseDeepSearchQA+2.0[0.9, 3.2]
ACM-Post-Trained − ACM BaseSWE-Bench Verified+1.6[0.8, 2.1]

The in-domain training gain on BrowseComp-Plus is large. The out-of-domain training gains are smaller but statistically reliable, even though training uses BrowseComp-Plus only. Table R1 above shows where this transfer comes from: without context-management supervision, it largely disappears. We will add Table R4 and the aggregation rules to the revised paper.

I appreciate the authors’ response and their answers to my questions. However, I still believe my initial overall rating reflects my assessment of the paper, and therefore I would like to keep it.

Thank you for your time and effort in reviewing our paper! If you have any other questions or concerns, please feel free to let us know—we’d be happy to answer them!

Reviewer_UHqLOpenReview ↗
Rating
3(+1)
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes ACM, a framework that allows agents to decide when to compress their context instead of relying on fixed rules. The original messages are saved in external memory, and the agent can retrieve them later using a memory tool. The authors also introduce a training method where a teacher corrects failed agent trajectories, either adding memory actions when useful or replacing unnecessary compression with better search or answer actions.

The method is evaluated on BrowseComp-Plus, DeepSearchQA, and SWE-bench Verified. ACM improves performance even without training, and the trained model achieves further gains. On BrowseComp-Plus, accuracy increases from 57.0% to 72.7%, while the peak context length is reduced.

Critical strengths

The framework is simple and practical, allowing agents to compress context without permanently losing information. It improves performance across all three benchmarks, with particularly strong gains on BrowseComp-Plus.

Teaching the agent both when to compress and when not to is a useful idea. The paper also includes helpful analysis of tool usage, reliability across multiple runs, and limitations on smaller models.

Critical weaknesses

It is unclear how much of the improvement comes from better memory management rather than general task learning. The teacher also provides better search and answer actions, and the ACM prompts encourage more exploration, so these factors may contribute to the gains.

Some training and evaluation details are unclear. The paper describes an NLL loss, while the released code appears to use KL distillation. Figure 5 also reports a different Pass@1 from the tables, and it is unclear whether SWE-bench results were evaluated using actual tests.

Questions for authors

Can the authors clarify the training loss and evaluation methods used for the main results, and explain the differences in reported Pass@1?

Can the authors add a comparison with fixed compression timing or without memory recall, while keeping the prompts and other training settings the same?

3 comments

We thank the reviewer for the careful reading. We address the weaknesses and questions with new experiments.

W1: Memory management vs. general task learning

The reviewer raises two possible confounds: the ACM prompt encourages more exploration, and the teacher provides better search and answer actions. We isolate each with a new experiment.

Exploration instructions in the ACM prompt. Compared with the ReAct prompt, the ACM prompt adds the following strategy instructions:

Strategy:
- If you are not confident in a result, search more --- issue additional queries with different terms to corroborate or contradict your best candidate. Do not settle on a low-confidence answer when more searches are still cheap.
- Only commit to a final answer when you have confident evidence.

Table R1 adds exactly these instructions to ReAct, without the context-management tools.

Table R1. Strategy-prompt control.

AgentContext-management toolsStrategy instructionsBrowseComp-Plus Pass@1DeepSearchQA Pass@1
ReAct✗✗57.036.7
ReAct + strategy prompt✗✓59.337.9
ACM Base✓✓63.540.5

The strategy instructions improve accuracy somewhat, but the context-management tools contribute the larger share of the gain. The main improvement therefore does not come from the prompt.

The teacher's search and answer corrections. The teacher sees the gold answer and evidence when annotating, but Injection only inserts manage_context / query_memory calls, so Refinement is the only path through which gold evidence can shape the training data.

Table R2 separates these effects. We train on Injection-only and Refinement-only data, generating additional demonstrations with the same pipeline so that every variant uses the same number of demonstrations. We also train on exactly our data with the context-management supervision masked out. All trained variants use 1,880 teacher-annotated demonstrations and share the student, teacher, NLL objective, and hyperparameters. The masked variant trains on exactly our trajectories, with the loss zeroed on every assistant turn that calls manage_context or query_memory, including its reasoning.

Table R2. Training-data ablation.

Training dataTeacher editsLoss on context-management turnsBrowseComp-PlusDeepSearchQASWE-Bench Verified
None (ACM Base)––63.540.561.4
Injection onlyInjectionKept67.341.662.2
Refinement onlyRefinementKept70.042.160.2
Injection + Refinement (ours)BothKept72.742.563.0
Injection + Refinement, context-management loss maskedBothMasked70.741.160.8
  • Injection-only contains no teacher-written search query, yet improves all three benchmarks.
  • The masked variant keeps every teacher-written search query and answer and removes only the context-management supervision. Accuracy drops on all three benchmarks, and on SWE-Bench Verified it falls below the untrained Base. Without context-management supervision, the out-of-domain gain over Base shrinks from +2.0 to +0.6 on DeepSearchQA and from +1.6 to −0.6 on SWE-Bench Verified. Context-management supervision is therefore what makes the training transfer.
  • Both constraints help in-domain, and their combination is best. On SWE-Bench Verified, Injection helps while Refinement does not: Refinement replaces a compression with search-specific actions, which do not carry over to coding. Larger coding gains would call for demonstrations synthesized on coding tasks, which the same pipeline can produce.

W2 / Q1: Training loss, Pass@1 and SWE-bench evaluation

Training loss. All results in the paper use GPT-5.5 as the teacher and the NLL objective in Eq. (2). The released code supports two interchangeable modes:

  • NLL on the supervised tokens. This needs only the teacher's text, so it works with any teacher, including API-only models such as GPT-5.5.
  • Token-level KL to the teacher's top-k distribution. This needs the teacher's logits, so it requires an open-weight teacher (e.g., Qwen3.5-397B-A17B).

We will document both modes, and the configuration that reproduces the paper, in the released codebase.

Pass@1 in Figure 5 (76.2%) vs. Tables 2–3 (72.7%). The two numbers come from different checkpoints. We first trained with LLaMA-Factory and later moved to a custom Transformers trainer, which is the version in our released code. To verify the released pipeline, we retrained the model from scratch with it. Tables 2–3 report this released checkpoint (72.7%), while Figure 5 was drawn by mistake from the earlier LLaMA-Factory checkpoint (76.2%). We apologize for the inconsistency. Figure 5 will be regenerated from the released checkpoint, which we share through a newly created anonymous Hugging Face account: https://huggingface.co/anonymous-openreview/acm-post-trained-qwen3.5-9b.

SWE-bench evaluation. We thank the reviewer for pointing out this oversight. SWE-Bench Verified is graded entirely by execution, not by an LLM. We follow the official SWE-bench harness and host each instance's environment on Modal to run its tests. The AI-use statement wrongly said that all benchmarks are LLM-graded, and we will correct it.

Q2: Fixed compression timing and no memory recall, with the same prompts and settings

Fixed compression timing. Table R3 compares agent-initiated compression with two fixed rules. We use the prompt-only agent (no training). In the fixed-rule settings, manage_context is removed from the agent's tools, and the environment calls the same summarizer either when the context reaches 90% of the 128K window (the trigger used by ReSum) or every 10 turns.

Table R3. Agent-initiated vs. fixed-rule compression (prompt-only, no training).

Compression triggerBrowseComp-Plus Pass@1Avg. # compressions / ep.Peak tok.
None (ReAct)57.0063k
Fixed token budget (90% of the window)60.80.768k
Fixed interval (every 10 turns)58.62.852k
Agent-initiated (ACM Base)63.52.159k

Agent-initiated timing gives the highest accuracy. The token-budget rule compresses late: many episodes finish before reaching 90% of the window, so it compresses only 0.7 times per episode and leaves the highest peak context. The fixed interval compresses most often and keeps the smallest peak context, but gains only 1.6 points over ReAct, because a schedule compresses whether or not the agent still needs its recent context. The agent compresses at a moderate rate and achieves the best accuracy. When to compress matters more than how often.

No memory recall. Table R4 removes query_memory while keeping everything else. Compression is still decided by the agent but becomes lossy.

Table R4. Effect of removing query_memory.

Policyquery_memoryBrowseComp-Plus Pass@1DeepSearchQA Pass@1
ACM Base✓63.540.5
ACM Base✗62.040.1
ACM-Post-Trained✓72.742.5
ACM-Post-Trained✗70.741.9

Removing recall lowers BrowseComp-Plus accuracy by 1.5 points for ACM Base and 2.0 points for ACM-Post-Trained, with smaller drops on DeepSearchQA. Most of ACM's gain comes from agent-initiated compression, and query_memory complements it. The agent recalls only about once per episode (Fig. 4), yet these few recalls are worth 1.5–2.0 points. Together, the two tools give the agent a short-term working context and a long-term store it can return to, a combination we see as promising for longer tasks.

We will add these ablations to Section 6 of the revision.

Thanks authors for the detailed response. Most of my concerns have been addressed in the rebuttal. One remaining concern I have is about how much of the training gain comes from context management itself. On BrowseComp-Plus, masking the context-management loss still achieves 70.7%, compared to 72.7% with the full method. From this, seems a large part of the improvement may is gained from general task learning. The out-of-domain results are more encouraging and suggest that context-management supervision does help with transfer.

Overall, I appreciate the authors' efforts in addressing the concerns. And I will raise my score.

Reviewer_tp4bOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes Agentic Context Management (ACM), which is a framework for managing growing interaction histories in long-horizon LLM agent tasks. ACM allows agents to autonomously summarize their working context, preserve the original messages in external storage, and retrieve relevant information on demand.

Besides, the authors also propose a teacher-guided pipeline that adds useful context-management actions and replaces unnecessary ones with further exploration or a final answer. Successful trajectories are then used for supervised fine-tuning. Experiments with Qwen3.5-9B on BrowseComp-Plus, DeepSearchQA, and SWE-Bench Verified show gains over ReAct and the evaluated context-management baselines.

Critical strengths
  1. I believe this paper is well motivated and practically relevant. It focuses on addressing context growth and information interference in long-horizon agent tasks. Preserving original records for later retrieval helps mitigate information loss from summarization. Besides, the teacher-guided pipeline corrects decisions in the student’s own trajectories and retains successful continuations, aligning training data with student behavior while providing outcome-based quality control.

  2. The experimental evaluation is comprehensive. Comparisons among ReAct, ACM Base, and ACM-Post-Trained help distinguish the benefits of context-management tools from dedicated training. ACM-Post-Trained achieves 72.7%, 42.5%, and 63.0% on BrowseComp-Plus, DeepSearchQA, and SWE-Bench Verified, on Pass@1, respectively.

Critical weaknesses

The runtime cost implications of ACM are insufficiently evaluated. When I see the results on BrowseComp-Plus, DeepSearchQA, and SWE-Bench Verified, I notice that the tool-call counts increase across the three benchmarks. And I believe that some of these calls involve context summarization or memory queries, which require additional LLM invocations and may introduce latency. It is therefore unclear how the performance gains trade off against overall execution time and cost. Reporting end-to-end runtime, including the overhead of context-management operations, or comparing methods under matched time or cost budgets would help readers better assess ACM’s practical benefits.

Questions for authors

Please see the weakness.

4 comments

We thank the reviewer for the constructive feedback. We address the weakness with new experiments.

W1: Runtime cost of ACM

We agree that the higher tool-call count calls for a cost analysis. We add the two measurements the reviewer asked for on all three benchmarks: end-to-end wall-clock time, including the overhead of context-management operations (Table R1), and token and call accounting, including every summarizer and recall call (Table R2).

Setup. All agents use Qwen3.5-9B served with vLLM on 8×H100 GPUs on Modal. For the two search benchmarks, one GPU hosts the Qwen3-Embedding-8B retrieval model and each of the other seven runs one vLLM engine; for SWE-Bench Verified, all eight GPUs run vLLM engines. We measure wall-clock time from the start of an episode until the agent returns its final answer; grading is excluded. Tens to hundreds of rollouts run concurrently against the same engines (max_num_seqs = 16), so each episode's time includes waiting for the scheduler. The numbers therefore reflect end-to-end latency under load.

Table R1. Wall-clock time per episode (seconds).

BenchmarkAgentMeanMedianp90
BrowseComp-PlusReAct100.696.9179.3
BrowseComp-PlusACM Base269.6182.8608.3
BrowseComp-PlusACM-Post-Trained367.9227.1932.4
DeepSearchQAReAct404.9381.4701.9
DeepSearchQAACM Base791.3650.22095.4
DeepSearchQAACM-Post-Trained924.0702.61785.1
SWE-Bench VerifiedReAct922.0788.91699.3
SWE-Bench VerifiedACM Base1197.01063.82446.0
SWE-Bench VerifiedACM-Post-Trained1294.01211.02654.3

Table R2. Tokens and LLM calls per episode.

Per-episode means. Policy input tokens sum the full prompt length over all turns. Summarizer and recall input tokens include the archived messages these calls read.

BenchmarkAgentPolicy turnsPolicy input tokens (total)Policy output tokensSummarizer + recall input tokensSummarizer + recall output tokensPeak context
BrowseComp-PlusReAct19.5899k5.3k––63k
BrowseComp-PlusACM Base30.81134k7.4k69k7.2k59k
BrowseComp-PlusACM-Post-Trained46.21649k11.5k146k3.1k54k
DeepSearchQAReAct 47.31428k9.8k––46k
DeepSearchQAACM Base88.72216k17.5k66k2.9k42k
DeepSearchQAACM-Post-Trained58.81473k16.6k54k1.6k41k
SWE-Bench VerifiedReAct104.73046k23.6k––59k
SWE-Bench VerifiedACM Base107.63373k24.1k60k4.2k46k
SWE-Bench VerifiedACM-Post-Trained109.33479k26.8k72k7.0k50k

What ACM costs. ACM spends more per episode. Relative to ReAct, ACM-Post-Trained processes 2.0× the input tokens on BrowseComp-Plus, 1.1× on DeepSearchQA and 1.2× on SWE-Bench Verified, and its mean wall-clock time is 3.7×, 2.3× and 1.4× ReAct's.

Where the cost comes from. Most of the increase comes from the longer episodes that compression makes possible: on BrowseComp-Plus, ACM-Post-Trained runs 46.2 policy turns versus ReAct's 19.5. The context-management operations themselves are a small share: summarizer and recall calls account for 8% of input tokens on BrowseComp-Plus, 4% on DeepSearchQA and 2% on SWE-Bench Verified. Under load, wall-clock time grows faster than tokens, because each additional sequential call waits in the scheduler queue.

What the cost buys. In return, ACM-Post-Trained improves Pass@1 over ReAct by 15.7 points on BrowseComp-Plus, 5.8 on DeepSearchQA and 5.0 on SWE-Bench Verified. Spending the same extra computation on ReAct does not close this gap: even an oracle that picks the best of four independent ReAct runs, at 4× ReAct's tokens, reaches 74.7% on BrowseComp-Plus (Pass@4, Fig. 5), about the same as ACM-Post-Trained's single run at 2.0× the tokens. Compression also lowers peak context by 11–15% after training, which bounds per-request memory during serving.

We will add these measurements to a new appendix on cost. The General Response also summarizes the new ablations requested by other reviewers.

Thank you for the rebuttal. And I appreciate the authors' effort in demonstrating the operating costs of ACM. I also appreciate the authors' explanation of where this cost intuitively comes from. This explains why the ratio of token and time growth varies across different benchmarks. I will keep my positive score and look forward to the authors incorporating this trade-off experiment and discussion into their revised manuscript as they indicated.

We appreciate your recognition. We are happy to see that our response addressed your concern. Thank you again for your time and effort in reviewing our paper!

Reviewer_KVttOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper proposes ACM, which teaches LLM agents when to summarize their context and retrieve archived details. Teacher-guided training improves search and coding performance while reducing peak context usage. However, overall computational savings remain unclear, and missing component ablations limit conclusions about what drives the gains.

Critical strengths
  1. Practical context-management design. ACM combines agent-controlled compression with retrievable raw history, allowing agents to shorten their working context while retaining access to earlier evidence.

  2. Meaningful empirical gains and transfer. Training on BrowseComp-Plus improves performance on both another search benchmark and software-engineering tasks, suggesting benefits beyond the training domain. The distillation comparison also suggests that context-management demonstrations provide benefits complementary to ordinary teacher imitation.

Critical weaknesses
  1. The key contributions are not sufficiently isolated. From my perspective, the paper lacks separate ablations of raw-history retrieval, agent-controlled compression timing, and the two training constraints. Consequently, the results do not establish which components drive the gains or whether preserving retrievable history materially improves performance over summarization alone.

  2. Context-management supervision is confounded with search correction. From my understanding across Section 4.1–4.2 and Appendix B.5 it is allowed that the teacher to replace compression with queries derived from gold evidence, so successful continuations do not establish that the original compression decisions were inappropriate. Consequently, the training gains may partly reflect privileged search guidance, weakening their attribution to learning when to manage context.

Questions for authors

Please see the weaknesses above.

2 comments

We thank the reviewer for the constructive feedback. We address both weaknesses with new experiments.

W1: Isolating the key components

We ablate each component separately: retrievable raw history (Table R1), agent-controlled compression timing (Table R2), and the two training constraints (Table R3, under W2).

Retrievable raw history. We remove query_memory. Compression is still decided by the agent but becomes lossy.

Table R1. Effect of removing query_memory.

Policyquery_memoryBrowseComp-Plus Pass@1DeepSearchQA Pass@1
ACM Base✓63.540.5
ACM Base✗62.040.1
ACM-Post-Trained✓72.742.5
ACM-Post-Trained✗70.741.9

Removing retrieval lowers BrowseComp-Plus accuracy by 1.5 points for ACM Base and 2.0 points for ACM-Post-Trained, with smaller drops on DeepSearchQA. Most of ACM's gain comes from agent-initiated compression, and query_memory complements it. The agent recalls only about once per episode (Fig. 4), yet these few recalls are worth 1.5–2.0 points. Together, the two tools give the agent a short-term working context and a long-term store it can return to. We see this combination as a promising foundation for longer tasks, where earlier evidence is needed more often.

Agent-controlled timing. Table R2 compares agent-initiated compression with two fixed rules. We use the prompt-only agent (no training), so training does not confound the comparison. In the fixed-rule settings, manage_context is removed from the agent's tools, and the environment calls the same summarizer either when the context reaches 90% of the 128K window (the trigger used by ReSum) or every 10 turns.

Table R2. Agent-initiated vs. fixed-rule compression (prompt-only, no training).

Compression triggerBrowseComp-Plus Pass@1Avg. # compressions / ep.Peak tok.
None (ReAct)57.0063k
Fixed token budget (90% of the window)60.80.768k
Fixed interval (every 10 turns)58.62.852k
Agent-initiated (ACM Base)63.52.159k

Agent-initiated timing gives the highest accuracy. The token-budget rule compresses late: many episodes finish before reaching 90% of the window, so it compresses only 0.7 times per episode and leaves the highest peak context. The fixed interval goes to the other extreme. It compresses most often and keeps the smallest peak context, but gains only 1.6 points over ReAct, because a schedule compresses whether or not the agent still needs its recent context. The agent compresses at a moderate rate and achieves the best accuracy. When to compress matters more than how often.

W2: Isolating context-management supervision

Table R3 trains on Injection-only and Refinement-only data. For these two variants we generate additional demonstrations with the same pipeline, so every variant uses the same number of demonstrations. All trained variants use 1,880 teacher-annotated demonstrations and share the student, teacher, NLL objective and hyperparameters. The masked variant trains on exactly our trajectories, with the loss zeroed on every assistant turn that calls manage_context or query_memory, including its reasoning.

Table R3. Training-data ablation.

Training dataTeacher editsLoss on context-management turnsBrowseComp-PlusDeepSearchQASWE-Bench Verified
None (ACM Base)––63.540.561.4
Injection onlyInjectionKept67.341.662.2
Refinement onlyRefinementKept70.042.160.2
Injection + Refinement (ours)BothKept72.742.563.0
Injection + Refinement, context-management loss maskedBothMasked70.741.160.8
  • Injection-only contains no teacher-written search query, yet improves all three benchmarks, so the gain does not depend on gold-informed queries.
  • The masked variant keeps every teacher-written search query and answer and removes only the context-management supervision. It lowers all three benchmarks and falls below the untrained Base on SWE-Bench Verified: learning when to manage context is what makes the training transfer.
  • In-domain, both constraints help, and their combination is best. Injection teaches when to manage context and Refinement teaches when not to; the student needs both.
  • Out of domain, the gains are smaller for every variant, as expected when training only on BrowseComp-Plus.
  • On SWE-Bench Verified, Injection-only improves over Base while Refinement-only does not. Refinement replaces a compression with a search-specific action (a new query, a document fetch, or a commit), which does not carry over to coding. Injection teaches when to compress, which does. Larger coding gains would call for demonstrations synthesized on coding tasks, which the same pipeline can produce.

Therefore, the training gains do not rest on privileged search guidance. Injection-only training, which contains no teacher-written search query, already improves all three benchmarks. With the teacher's search and answer corrections held fixed, removing only the context-management supervision lowers all three benchmarks, and on SWE-Bench Verified the model falls below the untrained Base. The search and answer corrections also help in-domain, as intended: Refinement teaches the agent what to do instead of compressing. Learning when to manage context accounts for a distinct part of the gain, and in particular for the part that transfers beyond the training domain.

Comments on the paper

2 comments
AuthorsOpenReview ↗

General Response to All Reviewers

We thank all reviewers for their constructive feedback. Reviewers found ACM practical and well motivated (KVtt, tp4b, UHqL, vWCK). They noted that keeping raw history retrievable addresses a real limitation of summarization (KVtt, tp4b, vWCK), and that the gains transfer beyond the training domain (KVtt, UHqL).

Several reviewers asked whether ACM's improvements come from context management itself or from other parts of our setup: the exploration instructions in the prompt (UHqL, vWCK), the teacher's corrections in the training data (KVtt, UHqL, vWCK), and the timing of compression (KVtt, UHqL). We ran a dedicated ablation for each and summarize them here. Each individual response contains these and the further experiments requested by that reviewer.

1. Prompt: the strategy instructions do not explain the gain

Compared with the ReAct prompt, the ACM prompt adds two strategy instructions: keep searching when not confident, and commit only with confident evidence. We added exactly these instructions to ReAct, without the context-management tools.

Table R1. Strategy-prompt control.

AgentContext-management toolsStrategy instructionsBrowseComp-Plus Pass@1DeepSearchQA Pass@1
ReAct✗✗57.036.7
ReAct + strategy prompt✗✓59.337.9
ACM Base✓✓63.540.5

The instructions alone add 2.3 points on BrowseComp-Plus, and the context-management tools account for the larger share of the gain.

2. Training data: supervision on when to manage context drives the transferable gain

Our pipeline has two directions. Injection inserts context-management calls where the student should have used them; Refinement replaces unnecessary compressions with a search, a document fetch or a final answer. Only Refinement's new search queries can draw on gold evidence. We train on Injection-only and Refinement-only data, generating additional demonstrations so that every variant has the same training size. We also train on our full data with the loss on context-management turns masked out: this variant keeps every search and answer correction from the teacher and removes only the supervision on when to manage context. All trained variants use 1,880 teacher-annotated demonstrations and share the student, teacher, NLL objective, and hyperparameters.

Table R2. Training-data ablation.

Training dataTeacher editsLoss on context-management turnsBrowseComp-PlusDeepSearchQASWE-Bench Verified
None (ACM Base)––63.540.561.4
Injection onlyInjectionKept67.341.662.2
Refinement onlyRefinementKept70.042.160.2
Injection + Refinement (ours)BothKept72.742.563.0
Injection + Refinement, context-management loss maskedBothMasked70.741.160.8
  • Injection-only contains no teacher-written search query, yet improves all three benchmarks.
  • Both constraints help in-domain, and their combination is best. On SWE-Bench Verified, only Injection helps, since Refinement's edits are specific to search.
  • Masking the context-management supervision lowers all three benchmarks, and SWE-Bench Verified falls below the untrained Base. Learning when to manage context is what makes the training transfer beyond its domain.

3. Compression timing: when to compress matters more than how often

We compare agent-initiated compression with two fixed rules on the prompt-only agent: compress when the context reaches 90% of the 128K window, or every 10 turns.

Table R3. Agent-initiated vs. fixed-rule compression (prompt-only, no training).

Compression triggerBrowseComp-Plus Pass@1Avg. # compressions / ep.Peak tok.
None (ReAct)57.0063k
Fixed token budget (90% of the window)60.80.768k
Fixed interval (every 10 turns)58.62.852k
Agent-initiated (ACM Base)63.52.159k

The token-budget rule compresses late: many episodes end before reaching 90% of the window, so it compresses only 0.7 times per episode and has the highest peak context. The fixed interval compresses most often and keeps the smallest peak context, yet gains only 1.6 points over ReAct. The agent compresses at a moderate rate and achieves the best accuracy.

We will add these ablations to Section 6 of the revision.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.