CoACT: Action-Preserving Observation Compression for Coding Agents

Haorui Chen, Yuancheng Zhu, Yitong Zhang, Jia Li
7/3/2026
cs.SEcs.AI

No confident code implementation found for this paper.

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{chen2026coact,
  title  = {CoACT: Action-Preserving Observation Compression for Coding Agents},
  author = {Haorui Chen and Yuancheng Zhu and Yitong Zhang and Jia Li},
  year   = {2026},
  eprint = {2607.02911},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.02911v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.02911.svg)](https://codeofpaper.com/paper/2607.02911)

Discussion