Debugging Workflows
This guide shows you how to debug agentic workflow failures on github.com using the Copilot CLI, the gh aw debugging commands, and manual investigation techniques.
Debugging with the Copilot CLI
Section titled “Debugging with the Copilot CLI”The Copilot CLI is the recommended first step: it audits logs, traces failures, and suggests fixes interactively.
Launch copilot, invoke agentic-workflows to enable gh aw audit, gh aw logs, and related debugging tools. Then paste the failing run URL:
Debug this workflow run: https://github.com/OWNER/REPO/actions/runs/RUN_IDCopilot downloads the logs, identifies the root cause (missing tools, permission errors, network blocks), and suggests fixes or opens a PR. Follow-up questions like “What domains were blocked?” or “Why did the MCP server fail?” work too.
Alternative entry points
Section titled “Alternative entry points”-
Copilot Chat on GitHub.com (requires agentic authoring setup):
agentic-workflows debug <run-url> -
Any coding agent: paste this prompt to install
gh awand run the standalone analysis:Debug this workflow run using https://raw.githubusercontent.com/github/gh-aw/main/debug.mdThe failed workflow run is at https://github.com/OWNER/REPO/actions/runs/RUN_ID
Debugging with CLI Commands
Section titled “Debugging with CLI Commands”Auditing a Specific Run
Section titled “Auditing a Specific Run”gh aw audit breaks down a single run — failure analysis and root cause, behavior fingerprint (network/tool/cost profile), tool usage, MCP server status, firewall analysis, token/cost metrics, and safe-outputs. Accepts a run ID, run URL, job URL (extracts first failing step), or step URL.
gh aw audit 12345678