Combined (08) (PEXT) Practice Exam Test #41
MohamedRadwan-DevOps
announced in
Documentation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Combined (08): (PEXT) Practice Exam Test
Document Type: PEXT (Practice Exam Test)
Scope: This document provides the first combined practice exam set, containing exam-style questions spanning multiple modules of the learning path. Each question includes the correct answer and a concise explanation, designed to mirror real exam scenarios, reinforce key concepts, and highlight common pitfalls and misunderstandings.
Question: [211]
What is a key difference between Copilot Agent Mode and standard Copilot Chat?
Options:
A. Standard Chat can only answer questions, while Agent Mode is limited to viewing logs and cannot edit code or run commands
B. Agent Mode can autonomously perform multi-step tasks (edit files, run commands, open PRs) based on a high-level goal
C. Agent Mode is restricted to Q&A and cannot change files or execute any tools
D. Agent Mode and standard Chat are identical in capability and differ only in UI
Correct Answer(s): B
Explanation:
Standard Copilot Chat focuses on conversational help explaining code, answering questions, and suggesting snippets while Agent Mode / the coding agent can take a high-level task and autonomously plan and execute multi-step workflows. These workflows can include editing multiple files, running tools or commands, and preparing a pull request for you to review, all within your existing repository permissions and policies.
Tips and Tricks:
Use standard Chat when you need explanations, quick examples, or small edits scoped to what is visible in the editor.
Use Agent Mode when the task involves multiple coordinated steps across files and tools, such as updating APIs, tests, and build scripts together.
Always review the agent’s changes and pull requests branch protections, required reviews, and CI checks still apply.
Important
When you see “multi-step, edit files, run commands, open a PR” in a scenario, it is pointing to Agent Mode / coding agent, not basic Copilot Chat.
Correct and Wrong:
The correct option is the only one that highlights autonomous, multi-step execution editing files, running commands, and opening PRs based on a high-level goal, which is exactly what Agent Mode adds. The other options either claim Agent Mode is only Q&A, give it incorrect limitations, or say there is no functional difference from Chat, all of which conflict with the documented behavior.
Source:
GitHub Copilot features – Agent mode (GitHub Docs)
About GitHub Copilot coding agent (GitHub Docs)
Build applications with GitHub Copilot agent mode (Microsoft Learn)
Agent mode 101: All about GitHub Copilot’s powerful mode (GitHub Blog)
Question: [212]
Which is the best prompt to give Copilot Agent Mode when building a new feature?
Options:
A. “Fix everything in this repository and change whatever you think is necessary across all services.”
B. “Implement a new /reports endpoint in this service that returns JSON summaries; update routing, handlers, and add tests. Keep existing APIs unchanged.”
C. “Write some code for me.”
D. “Refactor something somewhere in the codebase to make it better.”
Correct Answer(s): B
Explanation:
Agent Mode works best with a high-signal, well-scoped prompt that describes the feature, its scope, and any constraints. Asking for a
/reportsendpoint, specifying JSON summaries, naming the areas to update (routing, handlers, tests), and requiring that existing APIs remain unchanged gives the agent enough structure to plan a coherent set of edits. Vague prompts like “fix everything” or “write some code” are far more likely to produce noisy, hard-to-review changes.Tips and Tricks:
Include goal, scope, and constraints in your Agent Mode prompt: what to build, where to build it, and what must stay stable.
Mention tests explicitly for example, “add or update tests” to make them part of the agent’s plan, not an afterthought.
Avoid unbounded repo-wide prompts; smaller, well-defined tasks produce cleaner diffs and safer PRs.
Important
Treat Agent Mode prompts like ticket descriptions: clear feature, clear scope, explicit constraints, and acceptance criteria including tests and PR output.
Correct and Wrong:
The correct prompt clearly describes the feature, the affected areas, and the constraints, making it ideal for Agent Mode’s multi-step planning. The other prompts are vague (“write code,” “refactor something”) or dangerously broad (“fix everything”), which do not align with recommended practice or exam expectations for safe agent use.
Source:
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
GitHub Copilot features – Agent mode (GitHub Docs)
Build applications with GitHub Copilot agent mode (Microsoft Learn)
Question: [213]
In a TDD-style workflow using Copilot Agent Mode, what is an appropriate sequence?
Options:
A. Write implementation code first, let Agent Mode delete or skip any failing tests, then deploy if the build is green
B. Use Chat or Agent Mode to scaffold failing tests, then have Agent Mode implement the code to satisfy them, and finally review and refactor with tests passing
C. Ask Agent Mode to generate both code and tests in one pass and skip manual review as long as tests compile
D. Turn tests off while Agent Mode works, then enable them again only in production
Correct Answer(s): B
Explanation:
In a TDD-style workflow, you still follow red–green–refactor: write tests first (red), implement code to make them pass (green), then refactor with tests as your safety net. Copilot Chat or Agent Mode can help scaffold tests and implement code, but you remain in control of the sequence, run the tests yourself, and review the resulting changes before merging.
Tips and Tricks:
Start by asking Copilot to generate or refine tests that initially fail, validating your understanding of the desired behavior.
Have Agent Mode implement or adjust code until the tests pass, then refactor while keeping the suite green.
Keep tasks small and focused so it is obvious which tests correspond to which changes, making reviews and debugging easier.
Important
Copilot can accelerate TDD but never replaces it: tests still come first, and you still own review, refactoring, and final approval.
Correct and Wrong:
The correct option is the only one that respects the TDD loop tests first, then implementation, then refactor while using Agent Mode as an accelerator. The distractors either demote tests (deleting or disabling them), encourage skipping review, or suggest turning tests off entirely, which conflicts with both TDD practice and responsible Copilot usage.
Source:
Develop unit tests using GitHub Copilot tools (Microsoft Learn)
Develop Unit Tests using GitHub Copilot (lab) (Microsoft Learn)
Accelerate test-driven development with AI (GitHub Blog)
GitHub Copilot features – Agent mode (GitHub Docs)
Question: [214]
Which scenario best fits using Copilot Agent Mode instead of a simple edit or inline suggestion?
Options:
A. Renaming a single local variable inside one function in a single file
B. Correcting a spelling mistake in a comment that appears in one file
C. Updating a feature that spans multiple files (API contract, data model, and tests), and adjusting a CI script to run new tests as part of the same change
D. Writing a short, one-line SQL query for a quick check in a scratch file
Correct Answer(s): C
Explanation:
Agent Mode is designed for cross-cutting, multi-step tasks that touch several parts of your system such as updating an API contract, corresponding data models, related tests, and the CI configuration needed to run those tests together. For small localized edits like a variable rename, typo fix, or one-line query, inline suggestions or simple edits are faster, safer, and more appropriate.
Tips and Tricks:
Use Agent Mode when changes span multiple files or layers (API endpoints, domain models, tests, CI or tooling) and must remain consistent.
Prefer inline suggestions or Edit mode for tiny, local changes where a full autonomous workflow would be unnecessary overhead.
Keep Agent Mode tasks scoped so the resulting pull requests are understandable and reviewable in a single sitting.
Important
A good mental shortcut: if the task sounds like a mini-project across code, tests, and CI, think Agent Mode; if it is a small local tweak, stick with inline or simple edits.
Correct and Wrong:
The correct option is the only one that describes a multi-file, multi-step feature update exactly the kind of work Agent Mode is intended to orchestrate. The other options involve trivial, single-file edits or a quick query where Agent Mode would be excessive and where standard inline suggestions or a quick Chat answer are sufficient.
Source:
GitHub Copilot features – Agent mode (GitHub Docs)
Agent mode in Visual Studio (Microsoft Learn)
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
Agent mode 101: All about GitHub Copilot’s powerful mode (GitHub Blog)
Question: [215]
When Copilot Agent Mode opens a pull request after completing a task, what is the developer’s responsibility?
Options:
A. None, the pull request from Copilot can be merged automatically without human review or checks
B. Only verify that the branch has no merge conflicts before approving the pull request
C. Review the PR like any other: inspect diffs, run tests, ensure it meets security/compliance and coding standards
D. Accept all changes solely because they were generated by Copilot, without additional validation
Correct Answer(s): C
Explanation:
When Copilot Agent Mode or the coding agent opens a pull request, it is treated just like a PR from any other contributor. You must review the diffs, run or verify tests and status checks, and confirm that the changes meet your security, compliance, and coding standards before merging. The agent does not bypass branch protections or required reviews.
Tips and Tricks:
Important
Copilot can open PRs, but it cannot approve its own work code review, CI, and security checks still gate what gets merged.
Correct and Wrong:
The correct option is the only one that preserves full SDLC responsibility by requiring you to review diffs, run tests, and verify security and compliance before merging. The other options wrongly imply that agent-created PRs can be merged automatically, with minimal checks, or simply because Copilot wrote them, which conflicts with GitHub’s guidance.
Source:
About GitHub Copilot coding agent (GitHub Docs)
Responsible use of GitHub Copilot coding agent on GitHub.com (GitHub Docs)
Leveling up code reviews and pull requests with Copilot (Microsoft Learn)
GitHub Copilot features on GitHub.com (GitHub Docs)
Question: [216]
Which scenario is the best fit for using the GitHub Copilot coding agent instead of inline suggestions or simple Chat edits?
Options:
A. Quickly renaming a local variable in the current file using a single, simple change
B. Formatting a single function to match style guidelines in one file
C. Implementing a new feature described in a GitHub issue, updating multiple files, running tests, and opening a draft PR
D. Viewing a read-only summary of a pull request without making any changes
Correct Answer(s): C
Explanation:
The GitHub Copilot coding agent is designed for multi-step, task-based work: start from an issue, make coordinated changes across several files, run tests or other commands, and open a draft pull request. Inline suggestions and simple Chat edits are a better fit when you only need a small local change in a single file.
Tips and Tricks:
Important
If the scenario sounds like a mini-project issue, multiple files, tests, PR that’s a strong signal for the coding agent, not a one-line inline completion.
Correct and Wrong:
The correct option describes a full task lifecycle implementing a feature from an issue, updating several files, running tests, and opening a draft PR which matches how the coding agent is intended to be used. The other options are either trivial, single-file changes or read-only actions where inline suggestions or basic Chat would be more appropriate.
Source:
GitHub Copilot coding agent (GitHub Docs)
GitHub Copilot coding agent 101: Getting started with agentic workflows (GitHub Blog)
Piloting GitHub Copilot coding agent in your organization (GitHub Docs)
Question: [217]
What is a unique capability of the GitHub Copilot coding agent compared to inline suggestions and basic Chat edits?
Options:
A. It can bypass existing branch protection rules and merge changes directly to the default branch
B. It can modify a developer’s IDE configuration and extensions without any prompts
C. It can work from a GitHub issue, run tasks in a separate environment, and raise a pull request for you to review
D. It can delete repositories automatically when tests fail in CI
Correct Answer(s): C
Explanation:
A unique capability of the GitHub Copilot coding agent is that it can take a task from an issue or Chat, run in its own GitHub-hosted development environment, make code changes across files, run tests or other commands, and then open or update a pull request for you. Inline suggestions and basic Chat edits work directly in your editor and do not autonomously spin up an environment or raise PRs.
Tips and Tricks:
Important
The coding agent can run, change, and propose in a GitHub-hosted environment, but it cannot bypass branch protections or repository governance.
Correct and Wrong:
The correct option is the only one that captures the agent’s ability to work from an issue, execute tasks in an environment, and raise a PR a combination not offered by inline suggestions or simple Chat edits. The other options describe capabilities the agent does not have, like bypassing branch protections, changing IDE settings, or deleting repositories.
Source:
About GitHub Copilot coding agent (GitHub Docs)
Managing access to GitHub Copilot coding agent (GitHub Docs)
GitHub Copilot: Meet the new coding agent (GitHub Blog)
Question: [218]
How do branch protections and required reviews interact with changes made by the Copilot coding agent?
Options:
A. The coding agent automatically merges its pull requests as long as the tests in CI pass
B. The coding agent ignores branch protection rules so that changes can be merged faster
C. The coding agent’s pull requests are still subject to existing branch protections, required reviews, and status checks
D. The coding agent can operate only on branches that have no protection rules configured
Correct Answer(s): C
Explanation:
The Copilot coding agent creates or updates pull requests within your existing governance framework. Branch protections, required reviewers, and status checks all still apply. The agent is treated as a contributor, not an admin override, so it cannot merge around your protections or remove required reviews.
Tips and Tricks:
Important
Governance is non-negotiable: the coding agent works inside your branch protection and review rules, not around them.
Correct and Wrong:
The correct option is the only one that clearly states agent-created PRs are still governed by branch protections, reviews, and status checks. The distractors suggest auto-merging, ignoring protections, or only working on unprotected branches, none of which match GitHub’s documented behavior.
Source:
Responsible use of GitHub Copilot coding agent on GitHub.com (GitHub Docs)
Managing agents in your enterprise (GitHub Docs)
GitHub Copilot coding agent is now available for Copilot Business users (GitHub Blog)
Question: [219]
For GitHub Copilot Business and Enterprise customers, how is access to the Copilot coding agent controlled?
Options:
A. The coding agent is always enabled for all repositories and cannot be restricted or turned off
B. Access to the coding agent is controlled by organization and enterprise policies, which can enable or disable the agent for specific repositories and users
C. The coding agent can only be configured via a special
.ymlfile stored in each repositoryD. Each individual developer enables or disables the coding agent solely from their IDE settings, regardless of org policy
Correct Answer(s): B
Explanation:
For Copilot Business and Enterprise, access to the Copilot coding agent is governed by policies set by enterprise and organization admins. These policies determine whether the agent is available at all and, if so, which repositories it can work in. Enterprise owners and organization owners can restrict or expand usage, and individual users cannot override an enforced enterprise policy.
Tips and Tricks:
Important
Remember the hierarchy: Enterprise policies (if enforced) → Organization policies → Repository/user settings. Access to the coding agent flows from admin decisions, not from individual IDE toggles.
Correct and Wrong:
The correct option is the only one that reflects the documented policy-based control model, where enterprise and org admins manage access and repository scope. The other options either claim it is always on, rely on non-existent per-repo config files, or suggest that individual developers can bypass org/enterprise policy from their IDE.
Source:
Managing access to GitHub Copilot coding agent (GitHub Docs)
Managing agents in your enterprise (GitHub Docs)
Adding GitHub Copilot coding agent to your organization (GitHub Docs)
Piloting GitHub Copilot coding agent in your organization (GitHub Docs)
Question: [220]
What’s the practical difference between using Copilot Edits – Edit mode and assigning work to the Copilot coding agent?
Options:
A. Edit mode can only rename variables inside a single file, while the coding agent can only update documentation comments.
B. Edit mode applies scoped changes you review in your editor; coding agent autonomously executes multi-step tasks and raises a PR
C. Edit mode ignores branch protections while the coding agent must always merge to a protected branch.
D. There is no functional distinction between Edit mode and the coding agent; they use the exact same workflow and capabilities.
Correct Answer(s): B
Explanation:
Copilot Edits – Edit mode helps you apply scoped diffs in your editor: you choose the files or regions, preview the proposed changes, and selectively apply hunks. The Copilot coding agent takes a higher-level task, plans multiple steps (editing several files, running commands or tests), and then opens or updates a pull request for you to review. Both respect branch protections and required checks; neither merges code automatically.
Tips and Tricks:
Use Edit mode for small, well-bounded refactors and targeted fixes in a handful of files.
Use the coding agent when a task spans multiple files and tools and you want the result as a reviewable PR.
Keep both Edit prompts and agent tasks narrow and testable to avoid sprawling, hard-to-review changes.
Important
Edit mode = scoped diffs in your editor; coding agent = multi-step task execution ending in a PR. Both stay inside your existing branch protections and review rules, so you still own what gets merged.
Correct and Wrong:
The correct option is the only one that distinguishes scoped, editor-reviewed diffs (Edit mode) from autonomous multi-step tasks that culminate in a PR (coding agent). The other options either claim there’s no difference or misstate capabilities, such as ignoring branch protections or assigning the wrong responsibilities to each mode.
Source:
GitHub Copilot features (GitHub Docs)
GitHub Copilot Edits in Visual Studio (Microsoft Learn)
Copilot ask, edit, and agent modes: What they do and when to use them (GitHub Blog)
About GitHub Copilot coding agent (GitHub Docs)
Question: [221]
How does Copilot coding agent (Agent mode) differ from a simple Copilot Chat reply or Edit mode?
Options:
A. Agent mode never contacts GitHub services and runs entirely offline in the IDE.
B. Agent mode can autonomously perform multi-step tasks (edit multiple files, run tools/commands) and can open a pull request for review
C. Agent mode automatically merges to the default branch whenever tests pass, without human intervention.
D. Agent mode is allowed to bypass branch protections and required reviewers to speed up delivery.
Correct Answer(s): B
Explanation:
In Agent mode, Copilot acts as an autonomous assistant: it can analyze your project, plan a sequence of steps, modify multiple files, run tools or tests, and then open or update a pull request for you to review. Standard Chat replies and Edit mode focus on single-step answers or scoped diffs that you apply manually; they don’t orchestrate end-to-end workflows or raise PRs on their own.
Tips and Tricks:
Use Agent mode when a task reads like a ticket (multi-file changes plus tests and a PR), not for one-line fixes.
Use Chat or Edit mode for focused questions and localized refactors in a small area of the codebase.
Always review the agent’s PRs, run tests, and confirm compliance and security before merging.
Important
Agent mode plans and executes multi-step work, but it never replaces review. Branch protections, required reviewers, and status checks still apply to any PR it opens.
Correct and Wrong:
The correct option captures both aspects that distinguish Agent mode: multi-step task execution and the ability to open a PR for review. The distractors incorrectly claim that Agent mode runs fully offline or can auto-merge and bypass branch protections, which conflicts with GitHub’s responsible-use guidance.
Source:
Responsible use of GitHub Copilot coding agent on GitHub.com (GitHub Docs)
About GitHub Copilot coding agent (GitHub Docs)
Introducing GitHub Copilot agent mode (preview) (Microsoft / VS Code Blog)
Copilot ask, edit, and agent modes: What they do and when to use them (GitHub Blog)
Question: [222]
When Copilot coding agent runs on GitHub.com for a repository, what permissions does it effectively have?
Options:
A. It automatically receives admin access to all repositories in the enterprise, regardless of the user’s role.
B. It can push directly to protected branches and bypass required reviews if tests pass.
C. It acts with the same repository permissions as the signed-in user who invokes it
D. It can only ever read code; it cannot create branches or open pull requests.
Correct Answer(s): C
Explanation:
On GitHub.com, the Copilot coding agent runs with the permissions of the user who started it. If you can open branches and pull requests, the agent can do so on your behalf; if you only have read access, it cannot make changes. It does not gain admin rights, and it cannot bypass enterprise policies, org policies, or branch protections configured for the repository.
Tips and Tricks:
Only invoke the coding agent in repositories where your own permissions are appropriate for the changes you’re asking it to make.
Rely on branch protections, required reviews, and CI checks to guard agent-created PRs just like any other contribution.
Use organization and enterprise policies to control which repositories and members can use the agent.
Important
The coding agent never exceeds your own permissions it is constrained by the same repo access, branch protections, and policies that apply to you.
Correct and Wrong:
The correct option is the only one that states the agent acts with the same repository permissions as the invoking user. The other options incorrectly claim elevated admin access, the ability to bypass protections, or a hard read-only limit that doesn’t match GitHub’s documentation.
Source:
Responsible use of GitHub Copilot coding agent on GitHub.com (GitHub Docs)
About GitHub Copilot coding agent (GitHub Docs)
Managing GitHub Copilot coding agent in your enterprise (GitHub Docs)
GitHub Copilot policies to control availability of features and models (GitHub Docs)
Question: [223]
Which of the following is a recommended practice when using Copilot coding agent to make changes in your repository?
Options:
A. Merge agent-created pull requests immediately as long as they compile, skipping reviews and tests.
B. Turn off branch protections and required checks so the agent can push directly to the default branch.
C. Review the agent’s pull requests, run tests and security checks, and ensure changes meet your team’s standards before merging
D. Grant the agent effective admin rights so it can force-push and rewrite history to simplify fixes.
Correct Answer(s): C
Explanation:
GitHub emphasizes that the coding agent is a productivity aid, not an authority. Any changes it proposes, including those in PRs, must still go through your normal code review, testing, and security scanning processes. This ensures correctness, security, and compliance before changes are merged.
Tips and Tricks:
Treat agent PRs like contributions from a junior teammate: read the diff, question assumptions, and run tests.
Use PR templates and labels to keep reviews consistent and to flag AI-assisted changes.
Combine the agent with CI, code scanning, and dependency checks to catch issues early.
Important
The coding agent can plan, edit, and propose, but you own what ships reviews, tests, and policy gates are non-negotiable.
Correct and Wrong:
The correct option is the only one that preserves standard SDLC practices review, tests, and security checks before merging. The others either promote bypassing protections, auto-merging, or giving the agent admin-style powers, all of which conflict with GitHub’s recommended use.
Source:
Responsible use of GitHub Copilot coding agent on GitHub.com (GitHub Docs)
Responsible use of GitHub Copilot features (GitHub Docs)
Leveling up code reviews and pull requests with Copilot (Microsoft Learn)
Question: [224]
Which scenario is the best fit for using Copilot coding agent instead of just inline suggestions or a single Chat prompt?
Options:
A. You need to update a feature across several files, run tests, and then open a PR that ties the changes together
B. You only need to rename a single local variable in one function within the current file.
C. You just want a one-off code snippet in a scratch file with no follow-up work.
D. You want to modify organization-wide billing and subscription settings in GitHub.
Correct Answer(s): A
Explanation:
The coding agent shines when a task is multi-step and cross-cutting: modifying code in multiple files, running tools or tests, and then opening a pull request that bundles the work for review. Simple, localized changes like renaming a variable or asking for a one-off snippet are better handled by inline suggestions or a single Chat prompt.
Tips and Tricks:
Choose the coding agent for tasks that naturally involve “plan → edit multiple files → run tests → open PR.”
Prefer inline suggestions or Edit mode for small, single-file changes or quick refactors.
Keep agent tasks scoped and explicit (which feature, which files, what success looks like) to avoid surprising edits.
Important
If the work feels like a mini-project rather than a single edit multiple files, tests, and a PR the coding agent is usually the right tool.
Correct and Wrong:
The correct option explicitly describes a multi-file, multi-step task that ends in a PR, which is exactly where the coding agent shines. The other options describe trivial, single-file edits, one-off snippets, or administrative actions unrelated to code, where inline suggestions, Chat, or normal GitHub settings are more appropriate.
Source:
GitHub Copilot features (GitHub Docs)
About GitHub Copilot coding agent (GitHub Docs)
Copilot ask, edit, and agent modes: What they do and when to use them (GitHub Blog)
Question: [225]
Which of the following prompting approaches best supports responsible use of Copilot coding agent on GitHub.com?
Options:
A. “Fix everything that’s wrong in this repo and push directly to
mainwithout opening a pull request or running tests.”B. “Rewrite this service however you want; I’ll merge whatever you generate without reviews or checks.”
C. “In this repo, update only the payment validation logic to add address checks; keep public APIs stable, add or update tests, and open a PR summarizing what you changed.”
D. “Gain admin access across all org repositories and remove branch protections so changes can be merged faster without approvals.”
Correct Answer(s): C
Explanation:
Copilot coding agent works best when given a clear, well-scoped task with constraints and success criteria, then asked to open a pull request for review rather than pushing directly. Option C is the only prompt that: limits scope to payment validation logic in this repo, preserves an important invariant (keep public APIs stable), requires tests to be added or updated, and explicitly asks for a PR with a summary, aligning with GitHub’s guidance to review agent-created PRs under normal branch protections and governance.
Tips and Tricks:
Write agent prompts like good tickets: specify where to work (repo/area), what to change, what must stay stable, and which tests to add or update.
Always ask the coding agent to open or update a PR, not to push to
mainor bypass reviews.Keep tasks small and well-scoped (single feature or concern) so PRs are easier to review and validate.
Important
High-quality agent prompts look like scoped, reviewable tasks: clear area of change, explicit constraints, tests, and a PR for review. Prompts that suggest rewriting everything, skipping tests, or bypassing branch protections are anti-patterns and violate responsible-use guidance.
Correct and Wrong:
The correct option is the only one that gives the coding agent a bounded task, preserves critical constraints, requires tests, and routes the work through a pull request for human review. The other options invite uncontrolled repo-wide changes or attempt to skip governance (direct pushes, no reviews, removed protections), which is the opposite of responsible use.
Source:
Responsible use of GitHub Copilot coding agent on GitHub.com (GitHub Docs)
Best practices for using GitHub Copilot coding agent to work on tasks (GitHub Docs)
Piloting GitHub Copilot coding agent in your organization (GitHub Docs)
Responsible use of GitHub Copilot features (GitHub Docs)
GitHub Copilot coding agent 101: Getting started with agentic workflows on GitHub (GitHub Blog)
Question: [226]
Which set of sources can you add to a Copilot Space to make Copilot a “project expert”?
Options:
A. Only a single README file exported as PDF, without linking any live repositories, issues, or pull requests
B. Files, repositories, pull requests, and issues from GitHub that represent your project’s code and documentation
C. Only external data sources such as databases and cloud logs, without attaching any GitHub repositories or issues
D. Only ad-hoc code snippets manually pasted into the chat window, with no persistent link to GitHub content
Correct Answer(s): B
Explanation:
Copilot Spaces are built to combine multiple GitHub-native sources repositories, selected files or folders, pull requests, and issues into a curated project context that Copilot can reuse across chats. These sources remain linked to the live content on GitHub, so Copilot’s answers can stay aligned with your current code, documentation, and work items instead of relying on one-off pasted snippets.
Tips and Tricks:
Include the main repository plus key design docs, API files, and configuration that define how the system works.
Add important issues and pull requests that capture active work, conventions, and patterns your team wants Copilot to follow.
Prefer linked GitHub sources over manual paste so the Space stays in sync automatically as code evolves.
Important
For exam questions, remember the core Space building blocks: files, repositories, pull requests, and issues from GitHub not external databases or random pasted snippets.
Correct and Wrong:
The correct option is the only one that lists the GitHub artifacts Spaces are designed to aggregate files, repositories, pull requests, and issues to ground answers in your real project. The distractors either limit you to a single static file, focus on external systems like databases, or rely on ephemeral pasted snippets that do not reflect how Spaces actually work.
Source:
About GitHub Copilot Spaces (GitHub Docs)
Creating GitHub Copilot Spaces (GitHub Docs)
Speeding up development work with GitHub Copilot Spaces (GitHub Docs)
Introduction to Copilot Spaces (Microsoft Learn)
Question: [227]
What is the primary advantage of using the Copilot coding agent (Agent mode) compared to regular inline suggestions or simple chat edits?
Options:
A. It guarantees that all generated code is secure, fully compliant, and bug-free without any need for testing or review.
B. It can autonomously perform multi-step tasks across files and tools, and then propose changes or open a PR for review
C. It runs entirely on-premises with no dependency on GitHub’s cloud services or hosted environments.
D. It bypasses branch protections, required reviews, and CI checks so changes can be merged more quickly.
Correct Answer(s): B
Explanation:
The Copilot coding agent can execute multi-step workflows: analyze the repo, edit multiple files, run tools or tests in an ephemeral environment, and then surface its work as changes or a pull request for review. This goes beyond inline suggestions (cursor-local completions) and simple chat edits (single-step diffs), which don’t coordinate a full plan or open PRs on their own.
Tips and Tricks:
Use the coding agent when the task reads like a ticket: multiple files, commands, and a PR as the output.
Keep tasks well scoped (feature X, tests for X, PR) to avoid overly large or surprising changes.
Always review agent-created diffs and PRs, run tests, and verify security before merging.
Important
Think of the coding agent as an autonomous helper for multi-step work that still reports back through diffs and PRs branch protections, reviews, and CI checks remain your control points.
Correct and Wrong:
The correct option is the only one that highlights the agent’s ability to perform multi-step tasks across files and tools and then open a PR for review. The other options falsely claim guarantees about security, on-prem execution, or bypassing branch protections and CI, which are explicitly not features of the coding agent.
Source:
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
Managing Copilot coding agents (GitHub Docs)
Managing access to GitHub Copilot coding agent (GitHub Docs)
Question: [228]
In a regulated enterprise, what is the main purpose of the Copilot coding agent firewall?
Options:
A. To prevent the coding agent from ever generating code that calls external APIs, even as plain source code.
B. To enforce project-level formatting and linting rules before any pull request can be opened.
C. To control which domains/URLs the coding agent can access, reducing data exfiltration risk
D. To limit the agent to editing only one file per task so that multi-file changes cannot occur.
Correct Answer(s): C
Explanation:
The Copilot coding agent firewall limits which domains and URLs the agent can access when it needs internet connectivity (for example, downloading dependencies). By default it is enabled and uses a recommended allowlist; admins can further restrict or extend this list. This is specifically designed to reduce data exfiltration risk by preventing the agent from calling arbitrary external hosts.
Tips and Tricks:
Leave the agent firewall enabled by default and only add hosts your workflows truly require.
Align the firewall allowlist with your existing network and vendor allowlists and regulatory constraints.
Combine the firewall with content exclusion and code referencing for a layered governance model.
Important
Disabling or over-broadening the agent firewall allows the coding agent to contact any host, which significantly increases the risk of data leaving approved boundaries especially in regulated environments.
Correct and Wrong:
The correct option is the only one that reflects the firewall’s real purpose: controlling outbound network access to manage data exfiltration risk. The distractors confuse it with code-generation bans, linting tools, or file-edit limits, none of which are the firewall’s function.
Source:
Customizing or disabling the firewall for GitHub Copilot coding agent (GitHub Docs)
Copilot allowlist reference (GitHub Docs)
Customizing the development environment for GitHub Copilot coding agent (GitHub Docs)
Managing GitHub Copilot coding agent in your enterprise (GitHub Docs)
Question: [229]
Which type of request is best suited for the Copilot coding agent, rather than a simple inline suggestion?
Options:
A. “Add a single null-check on this line so the app doesn’t crash; don’t touch any other code.”
B. “Reformat this file with our standard code style, but don’t change behavior or add tests.”
C. “Investigate why these tests are failing, update the implementation if needed, and propose a fix I can review.”
D. “Rename this local variable to something clearer in just this function.”
Correct Answer(s): C
Explanation:
The coding agent is designed for multi-step, problem-solving tasks such as debugging failing tests: it can inspect test failures, read related code, adjust implementation across files, run tests, and then present a cohesive fix in a branch or PR. Simple one-line or single-file edits like adding a null-check, renaming a variable, or just reformatting are faster and safer with inline suggestions or basic Edits.
Tips and Tricks:
Use the coding agent for tasks that naturally involve tests + code changes + explanation across more than one file.
Keep prompts high-signal: describe the failing tests, expected behavior, and any constraints on changes.
After the agent proposes a fix, review the diffs and test results yourself before merging.
Important
If your request spans multiple files, steps, or tools, you’re in coding-agent territory; if it’s just a small local tweak, stick with inline suggestions or Edit mode.
Correct and Wrong:
The correct option is the only one that describes a multi-step debugging and fix workflow where the agent investigates failing tests and proposes a cohesive solution. The other options are single-line, single-file, or purely formatting tasks where a full coding agent would be unnecessary overkill.
Source:
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
Managing Copilot coding agents (GitHub Docs)
GitHub Copilot features (GitHub Docs)
Question: [230]
How does extending the Copilot coding agent with MCP (Model Context Protocol) servers help in real-world workflows?
Options:
A. It gives Copilot the ability to retrain its base foundation models directly on your repositories and telemetry data.
B. It lets the coding agent call specialized tools and data sources (for example, GitHub or Playwright MCP servers) as part of a task
C. It automatically disables the agent firewall, content exclusion, and other governance policies whenever MCP tools are used.
D. It forces all coding agent computation to run entirely on-premises instead of in GitHub-hosted environments.
Correct Answer(s): B
Explanation:
MCP (Model Context Protocol) lets you integrate external tools and data sources as first-class capabilities the coding agent can call during a task for example, a GitHub MCP server to query repos or a Playwright MCP server to run browser tests. This extends what the agent can do in a workflow, but it does not retrain models or turn off existing governance like the firewall or content exclusion.
Tips and Tricks:
Use MCP servers for approved, domain-specific tools you want the agent to orchestrate (tests, APIs, internal systems).
Keep your MCP tool list small and documented so agent behavior stays predictable and debuggable.
Combine MCP with the agent firewall and policies to ensure tools only talk to allowed endpoints.
Important
MCP expands the action space of the coding agent new tools and data sources but doesn’t bypass governance: firewall, content exclusion, and policies still apply to agent runs that use MCP.
Correct and Wrong:
The correct option is the only one that captures MCP’s purpose: giving the agent access to specialized tools and data sources as part of a task. The other options incorrectly suggest model retraining, disabling safeguards, or forcing all computation on-premises, none of which describe MCP for Copilot coding agent.
Source:
Extending GitHub Copilot coding agent with the Model Context Protocol (MCP) (GitHub Docs)
Enhancing GitHub Copilot agent mode with MCP (GitHub Docs)
Managing access to GitHub Copilot coding agent (GitHub Docs)
Question: [231]
From an enterprise admin perspective, what is a recommended approach to rolling out the Copilot coding agent?
Options:
A. Enable the coding agent everywhere for all members with no firewall, no policies, and no monitoring, and let each team decide how to use it.
B. Pilot the coding agent with a small group, keep the firewall enabled, and monitor usage before broader rollout
C. Disable the coding agent permanently and rely only on inline suggestions and basic chat.
D. Allow the coding agent only if all content exclusion and code-referencing policies are turned off so it has unrestricted access.
Correct Answer(s): B
Explanation:
GitHub’s guidance for enterprises is to adopt the coding agent via a controlled pilot: start with a small set of teams, keep safeguards like the agent firewall and policies enabled, monitor behavior and outcomes, and then scale usage based on feedback and metrics. This balances value and risk instead of enabling the agent everywhere on day one or refusing to use it at all.
Tips and Tricks:
Choose pilot teams with good test coverage and strong review practices so agent changes are well guarded.
Use enterprise/org policies, firewall, and content exclusion together as guardrails when enabling the coding agent.
Track usage metrics and qualitative feedback from the pilot to tune policies and documentation before a wider rollout.
Important
Treat the coding agent like any powerful capability: start small, keep guardrails on, measure impact, then expand not “enable everywhere with no controls” or “never use it at all.”
Correct and Wrong:
The correct option is the only one that reflects a phased, guarded rollout: pilot with a small group, keep the firewall enabled, and monitor results before scaling. The other options either remove safeguards entirely, ban the agent outright, or incorrectly suggest disabling governance features like content exclusion as a prerequisite.
Source:
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
Managing access to GitHub Copilot coding agent (GitHub Docs)
Managing Copilot coding agent in your enterprise (GitHub Docs)
Managing agents in your enterprise (GitHub Docs)
Question: [232]
How does Copilot coding agent typically operate on a task assigned from GitHub.com?
Options:
A. It edits files directly in your local IDE without ever creating branches or pull requests
B. It connects to an on-premises GitHub Enterprise Server (GHES) instance and runs entirely there
C. It initializes a cloud dev environment (GitHub Actions–powered), makes changes in a branch, and drafts a pull request for review
D. It automatically merges its changes into the default branch as soon as tests pass, bypassing normal reviews
Correct Answer(s): C
Explanation:
Copilot coding agent runs in an ephemeral development environment powered by GitHub Actions, where it can clone your repository, explore code, make edits across files, and run tests or linters. It then pushes commits to a branch with a draft pull request, so changes stay visible and auditable and must still pass your branch protections, CI checks, and reviews before merging.
Tips and Tricks:
Important
When you see “GitHub Actions–powered ephemeral environment” or “draft pull request while the agent works,” it’s describing Copilot coding agent’s execution model, not inline suggestions or basic Chat.
Correct and Wrong:
The correct option is the only one that mentions the Actions-powered cloud environment, working in a branch, and opening a draft PR for review. The other options either wrongly place the work in your local IDE or on GHES, or claim it auto-merges changes, which contradicts GitHub’s requirement that normal reviews and protections still apply.
Source:
About GitHub Copilot coding agent (GitHub Docs)
Customizing the development environment for GitHub Copilot coding agent (GitHub Docs)
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
GitHub Copilot: Meet the new coding agent (GitHub Blog)
Question: [233]
Which responsibilities remain with developers/teams when using Copilot coding agent? (Choose all that apply.)
Options:
A. Reviewing and approving the pull request before merge
B. Ensuring tests, linters, and security scans pass for the changes
C. Allowing the agent to bypass branch protections and merge directly to production as long as tests appear to pass
D. Defining safe, well-scoped tasks/issues for the agent to work on
Correct Answer(s): A, B, D
Explanation:
Copilot coding agent can implement changes and open pull requests, but GitHub’s guidance makes clear that humans still own task scoping, code review, and verification. Teams must continue to run and interpret tests, linters, and security scanners, and must approve PRs in line with existing branch protection rules before any agent-authored changes are merged.
Tips and Tricks:
Important
Any answer that suggests auto-merge or skipping reviews/tests for coding-agent PRs conflicts with GitHub’s responsible-use guidance Copilot assists with implementation, but you own what ships.
Correct and Wrong:
The correct answers (A, B, D) align with GitHub’s framing of the coding agent as assistive under existing SDLC controls. Option C is wrong because the agent cannot and should not bypass branch protections or review, even when tests are green.
Source:
Managing access to GitHub Copilot coding agent (GitHub Docs)
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
Piloting GitHub Copilot coding agent in your organization (GitHub Docs)
Responsible use of GitHub Copilot coding agent on GitHub.com (GitHub Docs)
Question: [234]
How do you customize the environment that Copilot coding agent uses when working on a repository?
Options:
A. Configuring a
.copilot-env.jsonfile in your personal home directory so the agent automatically mirrors your local toolsB. Changing your local dev container configuration so the agent reuses it without any repository-level setup
C. Adding a
.github/workflows/copilot-setup-steps.ymlworkflow that declares setup steps (tools, commands, environment) for the agent’s cloud environmentD. Setting environment variables only in the GitHub UI while ignoring any repository configuration files
Correct Answer(s): C
Explanation:
Copilot coding agent runs in its own ephemeral environment powered by GitHub Actions, separate from your laptop. You customize that environment by adding a
.github/workflows/copilot-setup-steps.ymlworkflow that installs languages, packages, and tools, and runs any required setup commands so the agent can build and test your project reliably before proposing a pull request.Tips and Tricks:
copilot-setup-steps.ymlto preinstall runtimes, package managers, and test tools the agent needs.Important
If a question asks how to make agent tasks faster and more reliable, the key is to pre-install dependencies with
copilot-setup-steps.ymlin.github/workflows, not to tweak your local machine.Correct and Wrong:
The correct option is the only one that matches GitHub’s documented approach of using a repository-level workflow named
copilot-setup-steps.ymlto configure the agent’s environment. The other options incorrectly focus on local config files, personal environments, or UI-only settings, none of which are how the agent actually prepares its GitHub Actions–powered environment.Source:
Customizing the development environment for GitHub Copilot coding agent (GitHub Docs)
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
Custom setup steps are more reliable and easier to debug (GitHub Blog)
Question: [235]
Which scenario is most appropriate for assigning work to Copilot coding agent?
Options:
A. Directly rotating production database credentials and applying schema changes live in production without going through a branch or pull request
B. Implementing a feature from a well-defined issue (with acceptance criteria), where the agent can work in a branch and open a PR
C. Manually hotfixing a live outage in production using ad-hoc shell access and one-off commands
D. Automatically managing enterprise SSO configuration and audit log settings without human involvement
Correct Answer(s): B
Explanation:
GitHub’s best-practices docs emphasize that Copilot coding agent is suited to well-scoped, code-centric tasks driven through branches and pull requests, such as feature work, bug fixes, UI updates, or test improvements. Sensitive production activities like incidents, credential rotation, or identity management should remain under human-run procedures and are explicitly called out as not appropriate to assign to the agent.
Tips and Tricks:
Important
Coding agent is a development assistant, not an SRE or security engineer use it for reviewable code changes, not for making direct production or security configuration changes.
Correct and Wrong:
Option B is correct because it describes a branch-and-PR workflow with a clear issue and acceptance criteria, matching GitHub’s recommended pattern. The other options are all production- or security-critical operations that GitHub explicitly advises against assigning to the agent.
Source:
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
Piloting GitHub Copilot coding agent in your organization (GitHub Docs)
Responsible use of GitHub Copilot coding agent on GitHub.com (GitHub Docs)
Question: [236]
Which task is most appropriate to assign to GitHub Copilot coding agent in Agent mode?
Options:
A. Designing an entirely new mission-critical payments architecture from scratch, with no existing codebase, tests, or clear acceptance criteria
B. Taking over an active production incident involving PII exposure and making security tradeoffs autonomously in real time
C. Updating a UI component library across the repo to use a new button component, running tests in the agent’s environment, and opening a PR with changes
D. Rewriting all pricing-related business logic based only on a vague one-line description with no tests or documentation
Correct Answer(s): C
Explanation:
GitHub’s guidance is to give the coding agent contained, well-described tasks such as UI updates, targeted bug fixes, test improvements, documentation updates, and technical-debt clean-up. These tasks are non-critical, have clear acceptance criteria, and are validated through tests and code review via PRs. In contrast, designing new critical architectures, handling live incidents, or rewriting entire subsystems with vague requirements are explicitly poor fits for Agent mode.
Tips and Tricks:
Important
“Well-scoped, non-critical task that ends in a PR” is the mental template for good coding-agent work; anything involving incidents, PII, or major architectural decisions should stay human-led.
Correct and Wrong:
Option C matches GitHub’s recommended use cases repository-wide but bounded updates with tests and a PR. The other options all describe high-risk or under-specified work (greenfield architecture, live security incidents, or large rewrites with vague requirements) that GitHub explicitly discourages assigning to the coding agent.
Source:
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
Piloting GitHub Copilot coding agent in your organization (GitHub Docs)
Responsible use of GitHub Copilot coding agent on GitHub.com (GitHub Docs)
Question: [237]
How does Copilot coding agent typically operate on a task assigned from GitHub.com?
Options:
A. It edits files directly in your local IDE without ever creating a branch or PR
B. It connects to and runs directly inside your on-prem GHES instance
C. It initializes a cloud dev environment (GitHub Actions–powered), makes changes in a branch, and drafts a pull request for review
D. It automatically merges its changes to the default branch as soon as tests pass
Correct Answer(s): C
Explanation:
Copilot coding agent runs in an ephemeral cloud development environment powered by GitHub Actions. It clones your repository, prepares the environment, edits code in a separate branch, runs tools such as tests or linters, and then surfaces its work as a draft pull request for you to review and merge. It does not run directly inside your local IDE, and it does not bypass branch protections or auto-merge changes.
Tips and Tricks:
Important
For exam questions, remember the signature pattern for Copilot coding agent: cloud dev environment + branch + PR + human review. If you see that combination, it’s describing the coding agent, not inline suggestions or simple Chat answers.
Correct and Wrong:
The correct option is the only one that matches GitHub’s description of the coding agent: it works in a GitHub Actions–powered ephemeral environment, pushes changes to a branch, and opens a PR for review. The other options incorrectly claim that it edits only locally, runs on GHES, or automatically merges to the default branch, all of which contradict the documented behavior.
Source:
About GitHub Copilot coding agent (GitHub Docs)
Customizing the development environment for GitHub Copilot coding agent (GitHub Docs)
Copilot coding agent: custom setup steps are more reliable and easier to debug (GitHub Blog)
Question: [238]
Which responsibilities remain with developers/teams when using Copilot coding agent? (Choose all that apply.)
Options:
A. Reviewing and approving the pull request before merge
B. Ensuring tests, linters, and security scans pass for the changes
C. Allowing the agent to merge directly to production without any human review
D. Defining safe, well-scoped tasks or issues for the agent to work on
Correct Answer(s): A, B, D
Explanation:
Copilot coding agent is an assistive developer, not an autonomous release system. Teams must still define well-scoped tasks, review the resulting pull requests, and verify that tests, linters, and security checks pass before merging. The agent does not replace human judgment, branch protections, or CI requirements; it only accelerates the implementation work.
Tips and Tricks:
Important
Coding agent can plan, edit, and propose, but humans own what ships. Reviews, tests, and security checks remain mandatory even when the agent drafts the PR for you.
Correct and Wrong:
Options A, B, and D are correct because they describe ongoing human responsibilities: scoping the task, reviewing the PR, and ensuring quality and security checks pass. Option C is wrong because GitHub explicitly expects teams to keep normal PR review and CI gates in place; the agent does not merge directly to production.
Source:
About GitHub Copilot coding agent (GitHub Docs)
Piloting GitHub Copilot coding agent in your organization (GitHub Docs)
Responsible use of GitHub Copilot coding agent on GitHub.com (GitHub Docs)
Question: [239]
How do you customize the environment that Copilot coding agent uses when working on a repository?
Options:
A. By editing a
.copilot-env.jsonfile in your local home directoryB. By modifying your local dev container; the agent automatically mirrors it in the cloud
C. By adding a
copilot-setup-steps.yamlfile that declares setup steps (tools, commands, environment) for the agent’s cloud environmentD. By setting environment variables only in the GitHub UI; repository workflow files are ignored
Correct Answer(s): C
Explanation:
To prepare the coding agent’s environment, you add a
copilot-setup-steps.yamlconfiguration that tells the agent how to set up its GitHub Actions–powered environment. This setup file is used to install tools, languages, dependencies, and perform any necessary initialization so the agent can reliably build and test your project before proposing a PR.Tips and Tricks:
copilot-setup-steps.yamlas the agent’s setup script: install runtimes, package managers, CLIs, and other tools it needs.Important
The coding agent runs in its own GitHub-hosted environment, not your laptop if you don’t declare setup steps, it may struggle to build and test your project consistently.
Correct and Wrong:
Option C is correct because it’s the only answer that matches GitHub’s documented mechanism for configuring the coding agent environment: a copilot-setup-steps configuration that defines setup steps for the agent. The other options invent mechanisms that are not supported, such as home-directory JSON, automatic reuse of local dev containers, or UI-only environment variables ignoring repository configuration.
Source:
Customizing the development environment for GitHub Copilot coding agent (GitHub Docs)
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
Question: [240]
Which scenario is most appropriate for assigning work to Copilot coding agent?
Options:
A. Rotating live production database credentials and applying schema changes directly in production
B. Implementing a feature from a well-defined issue (with acceptance criteria), where the agent can work in a branch and open a PR
C. Manually hotfixing a live outage in production over shell access
D. Automating enterprise SSO, audit log configuration, and other security admin tasks
Correct Answer(s): B
Explanation:
Copilot coding agent is designed for code-centric tasks that can be executed safely via branches and pull requests, such as implementing a feature described in a well-scoped issue with clear acceptance criteria. High-risk operational tasks like production credential rotation, live outage handling, or SSO/audit configuration must remain under human-run procedures and specialized admin tooling, not delegated to the agent.
Tips and Tricks:
Important
If a scenario mixes the coding agent with live production incidents, secrets, or identity/security configuration, the safe exam answer is: keep that work human-led and use the agent only for low-risk, testable code changes.
Correct and Wrong:
Option B is correct because it describes a well-scoped feature implemented through a branch and PR, fully aligned with GitHub’s recommendations. The other options attempt to offload production operations or security administration to the agent, which GitHub explicitly warns against for safety, compliance, and governance reasons.
Source:
Best practices for using GitHub Copilot to work on tasks (GitHub Docs)
About GitHub Copilot coding agent (GitHub Docs)
Beta Was this translation helpful? Give feedback.
All reactions