[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-detail-327598-en":59,"doc-seo-327598-105":99,"doc-similar-327598":163},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":5,"data":60},{"doc_id":61,"user_id":62,"nickname":63,"user_avatar":64,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":66,"doc_content":67,"file_id":68,"file_url":69,"file_type":70,"file_size":71,"view_count":72,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":73,"language":74,"language_code":75,"site_id":76,"html_lang":75,"table_of_contents":77,"faqs":78,"seo_title":79,"seo_description":66,"update_tm":80,"read_time":41,"preview_page_count":19,"preview_urls":81},327598,2336464648322,"Aria","https://ap-avatar.wpscdn.com/avatar/2200025388227c56fec?_k=1778556882303663488","CoACT: Action-Preserving Observation Compression for Coding Agents","LLM-based coding agents accomplish software-engineering tasks via iterative interactions with development environments, but accumulated observations expand context and drive high inference cost. Observation compression mitigates this by shortening observations before appending them, yet existing approaches often fail to achieve a satisfactory efficiency–effectiveness balance because they do not model how compression changes subsequent agent behavior. CoACT introduces next-action preservation to filter candidates, reducing token usage by 33.0% while keeping task-solving effectiveness close to the uncompressed baseline.","CoACT: Action-Preserving Observation Compression  \nfor Coding Agents  \nHaorui Chen  \nCollege of AI School of Tsinghua University  \nBeijing, China [hrchen@std.uestc.edu.cn](hrchen@std.uestc.edu.cn)  \nYuancheng Zhu‡ Intelligence Science and Technology  \nNanjing University  \nNanjing, China [mileszhu@smail.nju.edu.cn](mileszhu@smail.nju.edu.cn)  \nYitong Zhang  \nCollege of AI Tsinghua University Beijing, China  \nJia Li†  \nCollege of AI Tsinghua University Beijing, China  \n[zhangyt42@buaa.edu.cn jia](zhangyt42@buaa.edu.cn jia) [li@mail.tsinghua.edu.cn](li@mail.tsinghua.edu.cn)  \narXiv :2607 .029 1 1v 1 [ cs . SE] 3 Jul 2026  \nAbstract—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 actionpreserving 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.  \nIndex Terms—Large language models, coding agents, observation compression, efficient AI.  \nI. INTRODUCTION  \nLLM-based coding agents [1]–[5] have shown strong potential in solving complex software engineering tasks. Their strength comes from an interactive workflow with the development environment [6], [7] . At each step, the coding agent proposes an action, receives an observation from the environment, and directly appends that observation to its context for subsequent steps. As this process continues, observations accumulate rapidly and become a major source of inference cost, limiting the large-scale deployment of coding agents [8]–[12] . For example, our analysis shows that observation tokens account for 45.7% of total token consumption on SWE-bench Verified [13] and up to 67.8% on Terminal-Bench [14] .  \nThis observation-induced cost pressure has motivated a line of techniques (e.g., LongCodeZip [15] and LLMLingua-2 [16]) that compress observations before they are appended to the  \n‡This work was done while Yuancheng Zhu was an intern at the College of AI, Tsinghua University.  \n†Corresponding author.  \nagent context, which we refer to as observation compression 1. However, in practice, existing observation compression methods have not yet achieved a satisfactory efficiency-effectiveness trade-off. Some methods preserve task effectiveness but leave substantial efficiency gains unrealized, while others compress observations more aggressively but hurt task effectiveness or introduce extra recovery steps that offset the savings. For example, on SWE-bench Verified, LLMLingua-2 compresses observations aggressively but drops PASS @1 from 57.0% to 50.0%, while LongCodeZip preserves task effectiveness but only reduces total token consumption from 3.795M to 3.165M. This limitation raises one central question: how can observation compression better balance efficiency and eff","cbCaigS51WYboGO2","https://ap.wps.com/l/cbCaigS51WYboGO2","pdf",2211068,14,12,"English","en",105,"# Abstract\n# Introduction\n## Observation-induced cost pressure\n## Efficiency–effectiveness trade-off formulation\n## Limitations of existing compression methods\n# Related Work\n# Method\n## Next-action preservation (NAP)\n## Training with teacher filtering and rewards\n# Experiments\n## Setup\n## Results on SWE-bench Verified\n# Conclusion","[{\"question\":\"What problem does CoACT address for coding agents?\",\"answer\":\"It targets the high inference cost caused by repeated observations being appended to the agent context, where compression must reduce tokens without harming task performance.\"},{\"question\":\"How does CoACT ensure that compressed observations do not change the agent’s behavior?\",\"answer\":\"CoACT uses next-action preservation (NAP), requiring the compressed observation to induce the same immediate next action as the raw observation, which becomes a practical signal during training and filtering.\"},{\"question\":\"How is CoACT trained to balance efficiency and effectiveness?\",\"answer\":\"A teacher model generates multiple compressed candidates; an action-preservation reward based on NAP filters candidates that would alter the next action, and a length-reduction reward selects compact ones for supervision of a lightweight compressor.\"}]","CoACT: Action-Preserving Observation Compression for Coding Agents | PDF",1789977630,[82,86,90,95],{"page_no":8,"url":83,"width":84,"height":85},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/d039d2415f6108e9fcaea11c8e70ae16.webp",983,1272,{"page_no":14,"url":87,"width":88,"height":89},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/2df71c2a7c81a56481ec17a46389e4ac.webp",982,1270,{"page_no":91,"url":92,"width":93,"height":94},3,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/0d8e3f44002f6adcbe32431e9ed9c7ca.webp",981,1269,{"page_no":19,"url":96,"width":97,"height":98},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/2cc631a884589df79202523eb9d4e5ad.webp",980,1268,{"code":4,"msg":100,"data":101},"ok",{"site_id":76,"language":75,"slug":102,"title":65,"keywords":103,"description":66,"schema_data":104,"social_meta":157,"head_meta":159,"extra_data":161,"updated_unix":162},"coact-action-preserving-observation-compression-for-coding-agents","",{"@graph":105,"@context":156},[106,119,139],{"@type":107,"itemListElement":108},"BreadcrumbList",[109,113,115,117],{"item":110,"name":111,"@type":112,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":114,"name":9,"@type":112,"position":14},"https://docshare.wps.com/document/",{"item":116,"name":40,"@type":112,"position":91},"https://docshare.wps.com/document/research-report/",{"item":118,"name":65,"@type":112,"position":19},"https://docshare.wps.com/document/coact-action-preserving-observation-compression-for-coding-agents/327598/",{"url":118,"name":65,"@type":120,"image":121,"author":126,"headline":65,"publisher":128,"fileFormat":131,"inLanguage":75,"description":66,"dateModified":132,"datePublished":133,"encodingFormat":131,"isAccessibleForFree":134,"interactionStatistic":135},"DigitalDocument",{"url":122,"@type":123,"width":124,"height":125},"https://docshare.wps.com/thumbnails/coact-action-preserving-observation-compression-for-coding-agents/327598.png","ImageObject",300,407,{"name":63,"@type":127},"Person",{"url":110,"name":129,"@type":130},"DocShare","Organization","application/pdf","2026-11-15","2026-09-21",true,{"@type":136,"interactionType":137,"userInteractionCount":72},"InteractionCounter",{"@type":138},"ViewAction",{"@type":140,"mainEntity":141},"FAQPage",[142,148,152],{"name":143,"@type":144,"acceptedAnswer":145},"What problem does CoACT address for coding agents?","Question",{"text":146,"@type":147},"It targets the high inference cost caused by repeated observations being appended to the agent context, where compression must reduce tokens without harming task performance.","Answer",{"name":149,"@type":144,"acceptedAnswer":150},"How does CoACT ensure that compressed observations do not change the agent’s behavior?",{"text":151,"@type":147},"CoACT uses next-action preservation (NAP), requiring the compressed observation to induce the same immediate next action as the raw observation, which becomes a practical signal during training and filtering.",{"name":153,"@type":144,"acceptedAnswer":154},"How is CoACT trained to balance efficiency and effectiveness?",{"text":155,"@type":147},"A teacher model generates multiple compressed candidates; an action-preservation reward based on NAP filters candidates that would alter the next action, and a length-reduction reward selects compact ones for supervision of a lightweight compressor.","https://schema.org",{"og:url":118,"og:type":158,"og:title":65,"og:site_name":129,"og:description":66},"article",{"robots":160,"canonical":118},"index,follow",{"doc_id":61,"site_id":76},1790178816,{"list":164,"token":103},[165,172,178,184,191,198,204,210,217,223],{"doc_id":166,"doc_title":167,"file_type":70,"home_preview_img_url":168,"slug":169,"view_count":170,"category_name":40,"create_tm":171},84330,"LUMI: Tokenizer-Agnostic LLM-Based Lossless Image Compression","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809041862/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=jeb7TQZCbT7Hb%2BNMrAnQNi8WSFI%3D","lumi-tokenizer-agnostic-llm-based-lossless-image-compression",21,1784194864,{"doc_id":173,"doc_title":174,"file_type":70,"home_preview_img_url":175,"slug":176,"view_count":46,"category_name":40,"create_tm":177},273436,"SEER - Long-Context Reasoning via Selective Visual-Text Compression","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229899937320/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=oYhLWOofnael2y9Gz3%2BrnZhVC10%3D","seer-long-context-reasoning-via-selective-visual-text-compression",1789471427,{"doc_id":179,"doc_title":180,"file_type":70,"home_preview_img_url":181,"slug":182,"view_count":52,"category_name":40,"create_tm":183},389313,"Perplexity as a Metric for Dialectal Distance - A Computational Study of Greek Varieties","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229916785757/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=NIkcUgZRRLFTOll5pb%2B8l4t2voo%3D","perplexity-as-a-metric-for-dialectal-distance-a-computational-study-of-greek-varieties",1790318971,{"doc_id":185,"doc_title":186,"file_type":70,"home_preview_img_url":187,"slug":188,"view_count":189,"category_name":40,"create_tm":190},83108,"DepthWeave-KV Token-Adaptive Cross-Layer Residual Factorization for Long-Context KV Cache Compression","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808824463/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=y%2FtpFuk4sufaOvCvR2pdJgNAZno%3D","depthweave-kv-token-adaptive-cross-layer-residual-factorization-for-long-context-kv-cache-compression",28,1784185331,{"doc_id":192,"doc_title":193,"file_type":70,"home_preview_img_url":194,"slug":195,"view_count":196,"category_name":40,"create_tm":197},81543,"Signal Space-Transformed Expectation Propagation for Symbol Detection in ISI Channels","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808454680/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=QAddp%2BiBRAfFG58Qs3lPj1UkXjs%3D","signal-space-transformed-expectation-propagation-for-symbol-detection-in-isi-channels",24,1784174186,{"doc_id":199,"doc_title":200,"file_type":70,"home_preview_img_url":201,"slug":202,"view_count":41,"category_name":40,"create_tm":203},82561,"CAT: Confidence-Adaptive Thinking for Efficient Reasoning of Large Reasoning Models","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808763745/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=GWla3XzZUi4FcacwhjeoxOzRVZE%3D","cat-confidence-adaptive-thinking-for-efficient-reasoning-of-large-reasoning-models",1784181540,{"doc_id":205,"doc_title":206,"file_type":70,"home_preview_img_url":207,"slug":208,"view_count":41,"category_name":40,"create_tm":209},82236,"SherAgent Scaling Attack Investigation in the Wild via LLM-Empowered Iterative Query-Filter Backtracking","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808724266/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=bUy6kFapiUl%2BnHDtgof2%2BKNjh%2FY%3D","sheragent-scaling-attack-investigation-in-the-wild-via-llm-empowered-iterative-query-filter-backtracking",1784179045,{"doc_id":211,"doc_title":212,"file_type":70,"home_preview_img_url":213,"slug":214,"view_count":215,"category_name":40,"create_tm":216},82265,"General Non-Clairvoyant KV-Cache Scheduling via Regime-Aware Routing","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808681171/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=fVvHWZMGcBHONbZsUUYGWrGlWfU%3D","general-non-clairvoyant-kv-cache-scheduling-via-regime-aware-routing",22,1784179262,{"doc_id":218,"doc_title":219,"file_type":70,"home_preview_img_url":220,"slug":221,"view_count":189,"category_name":40,"create_tm":222},82337,"Fictional Worldbuilding Multi-Agent LLM Collaboration with Hierarchical Context Compression and Iterative Review","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808885541/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=BNgzeaXdiOjLLjcaCddosPnkWFc%3D","fictional-worldbuilding-multi-agent-llm-collaboration-with-hierarchical-context-compression-and-iterative-review",1784179731,{"doc_id":224,"doc_title":225,"file_type":70,"home_preview_img_url":226,"slug":227,"view_count":228,"category_name":40,"create_tm":229},81627,"RELISH: LLM Regression with a Latent Iterative State Head","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808465347/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=CG7MVRf%2BsHbQCYwP1sH0QG2CI9s%3D","relish-llm-regression-with-a-latent-iterative-state-head",29,1784174954]