Skip to content

GH-600 · Domain 2: Implement tool use and environment interaction · 22% of the exam

Task 2.3: Integrate agents within development environments

Where an agent runs and what it can reach, scoping it to a repository and branch, invoking it from CI, letting it open branches and pull requests, and fitting it to runners, networks and platforms.

Study it

  • Execution context: copilot-setup-steps.yml, runners, the firewall and Agents secrets

    Lesson coming

  • Repository and branch scope, CI invocation, and agent-opened branches and pull requests

    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

A developer adds .github/workflows/copilot-setup-steps.yml on a feature branch with a job named install-deps that installs the project's toolchain, and assigns an issue to Copilot. Copilot still installs dependencies by trial and error. Which changes are needed for the steps to be used?

  1. AAdd an on: copilot_agent trigger so the workflow knows when to run
  2. BMove the steps into the repository's custom instructions as a setup section
  3. CAdd contents: write to the job's permissions so Copilot can read the installed tools
  4. DRename the job to copilot-setup-steps and merge the file into the default branch
Show the answer and why
  • AAdd an on: copilot_agent trigger so the workflow knows when to run

    Incorrect

    There is no such trigger; Copilot runs the copilot-setup-steps job itself when a session starts.

  • BMove the steps into the repository's custom instructions as a setup section

    Incorrect

    Instructions guide the model; the setup steps file installs tools deterministically before the agent starts.

  • CAdd contents: write to the job's permissions so Copilot can read the installed tools

    Incorrect

    Job permissions don't decide whether Copilot uses the steps; the job name and the branch the file is on do.

  • DRename the job to copilot-setup-steps and merge the file into the default branch

    Correct

    The job must be called copilot-setup-steps, and the workflow won't trigger unless it is on the default branch.

To customize Copilot's environment, create .github/workflows/copilot-setup-steps.yml containing a single job named copilot-setup-steps. Its steps run in GitHub Actions before Copilot starts working, and the workflow won't trigger unless the file is on the default branch.

Question 2 · choose 2

A platform team plans to run Copilot cloud agent on self-hosted runners managed with Actions Runner Controller. Which steps does GitHub call for? (Choose TWO.)

  1. AUse macOS runners so the agent can build the iOS client too
  2. BRegister the runners with the reserved label copilot, which the agent picks up without any runner setting
  3. CUse ephemeral, single-use runners that aren't reused for other jobs
  4. DDisable cloud agent's integrated firewall and apply network controls on the runners
  5. EGive the runners open internet access so the agent can download dependencies
Show the answer and why
  • AUse macOS runners so the agent can build the iOS client too

    Incorrect

    Cloud agent supports Ubuntu x64 and Windows 64-bit runners, not macOS.

  • BRegister the runners with the reserved label copilot, which the agent picks up without any runner setting

    Incorrect

    There is no reserved label: runs-on in the copilot-setup-steps job, or an organization's labeled-runner default, chooses the runners.

  • CUse ephemeral, single-use runners that aren't reused for other jobs

    Correct

    GitHub recommends only ephemeral, single-use runners for cloud agent.

  • DDisable cloud agent's integrated firewall and apply network controls on the runners

    Correct

    The firewall isn't compatible with self-hosted runners, and use is blocked until it is disabled; network security is then yours to configure.

  • EGive the runners open internet access so the agent can download dependencies

    Incorrect

    GitHub says to make sure the agent doesn't have open access to your network or the public internet.

You can run Copilot cloud agent on self-hosted runners. GitHub recommends ephemeral, single-use runners, usually through ARC or the Runner Scale Set Client, with network controls that prevent open access while allowing the required GitHub and Copilot hosts. The integrated firewall must be disabled because it isn't compatible with self-hosted runners. Only Ubuntu x64 and Windows 64-bit runners are supported.

Question 3 · choose 1

An organization wants a GitHub Actions workflow to run copilot -p on every push without storing a personal access token, with usage billed to the organization. Which setup does that need?

  1. AAdd copilot-requests: write and turn on the policy that charges Copilot CLI usage to the org
  2. BStore the GITHUB_TOKEN as COPILOT_GITHUB_TOKEN in Actions secrets so it lasts across runs
  3. CAssign a Copilot seat to the github-actions bot account
  4. DUse a GitHub App installation token, which the CLI prefers over GITHUB_TOKEN
Show the answer and why
  • AAdd copilot-requests: write and turn on the policy that charges Copilot CLI usage to the org

    Correct

    GITHUB_TOKEN authentication needs that permission and the "Allow use of Copilot CLI billed to the organization" policy.

  • BStore the GITHUB_TOKEN as COPILOT_GITHUB_TOKEN in Actions secrets so it lasts across runs

    Incorrect

    GITHUB_TOKEN is generated for each run; storing it as a secret isn't how this works.

  • CAssign a Copilot seat to the github-actions bot account

    Incorrect

    With GITHUB_TOKEN, the workflow authenticates as an installation with no user, and usage is metered to the organization.

  • DUse a GitHub App installation token, which the CLI prefers over GITHUB_TOKEN

    Incorrect

    The documented options are a personal access token or the built-in GITHUB_TOKEN.

Copilot CLI can authenticate in GitHub Actions with a personal access token, billed to that user's seat, or with the built-in GITHUB_TOKEN. With GITHUB_TOKEN in an organization-owned repository, usage is metered to the organization; the workflow must grant copilot-requests: write, and the "Allow use of Copilot CLI billed to the organization" policy must be enabled.

Question 4 · choose 1

A developer adds a strategy matrix to the copilot-setup-steps job to test two Node.js versions. What happens to that setting?

  1. ACopilot runs one agent session for each entry in the matrix, in parallel
  2. BThe workflow fails validation and Copilot stops
  3. CCopilot picks the first matrix entry
  4. DIt is ignored, because only some job settings can be customized
Show the answer and why
  • ACopilot runs one agent session for each entry in the matrix, in parallel

    Incorrect

    Matrix isn't among the settings you can customize.

  • BThe workflow fails validation and Copilot stops

    Incorrect

    Other settings are ignored rather than failing the job.

  • CCopilot picks the first matrix entry

    Incorrect

    The setting is ignored, not interpreted.

  • DIt is ignored, because only some job settings can be customized

    Correct

    Only a short list of job settings, such as steps, permissions and runs-on, can be set; other changes are ignored.

In copilot-setup-steps.yml you can customize only a short list of settings of the copilot-setup-steps job, such as steps, permissions, runs-on and services; strategy is not among them. If you try to customize other settings, your changes are ignored.

Question 5 · choose 1

A team sets fetch-depth: 1 on actions/checkout in copilot-setup-steps.yml to speed up cloning. What does Copilot do with that value?

  1. AIt overrides it, so the agent can roll back commits when asked
  2. BIt keeps the value, so the agent always works on a shallow single-commit clone
  3. CIt rejects the workflow until fetch-depth is removed
  4. DIt applies it only to Copilot code review
Show the answer and why
  • AIt overrides it, so the agent can roll back commits when asked

    Correct

    The fetch-depth value is overridden to allow rollback on request while mitigating security risks.

  • BIt keeps the value, so the agent always works on a shallow single-commit clone

    Incorrect

    The value is overridden, not kept.

  • CIt rejects the workflow until fetch-depth is removed

    Incorrect

    The value is overridden quietly; the workflow isn't rejected.

  • DIt applies it only to Copilot code review

    Incorrect

    The override applies to the setup steps used by the agent.

Any value set for the fetch-depth option of actions/checkout in copilot-setup-steps.yml is overridden, allowing the agent to roll back commits upon request while mitigating security risks.

Question 6 · choose 1

A team wants Copilot code review to run in a lighter environment than the one Copilot cloud agent gets from copilot-setup-steps.yml. What does GitHub provide for this?

  1. AA codeReview job inside copilot-setup-steps.yml
  2. BNothing; code review always runs in exactly the same environment as cloud agent
  3. CA separate copilot-code-review.yml file for code review's environment
  4. DAn excludeAgent setting in copilot-setup-steps.yml
Show the answer and why
  • AA codeReview job inside copilot-setup-steps.yml

    Incorrect

    The setup steps file has a single copilot-setup-steps job; code review gets its own file.

  • BNothing; code review always runs in exactly the same environment as cloud agent

    Incorrect

    Code review can be given its own environment file.

  • CA separate copilot-code-review.yml file for code review's environment

    Correct

    By default code review reuses copilot-setup-steps.yml, but a dedicated copilot-code-review.yml configures it independently.

  • DAn excludeAgent setting in copilot-setup-steps.yml

    Incorrect

    excludeAgent is an instructions-file setting, not an environment option.

Copilot code review also runs in an ephemeral development environment that you can customize in the same ways as cloud agent's. By default it reuses your copilot-setup-steps.yml file, but you can create a dedicated copilot-code-review.yml file to configure code review's environment independently.

Question 7 · choose 1

In an enterprise, a developer can use Copilot CLI but /delegate fails. Which policy setup lets /delegate work?

  1. AOnly the Copilot CLI policy, since /delegate starts from the command line
  2. BBoth the Copilot CLI and Copilot cloud agent policies enabled
  3. CThe MCP servers in Copilot policy
  4. DAn IDE-specific policy for the terminal
Show the answer and why
  • AOnly the Copilot CLI policy, since /delegate starts from the command line

    Incorrect

    The cloud agent policy is also needed, because /delegate hands work to cloud agent.

  • BBoth the Copilot CLI and Copilot cloud agent policies enabled

    Correct

    Both policies must be enabled for /delegate to work.

  • CThe MCP servers in Copilot policy

    Incorrect

    That policy governs MCP servers, not delegation.

  • DAn IDE-specific policy for the terminal

    Incorrect

    IDE-specific policies don't affect Copilot CLI.

Not every AI control applies to Copilot CLI. Among those that do, both the Copilot CLI policy and the Copilot cloud agent policy must be enabled for users to use /delegate. IDE-specific policies do not affect Copilot CLI.

Practise domain 2 →Practise all domains →