Free GH-600 practice test

20 questions for the GitHub Agentic AI Developer (GH-600) exam, taken from our 61-question bank and spread across its 6domains by their weighting. No sign-up needed: pick an answer to check it, or open “Show answer & explanation” under any question.

What this test covers

Question 1 · Prepare agent architecture and SDLC processes

A development team is integrating a GitHub Copilot agent into their SDLC. They want the agent to assist during the requirements phase. Which task is MOST appropriate for the agent to perform at this stage?

Show answer & explanation

Correct answer: D

  • D. Decompose user stories into discrete, verifiable acceptance criteria and flag ambiguous requirements for human review

During the requirements phase, an agent's appropriate role is to help structure and clarify inputs — such as decomposing user stories into acceptance criteria and surfacing ambiguities for human review — which aligns with defining inputs and success criteria. Automatically merging pull requests is an action phase activity that bypasses human oversight. Deploying to staging belongs to the release/delivery phase. Generating and running unit tests against production is inappropriate at the requirements phase and introduces unacceptable risk.

Question 2 · Prepare agent architecture and SDLC processes

A financial services company deploys an agentic AI assistant in their GitHub Enterprise environment to automate infrastructure changes. A compliance officer requires that every agent decision be traceable to a specific input, reasoning step, and output, and that this trace be stored as a standard artifact accessible to auditors without requiring access to the agent runtime. Which approach BEST meets this requirement?

Show answer & explanation

Correct answer: A

  • A. Configure the agent to emit a structured trace file (e.g., OpenTelemetry spans serialized to JSON) as a GitHub Actions artifact on every run, retained for the compliance-required duration

Emitting structured trace files (such as OpenTelemetry-formatted spans) as GitHub Actions artifacts meets all requirements: traces are tied to a specific run, stored in standard dev tooling, accessible without runtime access, and retained per compliance policy. Container logs are ephemeral and not surfaced as standard artifacts in dev tooling. Relying on the LLM provider's internal logs introduces a third-party dependency and doesn't store traces in the team's own standard tooling. Relying on a system prompt for auditability is not a real control — LLMs don't inherently produce auditable structured traces.

Question 3 · Prepare agent architecture and SDLC processes

A team is defining the success criteria for an agent responsible for automatically refactoring legacy Python modules. They want to ensure the agent's work can be objectively evaluated. Which set of success criteria is MOST appropriate for this agent?

Show answer & explanation

Correct answer: C

  • C. All refactored modules must pass existing unit tests, cyclomatic complexity must not increase, no new linting errors may be introduced, and a diff summary must be produced as a structured artifact for human review

Passing existing unit tests, maintaining or reducing cyclomatic complexity, introducing no new linting errors, and producing a structured diff artifact are all objectively measurable, automated, and directly tied to refactoring quality — ideal success criteria. 'Do its best' with subjective review is not a measurable criterion and defeats the purpose of defining success criteria. Lines of code produced is a vanity metric that incentivizes verbosity over quality. Sentiment ratings are subjective, non-automatable, and not aligned with engineering quality outcomes.

Question 4 · Prepare agent architecture and SDLC processes

You are designing an agent that must output a structured plan before any action is taken. The plan must be both human-readable for reviewers and machine-parseable for downstream validation tooling. Which output format BEST satisfies both requirements?

Show answer & explanation

Correct answer: D

  • D. A JSON or YAML document with defined schema, accompanied by a brief natural-language summary field

JSON or YAML with a defined schema is both human-readable (reviewers can inspect it directly in a PR comment or file) and machine-parseable (validation tooling can deserialize and validate it against the schema). Free-form natural language is human-readable but difficult for automated tooling to parse reliably. Binary Protocol Buffers are highly machine-efficient but not human-readable without special tooling. A compiled executable is neither human-readable nor a structured data plan — it encodes behavior, not a declarative plan artifact.

Question 5 · Implement tool use and environment interaction

A Copilot agent is scoped to a single repository and configured to run in a GitHub Actions CI workflow triggered on pull request events. A team member notices that the agent is being invoked even for pull requests targeting feature branches, not just the protected main branch. The team wants the agent to run ONLY when a pull request targets main. Which configuration change achieves this?

Show answer & explanation

Correct answer: C

  • C. Add a branch filter to the workflow trigger so the pull_request event only fires when the target branch (base) is main.

GitHub Actions supports branch filtering on pull_request events using the branches key, which filters on the base (target) branch of the PR. Setting branches: [main] ensures the workflow—and therefore the agent—only runs when the PR is targeting main. Option B is incorrect because branch protection rules govern merge requirements, not which workflows are triggered; you cannot use them to selectively suppress a workflow invocation. Option A is incorrect because changing to a push trigger on main would invoke the agent after a merge, not during the PR review phase, which changes the intended behavior. Option D is incorrect because repository rulesets enforce policies (e.g., required checks, who can push) but do not selectively suppress specific workflow triggers based on PR target branch.

Question 6 · Implement tool use and environment interaction

An agent fails to complete a task after exhausting all configured retries. The team requires that failed agent actions do not silently drop work—there must be a documented escalation path. Which approach BEST implements this requirement?

Show answer & explanation

Correct answer: A

  • A. After retry exhaustion, configure the agent to open a GitHub issue in the repository with the failure details, task context, and the last error received, and assign it to the on-call team member.

Opening a GitHub issue with full failure context and assigning it to the on-call team creates a durable, trackable escalation artifact that ensures no work is silently lost. This is the standard escalation path pattern for agentic systems. Option C is incorrect because exiting with a zero status code falsely signals success, hiding the failure from monitoring systems; this is the opposite of a documented escalation path. Option D is incorrect because indefinite retries can cause runaway resource consumption and hung workflows; there must be a terminal failure state with an escalation action. Option B is incorrect because continue-on-error: true suppresses failure signals in the workflow, and a weekly digest is not a timely escalation mechanism.

Question 7 · Implement tool use and environment interaction

You are setting up a GitHub remote MCP server for use by a Copilot agent in your enterprise organization. Which statement BEST describes the purpose of configuring a GitHub remote MCP server rather than a local MCP server?

Show answer & explanation

Correct answer: B

  • B. A GitHub remote MCP server is hosted and managed by GitHub, allowing agents to call GitHub-native capabilities (such as repository, issue, and pull request operations) without the developer running any server infrastructure locally.

The GitHub remote MCP server is a GitHub-hosted endpoint that exposes GitHub platform capabilities (repositories, issues, PRs, etc.) as MCP tools, so developers do not need to run or maintain their own server infrastructure. Option A is incorrect because the remote MCP server is not tied to devcontainers or Codespaces; it is a cloud-hosted service. Option C is incorrect because authentication (OAuth tokens or GitHub App credentials) is still required; the remote MCP server does not eliminate authentication. Option D is incorrect because MCP tool outputs are returned to the agent at runtime and are not stored in GitHub Packages.

Question 8 · Implement tool use and environment interaction

A Copilot agent is configured to run autonomously in a CI workflow triggered on every push to the main branch. A security review finds that the agent is creating branches and opening pull requests against repositories outside the intended scope. What is the MOST effective configuration change to prevent this?

Show answer & explanation

Correct answer: A

  • A. Scope the agent to a specific repository by setting the repository scope in the agent's configuration, and restrict autonomous actions to that repository only.

Scoping the agent to a specific repository in its configuration directly constrains the agent's execution context so it cannot act on repositories outside the intended scope. This is the precise control mechanism designed for this scenario. Option B is incorrect because removing contents: write prevents branch creation in the current repository but does not prevent the agent from operating against other repositories if it has other credentials or tokens. Option D is incorrect because changing the trigger to workflow_dispatch only affects when the workflow runs, not the scope of the agent's actions when it does run. Option C is incorrect because branch protection rules govern merge requirements and do not prevent an agent from creating branches or PRs in out-of-scope repositories.

Question 9 · Implement tool use and environment interaction

Your organization uses an MCP registry to manage approved MCP servers for all Copilot agents across multiple repositories. A new MCP server for a code analysis tool has been published to the registry. What must a repository administrator do to make that server's tools available to the agent in their specific repository?

Show answer & explanation

Correct answer: B

  • B. Add the MCP server from the registry to the repository's MCP allow list, explicitly permitting the agent to use the server's tools in that repository's context.

Publishing a server to an MCP registry makes it available for adoption, but each repository must still opt in by adding the server to its MCP allow list. This two-step model (registry publication + per-repository allow listing) ensures that tool access is deliberate and scoped. Option A is incorrect because forking the registry does not affect the agent's configuration in the original repository; the allow list in the actual repository must be updated. Option C is incorrect because MCP server activation is self-service via configuration, not a GitHub Support process. Option D is incorrect because MCP server registration is a one-time configuration change, not a workflow step that must run on every execution.

Question 10 · Manage memory, state, and execution

An agent is used by a development team to triage GitHub Issues. It maintains a working memory of the current issue batch in its context window. After processing 200 issues over three hours, stakeholders notice that the agent's triage decisions start to drift — it begins mis-classifying issue priorities in ways inconsistent with its earlier, correct decisions. What is MOST likely causing this behavior, and what is the recommended corrective action?

Show answer & explanation

Correct answer: D

  • D. The agent has accumulated context drift as the session lengthened, diluting or shifting the effective representation of its initial instructions; correct this by implementing periodic context refresh checkpoints that re-inject core instructions and re-validate the agent's decision baseline.

Option D is correct because extended agent execution causes context drift — as more content accumulates in the context window, earlier instructions and decision criteria can become diluted or misrepresented. The recommended practice is to detect this drift pattern and apply periodic context refresh checkpoints that re-inject authoritative instructions and validate the agent's reasoning baseline, directly mapping to the 'detecting and correcting context drift during extended agent execution' skill. Option C is wrong because model weights do not degrade at runtime; model behavior within a session is deterministic given the same context — the problem is context content, not model integrity. Option B is wrong because stale API data would cause incorrect issue content, not drift in prioritization logic; the symptom described is about decision consistency, not data freshness. Option A is wrong because compute resource limits affect throughput and latency, not the logical consistency of the model's decisions.

Question 11 · Manage memory, state, and execution

An agent assists developers in resolving security vulnerabilities found by GitHub Advanced Security. The agent's memory of each vulnerability fix is set to expire after 24 hours to keep the memory store lean. A developer reopens a previously resolved vulnerability ticket two days later. The agent has no record of the prior fix decisions. What memory management rule should have been configured to handle this scenario correctly?

Show answer & explanation

Correct answer: B

  • B. Link memory expiration to the lifecycle of the associated work item (vulnerability ticket) rather than a fixed wall-clock interval, so the decision record is retained as long as the ticket remains relevant.

Option B is correct because tying memory expiration to the lifecycle of the associated artifact (the vulnerability ticket) rather than an arbitrary wall-clock interval is the principled approach to defining memory expiration rules. A ticket that is reopened is still active and its prior decisions remain relevant — the expiration should only trigger when the ticket is closed and confirmed resolved for a sufficient period. This directly addresses the 'defining memory expiration, pruning, and reset rules' skill. Option A is wrong because never-expiring memory causes unbounded growth and will eventually include stale, irrelevant decisions that pollute the agent's context — the goal is lifecycle-aware expiration, not no expiration. Option C is wrong because changing 24 hours to 72 hours is an arbitrary adjustment that does not fix the underlying design flaw; a ticket reopened after a week would still lose its history. Option D is wrong because requiring manual import is a labor-intensive workaround that undermines the automation benefits of agent memory systems and does not constitute a proper memory management rule.

Question 12 · Manage memory, state, and execution

An engineering team deploys a GitHub Copilot agent that autonomously manages branch protection rule changes across 50 repositories. After a major policy update, the team resets the agent's memory to enforce the new policy from a clean slate. Three days later, they discover that the agent correctly applied new rules to 40 repositories but applied the OLD rules to 10 repositories that happened to have cached configuration snapshots in an external state store the memory reset did not reach. What is the PRIMARY failure in the memory management design, and what architectural change would prevent this outcome?

Show answer & explanation

Correct answer: B

  • B. Primary failure: The agent's reset procedure did not have a comprehensive inventory of all memory and state storage locations, leaving the external state store uncleaned; stale cached snapshots then propagated old rules. Architectural change: Define a unified memory topology map that catalogs every storage location (in-context, long-term store, external caches) so that reset, pruning, and expiration operations are applied atomically across all layers.

Option B is correct because the root cause is an incomplete memory reset — the team reset one memory layer (likely the agent's long-term memory store) but an external state cache was not included in the reset scope. The 10 repositories read from this forgotten cache and received stale, pre-policy-update configuration. The architectural fix is a unified memory topology map: a documented, enforced catalog of every storage layer so that reset, pruning, and expiration operations are applied atomically across all layers simultaneously. This directly addresses the 'defining memory expiration, pruning, and reset rules' and 'preventing stale context from influencing agent decisions' skills. Option D is wrong because the speed of the reset is irrelevant — the problem is incompleteness (a missed store), not latency. Option C is wrong because the scenario states the agent correctly updated 40 repositories, which means it had sufficient permissions; permission is not the differentiating factor for the 10 failures. Option A is wrong because configuration heterogeneity across repositories is normal and expected; the failure is purely about stale cached state being applied, not about policy inconsistency.

Question 13 · Perform evaluation, error analysis, and tuning

A team uses an automated scanning tool integrated into their GitHub Actions workflow to generate evaluation signals for their Copilot agent. After a run, the scanner flags that the agent's output contains a hardcoded connection string. In the context of evaluation, how should this signal PRIMARILY be used?

Show answer & explanation

Correct answer: D

  • D. To inform a revision of the agent's instructions or constraints to explicitly prohibit credential hardcoding

Evaluation signals from automated scanners are used to identify gaps between agent behavior and desired behavior, and the appropriate response is to tune the agent — most directly by revising instructions or adding constraints (e.g., 'never include credentials in output files'). Option B (retraining the model) is outside the scope of agent-level tuning and is not a standard GitHub Copilot workflow. Option A (revoking the token) is a security incident response, not an evaluation-driven tuning action. Option C (storing the bad output in memory) would propagate the undesired behavior rather than prevent it.

Question 14 · Perform evaluation, error analysis, and tuning

You are analyzing a trace from a GitHub Copilot agent that was asked to refactor a Python module. The trace shows the agent called the read_file tool successfully, then called write_file with a payload that was 0 bytes, and then marked the task complete. The original file is now empty. Which root cause classification BEST fits this failure?

Show answer & explanation

Correct answer: B

  • B. Tool misuse — the agent invoked write_file with an empty payload instead of the refactored content

The trace clearly shows the agent called write_file with a 0-byte payload — it invoked the correct tool but provided incorrect (empty) content. This is tool misuse: the tool was used incorrectly (wrong argument), resulting in data loss. Option D is wrong because the write succeeded (the file is now empty, not unchanged). Option A (reasoning error) could be a secondary issue but does not describe the proximate cause visible in the trace. Option C (memory issue) is speculative and not supported by the trace evidence, which shows the agent did execute a write call.

Question 15 · Perform evaluation, error analysis, and tuning

Which of the following BEST describes an 'operational constraint' when specifying expected outcomes for an agentic task in GitHub Copilot?

Show answer & explanation

Correct answer: B

  • B. A boundary or rule the agent must respect during execution, regardless of task outcome

An operational constraint is a boundary or rule the agent must observe during task execution — for example, 'never push directly to the main branch' or 'only read files within the repository scope.' It governs how the agent behaves, independent of whether it achieves the goal. Option A describes a success metric or threshold, not a constraint. Option C describes a logging artifact. Option D describes a system prompt component, which may contain constraints but is not itself the definition of an operational constraint.

Question 16 · Orchestrate multi-agent coordination

Which statement BEST describes the role of a 'human-in-the-loop' step in a multi-agent recovery pattern?

Show answer & explanation

Correct answer: B

  • B. A human-in-the-loop step pauses workflow execution at a defined decision point, presents relevant agent state and failure context to an operator, and resumes or redirects the workflow only after explicit human approval

Correct: A human-in-the-loop (HITL) recovery step is a deliberate pause mechanism: it surfaces agent state and failure context to a human operator, who then makes an informed decision to resume, modify, or redirect the workflow. It preserves human oversight at critical recovery decision points without permanently replacing automation. — Wrong (A): Automatic retry with modified parameters is an automated recovery strategy (e.g., retry-with-backoff or parameter perturbation), not a human-in-the-loop pattern; HITL specifically requires human involvement. — Wrong (C): HITL does not permanently replace downstream automation; it is a conditional intervention at a specific decision point, after which automated agents typically resume. — Wrong (D): Automatic rollback to a checkpoint is a distinct recovery pattern (rollback recovery); HITL specifically defers the recovery decision to a human rather than executing it automatically.

Question 17 · Orchestrate multi-agent coordination

A multi-agent software delivery pipeline must produce artifacts that satisfy an enterprise change-advisory-board (CAB) review process. The CAB requires evidence of: (1) which agent approved each change, (2) the criteria used for approval, and (3) the sequence of handoffs between agents. Which workflow configuration approach BEST satisfies all three requirements?

Show answer & explanation

Correct answer: B

  • B. Require each agent to append a signed, structured decision record — including agent identity, decision criteria, and upstream agent reference — to an immutable artifact store at each handoff boundary, and expose these records via a summary report generated at workflow completion

Correct: Signed structured decision records appended at each handoff directly satisfy all three CAB requirements: agent identity addresses (1), decision criteria addresses (2), and the upstream agent reference chain addresses (3). An immutable store prevents post-hoc tampering, and the summary report makes the evidence accessible to reviewers. — Wrong (A): Verbose logging produces unstructured, high-volume output that does not map cleanly to the three specific CAB evidence requirements; it requires manual correlation across log lines and does not provide attributable agent-level decision records. — Wrong (C): A GitHub Release captures the end state but contains no per-agent decision attribution or handoff sequence, omitting requirements (1) and (3). — Wrong (D): Human approval logs address human-in-the-loop checkpoints but do not capture autonomous agent decision criteria or the inter-agent handoff sequence; they partially address (1) only for human approvers, not agents.

Question 18 · Orchestrate multi-agent coordination

Which of the following BEST describes the primary purpose of a 'coordinator agent' in a hierarchical multi-agent orchestration pattern?

Show answer & explanation

Correct answer: A

  • A. To decompose a high-level goal into sub-tasks, delegate them to specialized agents, and synthesize their outputs into a coherent result

Correct: In a hierarchical orchestration pattern, the coordinator agent's role is planning and synthesis — it breaks a complex goal into sub-tasks, assigns them to specialized subordinate agents, and integrates their individual outputs into a unified outcome. This is the defining characteristic of the orchestrator/coordinator role. — Wrong (D): Direct domain-specific task execution describes a worker or specialist agent, not a coordinator; coordinators delegate rather than execute domain tasks. — Wrong (C): Automated health monitoring and restart logic describes a watchdog or supervisor component, which is a distinct infrastructure concern from orchestration coordination. — Wrong (B): API proxying for rate-limit management is an infrastructure cross-cutting concern, not an orchestration pattern role; conflating it with coordination reflects a common architectural misunderstanding.

Question 19 · Implement guardrails and accountability

An agentic workflow automatically responds to Dependabot alerts by opening pull requests, running tests, and—if all checks pass—merging dependency updates. A risk review identifies that 'critical' severity Dependabot alerts for direct production dependencies should follow a different path than 'low' or 'moderate' alerts. Which design pattern best balances risk management with delivery velocity for this scenario?

Show answer & explanation

Correct answer: C

  • C. Require human approval exclusively for pull requests triggered by critical-severity alerts on direct production dependencies, while allowing the fully automated flow to continue for low and moderate alerts.

Differentiating the approval path by risk classification—fully automated for low/moderate, human-gated for critical on direct production dependencies—is the canonical 'autonomy level' design pattern described in the domain. It preserves velocity for the majority of alerts while applying the human-in-the-loop control exactly where risk justifies it. Option B (post-merge Slack notification) provides no pre-merge control; a merged critical vulnerability is already in the codebase before a human can act. Option D (pausing the whole pipeline for any critical alert) is disproportionately disruptive and slows remediation of low-risk alerts unnecessarily. Option A (all PRs human-reviewed) eliminates the velocity benefit of automation and adds approvals that do not materially reduce risk for low-severity updates.

Question 20 · Implement guardrails and accountability

Your organization operates a Copilot agent that can autonomously provision GitHub repository resources (create repos, configure branch protection, add webhooks) via the GitHub REST API. During a red-team exercise, testers demonstrate that a specially crafted issue comment can cause the agent to invoke the webhook-creation endpoint with an attacker-controlled URL, potentially exfiltrating repository data. You must harden the agent against this class of attack without disabling webhook management entirely. Which THREE controls most directly mitigate this risk? (Choose THREE.)

Select 3 answers.

Show answer & explanation

Correct answers: C, E, F

  • C. Require a human operator to approve all webhook creation and modification requests that originate from user-supplied input, classifying them as compliance-sensitive actions.
  • E. Validate and allowlist webhook target URLs against an organization-approved domain list before any webhook creation API call is executed.
  • F. Implement an input sanitization and prompt-injection guard layer that detects and blocks attempts to override the agent's system instructions from issue comment content.

Option E (URL allowlisting) is a direct output guardrail: even if the agent is tricked into calling the webhook API, only pre-approved domains can be registered, neutralizing data exfiltration. Option C (human approval for user-input-triggered webhook changes) applies the human-in-the-loop control precisely to the high-risk, compliance-sensitive action class, blocking the attack path before it reaches the API. Option F (prompt-injection guard) addresses the root cause—the attacker's ability to hijack the agent's decision-making via crafted input—by intercepting malicious instructions before the agent acts on them. Option D (narrowing installation scope) is a good least-privilege practice but does not prevent the attack within the permitted repositories; it only limits blast radius. Option A is wrong and counterproductive: a longer-lived token increases risk, not security, and is unrelated to the webhook injection vector. Option B (archiving repositories) is a disproportionate, disruptive response that harms legitimate users and does not systematically prevent the attack class.

Pick an answer on each question to check it. 20 questions in this test.

41 more GH-600 questions

Sign up free to start practising, or subscribe (from $4.97/mo) for the full 61-question bank, flashcards and timed mock exams.

GitHub Agentic AI Developer course overview and study guides →