# Debug a Failed Run With a Coding Agent (https://www.shipfox.io/docs/how-to/run-and-troubleshoot/debug-failed-run)

Description: Let your coding agent trace a failed run to its first error, or find why an event did not start one.

Find why a workflow run failed or why an event did not start one. Your
coding agent traces the run through its jobs, steps, and logs. It reports
the first error, its likely cause, and one fix to try.

This guide is meant to be carried out by your coding agent. You start it with
one prompt, answer the agent's questions, and review what it reports.

## Before you begin [#before-you-begin]

You need:

* A coding agent [connected to the Shipfox MCP
  server](https://www.shipfox.io/docs/how-to/set-up-work/connect-mcp-client).
* A link to the failed run, or a description of the event that did not start one.

## Start the agent [#start-the-agent]

Open your coding agent in your repository and send this prompt:

```text
Use Shipfox to debug a failed workflow run.
```