Free Claude Certified Architect - Foundations (CCAR-F) Study Resources
Free to use right now: 460 practice questions with explanations, 22 study notes and 240 flashcards. Questions follow the five domains of the published foundations outline, so practice matches how the exam is structured. Nothing here is a brain dump, and BrainyBee is not the exam vendor — the CCAR-F exam itself is booked and paid for separately.
460
Practice Questions
22
Study Notes
240
Flashcards
CCAR-F exam prep
Preparing for CCAR-F? Start practising now.
Free to use right now: 460 practice questions with explanations, 22 study notes and 240 flashcards. Questions follow the five domains of the published foundations outline, so practice matches how the exam is structured. Nothing here is a brain dump, and BrainyBee is not the exam vendor — the CCAR-F exam itself is booked and paid for separately.
The timed mock is assembled to the blueprint's 60 questions from this bank each time you start one.
Practise, read why an answer was wrong, study that domain, practise again.
The diagnostic draws questions from every domain in the exam guide, so each domain has enough evidence behind it. You answer at your own pace; nothing is charged and no card is asked for.
Each question carries a written explanation, and your results break down by exam domain so you can see which areas are costing you marks rather than guessing at them.
Study notes and flashcards for this certification are on this page and in the workspace, and the free AI tutor will answer follow-up questions about anything you just got wrong. The free tutor has fair-use limits.
Come back and practise again — a fresh set each time, and a full-length timed paper when you want to rehearse the real sitting. Your readiness estimate moves with the evidence; it is an estimate, not a probability of passing.
The diagnostic draws questions from every domain in the exam guide, so each domain has enough evidence behind it. You answer at your own pace; nothing is charged and no card is asked for.
$0 to study
Public study material, practice tests and the free AI tutor cost nothing. The free tutor has fair-use limits.
Optional AI credit top-ups start at $0.50, and premium usage is charged from your wallet.
No subscription and no card are needed to start free practice. The certification exam fee is separate and goes to the exam vendor.
The Claude Certified Architect – Foundations exam asks one kind of question over
and over: given this production system, which design holds up? It is not a
recall test about API parameters. Almost every item puts a working system in
front of you, breaks something about it, and offers four plausible repairs.
The exam at a glance
Items
60
Time limit
120 minutes
Structure
4 scenarios drawn from a bank of 6
Item format
Multiple-choice and multiple-response; each item states how many to select
Passing score
720 scaled, on 100–1,000
Delivery
Proctored — online or test centre, via Pearson VUE
Validity
12 months from the date awarded
The blueprint
Five domains, weighted. The weights are approximate proportions of scored
items, and they are the single best guide to where your study hours belong.
Domain weights
1 · Agentic Architecture & Orchestration
27%
2 · Tool Design & MCP Integration
18%
3 · Claude Code Configuration & Workflows
20%
4 · Prompt Engineering & Structured Output
20%
5 · Context Management & Reliability
15%
Domain 1 is the largest single block and Domain 5 the smallest, but the spread
is narrow — there is no domain you can afford to skip, and no domain that will
carry you on its own.
What the scenario draw means for you
The domains do not distribute evenly across the scenarios either. Prompt
engineering and structured output live mostly in the extraction and CI
contexts; the multi-agent and support contexts carry orchestration and context
management. So the draw moves your domain mix, which is why the practice papers
here draw four scenarios apiece rather than dealing a fixed blend.
A study sequence that works
From cold to exam-ready
1
Read the six scenario briefs first
They are short, and every question you will ever see is framed by one of them. Meeting a scenario for the first time in a practice paper wastes the reading time on orientation instead of on the question.
You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high-ambiguity requests like returns, billing disputes, and account issues. It has access to your backend systems through custom Model Context Protocol (MCP) tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.
Passage quoted verbatim from the official CCAR-F exam guide v1.0, section 5.
This scenario on the exam
Scenario
1 of 6 — four are dealt at random
Primary domains
3
Questions in this hive
45
Primary domains
Agentic Architecture & Orchestration
Tool Design & MCP Integration
Context Management & Reliability
What the exam asks inside this context
Enforcement before money moves. Identity verification ahead of a refund is the canonical prerequisite-gate item, and the correct answer is programmatic every time. A refund above a threshold gets intercepted and rerouted to escalation, not talked out of.
Tool descriptions with boundaries. The four named tools are deliberately close together, and questions turn on what a description fails to say — a threshold, an input format, an edge case.
When to escalate. Three legitimate triggers: the customer asks for a human, policy is silent or has an exception, or the agent cannot make progress. Frustration is not one of them, and neither is a low self-reported confidence.
Facts that survive a long conversation. Amounts, dates, order numbers and statuses belong in a persistent case-facts block outside the summarized history, because summarization is what eats them.
You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution.
Passage quoted verbatim from the official CCAR-F exam guide v1.0, section 5.
This scenario on the exam
Scenario
2 of 6 — four are dealt at random
Primary domains
2
Questions in this hive
50
Primary domains
Claude Code Configuration & Workflows
Context Management & Reliability
What the exam asks inside this context
Configuration scope. Which CLAUDE.md level reaches a teammate, which slash command directory is shared, and why a new joiner is missing instructions that work perfectly for everyone else.
Plan mode against direct execution. Scope decides it. A single-file fix with a clear stack trace is executed; a migration across forty-five files is planned first.
Skills and their frontmatter. context: fork for verbose or exploratory work, allowed-tools to keep a skill from doing damage, argument-hint for a missing parameter.
Iterative refinement. Concrete input/output examples and failing tests, rather than more description. Interacting problems go in one message; independent ones are better fixed one at a time.
You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.
Passage quoted verbatim from the official CCAR-F exam guide v1.0, section 5.
This scenario on the exam
Scenario
3 of 6 — four are dealt at random
Primary domains
3
Questions in this hive
47
Primary domains
Agentic Architecture & Orchestration
Tool Design & MCP Integration
Context Management & Reliability
What the exam asks inside this context
What a subagent inherits. Nothing. Not the parent conversation, not earlier findings, not memory between invocations — so the synthesis subagent gets the complete prior findings in its prompt or it does not have them.
Decomposition that covers. Slice a topic too narrowly and every slice is complete while the cross-cutting question is owned by nobody. Partition scope, by subtopic or by source type, before the subagents start.
Errors that a coordinator can act on. Failure type, what was attempted, partial results, alternatives. A generic 'search unavailable' is technically true and useless.
Provenance through synthesis. Claim-source mappings with URLs, document names and excerpts, preserved and merged rather than compressed away — plus dates, so a year-old figure is not read as a contradiction.
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.
Passage quoted verbatim from the official CCAR-F exam guide v1.0, section 5.
This scenario on the exam
Scenario
4 of 6 — four are dealt at random
Primary domains
3
Questions in this hive
30
Primary domains
Tool Design & MCP Integration
Claude Code Configuration & Workflows
Agentic Architecture & Orchestration
What the exam asks inside this context
Which built-in for which job. Grep searches contents, Glob matches paths, Edit needs a unique anchor and Read plus Write is the fallback when there is not one.
Learning a codebase without reading it all. Grep to entry points, Read to follow imports and trace flows. Reading everything up front fills the context with files the task never touches.
Scoped tool sets. An agent holding explore, edit and deploy together will eventually edit during an investigation. The fix is the tool list, not an instruction.
MCP servers alongside the built-ins. Project versus user scope, environment variable expansion for tokens, and a description good enough that the agent does not fall back to Grep.
Scenario brief168 words
Scenario 5: Claude Code for Continuous Integration
Scenario 5: Claude Code for Continuous Integration
You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.
Passage quoted verbatim from the official CCAR-F exam guide v1.0, section 5.
This scenario on the exam
Scenario
5 of 6 — four are dealt at random
Primary domains
2
Questions in this hive
36
Primary domains
Claude Code Configuration & Workflows
Prompt Engineering & Structured Output
What the exam asks inside this context
Running non-interactively. -p, or the job hangs. Then --output-format json with --json-schema, because inline PR comments need parseable findings rather than prose to scrape.
Precision over emphasis. Explicit categorical criteria — report bugs and security, skip minor style — rather than asking for high-confidence findings only.
Independent review. The session that generated the code is the worst reviewer of it, because it holds the reasoning that produced the mistake.
Repeat runs. Prior findings go into context with an instruction to report only new or unaddressed issues, or every re-run posts the same comments again.
You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.
Passage quoted verbatim from the official CCAR-F exam guide v1.0, section 5.
This scenario on the exam
Scenario
6 of 6 — four are dealt at random
Primary domains
2
Questions in this hive
45
Primary domains
Prompt Engineering & Structured Output
Context Management & Reliability
What the exam asks inside this context
Guaranteed shape. tool_use with a JSON schema, and tool_choice set so a tool is actually called — 'any' when the document type is unknown, forced when one extraction must run first.
Schema design against fabrication. Optional and nullable fields where the source may be silent; an 'unclear' enum value and 'other' plus a detail string where the categories may not fit.
Validation that catches meaning. Schemas remove syntax errors and leave semantic ones. calculated_total beside stated_total, and a conflict_detected boolean, put the check in the output shape.
Retry, and knowing when not to. Retry with the specific validation errors attached. Do not retry when the information is simply absent from the document.
Domain 1 is the biggest block on the exam, and nearly all of it reduces to one question: what is actually in control? The loop is controlled by stop_reason, not by reading the assistant's text. Ordering is controlled by a prerequisite gate, not by an instruction. A subagent's scope is controlled by the tools it was given, not by what it was told. Read every Domain 1 stem for the mechanism, and you will find that the distractors are almost always the version where a person is trusting the model to cooperate.
Domain 1 at a glance
Blueprint weight
27% of scored items
Task statements
7
Questions in this hive
66
Flashcards in this hive
48, one per published objective
What the guide measures here
Design and implement agentic loops with proper termination conditions
Orchestrate multi-agent systems with coordinator-subagent patterns
Configure subagent invocation, context passing, and spawning
Implement multi-step workflows with enforcement and handoff patterns
Apply Agent SDK hooks for tool call interception and data normalization
Design task decomposition strategies for complex workflows
Manage session state, resumption, and forking
The order to learn them in
Working through Domain 1
1
The agentic loop
Start with the agentic loop. Everything else in the domain sits inside one, and the three termination anti-patterns are the most reliably examined facts here.
Hands-on Lab1,199 words
Domain 1 Project — build a support agent, then make it a team
Domain 1 Project — build a support agent, then make it a team
One system, seven stages. You start with a single agent that can call two
tools and finish with a coordinator delegating to subagents across resumable
sessions. Every stage is one of Domain 1's seven task statements, so finishing
the project is finishing the domain's practical half.
Domain 1 is 27% of the exam, the largest block, and nearly all of it reduces to
one question: what is actually in control? You cannot answer that from
reading. You answer it by writing the loop, watching it stop for the wrong
reason, and fixing it.
The project at a glance
Domain
1 · Agentic Architecture & Orchestration (27%)
Stages
7, one per task statement
Difficulty
Intermediate
Total time
180 minutes
You need
Python 3.10+, the anthropic SDK, an API key
Based on
Exam guide Preparation Exercises 1 and 4
What you will be able to do
Write an agentic loop that terminates on stop_reason and explain why the other three termination strategies are wrong
Enforce a business rule in code and say when a prompt instruction is not enough
Build a coordinator that delegates to subagents and explain what each subagent does and does not inherit
Choose between a fixed pipeline and adaptive decomposition, and justify the choice from the task rather than from preference
Decide between resuming a session, forking it, and starting fresh with an injected summary
Before you start
Three commands and a smoke test. Do this before stage 1 — a setup problem
discovered halfway through a loop looks exactly like a loop bug, and you will
spend the difference debugging the wrong thing.
No key yet? Create one in the Anthropic Console. Every stage in this project
costs a few cents at most; the loop you build sends short messages.
Now put this in agent.py and run python agent.py:
python
import anthropic
response = anthropic.Anthropic().messages.create( model="claude-opus-5", max_tokens=64, messages=[{"role":"user","content":"Reply with the single word ready."}],)print(response.stop_reason, response.content[0].text)
You should see end_turn ready. If you do, the install works, the key works,
and you have already met the one field the whole of stage 1 turns on.
If instead you see an authentication error, the key is wrong or not exported in
this shell. If the import fails, the virtualenv is not active — the source
line above has to be re-run in every new terminal.
Build it in this order
The order is not the guide's. It is the order the system needs: enforcement has
to have a loop to enforce, hooks intercept calls the loop is already making, and
a coordinator is only worth having once there is decomposition to hand out.
Seven stages
1
1.1 · The loop · 30 min
BUILD — Two tools — lookup_order and a calculator — and a loop that calls the Messages API, branches on stop_reason, executes every tool_use block, and appends BOTH the assistant message and a user message carrying the tool results. WHY — Everything after this sits inside this loop, and it is the most reliably examined thing in the domain. Branching on stop_reason rather than on content is the difference between an agent that works and one that works on your test cases. YOU SHOULD SEE — History growing by exactly two messages per tool iteration, each tool_result carrying the tool_use_id of the call it answers, and the loop exiting only on stop_reason or the safety cap. TRAP — Appending the tool results but not the assistant message, or the reverse. Either one leaves the model reasoning from the same information twice, and the symptom is an agent that repeats a call rather than one that errors. STUCK? — Print response.stop_reason on every iteration before you write any branching at all. Half the bugs in this stage are visible the moment you can see the value the loop is supposed to be reading.
Stage 1 in full
The four steps
Send the whole conversation. Read stop_reason. If it is tool_use, run
the tools, append the results, and go again. If it is end_turn, you are
done. The Messages API is stateless — everything the model knows on iteration
four is something your loop put in the request.
Beyond the two values the guide names
The exam guide keys tool_use and end_turn — the two a basic loop
branches on, and the two you will be graded on. The live API returns five more,
and a loop that assumes anything other than end_turn means tool_use will
mishandle all of them:
stop_reason
What it means
end_turn
Finished naturally. Stop.
tool_use
Wants one or more tools. Run them and continue.
max_tokens
Hit your max_tokens ceiling. The response is truncated.
stop_sequence
Hit a stop sequence you supplied.
pause_turn
Paused a long-running turn and can be resumed.
refusal
Declined on safety grounds, on an otherwise normal 200 response.
model_context_window_exceeded
Filled the context window before max_tokens. Truncated.
refusal arrives on a successful HTTP response, so a loop that only checks
status codes treats it as ordinary output — and its stop_details identifies
the policy category. The safe default is to treat anything other than
end_turn as "not finished, find out why".
For the exam, know the two. For production, handle the seven.
Parsing natural language. Checking whether Claude said "I'm done".
Ambiguous by construction — it may have finished the first file and be about to
open the second.
An iteration cap as the primary stopping mechanism. It either cuts off work
that needed twelve iterations or burns seven on a task that finished in three. A
cap is a safety net; it is not a design.
Treating assistant text as completion. Claude routinely returns explanatory
text alongside a tool_use block in the same response — "Let me look up your
order" and the lookup arrive together. Text presence says nothing about whether
the agent is finished.
Multiple choice · Medium
An agent sometimes terminates early when Claude returns text alongside a tool call. The loop decides it is finished by checking whether the first content block has type text. Users report incomplete answers on complex queries. What should change?
Reference implementation
Work the stage first. This is what a finished stage 1 looks like, and the base
every later stage modifies.
python
import ast
import operator
import anthropic
client = anthropic.Anthropic()MODEL ="claude-opus-5"MAX_ITERATIONS =20TOOLS =[{"name":"lookup_order","description":"Look up an order by id. Returns status, total and placed_at.","input_schema":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"],},},{"name":"calculator","description":"Evaluate an arithmetic expression and return the result.","input_schema":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"],},},]# A whitelist evaluator, not eval(). A tool is an execution surface the model# chooses to invoke, so its blast radius is a design decision — this one can add,# subtract, multiply and divide numbers, and can do nothing else._OPS ={ast.Add: operator.add, ast.Sub: operator.sub, ast.Mult: operator.mul, ast.Div: operator.truediv}defcalculate(expression):defwalk(node):ifisinstance(node, ast.Constant)andisinstance(node.value,(int,float)):return node.value
ifisinstance(node, ast.BinOp)andtype(node.op)in _OPS:return _OPS[type(node.op)](walk(node.left), walk(node.right))ifisinstance(node, ast.UnaryOp)andisinstance(node.op, ast.USub):return-walk(node.operand)raise ValueError("unsupported expression")return walk(ast.parse(expression, mode="eval").body)defrun_tool(name, tool_input):if name =="lookup_order":return"status=delivered total=129.99 placed_at=2026-08-02"if name =="calculator":try:returnstr(calculate(tool_input["expression"]))except ValueError as error:returnf"Error: {error}"return"Unknown tool"defrun_agent(prompt): messages =[{"role":"user","content": prompt}]for _ inrange(MAX_ITERATIONS): response = client.messages.create( model=MODEL, max_tokens=16000, tools=TOOLS, messages=messages
)# Anything other than end_turn is "not finished, find out why".if response.stop_reason =="end_turn":returnnext(b.text for b in response.content if b.type=="text")if response.stop_reason =="refusal":returnf"Declined: {response.stop_details.category}"if response.stop_reason !="tool_use":returnf"Stopped early: {response.stop_reason}"# The assistant turn goes back verbatim — the tool_use blocks in it are# what each tool_result below refers to. messages.append({"role":"assistant","content": response.content})# Every result in ONE user message. Splitting them teaches the model to# stop calling tools in parallel. results =[{"type":"tool_result","tool_use_id": block.id,"content": run_tool(block.name, block.input),}for block in response.content
if block.type=="tool_use"] messages.append({"role":"user","content": results})print("WARNING: safety cap reached — the loop should have ended on stop_reason")return"Terminated by safety cap"if __name__ =="__main__":print(run_agent("Look up order A-4417 and tell me what a 20% refund would be."))
Three details worth reading twice. The refusal branch reads stop_details,
which is populated for that value alone. The loop is a for over the cap
rather than a while True with a counter, so the cap is structurally a bound
— exactly what the anti-pattern says it should be. And the calculator walks a
whitelisted syntax tree rather than calling eval: a tool is an execution
surface the model decides to invoke, and a lab that ships eval teaches the
opposite of what Domain 2 is about.
Prove stage 1 before moving on
Break the append on purpose: stop adding the tool_result message and re-run.
The agent should call the same tool again — the repeated-call symptom seen
from the inside.
Log stop_reason every iteration. A two-tool prompt should print tool_use,
tool_use, end_turn.
Confirm the safety cap never trips on a normal query. If it does, the loop is
not terminating on stop_reason and stage 1 is not finished.
When you get stuck
Every stage above ends with a STUCK? line — the first thing worth checking,
which is usually the thing actually wrong.
Past that, in the app: the Help button in this page's toolbar sends the
tutor the section you are currently reading, together with the project's title,
so you can ask "why does this not work" without pasting anything in. It knows
which stage you are on.
Print stop_reason before you branch on it. Most of stage 1's failures stop being mysterious the moment the value is on screen.
Print the message list, not just the reply. Almost every bug in stages 1 to 3 is a message that was not appended, appended twice, or appended in the wrong role. The history is the state; look at the state.
Change one thing. These stages compose, so a stage that breaks after you edited two of them gives you no information about either.
Where the depth lives
This page is for building. The reading is elsewhere, and repeating it here would
put the same claims in three places to drift apart:
The Domain 1 roadmap — what the domain is about, the order to learn it
in, and where it catches people
7 flashcard decks, 48 cards — one card per published objective
66 Domain 1 questions — judgement under exam conditions, inside the six
production scenarios
Sources
CCAR-F Exam Guide v1.0, section 6 — Domain 1's seven task statements, which are this project's seven stages.
CCAR-F Exam Guide v1.0, section 8 — Preparation Exercise 1 (Build a Multi-Tool Agent with Escalation Logic) and Exercise 4 (Design and Debug a Multi-Agent Research Pipeline). This project merges them: exercise 1 is the loop-and-enforcement half, exercise 4 the coordinator half.
Anthropic Messages API reference — the stop_reason set, stop_details, the tool_result message shape, and the parallel-tool-use rule.
The tool-use round trip, from the API documentation
The exam guide describes the agentic loop in prose. This is the same loop as the API documents it: the exact message shapes, the exact field names, and the full set of values that decide whether your loop runs again.
One turn, in full
A client tool round trip is three messages. Your request defines the tool; Claude answers with a tool_use block; you run the tool and send a tool_result back.
You sendmessages plus a tools array. Each tool carries a name, a description, and an input_schema.
Claude replies with stop_reason: "tool_use" and one or more tool_use blocks. Each block has an id, a name, and an input object.
You append two messages — the assistant turn verbatim, then a user turn whose content is a tool_result block carrying tool_use_id and content. The tool_use_id must match the id from step 2.
You send again. Claude uses the result to answer.
Where the code runs
The documentation splits tools by where they execute, and it is worth holding because it decides whether you write a handler at all.
Kind
Runs
You handle results?
Client tools
In your application
Yes — you send tool_result
Anthropic-schema client tools
In your application
Yes — schema is published, execution is yours
Server tools
On Anthropic's infrastructure
No — results come back in the same response
bash and text_editor are client tools with Anthropic-published schemas. web_search, web_fetch and code_execution are server tools.
Every stop_reason value
This is the set the loop branches on. The exam guide keys two of them; the API returns seven.
Value
Meaning
What you do
end_turn
Claude finished naturally
Use the response
tool_use
Claude is calling a tool
Run it, append the result, send again
max_tokens
Hit the max_tokens you set
Treat as truncated; raise the limit or continue
stop_sequence
Emitted one of your stop_sequences
Read the stop_sequence field for which
pause_turn
Server-tool loop hit its iteration limit
Send the assistant content back to continue
refusal
Declined on safety grounds
Read stop_details; retry on a fallback model
model_context_window_exceeded
Filled the context window before max_tokens
Treat the response as truncated
Two details the documentation is specific about: refusal returns HTTP 200, not an error, and the pause_turn iteration limit for server-side tool loops defaults to 10.
tool_choice
tool_choice constrains a single request. The default is {"type": "auto"}, which lets Claude decide whether to call a tool at all.
Setting
Guarantee
auto
None — Claude may return text instead
any
A tool will be called, but not which one
tool with a name
That specific tool is called
none
No tool is called
disable_parallel_tool_use: true limits a turn to at most one tool call.
Strict tool use
Adding strict: true to a custom tool definition makes Claude's calls match your schema exactly. That eliminates a class of shape error and does nothing about semantics — a schema-valid call can still put the right value in the wrong field.
Claude Certified Architect - Foundations (CCAR-F) Practice Questions
Try 15 sample questions from a bank of 460. Answers and detailed explanations included.
Q1easy
An engineer named yesterday's investigation session auth-refactor. Today they want to continue that specific prior conversation. Which mechanism does the guidance cite?
A.
Named session resumption using --resume with the session name to continue that specific prior conversation
B.
Start a new session and re-explain the context
C.
Export the transcript and paste it into a new chat
D.
Rely on auto-memory to reconstruct the session
Show answer & explanation
Correct Answer: A
Named session resumption via --resume continues a specific prior conversation - the guide's mechanism for picking up named investigation sessions across work sessions. Re-explaining, copy-pasting transcripts, and hoping memory reconstructs the session are the workarounds resumption replaces.
Q2medium
Restricting each subagent's tools to its role is best described as what?
A.
A design decision that prevents cross-specialisation misuse
B.
A corrective applied after misuse has been observed
C.
An optimisation that reduces the request payload size
D.
A security control unrelated to selection quality
Show answer & explanation
Correct Answer: A
Deciding what an agent holds is what stops the misuse arising, rather than detecting it afterwards. It happens to reduce payload and improve safety, but the objective frames it as preventing misuse by construction.
Q3easy
An agentic loop sends a request and receives a response. Which field determines whether the loop iterates again?
A.
The presence of text content in the response
B.
Whether any tool_use block appears first in the content array
C.
The number of iterations completed so far
D.
The stop_reason field on the response
Show answer & explanation
Correct Answer: D
Loop control is decided by one authoritative field on the response. The other three are all observable and all misleading: text arrives alongside tool requests, a counter measures duration rather than completion, and block ordering is not a signal the API guarantees.
Q4medium
One MCP tool returns dates as Unix seconds, another as ISO 8601 strings, and a third reports status as a numeric code. Where should the reconciliation happen?
A.
In a PostToolUse hook, before the model processes the result
B.
In each prompt that reasons about a date or status value
C.
In the tool descriptions, documenting each format precisely
D.
In the agent's system prompt, listing the three formats once
Show answer & explanation
Correct Answer: A
Intercepting results on the way back means the reconciliation happens once, in code, where it can be tested — and the model then sees one consistent shape. Every prompt-based option repeats the work and can get it wrong each time.
Q5hard
Policy covers own-site price adjustments and says nothing about competitor matching. What should the agent do?
A.
Decline, since what is not permitted is forbidden
B.
Escalate, since silence is a gap rather than an answer
C.
Apply the own-site rule by analogy to the competitor case
D.
Approve it, since nothing in policy prohibits it
Show answer & explanation
Correct Answer: B
Treating silence as refusal invents a rule nobody wrote; treating it as permission gives away something never agreed. Only escalation avoids both, and it puts the decision with someone who can make it.
Q6medium
A follow-up request for self-correction carries which three things?
A.
The document, the failed extraction, and the specific errors
B.
The document, the schema, and a higher token budget
C.
The failed extraction, the schema, and an example output
D.
The document, the errors, and a stricter temperature setting
Show answer & explanation
Correct Answer: A
Without the document there is nothing to re-extract from; without the failed attempt the model may reproduce it; without the errors it does not know what was wrong. Dropping any one makes the retry weaker than it looks.
Q7easy
A Jira MCP server is needed by everyone on the team. Where does it belong?
A.
Project scope, in .mcp.json, shared through version control
B.
User scope, in ~/.claude.json, replicated by each developer
C.
Either, provided every developer applies the same values
D.
Project scope, but only after the server has been trialled
Show answer & explanation
Correct Answer: A
Shared team tooling belongs in the file that travels with the repository, so everyone receives it without repeating a setup step. Replicating a config by hand is the failure this scope exists to prevent.
Q8easy
You need every test file in a project, wherever it lives. Which tool?
A.
Grep, searching for the word "test" inside every file
B.
Read, loading directories and filtering the listings
C.
Glob, matching file paths against a name pattern
D.
Edit, whose anchor matching identifies test blocks
Show answer & explanation
Correct Answer: C
Identifying files by how they are named is a path question, and a pattern answers it regardless of directory. Searching contents for a word would return every file that merely mentions testing.
Q9medium
In your multi-agent research system, the coordinator receives a tool result from a web-search subagent call. For the model to reason about its NEXT action, what must your loop do with that result?
A.
Summarize it into the system prompt before the next call
B.
Append it to the conversation history as a tool result message, then send the updated history for the next iteration
C.
Discard it after extracting a confidence score, since results are transient
D.
Store it in an external database and reference it by ID in the next prompt
Show answer & explanation
Correct Answer: B
Tool results are appended to the conversation history so the model can incorporate the new information into its reasoning about the next action - the API is stateless between calls, so the full history including tool results is what carries context forward. External stores and system-prompt summaries break the model's direct access to what its tool call returned.
Q10medium
A closed enum has no value for a document that fits none of its categories. What happens?
A.
The extraction fails validation and is retried automatically
B.
The field is omitted, since no value applies
C.
The nearest category is chosen, reported as confidently as any other
D.
The enum is extended automatically with a new value
Show answer & explanation
Correct Answer: C
Forced to choose, the model picks the closest fit and nothing marks the answer as a compromise. An unclear value lets ambiguity be recorded as ambiguity, and an other value with detail preserves what the document actually said.
Q11medium
Your CI review bot's system prompt says: When the diff mentions authentication, always run security_scan first. Since adding it, security_scan fires on diffs that merely contain the string auth in unrelated identifiers, drowning real findings. Per the guidance, where should you look FIRST?
A.
Remove the security_scan tool entirely so the association disappears
B.
Audit the system prompt for keyword-sensitive instructions that create unintended tool associations, and restate the intent as explicit criteria instead of keyword triggers
C.
Increase the CI runner memory allocation, since tool misfires correlate with resource pressure
D.
Reorder the tools array so security_scan appears last, breaking the keyword association
Show answer & explanation
Correct Answer: B
Keyword-sensitive system-prompt instructions create unintended tool associations - here the literal token auth hijacks the intended semantic condition. The prescribed remedy is reviewing the system prompt for such triggers and replacing keyword matching with explicit criteria (define what counts as an auth-relevant change). Removing the tool destroys capability rather than fixing routing; tool order does not govern selection.
Q12hard
A refund is refused by policy. Why must the tool supply customer-friendly wording rather than only a flag?
A.
Because the flag alone would cause the agent to retry
B.
Because policy text must be logged for compliance
C.
Because the agent will otherwise compose its own explanation
D.
Because customers cannot be shown raw error categories
Show answer & explanation
Correct Answer: C
The agent has to say something, and without supplied text it produces something fluent and authoritative about why the request was declined. Supplying the wording is what makes the refusal the customer hears the one you actually wrote.
Q13medium
You want a customised version of a shared team skill. What matters most about how you create it?
A.
Recording the divergence in the project's CLAUDE.md
B.
Keeping it in project scope so the team can review it
C.
Giving your variant a different name from the shared one
D.
Copying the shared skill's frontmatter unchanged
Show answer & explanation
Correct Answer: C
Two skills claiming one identity makes which behaviour you get depend on resolution rules rather than intent, while teammates still see the original and cannot reproduce what you describe. A distinct name keeps both available and unambiguous.
Q14hard
A coordinator sends its synthesis subagent a tidy summary of what search found. What has it given up?
A.
Nothing — a summary is sufficient for synthesis by design
B.
Reasoning over the evidence rather than someone else's compression
C.
The ability to invoke the synthesis subagent more than once
D.
Parallel execution, since summarising is a sequential step
Show answer & explanation
Correct Answer: B
The objective asks for complete findings to go forward, not a condensed version, because the synthesis agent can only work from what it receives. Compressing first means it reasons about the coordinator's reading of the evidence.
Q15medium
A large task is to be split in two halves, worked on concurrently and then merged. Is forking the right tool?
A.
Yes, provided both branches start from the same baseline
B.
Yes, since forking exists to parallelise expensive work
C.
Only if the halves have no shared dependencies between them
D.
No — forked branches never rejoin, and this work must merge
Show answer & explanation
Correct Answer: D
Forking suits exploring alternatives you will choose between, not dividing work that has to come back together. There is no mechanism to reunite branches, so the merge the task requires has nowhere to happen.
Claude Certified Architect - Foundations (CCAR-F) Flashcards
240 flashcards for spaced-repetition study. Showing 30 sample cards below.
Agentic loops(6 cards shown)
Question
What drives each turn of the agentic loop?
Answer
stop_reason. A value of tool_use means Claude wants tools run: execute them, append the results, send again. end_turn means it has finished. The loop is a while keyed on that field — never on anything in the assistant's text.
Question
Where do tool results go between iterations?
Answer
Into the conversation history, as a tool_result message alongside the assistant message that requested it. The API is stateless between calls, so the history you send is the only thing carrying the result forward.
Question
Model-driven control flow versus a pre-configured decision tree — what actually differs?
Answer
A decision tree routes on surface keywords and cannot adapt once it has branched. In an agentic loop Claude picks the next tool from the full context, including what earlier tools returned, which is what lets it handle an ambiguous request.
Question
Sketch the agentic loop's control flow.
Answer
While stop_reason is tool_use: run the requested tools, append their results to the history, and call again. Break when it is end_turn. No turn counters, no keyword matching.
Question
Your agent repeats a mistake the validator already caught. What did the loop fail to do?
Answer
Add the tool results to the context between iterations. Without them the next request is identical to the last one, so the model has nothing new to reason from and makes the same call again.
Question
Name the three loop-termination anti-patterns.
Answer
Parsing natural-language text for phrases like 'I have completed your request'; using an arbitrary iteration cap as the PRIMARY stopping mechanism; and treating any non-empty assistant text as completion. A cap is a runaway backstop, not the design.
Batch processing strategy(8 cards shown)
Question
State the Message Batches API's three headline terms.
Answer
50% cost savings, a processing window of up to 24 hours, and no guaranteed latency SLA. The saving is paid for in time, and the absent SLA is the part that decides suitability.
Question
Which workloads belong in a batch, and which must never be?
Answer
Non-blocking, latency-tolerant work: overnight reports, weekly audits, nightly test generation. Never a blocking workflow such as a pre-merge check — nobody can wait up to 24 hours to merge.
Question
Can a batch request run an agentic tool loop?
Answer
No. The batch API does not support multi-turn tool calling within a single request — it cannot execute a tool mid-request and feed the result back. Work needing a loop belongs on the synchronous API.
Question
How do you know which batch response answers which request?
Answer
The custom_id you set on each request comes back on its response. Without it, correlating a returned result to its input is guesswork.
Question
Match the API to the workflow: a pre-merge check, and a weekly analysis.
Answer
Synchronous for the pre-merge check — it blocks a person. Batch for the weekly analysis — nothing waits on it, so the 50% saving costs nothing that matters.
Question
You owe a 30-hour SLA and batches take up to 24. How often do you submit?
Answer
Every 4 hours. Worst case a document waits the full 4-hour window before submission and then the full 24-hour processing, which is 28 — inside 30. Submission frequency is what makes an SLA survive an unguaranteed processing window.
Question
Part of a batch failed. What do you resubmit?
Answer
Only the failed items, identified by custom_id, with whatever modification the failure calls for — chunking the documents that exceeded context limits, for instance. Resubmitting the whole batch pays twice for everything that already worked.
Question
What do you do before sending 10,000 documents through a batch?
Answer
Refine the prompt on a sample. First-pass success is what a batch's economics rest on — a flaw found on document one is found on all 10,000, and every resubmission cycle spends the saving again.
Grep — file CONTENTS, for patterns like function names, error messages or import statements. The question it answers is "where does this text appear", not "which files exist".
Question
Which tool matches file paths?
Answer
Glob — file NAMES and extensions. It answers "which files exist by this pattern" and never looks at what is inside them.
Question
Read/Write versus Edit — what is each for?
Answer
Read and Write handle the whole file. Edit makes a targeted modification by matching unique text, so it changes one place without rewriting everything around it.
Question
Edit fails because the anchor text appears more than once. What is the fallback?
Answer
Read the file, then Write it back with the change. Retrying Edit with the same non-unique anchor fails identically — the fallback is the reliable path, not a workaround for a broken tool.
Question
You need every caller of a function across the codebase. Which tool?
Answer
Grep. Callers are content, and the same goes for tracking down where an error message is produced — both are searches through what files say rather than what they are named.
Question
You need every test file under a directory tree. Which tool?
Answer
Glob, with a pattern like **/*.test.tsx. It is a naming question, so it never opens a file.
Question
There is no unique anchor for the change you need. Walk through the alternative.
Answer
Read the full contents, apply the change to what you have, and Write the result. You are supplying the whole file rather than asking the tool to locate a spot that cannot be located.
Question
How do you build understanding of an unfamiliar codebase?
Answer
Incrementally: Grep for entry points, then Read to follow the imports and trace the flows that matter. Reading everything up front fills the context with files the task never touches and dilutes attention on the ones it does.
Question
A function is re-exported through wrapper modules. How do you find its real usage?
Answer
Identify all the exported names first, then search for each name across the codebase. Searching only the original name finds the wrappers and misses every call that goes through them.
Claude Code in CI/CD(7 cards shown)
Question
Which flag runs Claude Code non-interactively?
Answer
-p, also spelled --print. It is what makes the CLI usable inside an automated pipeline, where there is nobody to answer a prompt.
Question
Which two flags enforce structured output in CI?
Answer
--output-format json and --json-schema. The first makes the output machine-readable; the second makes it conform to a shape the pipeline can rely on.
Question
How does a CI-invoked run learn your project's conventions?
Answer
From CLAUDE.md — testing standards, fixture conventions, review criteria. CI has no conversation history to draw on, so anything not written down is unavailable to it.
Question
Why not have the session that wrote the code review it?
Answer
It is less effective at reviewing its own changes. It carries the reasoning that produced them, so the assumptions behind a mistake are shared rather than examined. An independent instance sees the diff without the story.
Question
Your CI job hangs waiting for input. What was missing?
Answer
The -p flag. Without it the run expects interaction, and a pipeline with nobody at the keyboard waits until it times out.
Question
You want findings posted as inline PR comments. What produces them?
Answer
--output-format json with --json-schema, giving machine-parseable structured findings the pipeline can place on specific lines. Prose has to be scraped, and scraping is where line numbers get lost.
Question
Your re-run after new commits repeats every comment from the last review. What is missing?
Answer
The prior findings in context, plus an instruction to report only new or still-unaddressed issues. Each run is independent, so without the earlier review it rediscovers everything and posts it again.