A coordinator has found a failing test's file path and its stack trace, and now spawns a non-fork subagent to fix it. How should it give the subagent this information?
id q05193e2f9c
Home / Claude Certified Architect – Foundations / Practice
Instant feedback after every answer. Want exam conditions instead? Take the timed practice exam.
– · 0 correct
A coordinator has found a failing test's file path and its stack trace, and now spawns a non-fork subagent to fix it. How should it give the subagent this information?
id q05193e2f9c
Which request is the best fit for asking Claude to make the change directly instead of starting in plan mode?
id q06c0ae3bb3
A prompt pastes four sample ticket-and-answer pairs directly between the task instructions and the live ticket. Claude sometimes treats a sample ticket as part of the request it must answer. What fix does the guidance recommend?
Choose an answer to check it. Afterward, select any option to review its explanation.
Relocating unlabeled samples does not mark where each one starts and ends, so Claude still has nothing that separates them from the real request.
Making samples look like instructions blurs the boundary even more; the goal is to make them clearly distinct.
Dropping the examples throws away a reliable way to steer format. The problem is the missing boundaries, not the examples themselves.
Structured examples, each in its own example tag and grouped in an examples tag, let Claude tell samples apart from instructions and from the live input, which is exactly the confusion described.
id q09a7678b49
What does Claude do while a session is in plan mode?
id q0a432f2f93
Component test files live in many folders across a repository and all end in .test.tsx. Which paths pattern matches every one of them?
id q0dac499d59
An agent loads tools from a ticketing service and a wiki service. Both services expose a tool called 'search', and Claude sometimes queries the wrong system. Which naming change does the guidance recommend?
Choose an answer to check it. Afterward, select any option to review its explanation.
Version labels describe history, not purpose. Claude still cannot tell which tool reaches tickets and which reaches the wiki.
Every tool definition needs a name, and list order carries no meaning about what a tool does. Selection would get worse, not better.
This removes the name clash but not the ambiguity: a random suffix tells Claude nothing about which system each tool searches.
When tools span several services, the guidance recommends namespacing: prefix each name with its service. Two tools with the same vague name are exactly the overlap that confuses agents, and the prefix makes the boundary visible at selection time.
id q1182dfe1ed
Claude calls the Write tool on a file that already exists. What happens to that file?
id q11aefd8aa6
A main agent hands a subagent the job of finding every place a payment API is called across a large repository. The subagent opens hundreds of files along the way. What should it return to the main agent?
id q1343b37f8e
A developer starts Claude Code at the root of a monorepo. packages/billing/CLAUDE.md holds billing conventions, but right after launch /context does not list it under Memory files. What explains this?
Choose an answer to check it. Afterward, select any option to review its explanation.
That variable is real, but it governs directories added with --add-dir, which sit outside the working directory. A package inside the repository does not need it.
CLAUDE.md files do not replace one another; discovered files are concatenated. A root file could not suppress the billing file.
CLAUDE.local.md is the personal, gitignored variant. Its name has nothing to do with whether a nested file is discovered.
Only files at and above the launch directory load at startup. A CLAUDE.md below it joins the conversation once Claude reads, writes or edits a file in that subdirectory, so its absence from the launch list is expected.
id q149521c725
An architect is deciding where a lead agent with parallel subagents is worth its extra token cost. Which workload fits that architecture best?
Choose an answer to check it. Afterward, select any option to review its explanation.
Multi-agent runs use far more tokens than chat, so they only make sense when the task's value covers that cost.
Multi-agent systems pay off on valuable, heavily parallel work whose information exceeds a single context window: subagents explore separate directions at once, each in its own context.
Parallel subagents are overkill for a simple lookup. One agent with a few tool calls covers it.
Code changes look like divisible work, which makes this tempting. But tightly coupled steps need shared context, and agents are not yet good at coordinating in real time, so this is named as a poor fit.
id q179816f9df
A pipeline runs:
claude -p "List risky changes in this diff" \
--output-format json \
--json-schema "$FINDINGS_SCHEMA"Where in the JSON response does the object that matches the schema appear?
id q183e183d81
In Anthropic's Research system, how do the lead agent and its subagents divide the work on a user query?
id q1c3d7d478c
Claude asks for two currency conversions in one response. Your code runs both and returns two tool_result blocks, but Claude's final answer swaps the two figures. What should you check first?
Choose an answer to check it. Afterward, select any option to review its explanation.
A good description helps Claude decide when and how to call a tool, so the advice is real. Here Claude already called the right tool twice; the failure is in pairing results with calls.
Order is not the matching mechanism. The IDs let Claude pair results with requests even when results arrive in a different order.
Every tool call gets a unique ID, and each tool_result must echo the ID of the call it answers. That pairing is how Claude knows which output belongs to which request, so a mismatch produces exactly this swap.
Claude can legitimately request several tools in one response, and all their results go back together. Splitting them is unnecessary; matching IDs is what keeps them apart.
id q1e647e64ab
A developer adds an adversarial review step: before a task counts as done, a subagent running in a fresh context reviews the change. What does that reviewer evaluate?
id q1ec4d4bb93
A pipeline asks Claude to convert free-text shipping rules into a JSON config, then runs a static validator that checks field names against a known list. When the validator reports problems, what should the next turn to Claude contain?
id q1ff02bbcbe
A tech lead wrote the team's naming conventions in ~/.claude/CLAUDE.md on her own laptop. A new hire clones the repository, and Claude ignores those conventions in his sessions. What is the cause?
id q23c45621ad
An extraction script sends one tool definition and leaves tool_choice unset. Most responses contain a tool_use block, but some contain only a text reply. What explains the text replies?
id q245fb4809d
A developer adds a remote MCP server with claude mcp add and no --scope flag. Where is the server available afterwards?
id q26dec6d683
Hours into a session, an agent's history holds dozens of raw tool results from calls made early on that it no longer needs to reread. The team wants the least disruptive, low-risk way to reclaim context. What fits best?
Choose an answer to check it. Afterward, select any option to review its explanation.
Moving the same tokens elsewhere in the request does not reduce context. The results would still be read on every turn.
Once a tool result is far back in the history the agent rarely needs the raw output again, which makes clearing it one of the safest, lightest forms of compaction.
Expanding stale results adds tokens rather than freeing them, the opposite of what the team needs.
A blank restart frees space but throws away the decisions and progress in the history too. That is far more disruptive than removing only the stale tool output.
id q2798d92225
A research subagent receives this block from the web search tool, inside a response that came back with HTTP 200:
{"type": "web_search_tool_result",
"tool_use_id": "srvtoolu_7kq2",
"content": {"type": "web_search_tool_result_error",
"error_code": "too_many_requests"}}How should the subagent report this outcome to its coordinator?
id q3186eb2507
A team generates a market summary from a set of supplied reports and wants every claim in it to be auditable. Which prompt instruction best supports that?
id q34980e53e1
Before building a caching layer in a domain the team knows little about, a developer wants to surface edge cases, failure handling and tradeoffs she has not thought of yet. What should she ask Claude to do?
id q35f956c289
Your application has just executed the tools Claude requested in an agent loop. What should the next Messages API request contain?
id q35fa431ed5
Why does the course recommend that tool functions validate their inputs and raise errors with clear messages, such as 'start_date is required'?
Choose an answer to check it. Afterward, select any option to review its explanation.
A tool error does not end the conversation. It is reported back so Claude can continue, often by retrying.
The point of the recommendation is the opposite: Claude sees the error and learns from it.
Error messages from a tool reach Claude. A clear one tells it what was wrong, so it can call the tool again with a fixed value instead of guessing.
A failed call still gets a result block; validation improves what that block says, it does not remove it.
id q38194cb212
A script submits 5,000 classification requests in one batch, then writes results to a table by reading the results file top to bottom, assuming it follows submission order. Some labels land on the wrong rows. What should the script do instead?
id q39e1bc3f4c
A feedback classifier labels messages as complaint or praise. It handles most messages well, but rhetorical questions such as 'Why would anyone ship a charger this good?' are often labeled complaint. What should the team add to the prompt?
id q3dd4de06c0
A CI script runs claude --bare -p "review this diff against our standards". The team's review criteria are in the repository's root CLAUDE.md, yet the reviews ignore them. What is the cause?
id q4023991d73
A team wants everyone who clones its repository to get the same MCP server for the shared issue tracker. Which scope should they add the server with?
id q4082e80d92
After enabling Code Review with default settings on a service repository, a lead notices that no findings mention missing unit tests or inconsistent formatting, even on PRs that clearly have both. What explains this?
Choose an answer to check it. Afterward, select any option to review its explanation.
The trigger setting decides when a review runs and how much it costs, not what kinds of issues the review looks for.
The check run repeats the same findings as the inline comments in a severity table; it is not a separate home for style or test findings. If the review never produced them, they appear nowhere.
Out of the box, Code Review is calibrated for correctness: bugs that would break production. Formatting preferences and test coverage are outside that default, and a team that wants them flagged has to add guidance files.
Replying to an inline comment does not prompt Claude to respond or re-review, so replies cannot unlock new categories of findings.
id q48e8b5cc63
A codebase-analysis skill prints hundreds of lines of intermediate findings into the main conversation every time it runs. Which frontmatter setting keeps that work out of the main session and returns only the result?
Choose an answer to check it. Afterward, select any option to review its explanation.
With context: fork the skill runs in its own subagent, which does the noisy work in a separate context and hands back its result, so the main conversation stays clean.
This field is useful when you want to control when a skill runs, because it stops Claude from invoking it on its own. It does not change where the skill's output goes.
An argument hint only shows expected arguments during autocomplete. The output still lands in the main conversation.
This picks the shell for injected commands. It has no effect on how much output reaches the conversation.
id q4ec31fb1fe
Early in a long Claude Code session you set up a local database; the current work is a CSV export endpoint, and the context window is nearly full. You want the summary that replaces the history to keep the export endpoint decisions. What should you do?
id q53fd812a40
Claude runs a Grep search for deprecatedHelper without setting output_mode. What does the result contain?
id q563f6fe613
Anthropic's research subagent prompt calls for particular care with important facts, especially numbers and dates. What does it tell the subagent to do with such facts as it researches?
id q5cd9f81e5e
To cut latency, a developer changes a PreToolUse policy hook so it returns {"async": true} and finishes its check in the background. What does this do to the policy?
id q5d449e1933
Claude finished a long unattended refactor in one session. Before merging, the lead wants an independent check. According to the course, why open a fresh session or subagent for the review instead of asking the same session to review its own work?
id q66518cfef8
The repository has a project skill at .claude/skills/changelog/. A developer copies it to ~/.claude/skills/changelog/ and edits it to suit her own style. Which skill runs when she types /changelog in this repository?
id q726175826b
An agent aggregates several MCP servers that together expose roughly 250 tools, and its tool selection accuracy has dropped. What does the documentation recommend?
id q74d4f2d147
A rule file starts with this frontmatter:
---
paths:
- "infra/**/*.tf"
---When does Claude Code bring this rule into context?
id q74ddea914b
A museum's environmental monitor exposes an inspect_rooms wrapper that accepts a collection of ventilation and humidity tool requests. Claude has correctly populated that collection. The host currently responds with an acknowledgment without performing any checks. Which implementation change supplies the missing behavior?
id q77d934a5df
Compared with an agent, what is a main advantage of a workflow, a predefined series of calls to Claude?
id q7a64b1e58b
Your telemetry counts subagent launches by inspecting tool_use blocks in the Agent SDK message stream. To stay correct across older and current SDK versions, which tool names should it match?
id q7bf38f7495
A structured-output extraction job mostly parses cleanly, but a few responses are cut off mid-object and fail to parse. Their stop_reason is max_tokens. What should the pipeline do with these records?
id q93cd392152
A team is building an agent that refactors a service across many files over several hours. The product owner wants to review direction at a few planned points without approving every individual action. Which design fits the agent pattern?
Choose an answer to check it. Afterward, select any option to review its explanation.
Checkpoints give the owner a say at the points they care about while the agent keeps operating independently between them, which is exactly what the pattern allows.
This keeps autonomy but drops the planned review points the owner explicitly wants during the run.
Per-call approval is the opposite of what the owner asked for and removes the agent's independent operation.
Iteration caps are a real control, but they end the run at an arbitrary count rather than at the review points the owner chose.
id qa755ba6917
How does Claude Code combine up-front context with just-in-time retrieval when it works in a repository?
id qa9b7c76419
In the test-driven workflow with Claude Code, what is the step after the chosen tests have been written?
id qab0c73dbc8
A team is sorting its rules among CLAUDE.md, skills and hooks. Which rule belongs in a hook?
id qab86bd68fc
Which element turns a plain generate-then-review chain into an evaluator-optimizer workflow?
id qad79470159
Claude's web search server tool runs a query that completes without problems but finds no matching pages. What does the web_search_tool_result contain?
id qaf4a075b92
An unattended Claude Code run sometimes declares the work finished while tests still fail. Which hook event lets a test check refuse to let the turn end?
id qbd78a47744
Yesterday you renamed a Claude Code CLI session to invoice-bug with /rename. Today, in the same repository, how do you reopen exactly that conversation?
id qc62c61a046
A large batch was submitted during a period of heavy demand. When processing ended, some requests had the result type expired. What does that mean for those requests?
id qc665a7ea85
In Anthropic's description of autonomous agents, at which points can an agent stop and bring the human back in while it works?
id qc8d55f7bc3
With the Agent SDK, you resume a session with fork_session enabled to explore an alternative design. What happens to the original session?
id qcb69f2437c
A web search through the Claude API runs successfully but nothing matches the query. What does the tool result's content hold?
id qdd8ce7ccfb
A team's review prompt contains the rule 'Make sure error handling is good.' From one run to the next, reviews flag error handling inconsistently. Which rewrite of the rule best follows the guidance on writing rules Claude can follow?
id qddaf082751
A messaging tool has a required parameter named 'recipient'. Claude keeps passing people's display names, but the backend expects a numeric account identifier. Which change best addresses this?
id qe1d80e85ce
A service forces Claude Opus 5 to call an extract_receipt tool whose input_schema defines merchant, date, and total. After the call, where does the service read the extracted fields?
id qf46fc50dc2
A stage-lighting assistant issues a tool call with these hook input fields:
{
"tool_name": "mcp__stage__dim",
"tool_input": {"zone": "balcony", "level": 35},
"session_id": "lighting-72"
}For a PreToolUse hook, which value does the SDK test against the registered matcher?
id qf9d7c38929
Test yourself under exam conditions.
150+ questions · Weak-area analysis · 90-day access
See how your weak domains have changed.