Dynamic analysis enhances issue resolution

Mingwei Liu, Zihao Wang, Zhenxi Chen, Zheng Pei, Yanlin Wang, Zibin ZhengarXiv 2026

TL;DR

Current LLM-based software repair agents struggle with complex bugs because they rely almost entirely on static code analysis, leading to blind, token-heavy guesswork. This paper introduces DAIRA, a framework that integrates lightweight dynamic analysis (runtime tracing) directly into the LLM agent's decision loop. By converting raw execution traces into structured, human-readable semantic reports, DAIRA achieves a state-of-the-art 79.4% resolution rate on SWE-bench Verified while significantly cutting down inference costs.

What Problem Does This Paper Address?

Automated issue resolution agents have advanced rapidly, but they face a major bottleneck: they view programs through a static lens. When trying to fix a bug, typical agents retrieve code snippets based on keyword or semantic similarity.

However, real-world software defects often hide behind dynamic behaviors—such as intricate polymorphic control flows, implicit state mutations, or unexpected type degenerations. Without visibility into the actual execution runtime, agents fall into Speculative Exploration. They blindly load massive amounts of irrelevant code files to guess what went wrong, flooding their context windows and driving up API costs without ever pinpointing the root cause.

Fig. 1. Impact of Dynamic Execution Traces on Debugging Trajectories.

Methods

DAIRA (Dynamic Analysis-enhanced Issue Resolution Agent) solves this by equipping agents with a "panoramic map" of program execution through a trace-driven analysis paradigm. It consists of three core components:

  1. Dynamic Analysis Tool: A lightweight, language-agnostic "trigger-and-collect" tracer. In Python, it hooks into the runtime environment using sys.settrace. Crucially, it uses spatiotemporal filtering to only capture task-relevant modules and function calls, preventing trace bloat. It also features Adaptive Granularity Iteration, which automatically scales down trace depth if the context window risks overflowing.
  2. Execution Trace Semantic Analysis: Raw execution traces are incredibly noisy. DAIRA uses an LLM to reconstruct these raw logs into a clean, structured report featuring a hierarchical ASCII execution tree, key function role analysis, and a natural language workflow overview.
  3. Test-Tracing Driven Workflow: A three-phase operational loop:
  4. Execution Tracing Phase: The agent autonomously generates reproduction scripts, runs them, and collects the structured trace reports.
  5. Fault Diagnosis Phase: The agent maps runtime anomalies back to the static code structure to perform root-cause analysis.
  6. Repair & Verification Phase: The agent iteratively applies patches, re-runs the tracer to verify the fix, and conducts a regression check.
Fig. 4. Overview of DAIRA’s Test-Tracing Driven Workflow.

Datasets

The authors evaluated DAIRA using two primary benchmarks:

  • SWE-bench Verified: A human-filtered subset of 500 real-world Python tasks from the original SWE-bench, curated to ensure clear problem descriptions and verifiable solutions.
  • SWE-bench Multilingual: A dataset used to test DAIRA's language-agnostic capabilities across 129 tasks spanning Python, C/C++, Ruby, and Java.

Key Insights and Ideas

  • Observable Inference Beats Guesswork: When agents can see intermediate execution states, their behavior shifts from speculative trial-and-error to deterministic inference. They bypass redundant file searches and navigate straight to the faulty logic.
  • Systemic Correction vs. Symptom Masking: Without dynamic traces, agents tend to apply "defensive repairs"—patching the final crash site just to stop the error. Dynamic tracing allows them to follow the data flow upstream to the true root cause, yielding higher-quality, systemic fixes.
  • Raw Traces are Toxic to LLMs: Simply dumping raw execution logs into an LLM's context window introduces severe noise that actually degrades reasoning performance. Reconstructing the data into structured semantic summaries (like ASCII trees) is absolutely essential to unlocking the power of dynamic analysis.
Fig. 2. Comparison of Opaque and Transparent Runtime States.

Key Results

  • State-of-the-Art Performance: Powered by Gemini 3 Flash Preview, DAIRA achieved a 79.4% resolution rate on SWE-bench Verified, outperforming top agent frameworks like Live-SWE-agent, OpenHands, and Mini-SWE-agent.
  • Mastering High-Difficulty Tasks: On complex issues that take human developers over an hour to fix, DAIRA resolved 44.4% of tasks, yielding massive relative improvements over vanilla baselines (e.g., +133.33% for Qwen-3-Coder Flash on hard tasks).
  • Multilingual Generalization: DAIRA delivered a consistent 13.32% overall relative improvement over the SWE-agent baseline across all evaluated languages (Python, C/C++, Ruby, and Java).
  • Token and Cost Efficiency: By narrowing the search space and reducing the need to load massive source files, DAIRA cut input token consumption by roughly 25% and reduced overall inference costs for models like Gemini 3 Flash Preview by 11.2%.

Limitations and Future Work

  • Model-Dependent Behavior: While stronger models (like DeepSeek V3.2 and Gemini 3 Flash) seamlessly convert dynamic evidence into accuracy gains, lighter models (like Qwen-3-Coder Flash) occasionally suffer from cognitive overload or instability when processing dense context under complex feedback loops.
  • Runtime Overhead: Dynamic instrumentation naturally introduces runtime execution overhead. While the authors note this cost is marginal compared to LLM inference latency, optimizing tracer performance remains an area for improvement.
  • Infrastructure Dependencies: Expanding DAIRA to additional programming languages requires mature, language-specific debugging and tracing infrastructure to support the underlying instrumentation backend.

Summary updated

BibTeX
@misc{liu2026dynamic,
  author = {Mingwei Liu and Zihao Wang and Zhenxi Chen and Zheng Pei and Yanlin Wang and Zibin Zheng},
  title = {{Dynamic analysis enhances issue resolution}},
  year = {2026},
  eprint = {2603.22048},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.22048},
}
Figure