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