REVIEW 3 major objections 5 minor 46 references
Compressing coding-agent observations so the next action stays the same cuts token use by about a third without losing task success.
Reviewed by Pith at T0; open to challenge. T0 means a machine referee read the full paper against a public rubric. the ladder, T0–T4 →
T0 review · grok-4.5
2026-07-12 06:10 UTC pith:POVAN4I2
load-bearing objection Solid systems paper: NAP-guided observation compression delivers ~33% token savings with competitive PASS@1; the local-to-global proxy is soft but the empirics hold under the stated setup. the 3 major comments →
CoACT: Action-Preserving Observation Compression for Coding Agents
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
Observation compression for coding agents can be cast as a constrained optimization problem whose effectiveness constraint is next-action preservation rather than end-of-trajectory PASS@1. Training a lightweight compressor with an action-preservation reward (keep only candidates that induce the same next action) plus a length-reduction reward yields about 33% lower total token consumption on SWE-bench Verified while keeping task success comparable to the uncompressed agent, outperforming prior observation compressors on the efficiency–effectiveness trade-off.
What carries the argument
Next-action preservation (NAP): a compressed observation is accepted only when the agent’s immediate next action matches the action taken under the raw observation; NAP supplies a cheap, step-level proxy for the PASS@1 constraint and drives the action-preservation reward that filters teacher candidates before length-based selection.
Load-bearing premise
If every compression keeps the agent’s next action the same, the whole action sequence—and therefore final task success—will stay the same, even when information not needed for the immediate next step is still required later.
What would settle it
Run the same agent on SWE-bench with CoACT but deliberately keep compressions that pass NAP yet drop later-needed facts (for example long error traces used only after several steps); if PASS@1 then falls while next-action match rates stay high, NAP is not a sufficient proxy.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes CoACT, an observation-compression method for LLM coding agents that trains a lightweight compressor under a next-action preservation (NAP) constraint. NAP requires that a compressed observation induce the same immediate next action as the raw observation; the authors treat this as a practical proxy for the end-of-trajectory PASS@1 constraint in a constrained efficiency–effectiveness optimization (Eqs. 1–2). Supervision is built by filtering teacher-generated compression candidates with an action-preservation reward and a length-reduction reward, then training via offline bootstrap and online alignment. On SWE-bench Verified with three agentic models, CoACT reports an average 33.0% reduction in total tokens while keeping PASS@1 close to (and on two models above) the uncompressed baseline, outperforming LLMLingua-2, LongCodeZip, and SWE-Pruner on the efficiency–effectiveness trade-off and combining usefully with trajectory compression.
Significance. If the empirical trade-off holds under broader agent settings, CoACT is a useful systems contribution: observation compression that preserves KV-cache reuse is practically important, and explicitly tying compression supervision to agent next-action behavior is a clearer design principle than pure token-importance or code-structure heuristics. Strengths include multi-model evaluation, direct observation-compression baselines, reward ablations (Table IV), offline-vs-online ablation (Table V), trajectory-combination cost results (Table III), and distributional checks on observation lengths and steps. The work is reproducible in intent (code/data link) and the training pipeline is concrete enough for follow-on systems work.
major comments (3)
- Section I, rewrite of Eq. (1) into Eq. (2): the claim that preserving a_{t+1} at every compression step implies the same action trajectory and therefore the same PASS@1 is incomplete. An observation can be irrelevant to the immediate next action yet still be required later (e.g., a stack trace or file snippet used only after intermediate edits). In that case NAP can hold locally while the final trajectory diverges. The paper should either (i) weaken the formal implication to a practical proxy with explicit failure modes, or (ii) measure how often NAP-passing compressions still force recovery steps, different later actions, or different patches on held-out trajectories.
- Section III-B Eqs. (11)–(14) and Section VI-C: the action-preservation reward depends on a custom field-based action-similarity function with threshold θ=0.6 that agrees with human binary labels on only 80% of 100 pairs. That agreement rate is modest for a load-bearing training filter. Please report sensitivity of final PASS@1/Tokens to θ (and to M/K), and quantify how often candidates accepted under the automatic score would be rejected by human operational-intent labels—or how often accepted compressions still change the agent’s subsequent tool sequence despite high sim.
- Tables I–II (n=200 SWE-bench Verified instances): several headline deltas are small (e.g., Deepseek PASS@1 76.5%→75.0%; Qwen 57.0%→60.5%) and no confidence intervals, bootstrap estimates, or paired significance tests are reported. Given instance-level variance typical of SWE-bench, the claim of “maintaining” or “improving” effectiveness needs uncertainty quantification so readers can judge whether gains/drops are noise.
minor comments (5)
- Fig. 1 pipeline labels include “iiii” / “Num = K” style artifacts; clean the stage numbering and reward notation for camera-ready readability.
- Section IV-C: training uses 50 SWE-smith instances per model; briefly justify that this scale is enough for the 4B LoRA compressor and whether performance saturates with more data.
- Clarify whether Comp tokens in Tables I–II are always included in Tokens for every baseline (especially LLMLingua-2 / LongCodeZip / SWE-Pruner) so total-cost comparisons are apples-to-apples.
- Section VI-A teacher-model table: Deepseek teacher drops PASS@1 to 52.5% under Qwen agent—discuss whether this is candidate quality, reward mismatch, or over-compression so readers know how sensitive CoACT is to teacher choice.
- Minor wording: abstract/intro “unsatisfactory efficiency-effectiveness trade-off” is strong relative to LongCodeZip’s milder degradation; tone claims to match the quantitative gaps shown.
Circularity Check
No circular derivation: NAP is a training-time proxy; headline PASS@1 and token metrics are independent end-of-trajectory measurements on held-out data.
full rationale
CoACT is an empirical methods paper, not a first-principles derivation. Equation (1) states the desired constrained optimization (minimize tokens subject to PASS@1 within ε of the uncompressed agent). Equation (2) replaces the PASS@1 constraint with next-action preservation as a practical proxy for training, because full-trajectory PASS@1 is expensive and sparse. That rewrite is an incomplete sufficiency argument (if every next action is preserved then the action sequence matches), not a definition of the evaluation metric in terms of the training signal. Supervision is built by filtering teacher candidates with an action-preservation reward and a length-reduction reward, then SFT/LoRA-training a lightweight compressor; deployment uses only that compressor. The reported claims—33.0% average total-token reduction and PASS@1 close to (sometimes above) Vanilla on SWE-bench Verified across three agentic models—are measured independently of NAP: PASS@1 is end-of-trajectory test-pass rate on held-out instances, and Tokens is the sum of cached/uncached input, output, and compressor tokens. Ablations (Table IV) and online-alignment results (Table V) further treat AP/LR and offline/online stages as empirical levers, not tautologies. There is no self-definitional loop, no fitted parameter renamed as a prediction of the same quantity, no load-bearing uniqueness theorem imported from overlapping authors, and no renaming of a known empirical pattern as a forced result. Concerns about delayed-use information or imperfect action-similarity (θ=0.6, 80% human agreement) are correctness/proxy-validity risks, not circularity.
Axiom & Free-Parameter Ledger
free parameters (3)
- action-preservation threshold θ =
0.6
- candidate / reference counts (N, K, M, k) =
N=8, K=8, M=3, k=4
- LoRA rank and alpha =
rank=64, alpha=128
axioms (4)
- ad hoc to paper If a compressed observation induces the same next action as the raw observation at every step, the compressed agent follows the same action trajectory and therefore achieves the same PASS@1.
- ad hoc to paper A field-based action-similarity function (target file, search pattern, viewed line range, operation type) with threshold 0.6 adequately decides whether two agent actions express the same operational intent.
- domain assumption Observations returned by the environment are a major and compressible source of token consumption in coding-agent trajectories.
- domain assumption Prefix KV-cache reuse is valuable and should be preserved; therefore observation compression (append-only) is preferable to trajectory rewriting when possible.
invented entities (3)
-
next-action preservation (NAP)
no independent evidence
-
action-preservation and length-reduction rewards
no independent evidence
-
two-stage offline-bootstrap / online-alignment compressor training
no independent evidence
read the original abstract
LLM-based coding agents solve software-engineering tasks through iterative interactions with development environments, where returned observations accumulate in the context and become a major source of inference cost. Observation compression reduces this cost by shortening observations before they are appended to the context. However, existing methods still exhibit an unsatisfactory efficiency-effectiveness trade-off, as they do not explicitly model how compression affects the agent's subsequent behavior. This paper proposes CoACT, an action-preserving observation compression method for coding agents. CoACT is built on next-action preservation (NAP), which requires a compressed observation to induce the same next action as the raw observation. By checking the agent's immediate next action, NAP provides a practical signal for whether a compression preserves the information needed for continued task solving. During training, a teacher model first generates multiple compressed candidates of each observation. CoACT then uses an action-preservation reward based on NAP to filter out candidates that would change the agent's next action, and uses a length-reduction reward to choose compact candidates as supervision for a lightweight compressor. Experiments on SWE-bench Verified with three agentic models show that CoACT reduces average total token consumption by 33.0% while maintaining task-solving effectiveness close to the uncompressed agent.
Figures
Reference graph
Works this paper leans on
-
[1]
Swe-agent: Agent-computer interfaces enable automated software engineering,
J. Yang, C. E. Jimenez, A. Wettig, K. Lieret, S. Yao, K. Narasimhan, and O. Press, “Swe-agent: Agent-computer interfaces enable automated software engineering,”Advances in Neural Information Processing Systems, vol. 37, pp. 50 528–50 652, 2024
2024
-
[2]
Openhands: An open platform for ai software developers as generalist agents,
X. Wang, B. Li, Y . Song, F. F. Xu, X. Tang, M. Zhuge, J. Pan, Y . Song, B. Li, J. Singhet al., “Openhands: An open platform for ai software developers as generalist agents,” inInternational Conference on Learning Representations, vol. 2025, 2025, pp. 65 882–65 919
2025
-
[3]
Trae agent: An llm-based agent for software engineering with test-time scaling,
P. Gao, Z. Tian, X. Meng, X. Wang, R. Hu, Y . Xiao, Y . Liu, Z. Zhang, J. Chen, C. Gaoet al., “Trae agent: An llm-based agent for software engineering with test-time scaling,”arXiv preprint arXiv:2507.23370, 2025
Pith/arXiv arXiv 2025
-
[4]
Agentless: Demystifying llm-based software engineering agents,
C. S. Xia, Y . Deng, S. Dunn, and L. Zhang, “Agentless: Demystifying llm-based software engineering agents,”arXiv preprint arXiv:2407.01489, 2024
Pith/arXiv arXiv 2024
-
[5]
Ai-driven self-evolving soft- ware: A promising path toward software automation,
L. Cai, Y . Ren, Y . Zhang, and J. Li, “Ai-driven self-evolving soft- ware: A promising path toward software automation,”arXiv preprint arXiv:2510.00591, 2025
arXiv 2025
-
[6]
React: Synergizing reasoning and acting in language models,
S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan, and Y . Cao, “React: Synergizing reasoning and acting in language models,”arXiv preprint arXiv:2210.03629, 2022
Pith/arXiv arXiv 2022
-
[7]
Environmental injection attacks against gui agents in realistic dynamic environments,
Y . Zhang, X. Li, L. Cai, and J. Li, “Environmental injection attacks against gui agents in realistic dynamic environments,” 2026. [Online]. Available: https://arxiv.org/abs/2509.11250
arXiv 2026
-
[8]
Reducing cost of llm agents with trajectory reduction,
Y .-A. Xiao, P. Gao, C. Peng, and Y . Xiong, “Reducing cost of llm agents with trajectory reduction,”arXiv preprint arXiv:2509.23586, 2025
arXiv 2025
-
[9]
Swe-effi: Re-evaluating software ai agent system effectiveness under resource constraints,
Z. Fan, K. Vasilevski, D. Lin, B. Chen, Y . Chen, Z. Zhong, J. M. Zhang, P. He, and A. E. Hassan, “Swe-effi: Re-evaluating software ai agent system effectiveness under resource constraints,”arXiv preprint arXiv:2509.09853, 2025
arXiv 2025
-
[10]
AI | 2025 Stack Overflow Developer Survey
“AI | 2025 Stack Overflow Developer Survey.” [Online]. Available: https://survey.stackoverflow.co/2025/ai
2025
-
[11]
L. Bai, Z. Huang, X. Wang, J. Sun, R. Mihalcea, E. Brynjolfsson, A. Pentland, and J. Pei, “How do ai agents spend your money? analyzing and predicting token consumption in agentic coding tasks,”arXiv preprint arXiv:2604.22750, 2026
Pith/arXiv arXiv 2026
-
[12]
More with less: An empirical study of turn-control strategies for efficient coding agents,
P. Gao and C. Peng, “More with less: An empirical study of turn-control strategies for efficient coding agents,”arXiv preprint arXiv:2510.16786, 2025
arXiv 2025
-
[13]
Swe-bench: Can language models resolve real-world github issues?
C. E. Jimenez, J. Yang, A. Wettig, S. Yao, K. Pei, O. Press, and K. Narasimhan, “Swe-bench: Can language models resolve real-world github issues?” inInternational Conference on Learning Representations, vol. 2024, 2024, pp. 54 107–54 157
2024
-
[14]
Terminal-bench: Benchmarking agents on hard, realistic tasks in command line interfaces,
M. A. Merrill, A. G. Shaw, N. Carlini, B. Li, H. Raj, I. Bercovich, L. Shi, J. Y . Shin, T. Walshe, E. K. Buchananet al., “Terminal-bench: Benchmarking agents on hard, realistic tasks in command line interfaces,” arXiv preprint arXiv:2601.11868, 2026
Pith/arXiv arXiv 2026
-
[15]
Longcodezip: Compress long context for code language models,
Y . Shi, Y . Qian, H. Zhang, B. Shen, and X. Gu, “Longcodezip: Compress long context for code language models,”arXiv preprint arXiv:2510.00446, 2025
arXiv 2025
-
[16]
Llmlingua-2: Data distillation for efficient and faithful task-agnostic prompt compression,
Z. Pan, Q. Wu, H. Jiang, M. Xia, X. Luo, J. Zhang, Q. Lin, V . R ¨uhle, Y . Yang, C.-Y . Linet al., “Llmlingua-2: Data distillation for efficient and faithful task-agnostic prompt compression,” inFindings of the Association for Computational Linguistics: ACL 2024, 2024, pp. 963–981
2024
-
[17]
Swe-pruner: Self-adaptive context pruning for coding agents,
Y . Wang, Y . Shi, M. Yang, R. Zhang, S. He, H. Lian, Y . Chen, S. Ye, K. Cai, and X. Gu, “Swe-pruner: Self-adaptive context pruning for coding agents,”arXiv preprint arXiv:2601.16746, 2026
Pith/arXiv arXiv 2026
-
[18]
Qwen/Qwen3.5-35B-A3B · Hugging Face,
“Qwen/Qwen3.5-35B-A3B · Hugging Face,” Mar. 2026. [Online]. Available: https://huggingface.co/Qwen/Qwen3.5-35B-A3B
2026
-
[19]
Deepseek-v4: Towards highly efficient million- token context intelligence,
A. Xu, B. Lin, B. Xue, B. Wang, B. Xu, B. Wu, B. Zhang, C. Lin, C. Dong, C. Linget al., “Deepseek-v4: Towards highly efficient million- token context intelligence,”arXiv preprint arXiv:2606.19348, 2026
arXiv 2026
-
[20]
Gemini 3 Flash: frontier intelligence built for speed,
“Gemini 3 Flash: frontier intelligence built for speed,” Dec. 2025. [Online]. Available: https://blog.google/products-and-platforms/products/ gemini/gemini-3-flash/
2025
-
[21]
What papers don’t tell you: Recovering tacit knowledge for automated paper reproduction,
L. Li, R. Wang, H. Song, Y . Mao, T. Zhang, Y . Wang, J. Fan, Y . Zhang, J. Ye, C. Zhanget al., “What papers don’t tell you: Recovering tacit knowledge for automated paper reproduction,”arXiv preprint arXiv:2603.01801, 2026
arXiv 2026
-
[22]
T. Lindenbauer, I. Slinko, L. Felder, E. Bogomolov, and Y . Zharov, “The complexity trap: Simple observation masking is as efficient as llm summarization for agent context management,”arXiv preprint arXiv:2508.21433, 2025
arXiv 2025
-
[23]
Scaling long-horizon llm agent via context-folding,
W. Sun, M. Lu, Z. Ling, K. Liu, X. Yao, Y . Yang, and J. Chen, “Scaling long-horizon llm agent via context-folding,”arXiv preprint arXiv:2510.11967, 2025
arXiv 2025
-
[24]
Agentfold: Long-horizon web agents with proactive context management,
R. Ye, Z. Zhang, K. Li, H. Yin, Z. Tao, Y . Zhao, L. Su, L. Zhang, Z. Qiao, X. Wanget al., “Agentfold: Long-horizon web agents with proactive context management,”arXiv preprint arXiv:2510.24699, 2025
arXiv 2025
-
[25]
Scaling llm multi-turn rl with end-to-end summarization-based context management,
M. Lu, W. Sun, W. Du, Z. Ling, X. Yao, K. Liu, and J. Chen, “Scaling llm multi-turn rl with end-to-end summarization-based context management,” arXiv preprint arXiv:2510.06727, 2025
arXiv 2025
-
[26]
Compass: Enhancing agent long-horizon reasoning with evolving context,
G. Wan, M. Ling, X. Ren, R. Han, S. Li, and Z. Zhang, “Compass: Enhancing agent long-horizon reasoning with evolving context,”arXiv preprint arXiv:2510.08790, 2025
arXiv 2025
-
[27]
Acon: Optimizing context compression for long-horizon llm agents,
M. Kang, W.-N. Chen, D. Han, H. A. Inan, L. Wutschitz, Y . Chen, R. Sim, and S. Rajmohan, “Acon: Optimizing context compression for long-horizon llm agents,”arXiv preprint arXiv:2510.00615, 2025
Pith/arXiv arXiv 2025
-
[28]
Agentswing: Adaptive parallel context management routing for long-horizon web agents,
Z. Feng, L. Su, Z. Zhang, X. Wang, X. Zhang, X. Wang, R. Fang, Q. Zhang, B. Li, S. Caiet al., “Agentswing: Adaptive parallel context management routing for long-horizon web agents,”arXiv preprint arXiv:2603.27490, 2026
arXiv 2026
-
[29]
Context as a tool: Context management for long-horizon swe-agents,
S. Liu, B. Jiang, J. Yang, Y . Li, J. Guo, X. Liu, and B. Dai, “Context as a tool: Context management for long-horizon swe-agents,” inFindings of the Association for Computational Linguistics: ACL 2026, 2026, pp. 20 604–20 617
2026
-
[30]
Active context compression: Autonomous memory manage- ment in llm agents,
N. Verma, “Active context compression: Autonomous memory manage- ment in llm agents,”arXiv preprint arXiv:2601.07190, 2026
arXiv 2026
-
[31]
Claude Code by Anthropic | AI Coding Agent, Terminal, IDE
“Claude Code by Anthropic | AI Coding Agent, Terminal, IDE.” [Online]. Available: https://claude.com/product/claude-code
-
[32]
Cursor — cursor.com,
“Cursor — cursor.com,” https://cursor.com/
-
[33]
A self-evolving framework for efficient terminal agents via observational context compression,
J. Ren, S. Wu, Y . Li, K. Zhu, S. Xu, B. Feng, R. Yuan, W. Zhang, R. Batista-Navarro, J. Yanget al., “A self-evolving framework for efficient terminal agents via observational context compression,”arXiv preprint arXiv:2604.19572, 2026
Pith/arXiv arXiv 2026
-
[34]
Compressing code context for llm-based issue resolution,
H. Jia, E. T. Barr, and S. Mechtaev, “Compressing code context for llm-based issue resolution,”arXiv preprint arXiv:2603.28119, 2026
arXiv 2026
-
[35]
Llmlingua: Com- pressing prompts for accelerated inference of large language models,
H. Jiang, Q. Wu, C.-Y . Lin, Y . Yang, and L. Qiu, “Llmlingua: Com- pressing prompts for accelerated inference of large language models,” inProceedings of the 2023 conference on empirical methods in natural language processing, 2023, pp. 13 358–13 376
2023
-
[36]
Longllmlingua: Accelerating and enhancing llms in long context scenarios via prompt compression,
H. Jiang, Q. Wu, X. Luo, D. Li, C.-Y . Lin, Y . Yang, and L. Qiu, “Longllmlingua: Accelerating and enhancing llms in long context scenarios via prompt compression,” inProceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2024, pp. 1658–1677
2024
-
[37]
Provence: efficient and robust context pruning for retrieval-augmented generation,
N. Chirkova, T. Formal, V . Nikoulina, and S. Clinchant, “Provence: efficient and robust context pruning for retrieval-augmented generation,” arXiv preprint arXiv:2501.16214, 2025
Pith/arXiv arXiv 2025
-
[38]
Prompt compression with context-aware sentence encoding for fast and improved llm inference,
B. Liskavets, M. Ushakov, S. Roy, M. Klibanov, A. Etemad, and S. K. Luke, “Prompt compression with context-aware sentence encoding for fast and improved llm inference,” inProceedings of the AAAI Conference on Artificial Intelligence, vol. 39, no. 23, 2025, pp. 24 595–24 604
2025
-
[39]
P. He, S. Wang, and T.-H. Chen, “Codepromptzip: Code-specific prompt compression for retrieval-augmented generation in coding tasks with lms,”arXiv preprint arXiv:2502.14925, 2025
Pith/arXiv arXiv 2025
-
[40]
Qwen/Qwen3.5-4B · Hugging Face,
“Qwen/Qwen3.5-4B · Hugging Face,” Mar. 2026. [Online]. Available: https://huggingface.co/Qwen/Qwen3.5-4B
2026
-
[41]
Swe-smith: Scaling data for software engineering agents,
J. Yang, K. Lieret, C. Jimenez, A. Wettig, K. Khandpur, Y . Zhang, B. Hui, O. Press, L. Schmidt, and D. Yang, “Swe-smith: Scaling data for software engineering agents,”Advances in Neural Information Processing Systems, vol. 38, 2026
2026
-
[42]
Lora: Low-rank adaptation of large language models
E. J. Hu, Y . Shen, P. Wallis, Z. Allen-Zhu, Y . Li, S. Wang, L. Wang, W. Chenet al., “Lora: Low-rank adaptation of large language models.” Iclr, vol. 1, no. 2, p. 3, 2022
2022
-
[43]
Command similarity measurement using nlp,
Z. Hussain, J. K. Nurminen, T. Mikkonen, and M. Kowiel, “Command similarity measurement using nlp,” in10th Symposium on Languages, Applications and Technologies (SLATE 2021). Schloss Dagstuhl–Leibniz- Zentrum f ¨ur Informatik, 2021, pp. 13–1
2021
-
[44]
Models & Pricing | DeepSeek API Docs
“Models & Pricing | DeepSeek API Docs.” [Online]. Available: https://api-docs.deepseek.com/quick start/pricing
-
[45]
Pricing
“Pricing.” [Online]. Available: https://platform.claude.com/docs/en/ about-claude/pricing
-
[46]
OpenAI API Pricing
“OpenAI API Pricing.” [Online]. Available: https://openai.com/api/ pricing/
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.