Agent Trajectories as Evidence for Software Quality Assurance

Jonathan Ullrich, Julien Siebert, Michael Kläs, Adam Trendowicz, Andreas JedlitschkaarXiv 2026 · arXiv

TL;DR

As AI agents move toward "dark factory" settings—autonomously planning, coding, and testing software—human developers are losing sight of the why behind technical decisions. This paper proposes treating agent trajectories (the step-by-step records of an AI’s reasoning and tool usage) as first-class artifacts for Quality Assurance (QA) to uncover hidden assumptions and systematically improve agentic workflows.

What Problem Does This Paper Address?

The rise of autonomous software agents creates a phenomenon known as cognitive debt. When agents handle the entire development lifecycle with limited oversight, the final code and passing tests don't reveal the implicit assumptions or "shortcuts" the AI took.

If a piece of software behaves unexpectedly, it’s currently difficult to tell if the fault lies in an ambiguous requirement, a hallucinated assumption, a tool failure, or a genuine implementation error. Traditional QA focuses on the output, but in an agentic world, we need to audit the process to ensure regulated industries can justify decisions and developers can effectively "steer" their AI colleagues.

Methods

The authors propose a framework for Trajectory-Based Quality Assurance. Instead of just looking at the final PR, reviewers should analyze the "trajectory," which includes:

  • Reasoning Logs: The internal "thought" process of the LLM.
  • Tool Calls & Context Access: What files did the agent read? What queries did it run?
  • Artifact Revisions: How did the code evolve across different "retries"?
  • Verification Activity: The results of intermediate tests or linting run by the agent.

The paper suggests using causal inference and counterfactual replay—essentially asking, "If we had changed this one instruction or provided this specific piece of documentation, would the agent have avoided this error?" This allows for a continuous feedback loop where findings inform changes to agent instructions, software specifications, or verification rules.

Datasets

The paper does not introduce a new public dataset. Instead, it draws on industrial experience, specifically citing a massive project involving the migration of over one million lines of COBOL code to Java. In this project, agents used a "code knowledge graph" to query legacy logic. The authors use this real-world setting to illustrate how agent queries and reasoning can be cross-referenced against legacy behavior to identify where the AI went off the rails.

Key Insights and Ideas

  • Prioritization is the Bottleneck: Humans cannot review every step of an agent's trajectory. The authors propose five criteria to flag "consequential" decisions for human review: Impact (safety/security), Scope (how many components are affected), Uncertainty (conflicting evidence), Reversibility (cost of undoing the choice), and Validation Effort.
  • The "Dark Factory" Risk: Without trajectory analysis, we risk building software systems where no human truly understands the architectural trade-offs being made.
  • Beyond Bug Fixing: Trajectory analysis isn't just for finding bugs; it’s for improving the agent's environment. If an agent consistently fails at a specific task, the solution might be better "skills" (tools) or clearer "harness configurations" rather than just fixing the code output.
  • Multi-Disciplinary Approach: The authors argue that solving this requires a mix of Requirements Engineering (to handle ambiguity), Causal Inference (to understand failure), and Human Factors (to present complex logs in a way humans can actually digest).

Key Results

As a position/vision paper, it focuses on conceptual frameworks rather than quantitative benchmarks. However, the authors report qualitative findings from their industrial projects:

  • Agents often introduce simplifications or rely on outdated info without flagging it.
  • Agents may unnecessarily reimplement existing functionality because they didn't "see" it in the context.
  • Agent-generated tests often suffer from the same "blind spots" as the agent-generated code, leading to a false sense of security.

Limitations and Future Work

  • Nondeterminism: LLMs are inherently stochastic. Replaying a trajectory to "debug" it might result in a different path, making counterfactual analysis difficult.
  • Explanation vs. Reality: An agent’s "reasoning" log might be a post-hoc justification (hallucination) rather than a true reflection of why it chose a specific token.
  • Scalability: We don't yet know which parts of the feedback loop can be safely automated.
  • Human Overload: There is a significant research gap in how to present these massive trajectories to human reviewers without causing "alert fatigue."

The authors conclude by inviting the research community to develop better "decision-and-evidence" models to help humans stay in the loop without being buried by the data.

Summary updated

Abstract

Autonomous software agents increasingly plan, implement, and test software with limited human oversight. Their decisions may introduce implicit assumptions that final code and passing tests do not adequately expose. We propose analyzing observable agent trajectories alongside software and agent specifications and AI generated artifacts as evidence for targeted quality assurance. The aim is to prioritize consequential decisions for scrutiny, investigate their possible contribution to software problems, and inform improvements to specifications and development practices. Industrial experience motivates the idea; available execution records and preliminary analysis methods make it plausible. However, trajectories alone do not establish that decisions are justified, outcomes acceptable, or corrective changes effective. We ask how this evidence can support review, diagnosis, and continuous quality improvement, and when simpler QA approaches suffice. Perspectives from requirements engineering, verification and validation, agent systems, causal inference, empirical software engineering, and human factors could help develop and evaluate the idea.
BibTeX
@misc{ullrich2026agent,
  author = {Jonathan Ullrich and Julien Siebert and Michael Kläs and Adam Trendowicz and Andreas Jedlitschka},
  title = {{Agent Trajectories as Evidence for Software Quality Assurance}},
  year = {2026},
  eprint = {2611.22323},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.22323},
}
Figure