[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-83289-en":3,"doc-seo-83289-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},83289,1374391974564,"Clementine","https://ap-avatar.wpscdn.com/avatar/14000253aa45c000a9e?x-image-process=image/resize,m_fixed,w_180,h_180&k=1779874745381141002",8,"Research & Report","From Noisy Traces to Root Causes: Structural Trajectory Analysis and Causal Extraction for Agent Optimization","Long-horizon agent optimization increasingly depends on reflection-based mechanisms where an LLM diagnoses failures and updates policies, yet raw execution traces are hard to use efficiently. Large trace sets are redundant and heterogeneous, and individual trajectories include many irrelevant steps; naive reductions can discard causally important evidence and yield misleading signals. STRACE constructs high signal-to-noise optimization contexts by filtering redundant failures at the batch level and performing causal localization within each trace via a textual dependency graph. Results show clear gains, including 1.4× success-rate improvement on VeruSAGE-Bench.","From Noisy Traces to Root Causes: Structural Trajectory Analysis and Causal Extraction for Agent Optimization  \nYing Chang1 2 †, Jiahang Xu2 * , Xuan Feng2 , Chenyuan Yang2 , Peng Cheng2 , Yuqing Yang2  \n1University of Chinese Academy of Sciences, Beijing, China,  \n2Microsoft Research.  \nCorrespondence: [jiahangxu@microsoft.com](jiahangxu@microsoft.com)  \narXiv :2607 .07702v 1 [ cs .CL] 8 Jul 2026  \nAbstract  \nThe optimization of long-horizon agents increasingly relies on reflection-based mechanisms, where a large language model (LLM) acts as an optimizer to diagnose agent failuresand improve agent policies. However, real execution traces are difficult to use directly for optimization: large trace collections are often redundant and heterogeneous, making optimization inefficient and prone to overfitting to low-value failures; meanwhile, each individual trajectory also contains many irrelevant steps, while naive context reduction methods such as truncation or sliding windows can discard causally important evidence and produce misleading optimization signals. To resolve this dilemma, we introduce STRACE (Structural Trajectory Analysis and Causal Extraction), a framework that constructs high signal-noise optimization contexts for more precise and effective optimization. At the batch level, STRACE mines failure patterns to filter redundant traces and retain representative failures; within each selected trace, it performs causal localization over a textual dependency graph to remove noncausal steps and identify the true root-cause module for optimization. Empirical results demonstrate that STRACE significantly outperforms standard context-filtering baselines. Notably, on a challenging formal verification task (VeruSAGE-Bench), it successfully optimizes human-expert designed agents, delivering 1.4× success-rate improvement (42.5% to 58 .5%) . The code is available at [https:](https:)//[github.com/moomight/STRACE](github.com/moomight/STRACE).  \n1 Introduction  \nThe field of Artificial Intelligence is undergoing a paradigm shift from single-turn interactions to Compound Agent Systems (Zaharia et al., 2024) . Powered by reasoning-intensive models capable  \n†Ying Chang did the work during an internship at Microsoft Research.  \n*  \nCorresponding author.  \nFigure 1: Comparison of context construction strategies. Existing methods struggle with the context-noise trade-off : (a) Full Trajectory introduces noise leading to spurious correlations, while (b) Short Truncation fails to capture long-range causal dependencies (e.g., linking Step 1 to Step 48) . In contrast,(c) STRACE performs causal context distillation to extract a compact causal slice, providing a high-SNR context for precise optimization.  \nof Computer Use (Anthropic, 2024a,b) and autonomous software engineering (Jimenez et al., 2024 ; Chen et al., 2021 ; OpenAI, 2024b), these systems are no longer mere chatbots but sophisticated operational units. They orchestrate complex tool usage, manage dynamic memory, and execute multi-step control flows to solve intricate long-horizon tasks (Wang et al., 2024 ; Xi et al., 2023 ; Schick et al., 2023) . Meanwhile, the artifacts generated by these systems have evolved from simple conversational logs into complex execution trajectories with reasoning chains, code execution environments and state transitions. How to effec-  \ntively use such trajectory information to further enhance agent systems has become a critical question.  \nA predominant paradigm for optimizing such agent systems is reflexive optimization (Pryzantet al., 2023 ; Shinn et al., 2023 ; Yang et al., 2024), which uses an LLM to diagnose agent-system failures and evolve agent policies based on historical feedback derived from agent trajectories. However, when deployed on complex long-horizon tasks, these frameworks struggle to process the sheer volume and complexity of generated data. In realistic settings, batched execution trajectories contain heterogeneous failures with differ","cbCaiqvIz2W9rKXE","https://ap.wps.com/l/cbCaiqvIz2W9rKXE","pdf",6700237,1,22,"English","en",105,"# Abstract\n# Introduction","[{\"question\":\"What problem does STRACE address in long-horizon agent optimization?\",\"answer\":\"STRACE targets inefficient optimization caused by redundant, heterogeneous traces and low signal-to-noise contexts within individual trajectories, where naive truncation can remove causally important evidence.\"},{\"question\":\"How does STRACE build an optimization context at the batch level?\",\"answer\":\"STRACE mines failure patterns to filter redundant traces and keep representative failures, reducing overfitting to low-value errors.\"},{\"question\":\"How does STRACE locate root causes inside a selected trajectory?\",\"answer\":\"STRACE performs causal localization over a textual dependency graph to remove noncausal steps and identify the true root-cause module for optimization.\"}]",1784186511,55,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"from-noisy-traces-to-root-causes-structural-trajectory-analysis-and-causal-extraction-for-agent-optimization","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/from-noisy-traces-to-root-causes-structural-trajectory-analysis-and-causal-extraction-for-agent-optimization/83289/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-23","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does STRACE address in long-horizon agent optimization?","Question",{"text":75,"@type":76},"STRACE targets inefficient optimization caused by redundant, heterogeneous traces and low signal-to-noise contexts within individual trajectories, where naive truncation can remove causally important evidence.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does STRACE build an optimization context at the batch level?",{"text":80,"@type":76},"STRACE mines failure patterns to filter redundant traces and keep representative failures, reducing overfitting to low-value errors.",{"name":82,"@type":73,"acceptedAnswer":83},"How does STRACE locate root causes inside a selected trajectory?",{"text":84,"@type":76},"STRACE performs causal localization over a textual dependency graph to remove noncausal steps and identify the true root-cause module for optimization.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":45,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":45,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":45,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":45,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":45,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":45,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]