# From “it did something weird” to the exact span that did it.

Search the run, open the trace, and read the failure like a stack trace. RunAgain names the likely cause, diffs the run against the last good one, and turns the bad case into a test so it never comes back.

## The problem: Reproducing agent bugs is the whole bug

The user says the agent "went off the rails." Which run? Which of the twenty steps? Was it a bad tool result, a truncated response, or a prompt change last Tuesday? Without the trace, debugging an agent is archaeology.

## How RunAgain solves it

1. **The likely cause, named.** Failed runs are classified as an errored span, a failed tool call, a truncation, a dangling tool call, or silent no-output, so the trace detail tells you where to look before you start reading.
2. **Diff against the last good run.** Changed runs are matched to the previous run of the same agent: system prompt and final output diffs show exactly what shifted, separating a code regression from model weather.
3. **Find it in seconds.** Filter to Errors or Slow with one click, search by user, agent or trace id, follow the Slack alert's deep link: every path lands on the offending span with its full input and output payloads.
4. **Bug → regression test, one step.** Capture the failing trace into a versioned dataset and it becomes a permanent experiment case, and the fix is verified against the actual production failure, forever.

## Related solutions

- [Agent observability](https://runagain.ai/solutions/agent-observability.md)
- [Mocked environments](https://runagain.ai/solutions/mocked-environments.md)
- [Simulation & evals](https://runagain.ai/solutions/agent-simulation-evals.md)

Book a demo: https://cal.com/tamas-szuromi/30min · Get in touch: tamas@runagain.ai

---

Markdown mirror of https://runagain.ai/solutions/debug-ai-agents for agents and LLMs. Append .md to any runagain.ai page URL for its markdown twin. Overview: https://runagain.ai/llms.txt · For agents: https://runagain.ai/for-agents.md
