ACC: Compiling Agent Trajectories for Long-Context Training
Summary
Agent Context Compilation (ACC) enhances long-context reasoning in LLMs by converting multi-turn agent trajectories into structured QA pairs, enabling direct supervision of distant context integration without additional annotation.
View Cached Full Text
Cached at: 05/22/26, 02:30 AM
Paper page - ACC: Compiling Agent Trajectories for Long-Context Training
Source: https://huggingface.co/papers/2605.21850
Abstract
Agent Context Compilation (ACC) enhances long-context reasoning in LLMs by converting multi-turn agent trajectories into structured QA pairs, enabling direct supervision of distant context integration without additional annotation.
Recent development of agents has renewed demand forlong-context reasoningcapacity of LLMs. However, training LLMs for this capacity requires costly long-document curation or heuristic context synthesis. We observe that agents produce massive trajectories when solving problems, invoking tools and receivingenvironment observationsacross many turns. The evidence needed to answer the original question is thus scattered throughout these turns, requiring integration of distant context segments. Nevertheless, standardagent SFTmaskstool responsesand only trains turn-level tool selection, creating a supervision blind spot where these scattered signals go unused. We propose Agent Context Compilation (ACC), which converts trajectories from search, software engineering, and database querying agents into long-context QA pairs that combine the original question withtool responsesandenvironment observationsgathered across multiple turns, training the model to answer directly without tool use. This makes the dependencies between the question and the evidence explicit, enabling direct supervision oflong-context reasoningover distant segments without additional annotation. ACC is a simple but effective approach that can be combined with any existing long-context extension or training method, providing scalablesupervised fine-tuningdata. We validate ACC onlong-range dependency modelingtasks through MRCR and GraphWalks, challenging benchmarks requiringcross-turn coreference resolutionandgraph traversalover extended contexts. Training Qwen3-30B-A3B with ACC achieves 68.3 on MRCR (+18.1) and 77.5 on GraphWalks (+7.6), results comparable to Qwen3-235B-A22B, while preserving general capabilities on GPQA, MMLU-Pro, AIME, and IFEval. Further mechanism analysis reveals that the ACC-trained model exhibits task-adaptiveattention restructuringandexpert specialization.
View arXiv pageView PDFAdd to collection
Get this paper in your agent:
hf papers read 2605\.21850
Don’t have the latest CLI?curl \-LsSf https://hf\.co/cli/install\.sh \| bash
Models citing this paper0
No model linking this paper
Cite arxiv.org/abs/2605.21850 in a model README.md to link it from this page.
Datasets citing this paper0
No dataset linking this paper
Cite arxiv.org/abs/2605.21850 in a dataset README.md to link it from this page.
Spaces citing this paper0
No Space linking this paper
Cite arxiv.org/abs/2605.21850 in a Space README.md to link it from this page.
Collections including this paper0
No Collection including this paper
Add this paper to acollectionto link it from this page.
Similar Articles
HyperspaceDB v3.1.4: True Turbo 4-Bit Lloyd-Max, 1-Bit ADC Cascades, Mem0 Drop-In & Agent Trajectories
HyperspaceDB v3.1.4 introduces advanced quantization techniques for significant speed improvements, a drop-in replacement for Mem0 and Zep with lower latency, and built-in tracking for agent trajectories and stability analysis.
Elite-Weighted Supervised Fine-tuning for Goal-Directed Molecular Optimization
The paper introduces Elite-Weighted Supervised Fine-tuning (EW-SFT), a method for goal-directed molecular optimization that uses reward to guide elite selection and updates via the model's native loss, applicable across various generative architectures and tasks.
trajectory-judge: What Outcome-Only LLM Judges Miss on Agent Trajectories
This paper introduces a deterministic testbed for evaluating LLM judges on agent trajectories, showing that outcome-only judges miss silent faults while step-based judges achieve higher recall with better calibration.
Post-Training Language Models for Gold-Medal Performance in Coding Competitions
This paper presents a specialization pipeline for post-training language models to achieve gold-medal performance in coding competitions, demonstrating top scores on IOI benchmarks using techniques like supervised fine-tuning and reinforcement learning.
Locked at the Entrance, Open Inside: Where RLVR Narrows the Solution Space
This paper investigates how reinforcement learning with verifiable rewards (RLVR) narrows the solution space in LLM reasoning by analyzing where diversity is lost, finding it concentrated at the 'entrance' of trajectories. It demonstrates interventions to recover breadth without compromising accuracy.