mlsanityData to 14 Oct 2026

CausalFlow: Causal Attribution and Counterfactual Repair for LLM Agent Failures

arXiv 2605.25338 ↗First posted 25 May 2026cs.LG cs.AIcited by 18

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Large language model (LLM) agents frequently fail on multi-step tasks involving reasoning, tool use, and environment interaction. While such failures are typically logged or retried heuristically, they contain structured signals about where execution broke down. We introduce CausalFlow, an interventional framework that converts failed agent traces into minimal counterfactual repairs and reusable supervision. CausalFlow models execution traces as sequential chains of dependent steps and computes Causal Responsibility Scores(CRS) via step-level counterfactual intervention to identify failure-inducing steps. For these steps, we generate minimally edited repairs that flip the final outcome to success, producing validated contrastive pairs of the form (wrong step, corrected step). CausalFlow supports two complementary uses: targeted test-time repair that recovers from failures with minimal behavioral drift, and training-time supervision suitable for offline preference optimization or reward modeling. Across four benchmarks spanning mathematical reasoning, code generation, question answering, and medical browsing, CausalFlow converts failed executions into validated minimal repairs with high minimality and causal-consensus scores, and demonstrates that causal attribution is necessary for reliable improvement across diverse agent tasks, outperforming heuristic refinement in complex retrieval settings while producing more localized repairs throughout. These results demonstrate that interventional analysis over structured execution traces provides a principled and scalable mechanism for transforming agent failures into reliability gains and learning-ready supervision.

Key facts. Cited by 18 papers in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 32 of its 42 references that are in the map. First posted on arXiv 25 May 2026.

Builds on

32 of 42 references.

Closest ancestors · 3

Same direction, newest first

  1. 2025Which Agent Causes Task Failures and When? On Automated Failure Attribution of LLM Multi-Agent Systems30 Apr
  2. 2025Why Do Multi-Agent LLM Systems Fail?17 Mar
  3. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May

Other references · 29

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  3. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  4. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  5. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  6. 2023Let's Verify Step by Stepcited by 3,789
  7. 2021Program Synthesis with Large Language Modelscited by 3,637
  8. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
  9. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
  10. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  11. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
  12. 2023AgentBench: Evaluating LLMs as Agentscited by 1,267
17 more
  1. 2023Encouraging Divergent Thinking in Large Language Models through Multi-Agent Debatecited by 1,011
  2. 2022Mass-Editing Memory in a Transformercited by 1,001
  3. 2023Teaching Large Language Models to Self-Debugcited by 988
  4. 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 783
  5. 2024ORPO: Monolithic Preference Optimization without Reference Modelcited by 562
  6. 2023RRHF: Rank Responses to Align Language Models with Human Feedback without tearscited by 463
  7. 2023Causal Reasoning and Large Language Models: Opening a New Frontier for Causalitycited by 353
  8. 2023A Survey of Reinforcement Learning from Human Feedbackcited by 264
  9. 2023Causal Abstraction: A Theoretical Foundation for Mechanistic Interpretabilitycited by 205
  10. 2022Offline RL for Natural Language Generation with Implicit Language Q Learningcited by 138
  11. 2024StableToolBench: Towards Stable Large-Scale Benchmarking on Tool Learning of Large Language Modelscited by 132
  12. 2025SealQA: Raising the Bar for Reasoning in Search-Augmented Language Modelscited by 75
  13. 2025Unveiling Causal Reasoning in Large Language Models: Reality or Mirage?cited by 38
  14. 2025GraphTracer: Graph-Guided Failure Tracing in LLM Agents for Robust Multi-Turn Deep Searchcited by 23
  15. 2025Towards Safer Social Media Platforms: Scalable and Performant Few-Shot Harmful Content Moderation Using Large Language Modelscited by 5
  16. 2024NLP4Gov: A Comprehensive Library for Computational Policy Analysiscited by 4
  17. 2026STABLEVAL: Disagreement-Aware and Stable Evaluation of AI Systemscited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 18.

18 papers.

Sort:

By area:

  1. 2026MemTrace: Tracing and Attributing Errors in Large Language Model Memory Systemscited by 6
  2. 2026Graph Engineering in the Era of LLM Agents: From Individual Intelligence to System Intelligencecited by 3
  3. 2026Agent Hacks Agent: Autoresearch for Production-Agent Red-Teamingcited by 2
  4. 2026Cost-Utility Alignment in LLM Agent Trajectories:Profiling,Attribution,Diagnosis,Adaptation,and Evaluationcited by 2
  5. 2026What if LLMs Ate Their Words: Causal History Effects in Multi-Turn Interactioncited by 1
  6. 2026TwinCheck: Evidence-Grounded Negative-Twin Verification for Stateful Tool Agentscited by 1
  7. 2026DeFA: Dependency-Guided Failure Attribution for LLM Agentscited by 1
  8. 2026AUDITA: certified auditing and causal attribution of adverse outcomes in autonomous multi-agent systemscited by 0
  9. 2026Localizing Emergent Failures in Agentic AI: Recovering Minimal Repair Families via Counterfactual Replaycited by 0
  10. 2026Causal Attribution for Agentic Decisions: Estimators, Coupling, and a Traceability Specificationcited by 0
  11. 2026CausalLoss-Fin: Attributing Financial-Agent Loss to Decisions and Infrastructure Faultscited by 0
  12. 2026DAAF: From Failure Localization to Editable System Assets in LLM Agentscited by 0
6 more
  1. 2026The Right Lesson at the Right Step: Deriving Control Updates for Self-Evolving Agentscited by 0
  2. 2026Towards Reliable AI Data Scientists: Data Agents with Workflow Harnessescited by 0
  3. 2026EvoSteer: Online Self-Evolving Graph Orchestration via Reference-Anchored Credit Assignmentcited by 0
  4. 2026Where MLLMs Fail and Why: Causal Task Decomposition for Capability Failure Diagnosiscited by 0
  5. 2026When Harnesses Lose the Signal: Causal Evaluation of Recovery in LLM Agentscited by 0
  6. 2026Dream2Discern: Learning from Hard Latent Variants for Runtime Failure Prediction in Multi-Agent Systemscited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026DCFA: Dual-view Causal-inspired Attribution for Failure Reasoning in LLM-based Multi-agent Systems
  2. 2026From Flat Logs to Causal Graphs: Hierarchical Failure Attribution for LLM-based Multi-Agent Systems
  3. 2026Causal Agent Replay: Counterfactual Attribution for LLM-Agent Failures
  4. 2026Repair or Resample? Rethinking Failure Debugging in LLM Multi-Agent Systems
  5. 2025Abduct, Act, Predict: Scaffolding Causal Inference for Automated Failure Attribution in Multi-Agent Systems
  6. 2026Seeing the Whole Elephant: A Benchmark for Failure Attribution in LLM-based Multi-Agent Systems
  7. 2025AgenTracer: Who Is Inducing Failure in the LLM Agentic Systems?
  8. 2025Toward Causal-Visual Programming: Enhancing Agentic Reasoning in Low-Code Environments