A full GitHub Certified: Agentic AI Developer mock exam: 60 questions in 120 minutes, scored against the real exam's pass mark. Your first one is free.
Think first How do you hand a task to an agent so its result is safe to merge and actually solves the problem?
Why it matters: Questions describe an agent task and ask which steps, inputs, success criteria or mitigations fit it.
An agent joins your workflow as a participant; it does not replace it. You define each task by its inputs, outputs and success criteria. The agent works on a branch and opens a pull request, which waits for review and validation before it merges.
Reported, thanks
Step 2 of 11
Term
Meaning
Agent
A system that uses tools to produce branches, commits and pull requests, and iterates on checks, reviews and scans.
Task contract
The definition of an agent task: what it needs (inputs), what it produces (outputs) and how results are judged.
Required check
A CI workflow set through rulesets or branch protection that must pass before a pull request can merge.
Plan agent
A mode that researches with read-only tools and makes no code changes until you approve its plan.
Overreliance
Accepting incorrect or incomplete AI output, often because its mistakes are hard to spot.
Reported, thanks
Step 3 of 11
An agent is a participant in the workflow, not a replacement for it. An assistant is reactive: it waits for the user to choose the next step. An agent uses tools such as the GitHub API, CI workflows or repository writes. It produces lasting results like branches, commits and pull requests, then iterates on feedback.
Reported, thanks
Step 4 of 11
Agent work moves through a branch and a pull request. The agent commits its proposed changes to a branch and opens a pull request. It then waits for review and validation before any merge. Assigning an issue to Copilot always creates a pull request. To ask for a fix, mention @copilot in a comment, and it pushes new commits to that same branch.
Exam trap Wrong: the agent merges its own work once it is done. Copilot has a default guardrail that stops it from merging pull requests, and rulesets can add more protections for target branches.
Reported, thanks
Step 5 of 11
Hand agents maintenance, feature and background work. Maintenance includes security fixes, dependency upgrades and targeted refactoring. Feature work includes incremental feature requests, extra test suites and new or updated docs. Agents can also run tests or fix backlog issues asynchronously, with less human help, and support ideation or post-release optimization.
Reported, thanks
Step 6 of 11
The plan agent researches first and changes no code until you approve. It uses read-only tools to find requirements and constraints. It splits the task into actionable steps and lists open questions about unclear requirements. Once the plan is ready, Start Implementation switches Copilot Chat to agent mode to build it.
Reported, thanks
Step 7 of 11
Clear, well-scoped inputs give the best agent results. An ideal issue has a clear problem statement, complete acceptance criteria and hints about which files to change. The Optional prompt field can add coding patterns, files to modify or testing requirements. Copilot reads the issue title, description and existing comments when you assign it.
Exam trap Wrong: add new details as a fresh comment on the issue. Copilot does not see issue comments posted after assignment, so put follow-up details on the pull request.
Reported, thanks
Step 8 of 11
Define every agent task by inputs, outputs and success criteria. In the example contract, the outputs are a structured plan in the pull request description and a bounded changeset on an agent branch. Evidence links point to the workflow run.
The three parts of an agent task
Feature
Inputs
Outputs
Success criteria
Answers
What the agent needs
What the agent produces
How results are evaluated
Examples
Issue context, constraints, boundaries
Plan, pull request, evidence
Checks, scans, review outcomes
Reported, thanks
Step 9 of 11
A required check lets the system enforce success. With the CI workflow set as a required check, the pull request cannot merge until it passes. Criteria should also confirm the real goal, such as "vulnerability resolved". Check that scope matches intent, with no unexpected files changed. Record a rollback or escalation path for higher-risk changes.
Exam trap Wrong: "tests passed" proves the task is done. Passing CI is necessary but not always enough; the criteria must reflect what the task was really meant to achieve.
Reported, thanks
Step 10 of 11
Watch for vague tasks, overreliance, broad access and needless computer use. The table pairs each one with a mitigation. Match the mitigation to the risk that a question describes.
Common agent anti-patterns and how to mitigate them
Anti-pattern
What goes wrong
Mitigation
Under-specified task
Plausible changes that miss the real problem, like a vulnerable version still reachable transitively
A well-scoped issue with complete acceptance criteria
Overreliance on AI
Incorrect or incomplete output is accepted because errors are hard to detect
Use Copilot code review to supplement human review
Broad access
A session gets more tools and permissions than the task needs
Scope each SDK session to the tools, agents and permissions required
Computer use when a direct tool exists
Less structured information and less predictable results
Use an API, MCP server, terminal command or filesystem tool
Exam trap Wrong: AI code review can replace human reviewers. Copilot code review should supplement human review, since mistakes in AI output can be hard to detect.
Reported, thanks
Step 11 of 11
An agent participates through branches and pull requests, and Copilot cannot merge its own pull requests.
Define each task by inputs, outputs and success criteria, and make the criteria reflect the real intent.
Make CI a required check so the system, not the agent, enforces success.
Fix vague tasks with a clear problem, complete acceptance criteria and hints about which files to change.
Give each session only the tools and permissions its task needs.
Think first How do you make sure an agent's plan is checked and approved before the agent is allowed to change anything?
Why it matters: Questions describe an agent task and ask how to separate planning from action, where the plan appears, or which gate stops execution.
Planning and action are separate stages with a deliberate handoff between them. The plan is an artifact a human can review. Tool limits and approval gates enforce the pause; written instructions only guide it.
Reported, thanks
Step 2 of 10
Term
Meaning
Plan-first
The agent opens a pull request holding only its plan, so a human validates it before code exists.
Tool gating
An orchestrator runs planning with no tool execution and enables tools only once the plan is accepted.
Safe outputs
The agent proposes actions, and a separate gated step decides which are allowed.
Protection rule
An environment check, such as required reviewers or a wait timer, that must pass before a job starts.
Actor rules
Rules that separate who can write code from who can trigger workflows.
Reported, thanks
Step 3 of 10
A planning agent should get read-only tools only. That way it cannot modify files while it plans. Execution should start only after the plan is approved, through an explicit handoff to an implementation agent. Plan mode in some interfaces produces a plan artifact and pauses before applying changes. In orchestrations, tool gating gives the same pause.
Exam trap Telling an agent "do not edit files" is not a control. Instructions are guidance; tool allowlists and gates are what enforce the boundary.
Reported, thanks
Step 4 of 10
Plans are written down; execution shows up as commits. A structured plan can sit in a pull request description, an issue comment or a pull_request_template.md artifact. Code changes appear as commits on a branch. Two pull request patterns follow from this. Use plan-first for high-risk work such as workflows, infra, auth or production.
Plan-first and plan-plus-execution pull requests compared
Feature
Option A: Plan-first
Option B: Plan + execution
What the pull request holds
Only the plan, no code changes yet
A structured plan in the description plus initial commits
When a human validates
Before any code is written
After code is generated, before merge
Reported, thanks
Step 5 of 10
Review rests on evidence: checks run and human approvals recorded. Workflows and checks show what evidence exists. Review comments and approvals show what people accepted or rejected. A plan can also set scope, such as changes allowed under src/ but not infra/ unless requested. Copilot in the cloud prepares changes for review but does not automatically create or merge the pull request.
Exam trap If approvals are required, your own approval of a Copilot pull request does not count. Another reviewer must approve before it can merge.
Reported, thanks
Step 6 of 10
Escalation lets a person step in when the agent is stuck or unsure. You can build it by requiring pull request review, assigning reviewers automatically or notifying maintainers from a workflow step. Note that by default, Actions workflows do not run on their own when Copilot pushes to a pull request.
Reported, thanks
Step 7 of 10
A job that uses an environment waits until every protection rule passes. Until then it cannot read the environment's secrets either. A waiting job shows the status "Waiting" and fails automatically after 30 days without approval. Once approved, and with other rules passed, it proceeds.
Settings that tighten an environment approval gate
Setting
What it does
Detail
Required reviewers
A reviewer must approve the job
Up to 6 people or teams; one approval is enough
Prevent self-review
Blocks approving a run you triggered
Optional
Allow administrators to bypass
Lets admins skip the rules
Deselect it to disallow bypassing
Exam trap On GitHub Free, Pro or Team plans, required reviewers and wait timers are available only for public repositories.
Reported, thanks
Step 8 of 10
Some environment setups quietly remove or break the gate. Custom protection rules are GitHub Apps that approve or reject jobs from the deployment_protection_rule webhook. They need a deployment object.
What happens to the gate in each situation
Situation
Effect on the job
Gate still applies?
deployment: false
Full access to secrets; no deployment object or history
Yes: wait timers and required reviewers
deployment: false with custom rules
Fails immediately with an error
Not applicable
Workflow names an environment that does not exist
A new environment is created
No rules or secrets, unless made by a page build
Environment is deleted
Its secrets and rules are deleted
Waiting jobs fail automatically
Reported, thanks
Step 9 of 10
Limit who and what can execute, not only what the agent plans. By default, anyone with write access can trigger workflows; actor rules separate contributing code from running CI. Follow least privilege for workflow permissions. Prefer GitHub Agentic Workflows over calling Copilot CLI in run steps, since they carry guardrails for automation. Require lockfile protection blocks targeted workflows not onboarded to the lockfile.
Reported, thanks
Step 10 of 10
Give the planning agent read-only tools and hand off to an implementation agent only after approval.
Plan-first puts human validation before any code; plan plus execution validates before merge.
Instructions are guidance; allowlists, tool gating and approval gates are enforcement.
An environment job waits for its protection rules and fails after 30 days without approval.
Think first How can an autonomous coding agent work freely while people can still see, steer, and stop what it does?
Why it matters: Questions describe an agent setup and ask which guardrail, log, hook, or human approval point controls it.
Let the agent work on its own inside fixed guardrails, make every action visible, and keep people at the merge and deploy gates. Copilot cloud agent pushes to its own branch, logs its reasoning, and needs a human to merge.
Reported, thanks
Step 2 of 11
Term
Meaning
Hook
Code that runs at set points while the agent works, enforcing a rule instead of asking the model to follow it.
Session log
What Copilot reasoned and which tools it ran to read, change, and validate code.
Steering
Sending a prompt while Copilot is working so it is folded into the current task.
copilot environment
The environment whose secrets and variables are the only ones passed to Copilot cloud agent.
Required reviewers
An environment setting that makes a workflow job wait until a person approves it.
Reported, thanks
Step 3 of 11
Copilot cloud agent can push to only one branch. On an existing pull request it writes to that pull request's branch; otherwise it gets a new copilot/ branch. It cannot push to the default branch or merge, and rulesets apply to it as to people. Only users with write access can start it.
Exam trap Comments from users without write access do not influence the agent. They are never shown to it at all.
Reported, thanks
Step 4 of 11
The agent sees only secrets placed in the copilot environment. Organization and repository Actions secrets stay hidden from it. GitHub-hosted runners give each session a fresh virtual machine; self-hosted setups should use ephemeral runners. A firewall blocks data exfiltration, and by default the agent scans its code for security issues and asks Copilot code review for a second opinion.
Exam trap The agent's security validation does not need a GitHub Advanced Security, Code Security, or Secret Protection license.
Reported, thanks
Step 5 of 11
Hooks run code at key points, so rules are enforced, not requested. Use them for linting, formatting, or security scans. Repository hooks live in .github/hooks/*.json; Copilot CLI also reads personal hooks from ~/.copilot/hooks/*.json. Hooks block the agent while they run, so aim for under 5 seconds. The cloud agent supports only some hook events.
The two main tool hooks compared
Feature
preToolUse
postToolUse
When it runs
Before the agent uses any tool, such as bash or edit
After a tool finishes, whether it worked or failed
Main use
Approve or deny the tool call
Log results and build audit trails
Reported, thanks
Step 6 of 11
Copilot CLI keeps file access inside the session's allowed paths. Going outside those paths needs extra permission. With assisted permissions, a request that still needs approval prompts you interactively but is denied in autopilot and other unattended runs. The computer-use plugin is off until a user enables it, explicit deny rules win, and unhandled requests fail closed.
Reported, thanks
Step 7 of 11
Each agent commit links back to the session that made it. Reviewers can trace any change back to the session that made it. Administrators also get session logs and audit log events.
Where to inspect what the agent did
Artifact
What it shows
Why it helps
Commit
Signed and Verified; authored by Copilot with the requesting developer as co-author
Shows who asked for the change
Commit message
A link to the agent session logs
Supports code review and auditing
Session log
Copilot's reasoning and the tools it used
Explains how the change was made and checked
Agents tab
All sessions, shared by default
Anyone with repository access can view them
Diff and copilot/ branch
The changes, alone or in context
Review before a pull request exists
Workflow run graph
Live progress of the run
Monitor and debug deployments
Reported, thanks
Step 8 of 11
A human must review and merge the agent's draft pull requests. Copilot cannot mark them ready for review, approve, or merge them. Workflows on its code wait until a write-access user clicks Approve and run workflows, unless you allow automatic runs. Protect Copilot and MCP configuration files with CODEOWNERS and the Require review from Code Owners rule.
Exam trap The person who asked the agent for a pull request cannot approve it. When approvals are already required, the agent's pull request also needs one more approval.
Reported, thanks
Step 9 of 11
Steering redirects a session without halting it. Copilot applies your input once its current tool call ends. Each steering message uses AI credits, and third-party coding agents cannot be steered. Stopping a session ends its Actions run but keeps commits already pushed. When you ask the cloud agent for a plan, review it and iterate until it matches your intent.
Steering and queuing a prompt in Copilot CLI
Feature
Steer
Queue
How to send
Enter; a plain prompt sent while Copilot thinks
Ctrl+Enter or Ctrl+Q
When it applies
Within the task in progress
After the current task finishes
Effect
Joins the task in progress
Runs as the next turn
Reported, thanks
Step 10 of 11
Environments with required reviewers pause risky jobs. A job aimed at such an environment waits for approval, so agent-triggered workflows cannot reach protected secrets or deploy alone. To avoid delays, let services like Datadog or ServiceNow approve automatically, and get app notifications when a deployment awaits approval. Concurrency can allow just 1 deployment at a time.
Reported, thanks
Step 11 of 11
Copilot cloud agent pushes to a single branch and cannot approve or merge its own pull requests.
A preToolUse hook can approve or deny tool use; a postToolUse hook can build audit trails.
Each agent commit links to its session logs, which show Copilot's reasoning and tools.
Steering applies after the current tool call; a queued prompt waits until the task finishes.
By default, workflows on agent code wait until a write-access user approves and runs them.
Each topic's Check tested it on its own; this mixes them.
Mixed quiz
Take the Domain 1 quiz
11 questions mixed from every topic in this domain, each answer explained. Mixing topics is harder than one at a time, and it is what the exam does. No account needed; with a free account your answers also build your estimated exam score.
Thank you. It goes straight to the people who write these notes.
Test yourself in exam conditions
A full GitHub Certified: Agentic AI Developer mock exam: 60 questions in 120 minutes, scored against the real exam's pass mark. Your first one is free.
Free to start: the study notes and plan, quizzes, flashcards and the first mock exam, no card needed. A free account keeps your place and saves your quiz scores.