# How do I diagnose an agent workflow failure before changing its configuration?

Exam: GH-700 — Enhancing Operational Efficiency with Agentic AI (beta)
Knowledge domain: Perform human-in-the-loop tasks for agentic workflows (20–25%)
Updated: 2026-11-19T04:47:21.84975+00:00
HTML: https://learningpathx.com/faq/GH-700/gh700-diagnose-agent-workflow-failure-stage.html

## Also asked as

- How can I distinguish trigger, compilation, authentication and runtime failures in agent work?
- What evidence should I collect before trying to fix a failed agent workflow?

Identify the execution mechanism and last confirmed successful stage, then compare the actual error and tool result with the intended task. A Copilot cloud automation, a gh-aw Actions workflow and a local CLI session have different configuration paths; one generic retry or permission increase cannot diagnose them all.

Record the task, repository or external resource, workflow/session identity, revision, time window and whether a run exists. Preserve the original diagnostic before editing anything. Separate the system's report, your independently observed state and the current causal hypothesis.

| Symptom | First focused check |
| --- | --- |
| No expected cloud-automation session | Enabled state, qualifying trigger/filter, actor restrictions and periodic credit limits |
| Markdown fails to compile | First compiler diagnostic, YAML field/type, path or import |
| Model inference fails | Selected engine, repository ownership and documented authentication/policy |
| Read denied or tool missing | Required scope, enabled toolset and narrower allowlist |
| MCP operation fails | Actual client's server status, transport, configuration and credentials |
| Active cloud run reaches a cap | Per-run limit, observed session state and approved remaining allowance |
| Execution fails after some work | Last successful operation, failing dependency and partial effects |

Correct only the cause supported by evidence. Do not weaken strict validation or broaden credentials as a default repair. Count recurring faults by supported cause in an operator record, and retain the original failure alongside later outcomes. A technically recovered run still requires output acceptance against the original business requirements.

Use consumption evidence at its supported granularity. Usage views depend on plan; the AI usage page reports credits and costs by model but generally cannot attribute them to exact prompts, sessions or features per request. Do not turn matching timestamps into invented cost attribution.

References: [Error Reference](https://github.github.com/gh-aw/troubleshooting/errors/), [Creating automations with Copilot cloud agent - GitHub Docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/create-automations), [Managing agent sessions - GitHub Docs](https://docs.github.com/en/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agents), [Monitoring your GitHub AI Credits usage - GitHub Docs](https://docs.github.com/en/copilot/how-tos/manage-and-track-spending/monitor-ai-usage).

Source: [GH-700: Diagnose Agent Workflow Failures Before Retrying](https://learningpathx.com/guide/GH-700/gh-700-diagnose-agent-workflow-failures-before-retrying.html)
