CCA-F Free Quiz
No account or credit card needed — your score shows right here.A team runs a coordinator-subagent research system. A user asks how the semiconductor shortage affected industries worldwide. The coordinator spawns three subagents, all scoped to current 2025 supply chains. Its synthesized report covers supply chains well but omits automotive impacts entirely. Today the coordinator writes one synthesis and sends it straight to the citation step. Which change best fixes the incomplete coverage?
Correct Answer
An editor reads the draft, spots the missing chapter, and assigns a writer to cover it. Asking the same writers to redo the same assignment just returns the same draft.
The coordinator should judge whether its synthesis is complete and, if not, re-delegate targeted work before finalizing.
- The gap comes from narrow decomposition: every subagent was scoped to 2025 supply chains.
- In the source design, the lead agent synthesizes results and decides whether more research is needed.
- If more is needed, it can create additional subagents or refine its strategy.
- Distinct, bounded tasks match the guidance that each subagent needs clear task boundaries.
- A
- The CitationAgent runs only after the research loop exits.
- Its job is to find citation locations for claims, not to research missing topics.
- B
- Same instructions keep the same narrow scope, so the gap persists.
- Vague or overlapping tasks led subagents to perform the exact same searches.
- D
- Agents already tend toward overly long, specific queries that return few results.
- Query wording does not widen a scope that excludes automotive impacts.
- Assuming more searching or a later pipeline stage fixes gaps; coverage gaps come from decomposition and need coordinator re-delegation.
- Each subagent needs an objective, an output format, guidance on tools and sources, and clear task boundaries.
- Without detailed task descriptions, agents duplicate work, leave gaps, or fail to find necessary information.
- Complex research might use more than 10 subagents with clearly divided responsibilities.
- The lead agent saves its plan to Memory because context over 200,000 tokens is truncated.
- An LLM judge rubric includes completeness: are all requested aspects covered?
Answered
0/10
Correct
0
Score
0%
A team builds an agent with the Python Agent SDK. The agent calls the built-in Bash tool to run a log-query script. The script's raw output mixes several timestamp formats and includes noisy debug lines. The team wants Claude to see only a cleaned, normalized version of each Bash result, not the raw text. The cleanup must apply before the model processes the result. Which hook design meets this requirement?
Correct Answer
It is like an editor who swaps a messy draft for a clean copy before it reaches the reader. Adding a sticky note to the messy draft still leaves the mess in place.
To replace a tool's result before Claude sees it, a PostToolUse hook sets updatedToolOutput, which works for any tool.
- PostToolUse fires after the tool returns a result, so the hook can act on the result.
- updatedToolOutput replaces the tool's output before Claude sees it.
- It works for any tool in both SDKs, so it covers the built-in Bash tool in Python.
- B
- updatedMCPToolOutput is the older field that replaces MCP tool output only.
- Bash is a built-in tool, not an MCP tool.
- C
- Async outputs can't block, modify, or inject context, because the agent has already moved on.
- They suit side effects like logging only.
- D
- additionalContext appends information to the tool result.
- The raw, noisy output still reaches Claude, so it is not replaced.
- Picking a look-alike field: additionalContext appends rather than replaces, and updatedMCPToolOutput covers MCP tools only.
- Hooks without a matcher run for every event of that type; for tool hooks the matcher tests the tool name.
- Return {} to allow the operation without changes.
- If a PostToolUse callback exceeds its timeout, Claude Code keeps the tool result and the turn continues.
- Most events use a 600-second default timeout when none is set on the HookMatcher.
- The tool use ID correlates PreToolUse and PostToolUse events for the same tool call.
Answered
0/10
Correct
0
Score
0%
A team uses the Python Agent SDK. An agent session has analyzed an auth module and proposed a JWT refactor. You captured its session ID. The team now wants the agent to outline an OAuth2 design using that same analysis. They also want to return to the unchanged JWT conversation later. The OAuth2 step only produces an outline and does not edit files. What should you do?
Correct Answer
Forking is like photocopying a draft before trying a risky rewrite. You scribble on the copy, and the original draft stays clean for later.
Fork when you need prior context for a new direction but must keep the original history unchanged.
- Fork creates a new session that starts with a copy of the original's history.
- The OAuth2 outline still gets the full prior auth analysis.
- The original session's ID and history stay unchanged, so the JWT thread can be resumed later.
- You end up with two independent sessions you can resume separately.
- B
- Resume picks up the existing session and adds to it.
- The OAuth2 turns would be appended to the JWT thread, so it would no longer be unchanged.
- C
- Continue also picks up an existing session and adds to it.
- It finds the most recent session in the current directory, so it still modifies the original history.
- D
- A fresh query() does not return to the earlier session.
- The agent loses the files it read and the analysis it already performed.
- Assuming resume by ID is safe for side exploration; resume adds to the session, while only fork leaves the original unchanged.
- Resume and fork require a session ID, read from the session_id field on the result message.
- The fork gets its own session ID, distinct from the original.
- Forking branches the conversation history, not the filesystem; file edits in a fork are real.
- To branch and revert file changes, use file checkpointing.
- Continue needs no ID and suits apps that run one conversation at a time.
Answered
0/10
Correct
0
Score
0%
A developer is adding a multi-file billing feature. They gave Claude a short prompt asking it to interview them with the AskUserQuestion tool. After a long Q&A, Claude wrote a complete SPEC.md. What is the recommended next step?
Correct Answer
It's like an architect who interviews you and draws a blueprint. The builders then work from the blueprint, not from a recording of the whole meeting.
Interview first, write a spec, then implement in a fresh session that uses the spec as its reference.
- The guide says to start a fresh session once the spec is complete.
- The new session has clean context focused only on implementation.
- SPEC.md gives a written reference, so the interview history is no longer needed.
- Good specs end with an end-to-end verification step that proves the feature works.
- A
- The long interview fills the context window, and performance degrades as context fills.
- The guide says to switch to a fresh session, not continue in this one.
- B
- CLAUDE.md loads every session, so it should hold only broadly applicable rules.
- A bloated CLAUDE.md causes Claude to ignore your actual instructions.
- C
- The interview's job is to cover everything, then write a complete spec to SPEC.md.
- Skipping the written spec removes the reference the implementation session relies on.
- Assuming the session holding all the interview answers is the best place to implement, when clean context plus a written spec wins.
- Use the interview for larger features; start with a minimal prompt.
- Claude asks about technical implementation, UI/UX, edge cases, concerns, and tradeoffs.
- The most useful specs name the files and interfaces involved and state what is out of scope.
- Time spent making the spec precise pays off more than time spent watching the implementation.
- A clean session with a better prompt almost always outperforms a long session with accumulated corrections.
Answered
0/10
Correct
0
Score
0%
A team's CI job runs `claude -p` with `--output-format json` and a `--json-schema` that requires a `findings` array. A later step reads the findings with jq to fail or pass the build. On some runs, Claude declines the request. Which design correctly handles the machine-parseable findings?
Correct Answer
It's like a form-processing clerk who checks that the form was actually filled in before typing its boxes into the database. A blank return means "no form," not "empty answers."
With --output-format json --json-schema, schema output lands in structured_output, which is absent when no valid output was produced.
- Schema-conforming output is returned in the
structured_outputfield. - A declined request ends without valid structured output, so that field is missing.
- The docs say to check the field is present before the script uses it.
- A
resultholds the text result.- Schema output goes in
structured_output, notresult.
- B
- The docs pair
--output-format jsonwith--json-schemato get schema output. - The default
textformat is plain text with nostructured_outputfield.
- The docs pair
- C
- Claude Code accepts
formatonly as an annotation. - It does not enforce
format, so malformed values are not rejected.
- Claude Code accepts
- Assuming a schema guarantees the field always exists; a declined run returns no
structured_outputfield at all.
--json-schemais print mode only and validates output after the agent completes its workflow.- An invalid schema makes
claudeexit withError: --json-schema is not a valid JSON Schema. - The JSON response also carries metadata such as session ID and usage.
- With
--output-format json, the payload includestotal_cost_usd, a client-side estimate. - Claude Code exits 0 on success and non-zero when the run fails.
Answered
0/10
Correct
0
Score
0%
A team's lead agent must explain how authentication works across five subsystems of a large monorepo. Each subsystem needs deep searching, and the grep and file-read output for each runs to tens of thousands of tokens. The lead agent's job is to compare the subsystems and write one synthesis. Its answers degrade as raw search output piles up in its context. Which design best keeps the lead agent focused?
Correct Answer
A manager sends five researchers to dig through separate archives. Each comes back with a one-page brief, not boxes of paper, so the manager can actually compare findings.
Isolate deep exploration in subagents and pass only distilled summaries back to the lead agent.
- Each subagent explores in its own clean context window, so the lead never sees the raw search output.
- Subagents return a condensed, distilled summary, often 1,000-2,000 tokens.
- The lead agent can then focus on synthesizing and analyzing results across the five subsystems.
- Multi-agent designs suit complex research where parallel exploration pays dividends.
- A
- Loading everything up front adds tokens; context rot means recall drops as token count grows.
- Good context engineering seeks the smallest set of high-signal tokens, not exhaustive loading.
- B
- The source says context windows of all sizes will be subject to context pollution and relevance concerns.
- A bigger window does not remove the attention budget limit.
- D
- Returning raw output moves the tens of thousands of tokens back into the lead's context.
- This breaks the separation of concerns: detailed search context should stay isolated in the subagents.
- Assuming the lead needs every raw detail to be accurate; the pattern deliberately returns only a distilled summary.
- Context rot: as tokens in the window increase, the model's ability to recall information from it decreases.
- Compaction summarizes a conversation near the limit and restarts with the summary; it suits tasks with extensive back-and-forth.
- Structured note-taking persists notes outside the context window, such as a NOTES.md file; it excels for iterative development with clear milestones.
- In Claude Code, the built-in Explore subagent is read-only and keeps exploration results out of the main conversation context.
- Claude Code compaction keeps architectural decisions, unresolved bugs, and implementation details, plus the five most recently accessed files.
Answered
0/10
Correct
0
Score
0%
A team runs an automated pull-request reviewer on Claude Sonnet 4.6. Its system prompt says: "Be conservative and only flag important issues." The bot still flags many style nits, such as variable naming and line length. Engineers want flags only for logic bugs, security vulnerabilities, and breaking API changes. Which prompt change best reduces these false positives?
Correct Answer
Telling a new hire "only report big problems" leaves them guessing. Handing them a list of exactly which problems count, and which to ignore, gets consistent results.
Precise, explicit criteria beat vague qualifiers like "be conservative"; Claude acts on what you specify, not what you imply.
- "Be conservative" and "important" leave the threshold to guesswork, like a new employee without your norms.
- Naming the exact categories to flag and to skip makes the decision rule explicit.
- Adding the reason gives context, and Claude can generalize from the explanation.
- A
- Prefilling the last assistant turn is not supported starting with Claude 4.6 models.
- Such requests return a 400 error, so this change breaks the bot.
- C
- Louder wording adds no criteria; "important" is still undefined.
- The sources advise softening aggressive "CRITICAL: You MUST" language for models that respond strongly to system prompts.
- D
- "Unsure" is as vague as "be conservative"; it defines no categories.
- It says what not to do, while the sources recommend telling Claude what to do instead.
- Assuming stronger emphasis or more caution words fix false positives, when only explicit, specific criteria define what counts.
- Key test: if a colleague with minimal context would be confused by the prompt, Claude will be too.
- Explaining why a behavior matters gives Claude more information about your goals and yields more targeted responses.
- Few-shot examples should be relevant, diverse enough to cover edge cases, and wrapped in <example> tags.
- For classification tasks, use tools with an enum field of valid labels or structured outputs instead of prefill.
- Replace blanket defaults with more targeted instructions to avoid overtriggering.
Answered
0/10
Correct
0
Score
0%
A team submits 20,000 invoice-extraction requests in one Message Batch. When `processing_status` is `ended`, `request_counts` shows 180 `errored` and 40 `expired`. They want to resubmit only those 220 requests, not the whole batch. How should the pipeline identify which source invoices to resend?
Correct Answer
It is like a coat check. Coats come back in any order, so you match each coat by its ticket number, not by where it sits in the line.
Batch results can return out of order, so match each result to its request by a unique custom_id.
custom_idis the developer-provided key for matching results to requests.- Results may come back out of request order, so only an ID you set reliably maps back to the source invoice.
- Streaming results and filtering on
erroredorexpiredgives the exact set to resubmit. - Errored and expired requests are not billed, so retrying only them avoids paying again for succeeded work.
- A
- Results may be given out of request order.
- A line's position in the file does not reliably match its submission position.
- C
- An
erroredresult means a message was not created, so there is no message ID to use. - Even when present, the message ID is not a key you assigned to the source request.
- An
- D
request_countsonly shows how many requests reached each state.- It does not say which individual requests failed.
- Assuming the results file keeps submission order, so line position can stand in for a request identifier.
custom_idmust be 1-64 characters: letters, digits, hyphens and underscores only, and unique within the batch.- Errored, canceled and expired requests are not billed.
- An
invalid_request_errormust be fixed before re-sending; other errors can be retried directly. - Failure of one request in a batch does not affect the processing of other requests.
- Batch results are available for 29 days after the batch is created.
Answered
0/10
Correct
0
Score
0%
An agent connects to two MCP servers, one for Asana and one for Jira. Each server exposes a tool named `search`, described only as "Searches for items." Evaluation transcripts show the agent often queries Jira when the user asks about Asana projects. Which change best helps the agent pick the right tool?
Correct Answer
Two drawers both labeled "Stuff" get mixed up. Labeling them "Kitchen stuff" and "Garage stuff" fixes it.
When tools overlap or have vague purposes, namespace their names and sharpen descriptions so the agent can tell them apart.
- Both tools share a name and a vague description, so the agent cannot tell them apart.
- Service prefixes like
asana_searchandjira_searchdelineate boundaries between the tools. - Descriptions that say when to use each tool give Claude more context to choose correctly.
- A
- Shorter descriptions make the ambiguity worse.
- Guidance calls for extremely detailed descriptions of at least 3–4 sentences each.
- C
- Forcing
toolmakes Claude always use one particular tool. - It does not help the agent choose between two overlapping tools per request.
- Forcing
- D
- Overlapping tools can distract agents from efficient strategies.
- Returning everything wastes limited context on irrelevant results.
- Assuming fewer tokens or forced tool use fixes selection, when the real cause is overlapping names and vague purpose.
- Namespacing can be by service (
asana_search) or by resource (asana_projects_search). - MCP clients sometimes apply namespacing by default.
- Prefix vs. suffix namespacing had non-trivial effects in evaluations; choose based on your own evaluations.
- Descriptions should state when a tool should be used, and when it shouldn't.
- Service-prefixed names are especially important when using tool search.
Answered
0/10
Correct
0
Score
0%
Your app gives Claude the `text_editor_20250728` tool. Claude sends a `str_replace` with `old_str` set to `return None`, which appears in three functions. Your handler replaces text only when there is exactly one match. It returns: "Error: Found 3 matches for replacement text. Please provide more context to make a unique match." What should Claude do next to fix only the intended function?
Correct Answer
Telling a courier to deliver to "the blue house" on a street with three blue houses fails. Add the house number and it works.
str_replace needs an exact old_str that matches exactly one location; add context until it is unique.
- The error itself asks for more context to make a unique match.
- Adding nearby lines from the target function makes
old_strmatch one location only. - The handler then performs the replacement, as it does when exactly one match exists.
- B
- The Claude 4 text editor versions removed the
undo_editcommand. - Nothing was changed anyway, so there is nothing to undo.
- The Claude 4 text editor versions removed the
- C
- The handler replaces only when there is exactly one match.
- The same
old_strstill finds three matches and fails again.
- D
insert_line0 adds text at the beginning of the file.- It inserts new text but does not replace the old line in the target function.
- Assuming the tool picks the first match; it rejects ambiguous edits and requires a unique
old_str.
old_strmust match exactly, including whitespace and indentation.- A zero-match result returns: "Error: No match found for replacement. Please check your text and try again."
- Error results are returned in a
tool_resultwithis_error: true. - On success the example result reads "Successfully replaced text at exactly one location."
text_editor_20250728adds an optionalmax_charactersparameter to control truncation when viewing large files.
Answered
0/10
Correct
0
Score
0%
You got of 10 correct.
Get your full breakdown by email
Per-question review, weak spots to study, and explanations.
The full CCA-F question bank with complete explanations is part of the Exam Pass.