TRACER is proposed, which formulates compression as a sequential per-tool decision problem, and demonstrates the value of consequence-aware, per-tool context retention for improving the efficiency of long-horizon language agents.
Abstract
Enterprise data agents answer business queries by chaining many tool calls over multiple reasoning steps, routinely accumulating hundreds of thousands of context tokens per session. Existing compression strategies typically allocate retention budgets without accounting for the downstream consequences of removing individual tool outputs. Aggressive compression may therefore trigger costly tool re-invocations that offset the initial savings. We call this the compression--consequence gap. To close it, we propose TRACER, which formulates compression as a sequential per-tool decision problem. A lightweight REINFORCE policy assigns query-conditioned retention ratios using only information available at each compression event. Its consequence-aware objective jointly accounts for task success, total token consumption, and post-compression tool re-invocations. To improve credit assignment, TRACER uses a learned outcome model to compare the predicted consequences of the selected retention ratio with those of fully retaining each tool output. On held-out production queries across three compressor backends, TRACER reduces total token consumption by 29--46% relative to keeping all context while maintaining comparable or higher task success. Compared with a tool-type-conditional static policy, TRACER provides an additional 15--18% of token savings. Interventional rollouts show that the learned per-tool credit scores correlate with measured single-tool consequences. The learned policy also yields positive savings when transferred across agent backbones and compressor architectures, and reduces token consumption by 18--25% on five held-out LOCA-bench environments. These results demonstrate the value of consequence-aware, per-tool context retention for improving the efficiency of long-horizon language agents.
It is found that fewer tokens need not mean faster or cheaper execution: on Terminal-Bench with Qwen, policies using roughly one-third as many tokens can take 20-80% longer than the uncompressed agent.
Ritul Satish, Prasoon Sinha, Akiho Kawada et al.· 0 citations
This work proposes SLCA-GRPO, a framework incorporating Segment-Locked Credit Assignment (SLCA), a framework incorporating Segment-Locked Credit Assignment (SLCA) that decouples advantage estimation at the structural segment level within a single group of rollouts, without requiring additional rollouts from intermediat...
Ya-Ge Zhan, Shao-Bo Liu, Qiu-Nan Liu et al.· 0 citations
Whether an instruction-tuned model calls a tool can be controlled by a single linear direction in its residual stream, extracted without any training from the model's own tool-use preference signal and turned into an inference-time intervention with no prompt change.
Yu-Qiang Chen, Vincent Siu, Yang Liu et al.· 1 citation
TokenCast is proposed, which learns a composable cost representation for each execution segment, recording its own consumption and the context growth it introduces, and captures the extra input cost incurred when context from earlier segments is re-read by every later call.
Chao-Qian Ouyang, Ling Yue, Li-Bin Zheng et al.· 0 citations
A unified taxonomy of agent context compression along three dimensions is introduced: compression target (what is compressed), compression mechanism (how it is transformed and retained), and control policy (who decides when compression is triggered).
Model-as-a-service platforms call for continuous optimization as complex serving conditions expose inefficiencies missed before deployment. Detailed always-on profiling can incur substantial overhead, while lightweight collection omits information needed for diagnosis. We present Herschel, a continuous optimization sys...
Lu-Ping Wang, Wei-Gao Chen, Yi-Fei Wu et al.· 0 citations