Skip to content

GH-600 · Domain 4: Perform evaluation, error analysis, and tuning · 18% of the exam

Task 4.2: Analyze agent failures and identify root causes

Finding failures in logs, plans, traces, outputs and workflow artifacts, and telling reasoning errors, tool misuse and context or environment problems apart.

Study it

  • Finding failures in logs, plans, traces, outputs and workflow artifacts

    Partly covered by: Observability Basics

  • Classifying root causes: reasoning errors, tool misuse, context and environment issues

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the GitHub documentation page that proves it.

Question 1 · choose 1

An SDK app's error dashboard lumps all failures together. The team wants to split them into model problems, tool problems and everything else, using what the runtime already reports, so they can route each kind to the right owner. What should the onErrorOccurred hook record?

  1. AThe recoverable flag, which separates model errors from tool errors
  2. BThe cwd field, since tool errors always happen outside the working directory
  3. CThe retryCount the hook returned last time it ran, which counts model errors only
  4. DThe errorContext field, which is model_call, tool_execution, system or user_input
Show the answer and why
  • AThe recoverable flag, which separates model errors from tool errors

    Incorrect

    recoverable says whether recovery is possible, not where the error happened.

  • BThe cwd field, since tool errors always happen outside the working directory

    Incorrect

    cwd is the working directory; it doesn't classify errors.

  • CThe retryCount the hook returned last time it ran, which counts model errors only

    Incorrect

    retryCount is an output the hook can return for retries, not a classification of the error.

  • DThe errorContext field, which is model_call, tool_execution, system or user_input

    Correct

    errorContext says where the error occurred, which is the basis for classifying it.

The onErrorOccurred hook receives a timestamp, the working directory, the error message, an errorContext of model_call, tool_execution, system or user_input, and whether the error is recoverable. Categorizing by errorContext lets you handle and track different kinds of failure separately, and GitHub's best practices also say to log errors even when you suppress them.

Question 2 · choose 2

A team's new hook file never seems to run during Copilot sessions. Which of the following are causes that GitHub's troubleshooting table lists for hooks not executing? (Choose TWO.)

  1. AThe hook's timeoutSec is set below 30
  2. BThe file has no "version": 1 field
  3. CThe hook uses the cwd property
  4. DTwo hooks are defined for the same event
  5. EThe referenced script isn't executable or has no shebang line
Show the answer and why
  • AThe hook's timeoutSec is set below 30

    Incorrect

    A short timeout can make a hook time out, but it doesn't stop it from executing.

  • BThe file has no "version": 1 field

    Correct

    Hook configuration must specify version: 1.

  • CThe hook uses the cwd property

    Incorrect

    cwd is a supported optional property for the script's working directory.

  • DTwo hooks are defined for the same event

    Incorrect

    Several hooks per event are allowed and run in order.

  • EThe referenced script isn't executable or has no shebang line

    Correct

    Scripts called from a hook must be executable and have a proper shebang, such as #!/bin/bash.

If hooks are not executing, check that the JSON file is in the .github/hooks/ directory, that its syntax is valid (for example with jq), that version: 1 is specified, that the called script is executable (chmod +x) and that it has a proper shebang such as #!/bin/bash.

Question 3 · choose 1

A developer starts Copilot CLI's Autopilot mode, picks "Use Manual Approval for this session" when asked about permissions, and walks away. The session log later shows the agent repeatedly unable to run the test suite, and the task ends incomplete. What is the root cause?

  1. AAutopilot can't run shell commands at all, so the tests can never run in this mode
  2. BThe model hit a reasoning error and stopped calling tools
  3. CThat choice makes Copilot refuse any tool request that needs a prompt, so the test runs were refused
  4. DThe session reached its --max-autopilot-continues limit
Show the answer and why
  • AAutopilot can't run shell commands at all, so the tests can never run in this mode

    Incorrect

    Autopilot can run commands when permissions allow; the denials came from the chosen permission option.

  • BThe model hit a reasoning error and stopped calling tools

    Incorrect

    The log shows tool runs refused, which points to permissions, not reasoning.

  • CThat choice makes Copilot refuse any tool request that needs a prompt, so the test runs were refused

    Correct

    With manual approval, Copilot automatically denies tool requests that require approval, which can stop it finishing.

  • DThe session reached its --max-autopilot-continues limit

    Incorrect

    A continuation cap ends the run; here the evidence is repeated refused tool requests.

On entering Autopilot without full permissions, Copilot CLI offers to enable all permissions, use manual approval for the session, or cancel. With manual approval, Copilot automatically denies any tool request that requires approval, which may prevent it from completing tasks; /allow-all can grant full permissions during the session. Repeated refused tool calls in the log point to this, not to reasoning.

Question 4 · choose 1

A developer assigns an issue to Copilot and wants to confirm the agent picked it up. What is the first visible sign?

  1. AAn eyes reaction from Copilot on the issue
  2. BAn email from GitHub Support
  3. CA new label called copilot-working
  4. DA check run on the default branch
Show the answer and why
  • AAn eyes reaction from Copilot on the issue

    Correct

    Copilot leaves an eyes reaction, then opens a draft pull request shown in the timeline.

  • BAn email from GitHub Support

    Incorrect

    The sign is on the issue itself.

  • CA new label called copilot-working

    Incorrect

    No such label is added.

  • DA check run on the default branch

    Incorrect

    The sign is a reaction on the issue.

After you assign an issue, Copilot leaves an eyes reaction, then opens a draft pull request linked to the issue. When a "Copilot started work" event appears in the pull request timeline, View session opens the live session logs.

Question 5 · choose 1

A developer commits a new agent profile in .github/agents on a feature branch, but the agent doesn't appear in the agents dropdown. What is missing?

  1. AA copilot-setup-steps.yml file written specifically for the new agent
  2. BAn enterprise owner's approval
  3. CA tools property in the profile
  4. DMerging the profile into the default branch, then refreshing
Show the answer and why
  • AA copilot-setup-steps.yml file written specifically for the new agent

    Incorrect

    Setup steps aren't needed for an agent to be listed.

  • BAn enterprise owner's approval

    Incorrect

    Repository agents need no approval to be listed.

  • CA tools property in the profile

    Incorrect

    tools is optional; omitting it gives all tools.

  • DMerging the profile into the default branch, then refreshing

    Correct

    Custom agents appear in the dropdown after the profile is merged into the default branch.

To create a custom agent, add an .agent.md profile under .github/agents, commit it, and merge it into the default branch. Back on the agents tab, refresh if needed, and the agent appears in the dropdown.

Question 6 · choose 1

In VS Code, Copilot Chat replies that it can't create a pull request when asked to. What should the developer include in the prompt?

  1. AThe #codebase variable
  2. BThe /delegate command
  3. CThe @github chat participant
  4. DA link to the issue
Show the answer and why
  • AThe #codebase variable

    Incorrect

    The requirement is the @github participant.

  • BThe /delegate command

    Incorrect

    That is a Copilot CLI command; in IDE chat you mention @github.

  • CThe @github chat participant

    Correct

    In VS Code, Visual Studio and JetBrains IDEs you must mention @github; on GitHub.com it can be omitted.

  • DA link to the issue

    Incorrect

    The requirement is the @github participant.

If Copilot says it cannot create a pull request from chat, check that Copilot cloud agent is available. In VS Code, Visual Studio and JetBrains IDEs, you must mention the @github chat participant in your prompt; on GitHub.com you can omit it.

Question 7 · choose 1

What does GitHub do when a repository administrator clicks Save MCP configuration?

  1. AIt starts each server once to test it
  2. BIt validates the configuration's syntax
  3. CIt sends the file for an owner to approve
  4. DIt commits the file to the default branch
Show the answer and why
  • AIt starts each server once to test it

    Incorrect

    Servers start in agent sessions; saving checks syntax.

  • BIt validates the configuration's syntax

    Correct

    The configuration is validated to ensure proper syntax when saved.

  • CIt sends the file for an owner to approve

    Incorrect

    There is no approval step on save.

  • DIt commits the file to the default branch

    Incorrect

    The configuration lives in repository settings, not in a committed file.

Repository administrators enter MCP configuration as JSON in the repository's Copilot MCP settings and click Save MCP configuration, which validates the syntax.

Practise domain 4 →Practise all domains →