TrajAudit: Automated Failure Diagnosis for Agentic Coding Systems
The paper introduces TrajAudit, a novel framework designed to improve failure diagnosis in repository-level agentic coding systems by filtering noisy, long trajectories and leveraging prior knowledge, which achieves significantly higher localization accuracy and token efficiency on the new RootSE benchmark compared to existing baselines.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a very smart, automated robot assistant (an "AI Agent") whose job is to fix bugs in a massive, complex software library. Sometimes, this robot gets the job done perfectly. But other times, it tries to fix a problem, makes a mess, and the software still crashes.
The big question is: Where exactly did the robot go wrong, and why?
This is the problem the paper "TrajAudit" tries to solve. Here is a breakdown of the paper's ideas using simple analogies.
The Problem: The "Needle in a Haystack"
When the robot tries to fix a bug, it leaves behind a long trail of digital footprints called a trajectory. This trail includes every thought the robot had, every file it opened, every command it typed, and every error message it saw.
- The Haystack: These trails are incredibly long (sometimes 100+ steps) and full of "noise." Imagine the robot reading a 500-page manual, copying entire chapters of code that don't matter, and listing every single file in a folder. This is the "haystack."
- The Needle: Somewhere in that massive pile of information, there is one specific moment where the robot made a bad decision (the "needle").
- The Old Way: Previous methods tried to read the entire 500-page manual at once to find the mistake. But just like a human, the AI gets overwhelmed by so much text and starts missing the obvious clues. It's like trying to find a typo in a novel by reading the whole book in one breath.
The Solution: TrajAudit (The Detective)
The authors created a new system called TrajAudit. Instead of a robot trying to read everything at once, they built a Detective Agent with two special assistants.
Think of the Detective Agent as a seasoned investigator who doesn't read the whole file immediately. Instead, they use two smart tools:
1. The "Prior Knowledge" Assistant (The Hunch)
Before the detective even looks at the messy trail, this assistant looks at the error message (the crash report) and the test code (the rules the robot failed to follow).
- Analogy: Imagine a detective arrives at a crime scene. Before looking at the messy room, they read the police report which says, "The victim was poisoned." The detective now has a hunch: "Okay, I don't need to look at the furniture; I need to look at the kitchen and the drinks."
- In the paper: This module gives the AI a "preliminary diagnosis." It tells the main agent, "Focus on the part where the robot was looking at the database, not the part where it was just listing files." This stops the AI from getting lost in the noise.
2. The "Semantic Saliency Folding" Assistant (The Summarizer)
This assistant looks at the long, messy trail and asks: "Is this piece of information actually important to the crash?"
- Analogy: Imagine you have a 100-page transcript of a conversation. Most of it is people saying "Hello," "How are you," and "Let me check this file." But on page 42, someone says, "I deleted the wrong file!"
- The old way reads pages 1–100.
- This assistant folds (hides) pages 1–41 and 43–100, leaving only the critical sentence visible. It keeps the "error logs" and "code changes" but hides the boring "file listing" noise.
- In the paper: It uses pattern matching to find code changes and keywords like "error" or "exception." Everything else gets compressed into a tiny placeholder. This makes the trail short and clean.
3. The Detective Agent (The Investigator)
Now, the main Detective Agent looks at this short, clean summary with the hunch from the first assistant.
- The "On-Demand" Trick: If the summary isn't enough to be 100% sure, the Detective can say, "Wait, I need to see the full details of Step 3." It then asks the system to "unfold" just that specific part.
- The Result: The agent finds the exact step where the robot went wrong, explains why it was wrong, and does it without getting confused by the 500 pages of noise.
The Proof: RootSE (The Exam)
To prove their system works, the authors couldn't just test it on easy tasks. They needed a really hard exam.
- They created a new benchmark called RootSE.
- The Exam: They took 93 real-world examples where AI agents failed to fix software bugs. These weren't simple tasks; they were complex, multi-file jobs that generated thousands of steps of data.
- The Score: When they tested their new "Detective" system against old methods:
- Accuracy: The new system found the exact mistake 24% more often than the best previous method.
- Efficiency: It used 18% fewer computer resources (tokens) because it didn't waste time reading the boring parts.
Summary
The paper argues that when AI agents fail at complex coding tasks, we can't just feed them the whole history of their mistakes. They get overwhelmed.
TrajAudit is like giving the AI a smart filter and a good hunch before it starts reading. It hides the boring noise, highlights the critical clues, and lets the AI zoom in on the specific moment the mistake happened. This makes it much faster and more accurate at figuring out why the robot failed.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.