Analyze agent failures and identify their root causes
Unlock the complete study guide.
Bundled into the existing Developing in Agentic AI Systems premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- The surfaces that record what an agent was given and did
- Reading a workflow run as failure evidence
- Keeping workflow evidence usable
- Upgrade records: what was analysed, what was decided, what was executed
- Configuration gates that impersonate agent failure
- Telling the tool, context, and reasoning layers apart
- Applied reasoning: from symptom to root cause without over-claiming
Which surface answers which question
| Symptom | Surface to open | What it can establish | What it cannot establish |
|---|---|---|---|
| A pull request exists, but it is unclear whether a security finding was handled | Cloud agent session log | The analysis the agent performed and the actions it took | That the change is correct — the log records activity, not quality |
| A pull request looks stalled after a 'Copilot started work' event | View session on that event | Whether the session is still streaming activity | How long the remaining work will take |
| One agent task needs watching from the terminal | `gh agent-task view --log --follow` | That task's session log as it is produced, by session ID or PR | A cross-task overview — listing tasks is a different question |
| Copilot ignores the workspace and answers generically | Chat Debug view — Context section | Whether the expected repository files actually reached the model | Why they are missing: this section shows the absence, not its cause |
| Custom instructions appear to be ignored | Chat Debug view — System prompt section | Which instructions and available tools were actually supplied | That a configuration file on disk was the source of them |
| A tool ran but the result is wrong | Chat Debug view — Tool responses section | The actual arguments sent and the output returned | Whether the service itself is healthy for other callers |
| A workflow step failed | `gh run view --log-failed`, with `--job` and `--attempt` | The failing step's output, for the right job and the right attempt | Which revision was tested — that is `--json headSha` |
| An interrupted GitHub Copilot upgrade stopped somewhere unknown | `.github/upgrades/{scenarioId}/tasks.md` | Live per-step status and the validation criteria for each | Why a task failed internally — that is `progress-details.md` |
| The GitHub Copilot upgrade approach itself looks wrong | `assessment.md`, then `plan.md` and `upgrade-options.md` | What the analysis found, and confirmed decisions versus detailed strategy | How far execution actually got |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.