Study Guide · GH-600

GH-600 Cheat Sheet

646 entries · 19 chapters · 6 domains

Prepare agent architecture and SDLC processes

Integrate agents into the software development lifecycle

Read full chapter
  • Start agent delegation with clear, bounded development changes.
  • Broad changes requiring deep domain context are candidates for developer-led work.
  • Sensitivity and production criticality affect whether work should be delegated.
  • Resolve open-ended requirements before treating an issue as an implementation task.
  • A developer's learning goal can justify retaining implementation work.
  • Use CLI delegation for independent cloud work while local development continues.
  • An assigned issue should specify the problem, acceptance criteria, and change scope.
  • Semantic code search can discover relevant files when exact paths are unknown.
  • Provide visual references when the expected agent output is a user-interface design.
  • Use a custom agent when a recurring workflow needs specialized behavior and tools.
  • In agent-assisted test-driven development, review the failing tests before requesting implementation.
  • Record repository-wide build and validation commands in .github/copilot-instructions.md.
  • Use path-specific instructions for validation requirements that apply only to selected files.
  • Keep agent instructions concise, actionable, and nonconflicting.
  • Preinstall known dependencies instead of relying on agent trial-and-error setup.
  • Agent-side validation requires an operational development environment, not just generated source code.
  • Convert bulk migration findings into a checked-off work list.
  • Submit a batched review when several comments must guide the same agent iteration.
  • Only a user with repository write access can drive an agent revision through @copilot.
  • Human developers can contribute fixes directly to an agent's feature branch.
  • Merge-conflict resolution can be requested as follow-up work on an agent pull request.
  • Repository research and branch iteration can precede pull-request creation.
  • Specify the reviewable outputs before delegating implementation.
  • Task success requires the intended outcome and authorized scope as well as passing checks.
  • Choose a plan-first pull request when approval must precede implementation.
  • Use a pull-request template to standardize the plan and evidence reviewers see.
  • Pass small workflow values through step and job outputs rather than logs or environment variables.
  • Condition pull-request-dependent agent jobs on the triggering event in multi-trigger workflows.
  • Route follow-up changes to the existing agent pull request with an @copilot comment

Unlock with Premium — includes all practice exams and the complete study guide.

Separate planning and reasoning from agent action

Read full chapter
  • Give a planning-only agent read-only tools rather than implementation capabilities.
  • Define the structured planning deliverable in the custom agent's Markdown body.
  • Prevent automatic subagent invocation without hiding the agent from human selection.
  • An empty agents list stops a custom agent from starting subagents.
  • Use /plan or plan mode to request planning before implementation.
  • Copilot CLI stores its structured implementation checklist in the session's plan.md.
  • Inspect and edit the CLI plan before authorizing implementation.
  • The CLI plan workflow waits for approval before implementing.
  • Plan-then-autopilot is unsuitable when a human must approve the planning-to-action transition.
  • Validate the VS Code Plan agent's implementation and verification steps against the requirements.
  • The VS Code Plan agent's automatic plan save is session memory, not a durable repository document.
  • Use a non-sending handoff when the developer must inspect the implementation prompt.
  • Hand off a finalized plan through Start Implementation, carrying the conversation context.
  • Configure planning and implementation model defaults independently in VS Code.
  • Use assessment.md to review the upgrade's diagnosed compatibility problems and scope.
  • Review upgrade-options.md for the confirmed decisions that planning should implement.
  • The upgrade plan converts assessment findings and confirmed options into an implementation specification.
  • Validate project interdependencies before removing work from an upgrade plan.
  • The execution-stage task list pairs concrete changes with success checks.
  • Use guided upgrade mode when each stage requires review before the next stage starts.
  • Set upgrade targets and execution policy before the staged workflow begins.
  • Choose upgrade order according to dependency depth and feedback needs.
  • Unresolved upgrade problems require intervention rather than an assumed successful stage.

Unlock with Premium — includes all practice exams and the complete study guide.

Configure observability and control for autonomous agents

Read full chapter
  • Preapprove specific routine tools to reduce interruptions without granting every capability.
  • Use --deny-tool for operations that must be rejected rather than offered for approval.
  • Tool visibility and permission to run a tool are different CLI controls.
  • The CLI's allow-all shortcut expands more than shell-command approval.
  • Reset session approvals when previously trusted work should require renewed permission.
  • Autopilot changes task continuation rather than merely producing a plan.
  • Set an explicit continuation cap when autonomous work must have a bounded continuation budget.
  • An administrator policy can prevent users from enabling --allow-all.
  • Queue follow-up guidance when it should run after the current CLI task finishes.
  • Inspect tool arguments in preToolUse to deny dangerous calls before they execute.
  • A cloud-agent preToolUse ask decision is treated as a denial.
  • Any preToolUse denial blocks the call when several hooks run.
  • A failed command hook and a timed-out command hook have different enforcement behavior.
  • Do not assume an unavailable HTTP policy hook will deny a tool call.
  • Machine-wide CLI policy hooks are not disabled by ordinary disableAllHooks settings.
  • Use postToolUse for inspection or processing after a successful tool call.
  • Use errorOccurred for error-specific notification rather than general session completion.
  • Export cloud-agent hook output that must survive the sandbox.
  • Use preToolUse rather than permissionRequest for cloud-agent policy decisions.
  • Protect sensitive configuration with CODEOWNERS and required code-owner review together.
  • Repository rulesets and required checks still govern agent contributions.
  • Workflow execution approval is a separate checkpoint from accepting an agent pull request.
  • The person who requested a cloud-agent pull request cannot provide its approval.
  • Separate agent-accessible secrets from secrets reserved for Actions workflows.
  • Use workflow artifacts for files that reviewers and later jobs must inspect.
  • Order dependent jobs explicitly before they consume an agent's artifacts.
  • Select the files included in an artifact instead of uploading an undifferentiated workspace.
  • Per-artifact retention must fit the repository, organization, or enterprise limit.
  • Use an artifact name to retrieve a particular review package.
  • Identify and authorize retrieval when review evidence comes from another workflow run.
  • Publish revised evidence as a distinct artifact when using immutable v4 artifacts.
  • Artifact digest validation reports a mismatch as a warning rather than proving review success.
  • A Verified agent commit is a provenance signal, not an acceptance result.
  • Export a CLI session to a file when reviewers need a portable session record.
  • Configure CLI log destination and verbosity with separate options.
  • Treat full-content telemetry capture as an explicit sensitive-data decision.
  • Use structured task metadata to build an agent-status inspection view.
  • Attach a protected environment to the workflow job whose execution needs approval.
  • An environment's required-reviewer list permits approval by one listed reviewer.
  • Enable Prevent self-review when the workflow initiator must not approve the run.
  • Disable administrator bypass when environment protections must apply without that exception.
  • A wait timer supplies a delay, not a human approval decision.
  • Configure deployment branch and tag patterns for the intended ref type.
  • A workflow reference to a new environment does not copy an existing approval policy.
  • Deleting an environment fails jobs waiting on its protection rules.
  • Environment-bound workflow jobs expose deployment objects and status transitions.
  • Make plan checks required without mistaking artifact presence for plan approval.
  • Identify both the producing workflow run and the code state for review evidence.
  • Control runtime capabilities separately from repository acceptance.
  • Steer an active cloud-agent session without stopping the run.

Unlock with Premium — includes all practice exams and the complete study guide.

Perform evaluation, error analysis, and tuning

Define agent success criteria and evaluation signals

Read full chapter
  • A well-scoped agent task states the problem, acceptance criteria, and intended file scope
  • Research and planning tasks need not produce a pull request to succeed
  • Broad, ambiguous, deep business-logic, and production-critical tasks require more cautious delegation
  • Completing cloud-agent work is separate from human approval and merging
  • A testing agent can be evaluated on test quality as well as the existence of tests
  • Generating tests and executing tests provide different evidence
  • Requested test types and edge cases determine the validation scope
  • Repository validation can require several different checks
  • Coverage reports provide a distinct inspection surface for test coverage
  • The CLI diff command exposes the actual change set for review
  • The CLI review command requests agent analysis of the changes
  • CodeQL findings identify security issues in agent-generated code
  • Dependency analysis checks newly introduced packages for specified advisory risks
  • Secret scanning detects sensitive credentials in generated code
  • Copilot code review provides a second opinion on the agent's code
  • Tool-call counts can be separated by tool and success outcome
  • Tool latency and model or agent duration use different runtime metrics
  • Token-use signals distinguish input consumption from generated output
  • MCP connection outcomes are distinct from tool execution outcomes
  • A reported check becomes an enforced merge gate only when it is required
  • Repository dependency review supplies a separate acceptance signal for agent changes
  • Push protection can reject secret-bearing changes before they reach the repository
  • Browser interaction evidence verifies rendered behavior beyond source inspection
  • Interactive browser verification does not replace repeatable repository tests

Unlock with Premium — includes all practice exams and the complete study guide.

Analyze agent failures and identify their root causes

Read full chapter
  • The session log records the cloud agent's security analysis and actions
  • View session reveals live agent activity behind an apparently idle pull request
  • The GitHub CLI can stream a selected agent-task session log
  • The CLI diagnose command analyzes the current session log
  • Upgrade tasks.md records live execution progress and validation criteria
  • Upgrade assessment.md records the analysis that precedes execution
  • Upgrade plan.md and upgrade-options.md answer different planning questions
  • Per-task upgrade records distinguish scope from execution details
  • Failed-step logs isolate workflow failure evidence
  • Run-attempt selection prevents confusion between original and retried execution
  • Workflow run metadata identifies the revision that produced a result
  • Diagnostic artifact retention cannot exceed the enclosing retention limit
  • Artifact digest validation can flag changed diagnostic evidence
  • Retrieving artifacts from another run requires explicit run identity and authorization
  • UNKNOWN STEP can reflect a log-association limitation rather than agent behavior
  • Reasoning errors are diagnosed against the inputs the agent actually received
  • Tool inputs and outputs distinguish tool misuse from a valid call that failed
  • The raw context reveals whether expected repository files reached the model
  • The system prompt reveals which agent instructions were actually supplied
  • A tool that was not invoked may be absent from the model's available tools
  • An MCP error result and a protocol error are different reporting channels
  • A declared MCP output schema provides a contract for checking returned structured data
  • A cloud-agent firewall warning identifies a network-policy configuration gate
  • Missing CI execution can be the expected workflow-approval gate
  • A reviewer's write access determines whether cloud-agent feedback is delivered
  • Closed or merged pull requests do not accept new cloud-agent follow-up work
  • An Actions secret does not make a credential available to a cloud-agent session
  • The errorOccurred payload reports where a runtime error occurred
  • Comparing documented intent with produced changes locates the failure point
  • Stale or contradictory task records require context reconciliation
  • Workflow events and branch filters must match the intended validation activity
  • Content-exclusion policy can intentionally remove expected CLI or app context
  • Behavior redirected by untrusted instructions warrants a prompt-injection diagnosis

Unlock with Premium — includes all practice exams and the complete study guide.

Tune agent behavior from evaluation results

Read full chapter
  • Repository-wide instructions make recurring validation guidance reusable
  • Path-specific instructions constrain guidance to the files that need it
  • A custom agent's Markdown prompt defines its specialized behavior
  • The lowest-level matching custom-agent profile takes precedence
  • An existing custom-agent pull request retains its selected profile version
  • Batching review feedback lets Copilot address the whole review together
  • Preinstalling dependencies reduces trial-and-error environment setup
  • Required code-owner review protects critical agent configuration changes
  • Compaction checkpoints let reviewers inspect what survived summarization
  • A fresh conversation is appropriate when old context is no longer useful
  • Large tool-output spilling trades immediate detail for context capacity
  • Explicit context references supply the particular material an agent needs
  • The instructions command provides direct control over loaded instruction sources
  • Repository owners can curate persistent facts directly
  • Personal preferences and repository facts have different memory scopes
  • Copilot code review uses repository facts rather than personal preference memory
  • Repository-fact creation depends on the initiating user's access and memory setting
  • Enable one MCP tool, not a whole server, when a narrow capability suffices
  • Unrecognized custom-agent tool names are ignored rather than resolved by intent
  • Shell-based validation requires the execute capability rather than only file editing
  • Repository MCP settings are processed after custom-agent MCP settings
  • CLI deny rules take precedence over tool allows
  • CLI MCP permission patterns can authorize an individual tool
  • An individual MCP server can be disabled without disabling every server
  • Actionable tool-execution errors support corrected retries
  • A preToolUse hook can reject a risky tool invocation before it executes
  • An agentStop hook can require another turn before completion
  • An agentStop hook should detect when it already forced continuation
  • A command-hook crash and a timeout do not enforce the same outcome
  • HTTP preToolUse service failures fall through rather than reliably blocking calls
  • Native hook matcher regular expressions match the whole target value
  • A tuning intervention needs a new validation result linked to the change
  • Always-loaded instructions should prioritize information the agent cannot infer
  • Decomposing a broad request into verifiable steps makes failures easier to catch early

Unlock with Premium — includes all practice exams and the complete study guide.

Implement guardrails and accountability

Define autonomy levels for agent tasks

Read full chapter
  • Sensitive and production-critical tasks warrant human ownership
  • Context-heavy design work needs more human involvement
  • Resolve ambiguous requirements before granting execution autonomy
  • Local execution can still cause remote irreversible effects
  • Read-only work can still disclose sensitive context
  • Generated code remains a draft requiring human judgment
  • Repeated low-value confirmations can weaken oversight
  • Plan mode protects project files while allowing planning notes
  • Plan mode is not an absolute side-effect sandbox
  • Copilot CLI --autopilot continues work until the task is completed
  • Bound autonomous continuation with an explicit limit
  • Copilot CLI --allow-all grants tools, paths, and URLs, not tools alone
  • Choose how long an approval persists to match how long you mean to trust
  • Resetting permissions clears saved tool approvals for the current location
  • Plan-then-autopilot intentionally removes the planning approval checkpoint
  • Manual permissions preserves configured fine-grained approval rules
  • VS Code Allow all removes permission dialogs but keeps clarifying questions
  • VS Code Agent Host Autopilot auto-approves, iterates, and answers questions itself
  • Session permission levels have a smaller scope than global auto-approval
  • Enterprise cloud-agent restrictions form a baseline for organizations
  • Private MCP registry policy does not govern cloud-agent access
  • A VS Code policy can remove the broad auto-approval levels
  • Enforce human approval for selected tools without disabling all agents
  • Managed CLI policy can prohibit permission-bypass options
  • Human selection and automatic custom-agent selection are independent controls
  • Use the agent-mode policy when the authorized autonomy level is none
  • File edits can trigger side effects before source-control integration
  • A bring-your-own-key model does not guarantee Responsible AI output filtering
  • Sandbox enablement does not prohibit every permission-relaxing retry
  • Organization firewall settings decide whether repositories can widen outbound access
  • Block extension-contributed tools without removing built-in or MCP capabilities
  • Resolve effective managed policy per key rather than merging competing policy values
  • Gate AI activation on approved organization membership and resolved account policy

Unlock with Premium — includes all practice exams and the complete study guide.

Implement guardrails and human-in-the-loop workflows

Read full chapter
  • Hidden issue or comment text is filtered before reaching the cloud agent.
  • Only repository writers can direct cloud-agent work by hand
  • Cloud-agent write authority is scoped to its working branch
  • Cloud-agent pull requests retain a human merge boundary
  • Delegating a pull request does not evade separation of duties
  • Unattributed cloud-agent pull requests can require an additional approval
  • Approving workflow execution is separate from approving a merge
  • Combine CODEOWNERS with required owner review for sensitive configuration
  • An explicit tools list narrows custom-agent capabilities
  • Select an individual MCP tool rather than an entire server
  • The execute tool alias grants command execution
  • Subagent delegation is itself a capability to scope
  • The built-in GitHub MCP server does not imply enterprise-wide authority
  • The built-in Playwright MCP server is scoped to localhost
  • Use the secret store that matches the intended trust boundary
  • Setup-workflow token permissions and cloud-session credentials are separate
  • Use fresh execution environments for cloud-agent work
  • Organization runner policy can constrain cloud-agent execution placement
  • Keep sensitive MCP inputs in the secure credentials store
  • Explicit CLI denials take precedence over broad permissions
  • CLI MCP permission patterns can target one tool
  • A path-scoped write denial leaves unrelated writes available
  • Match a permission rule to the capability being constrained
  • Read-looking commands can become dangerous through environment overrides
  • Use preToolUse for policy enforcement before a tool runs
  • An ask decision requires an interactive approval path
  • Leave routine actions to normal permissions when policy does not match
  • Any preToolUse denial blocks the tool across matching hooks
  • Policy hooks cannot be disabled by ordinary hook opt-out
  • Use the hook event supported by the execution surface
  • Command-hook errors fail closed for preToolUse
  • A timed-out hook falls through to normal permission processing
  • HTTP hook failures do not automatically deny a tool call
  • Emit one parseable final decision object from a hook
  • Configuration validity determines whether your hook files load at all
  • Enabling a tool does not approve its execution
  • Review the exact tool inputs at the approval boundary
  • A false terminal auto-approval rule requests review rather than forbidding execution
  • Automatic terminal approval must cover every subcommand
  • Protect sensitive files before edits are applied
  • Manage individual grants instead of resetting all trusted operations unnecessarily
  • An environment gate applies to jobs that target that environment
  • Protected environment secrets are released only after the gate passes
  • Restrict which branches and tags are eligible to deploy
  • Automate validation and gate the consequential promotion step
  • Define the evidence a deployment reviewer must evaluate
  • Review an untrusted workspace before enabling its agents
  • Changed MCP configuration requires renewed trust
  • Trusted Domains does not approve incoming user-generated content
  • Pre-approve a trusted endpoint without automatically trusting its responses
  • Network-domain denials take precedence over allowed domains
  • Allowing a domain does not restrict the operations performed there
  • Cloud-agent internet restrictions reduce information-leakage exposure
  • Verified agent commits establish provenance rather than technical correctness
  • Use the session evidence linked from an agent-authored commit
  • Treat full telemetry content capture as a data-disclosure decision
  • Require security results through repository rules rather than agent discretion
  • Permission-deciding HTTP hooks require encrypted transport
  • The location of disableAllHooks determines which hooks it disables
  • Best-effort command parsing cannot enforce complete terminal isolation
  • Grant external reference-folder access without granting external writes
  • Copilot CLI web_fetch accepts web protocols rather than local-file URLs
  • A hostname does not bypass web_fetch private-address protections
  • Redirects are revalidated rather than inheriting unrestricted trust
  • Terminal sandbox restrictions follow child processes, not built-in file tools
  • Confine a local MCP server with explicit filesystem and network grants
  • Do not treat an untrusted MCP tool's behavior description as authorization
  • Match cloud-agent firewall protection to the process launch path
  • Use a URL allowlist rule when only one dependency path needs access
  • Apply content exclusion policies to sensitive-file context in Copilot app and CLI
  • Configure required reviewers and prevent self-review for independent deployment approval
  • Disallow administrator bypass when deployment protection must remain mandatory
  • Enforce the telemetry destination and lock content-capture policy centrally
  • Reassess tool permissions before accepting automation events from users without write access

Unlock with Premium — includes all practice exams and the complete study guide.

Manage memory, state, and execution

Implement agent memory strategies

Read full chapter
  • The active context window provides short-term conversational memory
  • Use /context to identify what consumes the active context budget
  • Large tool results can be kept outside the active context as file-backed previews
  • Raising the large-output threshold leaves less context for subsequent work
  • Attach the specific file or GitHub work item needed for the current decision
  • Use independent conversations for unrelated tasks
  • Keep custom instructions concise and actionable
  • Choose repository facts or personal preferences according to who should reuse them
  • Creating Copilot Memory repository facts requires an enabled user with write access
  • Enable Copilot Memory for the user rather than for an individual repository
  • Select the VS Code memory path according to lifetime and workspace scope
  • Local VS Code memory is not a repository-distributed collaboration artifact
  • Do not rely on a VS Code Plan agent's plan in session notes in a later conversation
  • Unused Copilot memories expire rather than persisting indefinitely
  • Use the appropriate owner to remove persistent Copilot memories
  • Prune an outdated VS Code memory by asking the agent to update its file
  • Clear All Memory Files resets all VS Code memory scopes
  • Use /clear or /new for a fresh conversation rather than a continuity-preserving summary
  • Archive a completed conversation when it must remain recoverable
  • Set state-artifact retention within the enclosing retention limit
  • Use a Copilot Space for reusable external project context
  • Use a Space's custom instructions to specialize responses to its workflow
  • Attach GitHub sources directly when reusable context must track repository changes
  • Share a Copilot Space to give teammates the same selected project context
  • Use the remote GitHub MCP server to access Spaces from an IDE
  • Explicitly attach task-critical sources instead of relying on editor activity
  • Treat workspace indexing as selective discovery rather than full-repository context
  • Enable the memory tool and explicitly request a reusable note when persistence matters
  • Prioritize reusable guidance within the automatically loaded portion of user memory
  • Sharing a Space does not grant access to its restricted sources
  • Choose Space sources that the IDE integration supports
  • Enable the Spaces toolset and use Agent mode before requesting IDE Space context
  • Delete retained cloud history explicitly and choose whether to preserve the local copy
  • Moving a task to another repository leaves its learned repository facts behind
  • Treat Copilot Memory as a renewable convenience, not a permanent record

Unlock with Premium — includes all practice exams and the complete study guide.

Persist agent state and manage context drift

Read full chapter
  • Read assessment.md for the analyzed upgrade scope and compatibility findings
  • Read upgrade-options.md to recover confirmed upgrade decisions
  • Read plan.md for the upgrade specification derived from the assessment and approved options
  • Read tasks.md for individual upgrade-step status and validation progress
  • Use scenario-instructions.md for persistent scenario-specific agent memory
  • Use the per-task task.md file to recover a task's scope and context
  • Read progress-details.md for a task's detailed execution notes and results
  • Choose explicitly whether to continue an existing upgrade scenario or start fresh
  • Update generated upgrade artifacts before advancing when the intended work changes
  • Use events.jsonl for the full saved CLI session history
  • Use workspace.yaml for session metadata rather than the session history
  • Recover the CLI implementation plan from its session plan.md artifact
  • Use session files for working artifacts that should not be repository content
  • Maintain a file-backed checklist as each migration issue is resolved
  • Compaction creates saved checkpoints that can be inspected individually
  • Compact a continuing CLI task to preserve essential progress in less context
  • Do not treat a compaction summary as a lossless record
  • Provide focus instructions when a compaction summary must emphasize a particular decision
  • Inspect compaction checkpoints when the agent diverges from earlier decisions
  • Use the conversation-summary setting to control automatic VS Code compaction
  • A CLI compaction checkpoint is not an undo control for completed compaction
  • Redirect an off-course agent with corrected context and verify the resulting changes
  • Resuming restores a saved CLI session's work context instead of an empty conversation
  • Account for working-directory selection when automatically continuing a CLI session
  • Fork a CLI session to explore an alternative without replacing the original conversation
  • Choose whether a CLI rewind should restore files as well as conversation state
  • Editing an earlier VS Code request reverts its changes and later changes before resubmission
  • Use Git rather than temporary VS Code chat checkpoints for permanent version history
  • Rebuild focused context in a fresh chat from a saved and reviewed implementation plan
  • Continue a task in its saved CLI session, not in an unrelated one

Unlock with Premium — includes all practice exams and the complete study guide.

Maintain agent memory and state across tools and environments

Read full chapter
  • Upload and download artifacts to pass agent state files between jobs
  • Order artifact consumers after the producing job with needs
  • Use upload paths and exclusions to bound a state handoff
  • Download a named artifact when a consumer needs one specific state package
  • Set the artifact download path when the consuming tool expects a specific directory
  • Account for per-artifact directories when downloading every artifact in a run
  • Provide authorization and run identity when retrieving state from another workflow run
  • Publish transformed state as a separate immutable artifact
  • Treat an artifact digest warning as an integrity discrepancy, not proof of a valid handoff
  • Reuse repository memories only after checking their evidence against the current branch
  • On Business and Enterprise plans, only the current active billing entity's preferences are retrieved
  • User preferences are checked for continued applicability rather than validated as code facts
  • Read expires_at to determine when a saved state artifact is scheduled for deletion
  • A retained artifact can still be manually deleted before its expiration date
  • Deleting a workflow run also deletes the artifacts that carry its agent state
  • Repository read access is sufficient for an authenticated reviewer to download state artifacts
  • Commit the upgrade state folder so the branch carries it across environments
  • Export a CLI session to a file for an explicit context handoff
  • Export a VS Code chat session as JSON to preserve its prompts and responses
  • Use external-session discovery to continue supported local CLI work in VS Code
  • Separate conversation history does not imply separate working files
  • Submit related review comments together so Copilot processes coherent feedback
  • Use applyTo to keep file-specific rules from becoming repository-wide context
  • Use root AGENTS.md for a common instruction set across compatible coding agents
  • Resolve conflicting instruction files rather than relying on file-loading order
  • Inspect instruction references and diagnostics when expected context is missing
  • Use /instructions to inspect and toggle the CLI's active instruction files
  • Account for feature-specific memory consumption when moving between CLI and code review
  • Reference reusable instruction files to reduce divergent copies of the same rules
  • Review shared guidance as the codebase changes and remove obsolete instructions
  • Use native handoff to carry conversation context while changing the execution target
  • Check sync settings and policy before expecting session history on another device
  • Explicit session sharing gives repository collaborators visibility rather than control

Unlock with Premium — includes all practice exams and the complete study guide.

Orchestrate multi-agent coordination

Operate and manage multi-agent workflows

Read full chapter
  • A coordinator delegates focused subtasks and integrates worker results
  • Independent review perspectives can run in parallel before synthesis
  • A coordinator must have the agent tool available to invoke subagents
  • An explicit agents list limits which workers a VS Code coordinator may select
  • A stateless subagent invocation needs its relevant context and expected output up front
  • Recursive delegation requires enabling subagent-to-subagent invocation
  • A custom worker can override the configuration inherited by ordinary subagents
  • An explicit invocation model outranks the custom agent and parent models
  • Subagents receive isolated context rather than the parent's full conversation
  • Use separate worktree-isolated sessions for tasks that must not edit the same working files
  • Worktree isolation separates code changes but does not restrict commands or networking
  • A new worktree starts from committed state rather than unsaved task dependencies
  • Ignored dependencies need explicit inclusion in new VS Code worktrees
  • Independent conversations do not necessarily have independent working files
  • A cloud worker uses cloud-configured resources rather than the local editor environment
  • A handoff continues the task with a different agent configuration and retained context
  • The handoff send property controls whether selecting the handoff immediately submits its prompt
  • A handoff's agent field selects the target agent while label names the button
  • IDE handoff frontmatter does not orchestrate Copilot cloud agent on GitHub.com
  • Dependent agent jobs must wait for the producer before consuming its artifacts
  • Agent Host cross-session messaging requires confirmation and cannot target its own chat
  • Overlapping agent edits can require explicit merge-conflict resolution
  • The three-way merge editor lets a reviewer construct the reconciled result
  • Accept Both Changes retains both conflicting versions rather than deciding their semantics
  • Architectural review can catch duplicated work before implementation
  • Contradictory outputs require comparison rather than an assumed consensus
  • Validate the integrated branch before disposing of a worker session
  • Dispatch parallel work from explicit readiness and ownership records
  • Use workflow completion events to coordinate agents across separate workflows
  • Give competing Actions workers the same resource-specific concurrency group
  • Resolve incompatible agent proposals through validation evidence and accountable review
  • SDK automatic routing matches agent expertise and respects infer: false
  • Exclude execution tools from the default agent without excluding them from workers
  • Separate worker authorization through job-level token permissions

Unlock with Premium — includes all practice exams and the complete study guide.

Configure observability for multi-agent behavior

Read full chapter
  • Artifact names distinguish a selected worker's evidence from the whole run's output
  • Revised outputs need distinct artifact names in the immutable artifact model
  • Artifact upload paths can collect selected files while excluding unrelated output
  • Artifact download verifies a digest but reports a mismatch as a warning
  • The subagentStart hook records dispatch before a worker begins
  • The subagentStop payload captures the worker's final output before its return
  • The general-purpose built-in worker is an exception to subagent lifecycle hook coverage
  • postToolUse records only successful tool calls; failures need postToolUseFailure
  • Hook parsers must match the configured event-name payload format
  • Chat export creates a reusable conversation record for review
  • Copy All preserves intermediate chat activity that Copy Final Response omits
  • Follow a selected agent task's logs rather than repeatedly listing tasks
  • Agent-task JSON links execution state to its pull request and repository
  • Use failed-step logs to narrow workflow-level failure analysis
  • Select the workflow attempt when comparing an original failure with a retry
  • Chat Debug reveals the actual prompts, context, and tool payloads used by an agent
  • Expanding a subagent tool call exposes its assignment, actions, and return
  • Workflow metadata supplies the code revision and operational result for an audit record
  • Per-artifact retention is bounded by repository, organization, or enterprise policy
  • Write access permits manual artifact deletion before expiration
  • Deleting a workflow run also deletes its artifacts
  • The artifact REST record exposes its scheduled expiration
  • Require worker returns to state changes, validation, and remaining blockers
  • Correlate SDK worker lifecycles by toolCallId and attribute traces by envelope agentId

Unlock with Premium — includes all practice exams and the complete study guide.

Detect and respond to multi-agent failures

Read full chapter
  • A sessionEnd event must be classified by its termination reason
  • errorOccurred supplies failure context and a recoverability signal
  • Use the watch command's exit-status option when automation must react to failure
  • UNKNOWN STEP can indicate a logging association limitation rather than a failed agent step
  • Agent completion must be checked against the actual change set and validation results
  • Missing CI activity after a cloud-agent push can be an approval wait
  • Route @copilot corrections through a user with write access on an open pull request
  • Incomplete or mis-scoped agent work calls for a clearer assignment
  • Repository instructions give agents a consistent build and validation procedure
  • Preinstall dependencies when repeated environment discovery degrades agent reliability
  • Use cloud-agent firewall warnings to diagnose a worker's blocked request
  • A stop hook can request another turn when a worker's result is incomplete
  • Stop-hook continuation must recognize an already-forced continuation
  • Multiple subagent response rewrites do not form a sequential processing pipeline
  • Choose the failed-job rerun when the whole workflow does not need replay
  • Enable debug logging on the rerun when the first attempt lacks diagnostic detail
  • Cancel the selected workflow run to stop an unwanted agent execution
  • Retry a stalled cloud-agent task through the trigger that started its work
  • postToolUseFailure can supply recovery guidance for the failed operation
  • Checkpoint rollback restores the workspace and removes subsequent conversation requests
  • Abort an unresolved merge when integration should return to its starting state
  • Human-in-the-loop recovery can continue directly on the agent's pull-request branch
  • Interpret SDK worker selection, execution, and failure as different lifecycle signals
  • Steer a running Copilot session through its log viewer without stopping it
  • Stopping a cloud session ends execution without undoing pushed commits

Unlock with Premium — includes all practice exams and the complete study guide.

Manage agent lifecycles within workflows

Read full chapter
  • A workspace agent profile adds a reusable specialist to the repository
  • A GitHub custom-agent profile requires a purpose and capability description
  • Agent Host loads reusable user agents from the Copilot agents directory
  • The extra agent-file locations setting reaches only the Local agent
  • Organization-agent discovery must be enabled in VS Code
  • Start an existing custom agent from the CLI with explicit task scope
  • Custom-agent versions are identified by profile-file Git commits
  • A new custom-agent task uses the latest profile for its selected repository and branch
  • Existing pull-request interactions retain the custom-agent version used to create the pull request
  • Profile-file identity and configuration scope determine which duplicate agent wins
  • Repository MCP settings can override a replacement worker's MCP configuration
  • Preserve the intended tool boundary when replacing an agent profile
  • A profile can load while environment-specific tool names are ignored
  • User selection and automatic invocation are independent agent lifecycle controls
  • A VS Code model list provides ordered availability fallback for a custom worker
  • Retire a custom agent through the source that supplies it
  • Inspect an agent's source before removing a similarly named configuration
  • Worktree-session archiving preserves branch changes before removing working files
  • Permanent session deletion requires preserving work first
  • Retiring one session does not remove a worktree still used by another session
  • Archived worker records require the appropriate session-list filter
  • Register SDK specialists in the session's customAgents configuration
  • Preserve explicitly configured skills when replacing an SDK worker
  • Archive cloud-agent sessions, because only local sessions can be deleted
  • Check prompt-file tool overrides when replacing a VS Code custom agent

Unlock with Premium — includes all practice exams and the complete study guide.

Implement tool use and environment interaction

Select and configure agent tools

Read full chapter
  • Listing a planning tool does not make an unavailable tool operational.
  • Use read and search tools to inspect a repository without enabling edits
  • Enable edit when an agent must change files
  • Enable execute for shell-based builds and tests
  • Enable the agent tool to invoke another custom agent
  • Use cloud agent's default Playwright MCP tools for browser work against localhost
  • Distinguish an omitted tools property from an empty tools list
  • Namespace MCP tools when filtering a custom agent's tool set
  • Do not treat an unrecognized tool name as a configuration failure
  • Disable model invocation to require deliberate custom-agent selection
  • Use user-invocable to control manual selection separately from automatic invocation
  • Set target when an agent profile is intended for a particular environment
  • Configure IDE MCP connections outside the profile's mcp-servers property
  • Separate model-visible tools from permission to execute them
  • Explicit CLI deny rules override allow rules
  • Use the command-stem pattern to avoid matching unrelated executable names
  • Scope CLI MCP approval to a tool rather than an entire server when possible
  • Deny writes to a selected path without blocking unrelated writes
  • Configure URL access independently of tool approval
  • Treat adding a CLI directory as a configuration-trust decision
  • Enterprise policy can prevent CLI bypass flags from granting broad permissions
  • Discover the server's actual tools rather than inferring capabilities from its name
  • Validate tool arguments against inputSchema
  • Use outputSchema to validate structured tool results
  • Do not grant tool permissions solely from an untrusted annotation
  • Refresh discovery when a server announces a changed tool catalog
  • Provide cloud-agent MCP credentials as prefixed Agents secrets
  • Match secret-reference syntax to the MCP configuration format
  • Check token environment-variable precedence when CLI uses the wrong identity
  • Use a supported fine-grained token when authenticating CLI with a personal access token
  • Check credential-store availability before relying on encrypted local token storage
  • Choose the tool provider that supplies the required integration
  • Use integrated browser tools to validate an observable web user flow
  • Match the tool-selection surface and persistence to the active harness
  • Apply the availability allowlist when both CLI visibility filters are supplied
  • Distinguish location-persisted tool consent from session flags and global URL consent
  • Reset interactive approvals without discarding startup permission options
  • Reduce enabled tools or use virtual tools when a request exceeds the tool limit
  • Provide GitHub CLI credentials for unattended repository operations
  • Use gh api for GitHub operations beyond dedicated subcommands

Unlock with Premium — includes all practice exams and the complete study guide.

Configure MCP servers

Read full chapter
  • Configure shared repository MCP servers in Copilot MCP settings
  • Supply a launch command and argument array for a local MCP server
  • Allowlist MCP tools before granting an autonomous cloud agent access
  • Expose required capabilities as tools for cloud-agent MCP integrations
  • Repository MCP settings override custom-agent and built-in MCP configuration
  • Adapt interactive editor MCP inputs before reusing configuration in the cloud
  • Validate MCP startup by inspecting the tools discovered in the session logs
  • The built-in GitHub MCP token is read-only and limited to the current repository
  • Use the dedicated GitHub MCP token secret to read additional repositories
  • Do not assume an editor's interactive OAuth MCP connection works in cloud agent
  • Choose the entry by transport: stdio launches, Streamable HTTP reaches an endpoint
  • Choose workspace or user-profile MCP configuration to match sharing scope
  • Use the editor's servers map rather than the cloud repository JSON wrapper
  • Keep sensitive MCP values out of shared VS Code configuration
  • Review server trust separately from approving an individual tool call
  • Disable an MCP server without changing the team's shared definition
  • Restart the MCP server after configuration changes to rediscover tools
  • Put dev-container MCP definitions under customizations.vscode.mcp
  • Point VS Code at a private registry with McpGalleryServiceUrl
  • Discover registry servers through the MCP filter in the Extensions view
  • Configure source restriction as well as the registry URL
  • Use Policy Diagnostics to inspect the effective managed configuration
  • Use allowedMcpServers to restrict which servers can be installed or run
  • A managed MCP deny entry wins over an allow entry
  • Match remote and local MCP servers with the appropriate allowlist identity
  • Require the enterprise-managed allowlist to be the source of MCP grants
  • Copilot managed MCP lists replace the equivalent VS Code enterprise-policy list
  • Resolve overlapping managed MCP settings per key rather than replacing the entire configuration
  • Verify client support before treating an MCP managed setting as enforced
  • Choose MCP resources for context, prompts for templates, and tools for execution
  • Sandbox local stdio MCP processes with host-supported access rules
  • Inspect the selected MCP server's output when validating its editor connection

Unlock with Premium — includes all practice exams and the complete study guide.

Integrate agents within development environments

Read full chapter
  • Choose execution context based on where the agent's tools run
  • Use a worktree session to keep agent files separate from the primary worktree
  • Place MCP configuration in the scope that runs on the intended machine
  • In an Agent Host session, review saved edits through diffs, not approval prompts
  • How the task starts sets the cloud agent's working-branch scope
  • Set pull-request base and head according to destination and proposed changes
  • A cloud-agent task uses the branch's latest custom-agent profile and keeps that version
  • A repository's matching custom-agent profile overrides broader definitions
  • Use prompt mode for a CLI invocation that exits after completing its task
  • Authenticate an Actions CLI invocation with the built-in token and Copilot request permission
  • Declare workflow_dispatch before invoking an agent workflow with gh workflow run
  • Select the workflow's repository and ref explicitly for branch-specific invocation
  • Parse programmatic JSON output as JSON Lines
  • Use silent mode when a script needs only the agent's response
  • Select the intended custom agent on the CLI invocation
  • Use the recognized setup file and job identifier
  • Install required MCP launch dependencies in setup steps
  • Setup-job permissions are not the cloud agent's working-branch scope
  • Test environment setup when the setup workflow changes
  • Provide a Linux-compatible command for cloud-agent hooks
  • Do not assume cloud-agent hook scripts receive the Actions GITHUB_TOKEN variable
  • Allow the destination before depending on an external cloud-agent hook notification
  • Explicitly authorize repository-controlled MCP startup in CLI prompt mode
  • Keep stdio MCP protocol output separate from diagnostic logging
  • Commit cloud-agent audit hooks to the default branch
  • Use native portable MCP configuration when Agent Host forwarding is unsuitable
  • Keep a Docker-launched stdio MCP server in the foreground
  • Select a shell with integration support for reliable command lifecycle signals
  • Background persistent terminal commands so the agent can continue working
  • Merge the setup workflow into the default branch to activate it
  • Prepare application dependencies deterministically before the agent starts
  • Treat a failed setup step as partial preparation rather than a blocked agent launch
  • Restrict setup-job customization to the supported settings
  • Select a compatible provisioned runner for the agent's execution requirements
  • Replace the integrated firewall with network controls on incompatible runners
  • Fetch LFS objects during setup when the agent needs their file contents
  • The cloud agent's pushes stay within its working-branch scope and its protections

Unlock with Premium — includes all practice exams and the complete study guide.

Operate agents with safe execution paths and robust error handling

Read full chapter
  • Distinguish protocol errors from failures returned by a tool
  • Use errorOccurred for an agent-execution failure notification
  • Use postToolUseFailure to give the agent recovery guidance after a failed tool
  • Account for different failure behavior in command and HTTP preToolUse hooks
  • Check for a created pull request before retrying a partially failed creation command
  • Handle modern MCP version mismatches by retrying with a compatible version
  • Choose the failed-job rerun surface when an entire workflow replay is unnecessary
  • Use the job database identifier when retrying one workflow job
  • Enable debug logging on a workflow retry when the original evidence is insufficient
  • Bound tool waiting even when progress notifications continue
  • Resume a resumable response stream instead of blindly repeating the tool request
  • Start a new MCP session when the server rejects an expired session identifier
  • Respect the server's stream reconnection delay
  • Choose file rollback explicitly when rewinding a CLI session
  • Restore a VS Code checkpoint to return files and conversation to an earlier request boundary
  • Use Redo to recover changes undone by restoring a checkpoint
  • Editing an earlier request both reverts later changes and reruns the revised request
  • Use a revert pull request to propose rollback of a merged agent change
  • Recognize the default human approval gate before workflows run on cloud-agent code
  • Keep repository checks and branch protections in the agent's completion path
  • Choose an escalation mechanism that exists in the execution context
  • Stop the CLI agent explicitly when a denied operation requires escalation
  • Cancel a workflow run through the run-control surface
  • Use agent commit authorship and co-authorship to identify who initiated a change
  • A Verified agent commit proves who made it, not that the code is right
  • Follow the agent-authored commit's session link to inspect execution evidence
  • Upload workflow-produced traces and plans as artifacts for inspection and handoff
  • Treat an artifact digest mismatch as an integrity warning requiring investigation
  • Preserve cloud-hook evidence outside the ephemeral sandbox
  • Bound repeated rate-limit retries and increase the delay between attempts
  • Validate generated text for its execution context before a tool wrapper interprets it

Unlock with Premium — includes all practice exams and the complete study guide.