Foundations Mock Exam 3 — 60 Scenario Questions, Timed (Q649–Q708)
A full-length CCAR-F practice simulation, built like the official exam: 60 questions in 120 minutes, under 4 scenarios drawn from the bank of 6, 15 questions per scenario. This mock uses Code Generation with Claude Code · Multi-Agent Research System · Developer Productivity with Claude · Claude Code for Continuous Integration. Every question was written for this guide against a task statement of the official Claude Certified Architect – Foundations Exam Guide (v1.0, July 2026), and the domain counts follow its blueprint. 4 questions are multiple-response and say “Select TWO”; the rest say “Select ONE”. This is not an official Anthropic or Pearson VUE exam. It does not reproduce, reconstruct or recall any live exam item, and the guide’s sample questions are used only as a model of style. Other full mocks: Mock 1 · Mock 2 · Mock 4.
Time remaining: 02:00:00
Loading the timed runner…
| Official domain | Study it here | Blueprint weight | Questions here |
|---|---|---|---|
| Agentic Architecture & Orchestration (official Domain 1) | Domain 1 lesson | 27% | 16 |
| Tool Design & MCP Integration (official Domain 2) | Domain 4 lesson | 18% | 11 |
| Claude Code Configuration & Workflows (official Domain 3) | Domain 2 lesson | 20% | 12 |
| Prompt Engineering & Structured Output (official Domain 4) | Domain 3 lesson | 20% | 12 |
| Context Management & Reliability (official Domain 5) | Domain 5 lesson | 15% | 9 |
How to read your result. The runner reports a practice score: raw questions correct out of 60, a per-domain breakdown, the elapsed time and the unanswered count. Unanswered questions count as incorrect. The live exam reports a scaled score (pass mark 720 on 100–1,000); this page does not convert a raw score into a scaled score, because no public conversion exists. A useful study heuristic: aim for 80% here, with no domain under 65%, on a mock you have not seen before. Untimed practice by domain lives in Practice Questions and Concept Drills.
Foundations mock exam 3 · 60 questions (Q649–Q708)
Scenario 1 · Code Generation with Claude Code
Q649. SQL migration files live in apps/api/db/migrations/, packages/ledger-core/migrations/ and several jobs/*/migrations/ folders, and new jobs add new folders every month. Every migration must include a reversible down step and must never drop a column in the same release that stops writing it. Which way of giving Claude Code this convention is most maintainable? (Select ONE.) A) A CLAUDE.md inside each existing migrations folder that repeats the convention, plus an onboarding note asking job authors to copy it into new folders. B) A .claude/rules/ file with paths frontmatter such as /migrations//*.sql, so it loads for migrations in any folder. C) A project skill named migration-rules whose description mentions SQL migrations, so Claude can load the convention when it decides the task involves one. D) A section in the root CLAUDE.md that states the convention and asks Claude to apply it when the file being edited appears to be a migration.
Understand Foundations Mock Exam 3 · Q649 · the situation and each part of the question
The real situation behind this question
Tallyforge's database changes are spread across the monorepo. The API has migrations, the ledger package has migrations, and almost every new batch job brings its own migrations folder. Twice this year a migration dropped a column that a running release still wrote, and the on-call engineer had to restore data. The platform lead wants Claude Code to know the safety convention every time it touches a migration, wherever that file lives.
Read the question in parts
Part 1 · several jobs/*/migrations/ folders
the same file type lives in many sibling folders, so a single directory-level file cannot cover it.
Part 2 · Every migration must include a reversible down step
the convention attaches to a file type, not to a team or folder, which points to a file-pattern match.
What you are being asked to decide
Migrations live in many folders that keep multiplying. Where do you put their rules? Tests choosing a glob path rule over directory CLAUDE.md files for scattered file types.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Path-scoped rule | a .claude/rules/ file whose paths glob makes Claude Code load it only for matching migration files |
| Directory-bound | a CLAUDE.md applies to its own folder tree only, so it cannot follow migrations into new folders |
Study: .claude/rules/ — path-scoped conventions with glob frontmatter Frontmatter CLAUDE.md
Understand Foundations Mock Exam 3 · Q649's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The file type is scattered and the folder list keeps growing. A .claude/rules/ file with a glob in its paths frontmatter follows the file type anywhere and loads only when relevant. Directory files, root sections and skills each leave gaps.
Connect the design to the situation
Migration folders under apps, packages and every new batch job, all needing the same safety rule.
Best answer: B. A path-scoped rule matches files by glob wherever they live, including folders created next month, and loads only when matching files are in play. Copies in each migrations folder are directory-bound and drift, and new folders depend on someone remembering to copy the file. A root section loads for every session and still relies on inference, and a skill loads only when the model chooses it.
The decisive evidence in the stem
new jobs add new folders every month
The set of folders keeps changing, so only a pattern that matches by file path, not by fixed directory, keeps covering every migration automatically.
Official objective tested: Task 3.3 · Apply path-specific rules for conditional convention loading
What each choice would do here
A · Why this does not meet the full requirement
A CLAUDE.md inside each existing migrations folder that repeats the convention, plus an onboarding note asking job authors to copy it into new folders.
Copies drift apart and every new job folder depends on a person remembering to copy the file.
The convention exists in four or five copies that will slowly diverge as people edit one and forget the others. The next new job folder has no copy until someone remembers the onboarding note, which is exactly the gap that caused past incidents.
B · Why this meets the requirement
A .claude/rules/ file with paths frontmatter such as /migrations//*.sql, so it loads for migrations in any folder.
One glob rule covers every current and future migrations folder and loads only when relevant.
The rule file's paths field lists a glob that matches migration SQL anywhere in the tree. When Claude reads or edits such a file, Claude Code adds the rule to context. A new jobs/payouts/migrations/ folder is covered on day one with no extra work.
C · Why this does not meet the full requirement
A project skill named migration-rules whose description mentions SQL migrations, so Claude can load the convention when it decides the task involves one.
A skill loads only when the model selects it, so the safety rule becomes optional.
The convention now loads only when Claude matches the skill description to the task. A quick migration edit inside a larger change may never trigger it, so the safety rule silently does not apply in exactly the cases that are risky.
D · Why this does not meet the full requirement
A section in the root CLAUDE.md that states the convention and asks Claude to apply it when the file being edited appears to be a migration.
A root section loads in every session and still depends on Claude guessing the file type.
Every session, including pure UI work, carries the migration convention, which wastes context. Claude must also decide for itself that a file is a migration, so the rule is applied by inference rather than by a reliable path match.
Check your understanding · explain the design in your own words
Migrations live in many folders that keep multiplying. Where do you put their rules?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: .claude/rules/ — path-scoped conventions with glob frontmatter
Study: .claude/rules/ — path-scoped conventions with glob frontmatter Frontmatter CLAUDE.md
Return to Foundations Mock Exam 3 · Q649's situation and clause-by-clause explanation
Answer
**B.** A path-scoped rule matches files by glob wherever they live, including folders created next month, and loads only when matching files are in play. Copies in each migrations folder are directory-bound and drift, and new folders depend on someone remembering to copy the file. A root section loads for every session and still relies on inference, and a skill loads only when the model chooses it.Q650. Tallyforge must replace its hand-written date helpers with the Temporal API across about 60 files in apps/web and apps/api. Two valid approaches exist: wrap Temporal in an adapter module first, or replace call sites directly, and the choice changes how much test churn the team absorbs. How should the engineer run this work in Claude Code? (Select ONE.) A) Start in plan mode to map every helper usage and compare both approaches, approve one plan, then let Claude execute the approved plan with normal edits. B) Use direct execution with a long first prompt that specifies the adapter approach and exact edits for every file, so no exploration step is needed. C) Start in direct execution and switch to plan mode only if Claude reports unexpected dependencies between helpers partway through the edits. D) Use direct execution file by file with a commit after each file, so any bad edit can be reverted and the best approach becomes clear as work proceeds.
Understand Foundations Mock Exam 3 · Q650 · the situation and each part of the question
The real situation behind this question
The team's own date helpers have caused three time-zone bugs this year, and the Temporal API is now available in every runtime Tallyforge supports. The migration touches about 60 files. The tech lead is unsure whether to keep an adapter layer, which isolates future changes but adds code, or to replace call sites directly, which is cleaner but rewrites many tests. Picking wrong means redoing much of the work.
Read the question in parts
Part 1 · across about 60 files
this is a large multi-file change where late discoveries are expensive to undo.
Part 2 · the choice changes how much test churn the team absorbs
the decision has real consequences, so it should be made with evidence before any edits.
What you are being asked to decide
A big library swap with two possible designs. Plan first, or edit straight away? Tests combining plan mode for design with direct execution for implementation.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Plan mode | a Claude Code permission mode where Claude explores and proposes but does not edit source until the plan is approved |
| Direct execution | Claude Code editing files right away, suited to the implementation once the approach is chosen |
Study: Plan mode vs direct execution — and the Explore subagent Permission mode Claude Code
Understand Foundations Mock Exam 3 · Q650's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The stem already shows a large change with two valid designs. Plan mode resolves the design before edits, and direct execution then carries out the approved plan. Incremental, pre-specified or wait-and-see approaches all decide the design too late or without evidence.
Connect the design to the situation
Replacing date helpers with Temporal in 60 files, adapter-first or direct replacement.
Best answer: A. A 60-file migration with two valid approaches is the case plan mode exists for: explore usages and decide before edits, then implement the approved plan directly. File-by-file commits make rework revertible but do not avoid it, since the approach choice would surface only after many edits. Pre-specifying the adapter approach skips the comparison the stem says matters, and waiting for surprises ignores complexity that is already known.
The decisive evidence in the stem
Two valid approaches exist
Several valid approaches plus a large multi-file change is the defining signal for plan mode, followed by direct execution of the chosen plan.
Official objective tested: Task 3.4 · Determine when to use plan mode vs direct execution
What each choice would do here
A · Why this meets the requirement
Start in plan mode to map every helper usage and compare both approaches, approve one plan, then let Claude execute the approved plan with normal edits.
Explores and decides before touching 60 files, then implements the approved design efficiently.
In plan mode Claude reads the helpers and their call sites, counts usages, and lays out both approaches with their test impact. The engineer approves one. Claude then leaves plan mode and edits the files according to the plan, with tests run along the way.
B · Why this does not meet the full requirement
Use direct execution with a long first prompt that specifies the adapter approach and exact edits for every file, so no exploration step is needed.
Fixes the approach before anyone has compared the two options against the real usages.
Claude follows the detailed instructions without checking whether the adapter fits the real call sites. If some usages need behaviour the adapter does not cover, the plan breaks midway, and nobody compared the direct approach at all.
C · Why this does not meet the full requirement
Start in direct execution and switch to plan mode only if Claude reports unexpected dependencies between helpers partway through the edits.
Waits for complexity to appear although the stem already states it up front.
The known complexity, 60 files and two designs, is treated as a surprise that might never happen. By the time a dependency forces a switch to plan mode, many files may already follow an approach the team would not have chosen.
D · Why this does not meet the full requirement
Use direct execution file by file with a commit after each file, so any bad edit can be reverted and the best approach becomes clear as work proceeds.
Revertible commits limit damage but still discover the right approach only after costly edits.
Claude begins replacing helpers in the first files and commits each one. The team learns only after twenty files whether the adapter was needed. Reverting is possible, but the edits, reviews and test runs for those files are wasted work.
Check your understanding · explain the design in your own words
A big library swap with two possible designs. Plan first, or edit straight away?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Plan mode vs direct execution — and the Explore subagent
Study: Plan mode vs direct execution — and the Explore subagent Permission mode Claude Code
Return to Foundations Mock Exam 3 · Q650's situation and clause-by-clause explanation
Answer
**A.** A 60-file migration with two valid approaches is the case plan mode exists for: explore usages and decide before edits, then implement the approved plan directly. File-by-file commits make rework revertible but do not avoid it, since the approach choice would surface only after many edits. Pre-specifying the adapter approach skips the comparison the stem says matters, and waiting for surprises ignores complexity that is already known.Q651. An engineer spends a three-hour Claude Code session mapping the legacy jobs/ folder before a rewrite. Early on, Claude identified specific classes such as SettlementWindow and FxRateCache. By hour three, its answers describe "typical ETL patterns" and contradict findings from the first hour. What should the engineer do to keep later answers grounded? (Select ONE.) A) Switch to a model with a larger context window so the entire three-hour exploration fits without any earlier findings falling away. B) Restart the session every hour and let Claude rediscover the folder from scratch, so each answer is based on fresh reads of the code. C) Have Claude record key findings in a scratchpad file such as docs/jobs-map.md and consult it for later questions. D) Remind Claude in each new prompt to remember carefully what it found earlier and to avoid giving generic answers about common patterns.
Understand Foundations Mock Exam 3 · Q651 · the situation and each part of the question
The real situation behind this question
The jobs/ folder is ten years old, and nobody on the current team wrote most of it. An engineer is using Claude Code to map it before a rewrite. The first hour is excellent: Claude names real classes and explains their roles. By the third hour, answers become vague and sometimes contradict what Claude said earlier. The engineer needs the specifics to survive the whole session.
Read the question in parts
Part 1 · contradict findings from the first hour
the earlier, specific knowledge is no longer reliably available in the session's context.
Part 2 · Claude identified specific classes such as SettlementWindow and FxRateCache
the valuable output is a set of concrete findings that can be written down and reused.
What you are being asked to decide
In a long exploration, Claude starts giving generic answers. How do you keep it specific? Tests scratchpad files to counter context degradation in long exploration.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Scratchpad file | a notes file in the repo where Claude writes what it found, so the facts live outside the conversation |
| Context degradation | a long session's drift toward vague, inconsistent answers as early details fade |
Study: Scratchpads & crash-recovery manifests Scratchpad Context window
Understand Foundations Mock Exam 3 · Q651's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Generic answers and contradictions show that early findings have faded from a long session. A scratchpad file keeps those findings on disk where Claude can consult them. Reminders, bigger windows and restarts do not preserve the specifics.
Connect the design to the situation
Three hours mapping legacy jobs, with early class findings forgotten by hour three.
Best answer: C. Context degradation in long sessions shows up as generic answers and contradictions, and a scratchpad file persists the specific findings outside the conversation so Claude can re-read them. Reminders ask Claude to remember what has already degraded. A bigger window delays degradation without addressing it, and hourly restarts discard findings and repeat the exploration.
The decisive evidence in the stem
its answers describe "typical ETL patterns"
Generic pattern talk replacing specific classes is the classic sign of context degradation, which a persisted findings file counteracts.
Official objective tested: Task 5.4 · Manage context effectively in large codebase exploration
What each choice would do here
A · Why this does not meet the full requirement
Switch to a model with a larger context window so the entire three-hour exploration fits without any earlier findings falling away.
Delays the drift but does not stop it, and long contexts still dilute attention.
More context lets the session run longer before trouble starts, but degradation over long sessions still happens. The findings remain only in the conversation, and the engineer will hit the same problem a little later.
B · Why this does not meet the full requirement
Restart the session every hour and let Claude rediscover the folder from scratch, so each answer is based on fresh reads of the code.
Throws away three hours of findings and repeats the exploration each hour.
Each new session starts with no findings, so Claude spends most of every hour rereading the same code. The map never accumulates, and the engineer gets three shallow passes instead of one deep one.
C · Why this meets the requirement
Have Claude record key findings in a scratchpad file such as docs/jobs-map.md and consult it for later questions.
Findings persist outside the conversation and can be re-read whenever a later question needs them.
Claude appends each finding to docs/jobs-map.md: class, role, and file path. Before answering a later question, it reads the file. Even when early conversation fades, the facts are on disk, and answers name the real classes instead of typical patterns.
D · Why this does not meet the full requirement
Remind Claude in each new prompt to remember carefully what it found earlier and to avoid giving generic answers about common patterns.
Asks Claude to rely on the very memory that is already degrading.
Each prompt now carries a reminder, but the specific findings themselves are still only in the fading conversation. Claude cannot remember what is no longer reliably in its context, so the generic answers continue.
Check your understanding · explain the design in your own words
In a long exploration, Claude starts giving generic answers. How do you keep it specific?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Scratchpads & crash-recovery manifests
Study: Scratchpads & crash-recovery manifests Scratchpad Context window
Return to Foundations Mock Exam 3 · Q651's situation and clause-by-clause explanation
Answer
**C.** Context degradation in long sessions shows up as generic answers and contradictions, and a scratchpad file persists the specific findings outside the conversation so Claude can re-read them. Reminders ask Claude to remember what has already degraded. A bigger window delays degradation without addressing it, and hourly restarts discard findings and repeat the exploration.Q652. An engineer types: "make the retry policy back off longer." Claude Code's search finds three retry policies, in the HTTP client, the queue consumer and the ledger sync job. It edits the most recently changed one, which was not the one the engineer meant, and the mistake reaches review. What should the team add so this does not repeat? (Select ONE.) A) A CLAUDE.md instruction telling Claude to apply the requested change to every matching candidate, so the intended one is always included. B) A CLAUDE.md instruction telling Claude to choose the candidate with the most references in the codebase, since it is most likely the shared one. C) A CLAUDE.md instruction, with a short example, telling Claude to list the matching candidates and ask which one is meant before editing when a request matches several. D) A PreToolUse hook that blocks every Edit until the engineer approves it manually, so wrong edits are caught before they reach review.
Understand Foundations Mock Exam 3 · Q652 · the situation and each part of the question
The real situation behind this question
Tallyforge has retry logic in several places because each subsystem has different failure modes. An engineer asked Claude to lengthen the backoff, thinking of the queue consumer. Claude picked the ledger sync job because it changed most recently. The reviewer caught the mistake, but only after time was spent reviewing the wrong change. The team wants Claude to handle this kind of vague request safely without slowing everything down.
Read the question in parts
Part 1 · It edits the most recently changed one
Claude resolved the ambiguity by a heuristic, which is the behaviour that needs to change.
Part 2 · which was not the one the engineer meant
the information needed to choose existed only in the engineer's head, so asking was the only reliable path.
What you are being asked to decide
A request matches three possible places. Should Claude guess or ask? Tests asking for clarification on multiple matches instead of heuristic selection.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Ambiguity resolution | getting the missing detail, here which retry policy, from the engineer before acting |
| Heuristic selection | guessing a target by a rule of thumb such as most recently changed or most referenced |
Study: Escalation and ambiguity: when to hand off, when to ask Escalation Few-shot
Understand Foundations Mock Exam 3 · Q652's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The request has three plausible targets and only the engineer knows which one is meant. The right pattern is to list the matches and ask, taught in CLAUDE.md with an example. Recency, reference counts or changing all of them are guesses or overreach.
Connect the design to the situation
Three retry policies and a request that does not say which one.
Best answer: C. When a request matches several targets, the reliable pattern is to ask for the missing identifier rather than pick by heuristic, and an example in CLAUDE.md shows Claude what that looks like. Choosing by reference count is still a heuristic guess. Changing all three alters behaviour nobody asked to change, and blocking every edit adds friction to all work instead of resolving the ambiguity.
The decisive evidence in the stem
finds three retry policies
The request matches several candidates, so the correct response is to ask which one is meant instead of selecting one by any heuristic.
Official objective tested: Task 5.2 · Design effective escalation and ambiguity resolution patterns
What each choice would do here
A · Why this does not meet the full requirement
A CLAUDE.md instruction telling Claude to apply the requested change to every matching candidate, so the intended one is always included.
Changes two policies nobody asked to change, creating new behaviour and risk.
All three policies now back off longer. The engineer's target is included, but the HTTP client and ledger sync now behave differently in production, which may hurt latency or recovery in ways nobody reviewed.
B · Why this does not meet the full requirement
A CLAUDE.md instruction telling Claude to choose the candidate with the most references in the codebase, since it is most likely the shared one.
Most references is just another guess, and it can be wrong exactly as recency was.
Claude now picks the HTTP client policy because it has the most references. That is a different guess, but still a guess, and the engineer who meant the queue consumer gets the wrong change again.
C · Why this meets the requirement
A CLAUDE.md instruction, with a short example, telling Claude to list the matching candidates and ask which one is meant before editing when a request matches several.
Asking resolves the real ambiguity, and the example shows Claude when and how to ask.
CLAUDE.md now says: if a request matches several code locations, list them with file paths and ask which one, before editing, with one short example. Next time Claude replies with the three policies and a question, and the engineer answers in one word.
D · Why this does not meet the full requirement
A PreToolUse hook that blocks every Edit until the engineer approves it manually, so wrong edits are caught before they reach review.
Taxes every edit to catch one kind of mistake and still leaves the ambiguity unresolved.
Every edit in every session waits for approval, so the whole team slows down. Claude still guesses the target first, and the engineer must notice in the approval prompt that the file is wrong.
Check your understanding · explain the design in your own words
A request matches three possible places. Should Claude guess or ask?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Escalation and ambiguity: when to hand off, when to ask
Study: Escalation and ambiguity: when to hand off, when to ask Escalation Few-shot
Return to Foundations Mock Exam 3 · Q652's situation and clause-by-clause explanation
Answer
**C.** When a request matches several targets, the reliable pattern is to ask for the missing identifier rather than pick by heuristic, and an example in CLAUDE.md shows Claude what that looks like. Choosing by reference count is still a heuristic guess. Changing all three alters behaviour nobody asked to change, and blocking every edit adds friction to all work instead of resolving the ambiguity.Q653. Tallyforge split its root CLAUDE.md into .claude/rules/terraform.md, storybook.md and pytest.md. Terraform modules sit under infra/ and several services/*/deploy/ folders. A week later, /context shows all three rules files loaded even in sessions that only touch Python jobs, using about 9,000 tokens. What change makes each file load only when it is relevant? (Select ONE.) A) Convert each rules file into a project skill with a clear description, so Claude pulls in a convention only when it judges that the current task needs it. B) Shorten each rules file to a few summary lines so the three files together cost far fewer tokens in every session, while still loading all of them. C) Add paths frontmatter with glob patterns to each rules file, such as **/*.tf for terraform.md, so each file loads only when matching files are worked on. D) Import the three rules files from the root CLAUDE.md with @import lines instead of keeping them in .claude/rules/, so they are all referenced from one place.
Understand Foundations Mock Exam 3 · Q653 · the situation and each part of the question
The real situation behind this question
The platform lead did the sensible first step: break a giant CLAUDE.md into topic files. Engineers liked the tidier layout, but nothing got cheaper. A data engineer working only on a Python batch job opened /context and saw Terraform and Storybook conventions taking thousands of tokens. The lead now realizes that splitting files only organizes the text; something else must decide when each file is loaded.
Read the question in parts
Part 1 · several services/*/deploy/ folders
Terraform files sit in many places, so the trigger must be a file pattern rather than one directory.
Part 2 · using about 9,000 tokens
the cost is measurable context waste in sessions where the rules have no use.
What you are being asked to decide
The team split its rules into files, but all of them still load every time. What makes them load only when needed? Tests that paths frontmatter, not splitting alone, makes rules load conditionally.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| paths frontmatter | a YAML list of globs at the top of a rules file that tells Claude Code when to load it |
| Context budget | the 9,000 tokens that unrelated rules take from every session's working space |
Study: .claude/rules/ — path-scoped conventions with glob frontmatter Context budget YAML
Understand Foundations Mock Exam 3 · Q653's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Splitting rules into files does not make them conditional. The paths frontmatter with globs is the switch that loads a rules file only for matching files. Imports, skills and shorter files leave the always-loaded behaviour or the reliability problem in place.
Connect the design to the situation
Terraform, Storybook and pytest rules all loading in a Python-only session.
Best answer: C. Rules files without a paths field load at session start like CLAUDE.md; adding paths frontmatter with globs is what makes them conditional, so Terraform rules appear only when .tf files are in play wherever they live. @import still loads the content every session. Skills make loading depend on the model's judgment, and shortening the files keeps the waste while throwing away detail.
The decisive evidence in the stem
all three rules files loaded even in sessions that only touch Python jobs
Plain rules files are always loaded, so the missing piece is the paths field that makes each one conditional on the files being edited.
Official objective tested: Task 3.3 · Apply path-specific rules for conditional convention loading
What each choice would do here
A · Why this does not meet the full requirement
Convert each rules file into a project skill with a clear description, so Claude pulls in a convention only when it judges that the current task needs it.
Skills replace a guaranteed path match with the model's choice about when to load them.
Each convention now loads only when Claude decides the task needs it. A quick Terraform edit inside a bigger change may never trigger the skill, so the convention becomes unreliable, and skills are meant for procedures rather than standing rules.
B · Why this does not meet the full requirement
Shorten each rules file to a few summary lines so the three files together cost far fewer tokens in every session, while still loading all of them.
Smaller files still load everywhere, and the useful detail in each rule is lost.
The three files shrink, so the waste per session is smaller, but they still load in every session regardless of relevance. The detailed guidance engineers relied on is gone, which makes Claude's Terraform and test output worse.
C · Why this meets the requirement
Add paths frontmatter with glob patterns to each rules file, such as **/*.tf for terraform.md, so each file loads only when matching files are worked on.
Globs make each file conditional on matching files, wherever those files sit in the tree.
terraform.md gets paths: ["**/*.tf"], storybook.md gets a glob for story files, and pytest.md a glob for Python tests. Claude Code now loads each file only when Claude works on matching files, so a Python-only session carries just the pytest rules.
D · Why this does not meet the full requirement
Import the three rules files from the root CLAUDE.md with @import lines instead of keeping them in .claude/rules/, so they are all referenced from one place.
Imported content still loads in every session, so nothing becomes conditional.
The rules move back under the root file through imports. Claude Code expands imports when it loads CLAUDE.md, so all three files still enter every session. The 9,000 tokens remain, and the layout is simply organized differently.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative path-scoped rules file
---
paths:
- "**/*.tf"
- "**/*.tfvars"
---
# Terraform conventions
Pin every provider version. Never hard-code account identifiers.Illustrative content. The paths list makes Claude Code load this file only when Claude works on matching Terraform files, in infra/ or any services/*/deploy/ folder.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The team split its rules into files, but all of them still load every time. What makes them load only when needed?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: .claude/rules/ — path-scoped conventions with glob frontmatter
Study: .claude/rules/ — path-scoped conventions with glob frontmatter Context budget YAML
Return to Foundations Mock Exam 3 · Q653's situation and clause-by-clause explanation
Answer
**C.** Rules files without a paths field load at session start like CLAUDE.md; adding paths frontmatter with globs is what makes them conditional, so Terraform rules appear only when .tf files are in play wherever they live. @import still loads the content every session. Skills make loading depend on the model's judgment, and shortening the files keeps the waste while throwing away detail.Q654. After a painful refactor, a Tallyforge team lead proposes a rule that every Claude Code task must start in plan mode. Another engineer argues that well-scoped changes waste time in a planning step. The team reviews four tickets from this sprint to decide which ones should go straight to direct execution. Which TWO tickets are best handled with direct execution? (Select TWO.) A) Decide whether ledger events should move to an event-sourced store or stay in the current tables, and then restructure the ledger-core modules to match. B) Fix the TypeError in formatInvoiceDate, where the stack trace points to one line in one file and the failing unit test already reproduces it. C) Add a check in createTransfer that rejects amounts below one cent, matching an existing check pattern used in the same function for maximum amounts. D) Move session handling in apps/web and apps/api from cookies to short-lived tokens, touching auth middleware, clients and about 40 test files.
Understand Foundations Mock Exam 3 · Q654 · the situation and each part of the question
The real situation behind this question
A recent refactor went badly because Claude started editing before anyone understood the module, and the team lead now wants planning everywhere. Other engineers worry that every tiny fix will now take an extra round of approval. The team decides to settle it with real tickets from the current sprint: two look tiny and two look large. The question is which ones truly benefit from the planning step.
Read the question in parts
Part 1 · every Claude Code task must start in plan mode
the proposed blanket rule ignores the difference between small clear tasks and large uncertain ones.
Part 2 · which ones should go straight to direct execution
the team must pick the tickets whose scope and fix are already known.
What you are being asked to decide
Which of these four tickets are small and clear enough to skip planning? Tests recognizing well-scoped changes that suit direct execution.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Direct execution | Claude Code edits right away; right when the location and the fix are already clear |
| Plan mode | explore and propose before editing; right when the design or the blast radius is still open |
Study: Plan mode vs direct execution — and the Explore subagent Permission mode Multiple-response item
Understand Foundations Mock Exam 3 · Q654's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Direct execution fits changes whose scope and fix are already clear, like one-file bug fixes and pattern-following checks. Architectural decisions and large multi-file migrations need plan mode first. A blanket rule in either direction ignores that distinction.
Connect the design to the situation
A one-line bug fix, a one-check validation, an architecture choice, and a 40-file auth migration.
Best answer: BC. A single-file bug with a clear stack trace and a reproducing test, and a single validation check that follows an existing pattern, are well-understood changes with clear scope, so plan mode adds only ceremony. The event-store decision is an architectural choice with several valid approaches, and the token migration spans many files across two apps; both need planning before edits.
The decisive evidence in the stem
well-scoped changes waste time in a planning step
The decision rule is scope and uncertainty: tickets with one clear location and a known fix suit direct execution, while architectural or many-file tickets do not.
Official objective tested: Task 3.4 · Determine when to use plan mode vs direct execution
What each choice would do here
A · Why this does not meet the full requirement
Decide whether ledger events should move to an event-sourced store or stay in the current tables, and then restructure the ledger-core modules to match.
An architectural decision with several valid approaches is the core plan-mode case.
Choosing an event-sourced store against keeping tables changes the ledger's architecture, and both are valid. Starting to edit directly would lock in one design before its trade-offs are explored, so this ticket needs plan mode first.
B · Why this does not meet the full requirement
Fix the TypeError in formatInvoiceDate, where the stack trace points to one line in one file and the failing unit test already reproduces it.
One file, one line, a stack trace and a failing test: the scope and the fix are clear.
Claude opens the file the stack trace names, fixes the line, and runs the failing test until it passes. There is nothing to explore and no design to choose, so a planning step would only add an approval round to a five-minute fix.
C · Why this does not meet the full requirement
Add a check in createTransfer that rejects amounts below one cent, matching an existing check pattern used in the same function for maximum amounts.
One function and an existing pattern to copy: a small, well-understood change.
Claude adds a minimum-amount check next to the existing maximum-amount check in createTransfer, following the same pattern, and adds a test. The change is local and the approach is obvious, so direct execution is efficient and safe.
D · Why this does not meet the full requirement
Move session handling in apps/web and apps/api from cookies to short-lived tokens, touching auth middleware, clients and about 40 test files.
A cross-app migration touching about 40 test files needs exploration and a plan first.
The migration touches middleware, two clients and about 40 test files, and the order of changes matters. Direct execution would discover dependencies mid-edit, so this ticket should be planned first and then executed against the approved plan.
Check your understanding · explain the design in your own words
Which of these four tickets are small and clear enough to skip planning?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Plan mode vs direct execution — and the Explore subagent
Study: Plan mode vs direct execution — and the Explore subagent Permission mode Multiple-response item
Return to Foundations Mock Exam 3 · Q654's situation and clause-by-clause explanation
Answer
**BC.** A single-file bug with a clear stack trace and a reproducing test, and a single validation check that follows an existing pattern, are well-understood changes with clear scope, so plan mode adds only ceremony. The event-store decision is an architectural choice with several valid approaches, and the token migration spans many files across two apps; both need planning before edits.Q655. Two hours into exploring packages/ui, an engineer's Claude Code session is about 85% full, mostly with long file listings and search output. The session also holds decisions the engineer needs for the next step: which components to split and the agreed prop names. The next step is implementation in the same session. What should the engineer do now? (Select ONE.) A) Run /clear to empty the context completely, then start implementation in the same session with whatever decisions the engineer can retype from memory. B) Continue straight into implementation and keep working until the context is completely full, then decide at that point what to do about the overflow. C) Start a brand-new session for implementation with no summary, so Claude reads the components again and makes its own fresh decisions. D) Run /compact with an instruction to keep the split decisions and agreed prop names, so verbose discovery output is condensed and the decisions remain.
Understand Foundations Mock Exam 3 · Q655 · the situation and each part of the question
The real situation behind this question
The engineer and Claude spent two hours in packages/ui working out how to split a set of oversized components. They agreed which components to split and what the new props should be called. Along the way, Claude ran many searches and listed many folders, and that output now fills most of the session. Implementation is next, and the engineer does not want to lose the agreements or start over.
Read the question in parts
Part 1 · about 85% full
the session is close to its limit, so action is needed before implementation adds more.
Part 2 · decisions the engineer needs for the next step
whatever the engineer does must keep the split plan and prop names intact.
What you are being asked to decide
The session is nearly full of search output but holds key decisions. How do you make room? Tests using /compact to reduce context during long exploration while keeping decisions.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| /compact | a Claude Code command that replaces the conversation with a summary, optionally guided by a focus instruction |
| Discovery output | the file listings and search results from exploring packages/ui that no longer need to stay verbatim |
Study: Scratchpads & crash-recovery manifests Compaction Context budget
Understand Foundations Mock Exam 3 · Q655's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The context is full of condensable discovery output, yet holds decisions that must survive. /compact with a focus instruction reduces usage while keeping those decisions. Clearing, overflowing or starting fresh without a summary all lose the agreements.
Connect the design to the situation
An 85%-full session full of listings, with split decisions and prop names still needed.
Best answer: D. When context fills with verbose discovery output during a long exploration, /compact reduces usage while keeping a summary, and a focus instruction protects the decisions the next step needs. /clear discards the decisions with the noise. Pushing on until the window is full risks losing control of what survives, and a fresh session without a summary throws away the agreed decisions.
The decisive evidence in the stem
mostly with long file listings and search output
The space is consumed by verbose discovery output that can be condensed, while the decisions must survive, which is what a focused /compact provides.
Official objective tested: Task 5.4 · Manage context effectively in large codebase exploration
What each choice would do here
A · Why this does not meet the full requirement
Run /clear to empty the context completely, then start implementation in the same session with whatever decisions the engineer can retype from memory.
Deletes the agreed decisions along with the noise.
The context is now empty, including the split list and the prop names. The engineer must reconstruct two hours of agreements from memory, and any detail they forget is lost, which risks an implementation that differs from what was agreed.
B · Why this does not meet the full requirement
Continue straight into implementation and keep working until the context is completely full, then decide at that point what to do about the overflow.
Leaves what survives to chance when the window overflows mid-implementation.
Implementation adds diffs and test output to an already crowded context. When the window fills, automatic handling decides what to keep without the engineer's guidance, and the agreements may be summarized away at the worst moment.
C · Why this does not meet the full requirement
Start a brand-new session for implementation with no summary, so Claude reads the components again and makes its own fresh decisions.
Discards agreed decisions and invites Claude to make different ones.
The new session starts empty. Claude reads the components again and may propose a different split or different names, so the two hours of agreement are lost and the team may end up debating the design again.
D · Why this meets the requirement
Run /compact with an instruction to keep the split decisions and agreed prop names, so verbose discovery output is condensed and the decisions remain.
Condenses the bulky discovery output and explicitly keeps the decisions implementation depends on.
The engineer runs /compact with a note such as keep the component split list and prop names. Claude Code summarizes the conversation, condensing the listings and search output. The decisions survive in the summary, and implementation starts with plenty of free context.
Check your understanding · explain the design in your own words
The session is nearly full of search output but holds key decisions. How do you make room?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Scratchpads & crash-recovery manifests
Study: Scratchpads & crash-recovery manifests Compaction Context budget
Return to Foundations Mock Exam 3 · Q655's situation and clause-by-clause explanation
Answer
**D.** When context fills with verbose discovery output during a long exploration, /compact reduces usage while keeping a summary, and a focus instruction protects the decisions the next step needs. /clear discards the decisions with the noise. Pushing on until the window is full risks losing control of what survives, and a fresh session without a summary throws away the agreed decisions.Q656. Engineers run the team's dependency-audit skill in the middle of feature work. It reads every lockfile and prints about 3,000 lines of package analysis into the conversation. After it runs, Claude's later coding answers in the same session lose track of earlier decisions. Engineers only need the final list of risky packages. Which frontmatter change should the team make to the skill? (Select ONE.) A) Keep the skill inline and add a final step in its body that tells Claude to run /compact automatically after it prints the full analysis. B) Add context: fork to the SKILL.md frontmatter so the audit runs in a separate subagent context and only its summary returns to the main session. C) Add an argument-hint to the SKILL.md frontmatter that asks for a package name, so engineers audit one dependency at a time instead of all. D) Add allowed-tools listing only Read and Grep to the SKILL.md frontmatter so the audit cannot run noisy shell commands that produce long, verbose output.
Understand Foundations Mock Exam 3 · Q656 · the situation and each part of the question
The real situation behind this question
Engineers at Tallyforge often run the dependency audit halfway through a feature, when a new package looks suspicious. The audit is thorough: it reads every lockfile and explains every transitive package. The problem is what happens afterwards. The session that was building a feature is now full of lockfile analysis, and Claude starts forgetting the design decisions made an hour earlier. Engineers want the audit's answer, not its working notes.
Read the question in parts
Part 1 · prints about 3,000 lines of package analysis into the conversation
the problem is output volume landing in the main context, not which tools the skill may use.
Part 2 · lose track of earlier decisions
the main session's context is being crowded out, so the fix must keep the noise outside it.
What you are being asked to decide
A skill floods the conversation with output. How do you keep the output out of the main session? Tests context: fork for skills that produce verbose output.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| context: fork | a SKILL.md frontmatter key that makes Claude Code run the audit in its own subagent context |
| Context isolation | keeping the lockfile analysis inside the audit's context so it does not crowd the feature-work conversation |
Study: Skill frontmatter — the three options the exam names Frontmatter Context isolation Subagent
Understand Foundations Mock Exam 3 · Q656's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The damage comes from verbose skill output entering the main context. context: fork runs the skill in an isolated subagent and returns only the result. Tool pre-approval, hints and after-the-fact compaction do not keep the output out.
Connect the design to the situation
A dependency audit that prints 3,000 lines mid-session when only a short risk list matters.
Best answer: B. context: fork runs the skill in an isolated subagent context, so the 3,000 lines of analysis stay there and only the result comes back to the main conversation. allowed-tools pre-approves tools; it does not restrict them and does not shorten what Read and Grep output. An argument-hint only shows a hint and changes the job, and compacting after the flood still spends the context and summarizes away detail.
The decisive evidence in the stem
Engineers only need the final list of risky packages
The verbose work is useful only inside the audit, so isolating it in a forked context and returning a summary removes the pollution without losing the result.
Official objective tested: Task 3.2 · Create and configure custom slash commands and skills
What each choice would do here
A · Why this does not meet the full requirement
Keep the skill inline and add a final step in its body that tells Claude to run /compact automatically after it prints the full analysis.
The flood still enters the main context first, and compaction then blurs earlier decisions.
The full analysis enters the main context first, and then compaction replaces earlier conversation with a summary. The feature decisions made before the audit may be blurred in that summary, so the cure damages the thing it was meant to protect.
B · Why this meets the requirement
Add context: fork to the SKILL.md frontmatter so the audit runs in a separate subagent context and only its summary returns to the main session.
The noisy analysis stays in the forked context and only the risky-package list comes back.
Claude Code starts a subagent with the skill body as its prompt. The subagent reads the lockfiles and does the long analysis in its own context window. The main session receives only the final risky-package list, so the feature conversation keeps its earlier decisions.
C · Why this does not meet the full requirement
Add an argument-hint to the SKILL.md frontmatter that asks for a package name, so engineers audit one dependency at a time instead of all.
A hint does not enforce an argument and narrows the audit the team actually needs.
Engineers see a hint asking for a package name, but nothing requires one. When they do pass one, the audit no longer covers all lockfiles, which is not what the team wants, and inline output still enters the main session.
D · Why this does not meet the full requirement
Add allowed-tools listing only Read and Grep to the SKILL.md frontmatter so the audit cannot run noisy shell commands that produce long, verbose output.
allowed-tools pre-approves tools; it neither blocks others nor shortens the output.
Read and Grep are now pre-approved, but other tools are not removed, and Read on a large lockfile still returns long output. The 3,000 lines still land in the main conversation, so the context problem is unchanged.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative SKILL.md frontmatter
---
name: dependency-audit
description: Audit lockfiles and list risky packages.
context: fork
---
Read every lockfile, analyse each package, and return only a table of risky packages with reasons.Illustrative file. context: fork makes the audit run in a separate subagent context; the body asks for a short final table, which is all the main session receives.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
A skill floods the conversation with output. How do you keep the output out of the main session?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Skill frontmatter — the three options the exam names
Study: Skill frontmatter — the three options the exam names Frontmatter Context isolation Subagent
Return to Foundations Mock Exam 3 · Q656's situation and clause-by-clause explanation
Answer
**B.** context: fork runs the skill in an isolated subagent context, so the 3,000 lines of analysis stay there and only the result comes back to the main conversation. allowed-tools pre-approves tools; it does not restrict them and does not shorten what Read and Grep output. An argument-hint only shows a hint and changes the job, and compacting after the flood still spends the context and summarizes away detail.Q657. During a long debugging session, Claude Code runs the full Vitest suite after every edit. Each run prints about 4,000 lines, almost all of them passing tests, and after six runs the session is close to its context limit while only two failing tests matter. What change best preserves the session's useful context? (Select ONE.) A) Let the session continue unchanged and rely on automatic compaction to summarize the older test runs once the context window finally fills up completely. B) Run /clear after every test run so the next attempt starts with an empty context and no leftover output from earlier runs. C) Switch to a model with a much larger context window so that many more complete test runs fit in the session before it finally reaches its limit. D) Have Claude run the suite with a reporter or filter that prints only failing tests and their errors, so each run adds a few dozen relevant lines.
Understand Foundations Mock Exam 3 · Q657 · the situation and each part of the question
The real situation behind this question
An engineer is chasing two flaky tests in the payments web app. Claude Code dutifully runs the whole suite after every edit, and every run prints thousands of green lines. After an hour the session is sluggish and Claude starts to forget which fixes it already tried. The engineer needs the session to keep its memory of attempts while the test output stops crowding everything else out.
Read the question in parts
Part 1 · Each run prints about 4,000 lines
each tool result is large, and six of them accumulate in the conversation.
Part 2 · only two failing tests matter
the relevant part of each result is tiny, so trimming loses nothing important.
What you are being asked to decide
Test runs flood the session with passing tests. How do you keep the context useful? Tests trimming verbose tool output to relevant content before it accumulates.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Context window | the working memory of the session, which six full test runs nearly fill |
| Trimming tool output | asking the test command itself to print only failures, so less text enters the conversation |
Understand Foundations Mock Exam 3 · Q657's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Most of each tool result is irrelevant passing-test output. Trimming the output at its source keeps only the failing tests in context. Late compaction, a bigger window or clearing the session either delay the problem or destroy useful history.
Connect the design to the situation
Six 4,000-line test runs where only two failing tests matter.
Best answer: D. Tool output accumulates in context out of proportion to its relevance, so the fix is to trim it before it lands: print only the failing tests and their errors. Automatic compaction acts late and summarizes away detail the debugging needs. A larger window postpones the same waste, and /clear throws away the debugging history along with the noise.
The decisive evidence in the stem
almost all of them passing tests
Most of the tool output is irrelevant to the task, so trimming it at the source removes the waste without losing the facts that matter.
Official objective tested: Task 5.1 · Manage conversation context to preserve critical information across long interactions
What each choice would do here
A · Why this does not meet the full requirement
Let the session continue unchanged and rely on automatic compaction to summarize the older test runs once the context window finally fills up completely.
Compaction arrives late and replaces precise earlier details with a summary.
The session keeps filling with passing-test output. When compaction finally runs, it summarizes everything, including the exact error messages and the list of attempted fixes, so Claude may retry an approach it already tried.
B · Why this does not meet the full requirement
Run /clear after every test run so the next attempt starts with an empty context and no leftover output from earlier runs.
Clearing also deletes the debugging history Claude needs between attempts.
Every attempt starts from nothing. Claude no longer remembers which fixes failed or what the error looked like before, so the debugging loses its continuity and the engineer must re-explain the problem each time.
C · Why this does not meet the full requirement
Switch to a model with a much larger context window so that many more complete test runs fit in the session before it finally reaches its limit.
A bigger window only delays the same waste by a few more runs.
The larger window holds more runs, but each run is still 4,000 lines of mostly passing tests. The waste continues at the same rate, and long contexts also make it harder for the model to focus on the two failures.
D · Why this meets the requirement
Have Claude run the suite with a reporter or filter that prints only failing tests and their errors, so each run adds a few dozen relevant lines.
Cuts each run to the failing tests, so the context holds signal instead of thousands of passes.
Claude runs the suite with a failures-only reporter or filters output to failing tests. Each run now adds a few dozen lines with the failing test names and errors. The session keeps its earlier attempts in view and has room for many more runs.
Check your understanding · explain the design in your own words
Test runs flood the session with passing tests. How do you keep the context useful?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Context management Context window Token optimization
Return to Foundations Mock Exam 3 · Q657's situation and clause-by-clause explanation
Answer
**D.** Tool output accumulates in context out of proportion to its relevance, so the fix is to trim it before it lands: print only the failing tests and their errors. Automatic compaction acts late and summarizes away detail the debugging needs. A larger window postpones the same waste, and /clear throws away the debugging history along with the noise.Q658. Before a release, an engineer pastes one combined report from twelve checks (lint, type-check, unit, contract and security scans), about 30,000 tokens, and asks Claude Code to fix everything. Claude fixes the lint issues at the top and the security findings at the bottom but misses most contract-test failures from the middle. How should the engineer restructure the input? (Select ONE.) A) Paste the same report again with a sentence asking Claude to read every part of it carefully and fix all failures without skipping any. B) Sort all findings alphabetically by file path so related failures sit next to each other regardless of which check produced them. C) Put a short summary listing every failing check and count at the top, then give each check's details under an explicit section header. D) Switch to a model with a larger context window so the 30,000-token report sits comfortably inside the available space with room left over.
Understand Foundations Mock Exam 3 · Q658 · the situation and each part of the question
The real situation behind this question
Tallyforge's release checklist produces twelve reports. To save time, an engineer pasted them into one huge message and asked Claude to fix everything. The result looked impressive until the contract tests ran again and most still failed. Claude had worked through the first and last parts of the report but quietly skipped much of the middle. The release is tomorrow, and the engineer needs every failure addressed.
Read the question in parts
Part 1 · about 30,000 tokens
the input is long enough for position effects to matter, though it fits the context window.
Part 2 · fixes the lint issues at the top and the security findings at the bottom
the beginning and end were handled, which points at position rather than ability.
What you are being asked to decide
Claude fixed the top and bottom of a long report but missed the middle. How do you fix the input? Tests mitigating the lost-in-the-middle effect with a summary up front and headers.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Lost in the middle | the tendency to handle the start and end of the long report well while missing the contract failures in between |
| Section header | a clear label such as a per-check heading that marks where each check's details begin |
Study: Lost in the middle — position effects Long-context placement XML tags
Understand Foundations Mock Exam 3 · Q658's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The misses sit in the middle of a long input that fits the window. A summary at the top and explicit section headers move every failure into view. More care, re-sorting or a larger window leave the position effect untouched.
Connect the design to the situation
A 30,000-token combined check report where contract failures in the middle were skipped.
Best answer: C. Models process the start and end of long inputs reliably but can miss material in the middle, so a key-findings summary at the top plus clear section headers counters the position effect. Asking for more care does not change where attention falls. Sorting by file path scatters each check's findings, and the report already fits, so a bigger window does not address position.
The decisive evidence in the stem
misses most contract-test failures from the middle
Findings from the start and end were handled while the middle was dropped, the signature of the lost-in-the-middle position effect.
Official objective tested: Task 5.1 · Manage conversation context to preserve critical information across long interactions
What each choice would do here
A · Why this does not meet the full requirement
Paste the same report again with a sentence asking Claude to read every part of it carefully and fix all failures without skipping any.
A request for care does not change the position effect that caused the misses.
The same 30,000-token report arrives again with an extra instruction. The contract failures are still in the middle, where attention is weakest, so Claude is likely to miss many of them again despite the request to be careful.
B · Why this does not meet the full requirement
Sort all findings alphabetically by file path so related failures sit next to each other regardless of which check produced them.
Sorting by file mixes checks together and removes the per-check structure.
Findings are now interleaved by file, so contract failures are scattered among lint and type errors throughout the input. There is still no summary at the top, and the structure that showed which check failed is gone.
C · Why this meets the requirement
Put a short summary listing every failing check and count at the top, then give each check's details under an explicit section header.
A summary up front plus headers makes every failing check visible at a reliably processed position.
The engineer starts with a ten-line summary: each check, pass or fail, and failure count, with contract tests clearly listed. Each check's details follow under its own header. Claude sees every failing area at the top and can navigate to the contract section.
D · Why this does not meet the full requirement
Switch to a model with a larger context window so the 30,000-token report sits comfortably inside the available space with room left over.
The report already fits; the problem is position, not available space.
The report already fits, so a larger window changes nothing about where the contract failures sit. The model still processes the middle less reliably, and the same failures are likely to be skipped.
Check your understanding · explain the design in your own words
Claude fixed the top and bottom of a long report but missed the middle. How do you fix the input?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Lost in the middle — position effects
Study: Lost in the middle — position effects Long-context placement XML tags
Return to Foundations Mock Exam 3 · Q658's situation and clause-by-clause explanation
Answer
**C.** Models process the start and end of long inputs reliably but can miss material in the middle, so a key-findings summary at the top plus clear section headers counters the position effect. Asking for more care does not change where attention falls. Sorting by file path scatters each check's findings, and the report already fits, so a bigger window does not address position.Q659. Claude Code's refactor of reconcileDay() has three problems. It rounds per line instead of per invoice, which changes totals. The duplicate-detection key is built from those totals. And the retry wrapper now re-runs the step after a duplicate is detected. Fixing any one changes how the others behave. How should the engineer give this feedback to Claude? (Select ONE.) A) Ask Claude to revert the whole refactor and redo it from the beginning, this time with a reminder to be careful about totals and retries. B) Report the rounding problem first, wait for the fix, then report the duplicate key, then the retry wrapper, so each change can be checked alone. C) Describe all three problems in one detailed message, explain how they interact, and ask for one coordinated fix with tests. D) Report only the retry wrapper problem, since it is the most visible symptom, and expect the other two to resolve once retries behave correctly.
Understand Foundations Mock Exam 3 · Q659 · the situation and each part of the question
The real situation behind this question
The refactor of the daily reconciliation job looked good in review until the engineer ran it on a real day of data. Totals were off by a cent on some invoices, which changed the duplicate keys, and the retry wrapper then re-ran steps it should have skipped. Each problem feeds the next. The engineer wants Claude to fix them without creating a fourth problem in the process.
Read the question in parts
Part 1 · The duplicate-detection key is built from those totals
the second issue depends directly on the first, so they cannot be fixed in isolation.
Part 2 · How should the engineer give this feedback
the decision is about how to communicate issues to Claude, not about which tool to use.
What you are being asked to decide
Three bugs depend on each other. Report them together or one by one? Tests sending interacting issues in one message versus sequential iteration.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Interacting issues | problems where the fix for rounding changes the totals that the duplicate key and the retry logic depend on |
| Idempotency | the property that re-running reconciliation does not create duplicates, which the retry bug breaks |
Study: Iterative refinement: getting Claude from "close" to "right" Idempotency Regression
Understand Foundations Mock Exam 3 · Q659's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The three issues interact: rounding changes totals, totals build the key, and the key drives retries. Interacting issues belong in one detailed message so one coordinated fix comes back. Sequential iteration is the right pattern only for independent problems.
Connect the design to the situation
Rounding, duplicate-key and retry bugs where each fix shifts the other two.
Best answer: C. When fixes interact, giving all the issues in one detailed message lets Claude design a fix that keeps rounding, key construction and retries consistent with each other. Sequential feedback suits independent problems; here each separate fix would be judged against behaviour the next fix changes. Reverting discards correct work, and reporting one symptom leaves two real defects.
The decisive evidence in the stem
Fixing any one changes how the others behave
The issues interact, so they must be presented together rather than fixed one at a time, which works only for independent problems.
Official objective tested: Task 3.5 · Apply iterative refinement techniques for progressive improvement
What each choice would do here
A · Why this does not meet the full requirement
Ask Claude to revert the whole refactor and redo it from the beginning, this time with a reminder to be careful about totals and retries.
Throws away a mostly correct refactor and adds only a vague reminder.
All the correct parts of the refactor are discarded, and the new attempt gets only a general reminder. Without the specific interactions spelled out, Claude may repeat one or more of the same mistakes in the redo.
B · Why this does not meet the full requirement
Report the rounding problem first, wait for the fix, then report the duplicate key, then the retry wrapper, so each change can be checked alone.
Sequential fixes suit independent bugs; here each fix is checked against behaviour that will change.
Claude fixes rounding first, and the totals change. The duplicate-key tests then fail in new ways, and the retry fix is later built on keys that are about to change again. The loop takes several rounds and may introduce regressions between them.
C · Why this meets the requirement
Describe all three problems in one detailed message, explain how they interact, and ask for one coordinated fix with tests.
One message with the dependencies lets Claude produce a consistent fix across all three parts.
The engineer writes one message: per-invoice rounding, a key built from the corrected totals, and a retry that stops on duplicates, and why they depend on each other. Claude changes all three together and adds tests that exercise the combined path, so the fix is consistent.
D · Why this does not meet the full requirement
Report only the retry wrapper problem, since it is the most visible symptom, and expect the other two to resolve once retries behave correctly.
Leaves two real defects in place on a hope that they share one root cause.
Claude adjusts the retry wrapper, and retries look healthier, but per-line rounding and the totals-based key remain wrong. Duplicate detection still misfires on real data, so the visible symptom hides two live defects.
Check your understanding · explain the design in your own words
Three bugs depend on each other. Report them together or one by one?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Iterative refinement: getting Claude from "close" to "right"
Study: Iterative refinement: getting Claude from "close" to "right" Idempotency Regression
Return to Foundations Mock Exam 3 · Q659's situation and clause-by-clause explanation
Answer
**C.** When fixes interact, giving all the issues in one detailed message lets Claude design a fix that keeps rounding, key construction and retries consistent with each other. Sequential feedback suits independent problems; here each separate fix would be judged against behaviour the next fix changes. Reverting discards correct work, and reporting one symptom leaves two real defects.Q660. Tallyforge shares a release-notes skill in .claude/skills/release-notes/. One staff engineer wants a much terser personal version for their own changelog drafts. The team version must keep working unchanged for everyone else, and the engineer still wants to run the team version on some days. Where should the engineer put the personal variant? (Select ONE.) A) In the project CLAUDE.md, adding a line that tells Claude to write release notes tersely whenever this engineer is the one asking for them. B) In ~/.claude/skills/release-notes-terse/SKILL.md, a personal skill with a different name, so both versions stay available and teammates see no change. C) In ~/.claude/skills/release-notes/SKILL.md, using the same name, so the personal copy replaces the team version whenever this engineer runs the skill. D) In the shared .claude/skills/release-notes/SKILL.md on a local branch that is never pushed, so the change stays on the engineer's own machine only.
Understand Foundations Mock Exam 3 · Q660 · the situation and each part of the question
The real situation behind this question
The team's release-notes skill produces friendly, detailed notes for customers. A staff engineer also writes quick internal changelog drafts and finds the team style far too long for that. They do not want to start a debate about the shared skill, and they still use the official version for real releases. They need a personal tool that sits next to the team's tool without changing it.
Read the question in parts
Part 1 · must keep working unchanged for everyone else
nothing shared through version control, including project memory and the shared skill folder, may change.
Part 2 · a much terser personal version
the customization is for one person only, so it belongs in that person's user-level configuration.
What you are being asked to decide
Where does a personal version of a team skill go so nobody else is affected? Tests personal skill customization in ~/.claude/skills/ with a different name.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Personal skill | a skill stored under the engineer's home folder, loaded only on their machine and never committed |
| Team skill | the release-notes skill in the repository's .claude/skills/ folder that every engineer receives through git |
Study: Skill frontmatter — the three options the exam names Skill Slash command
Understand Foundations Mock Exam 3 · Q660's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The variant is personal and both versions must stay reachable. User-level ~/.claude/skills/ keeps it off version control, and a different name keeps it from shadowing the team skill. Every other location either shares the change or hides the original.
Connect the design to the situation
A team release-notes skill and one engineer who wants a terse version for private drafts.
Best answer: B. Personal customization belongs in ~/.claude/skills/ under a different name: it is not shared through git, and the distinct name means it never hides or conflicts with the team skill. Reusing the same name makes one version shadow the other, so the engineer loses easy access to the team version. A local-branch edit drifts and leaks into commits, and a project CLAUDE.md line changes behaviour for every teammate.
The decisive evidence in the stem
still wants to run the team version on some days
Both versions must stay invocable for this engineer, which rules out any design where the personal copy replaces or hides the team skill.
Official objective tested: Task 3.2 · Create and configure custom slash commands and skills
What each choice would do here
A · Why this does not meet the full requirement
In the project CLAUDE.md, adding a line that tells Claude to write release notes tersely whenever this engineer is the one asking for them.
Project CLAUDE.md is shared memory for the whole team, so it changes everyone's sessions.
The project CLAUDE.md is loaded for every engineer. Claude cannot reliably tell who is asking, so the rule either affects teammates' notes or is ignored, and it mixes a personal preference into shared team memory.
B · Why this meets the requirement
In ~/.claude/skills/release-notes-terse/SKILL.md, a personal skill with a different name, so both versions stay available and teammates see no change.
A distinct personal name keeps both skills invocable and leaves teammates untouched.
The engineer copies the skill to ~/.claude/skills/release-notes-terse/ and edits the body. In Claude Code they can run /release-notes for the team style or /release-notes-terse for their own. Nothing in the repository changes, so teammates are unaffected.
C · Why this does not meet the full requirement
In ~/.claude/skills/release-notes/SKILL.md, using the same name, so the personal copy replaces the team version whenever this engineer runs the skill.
The same name makes the versions compete, so the team version is no longer reliably reachable.
Two skills now share one name at different levels. The engineer's sessions resolve the name to one of them, so the team version is hidden or ambiguous for this engineer, and they can no longer choose it on the days they need it.
D · Why this does not meet the full requirement
In the shared .claude/skills/release-notes/SKILL.md on a local branch that is never pushed, so the change stays on the engineer's own machine only.
An unpushed edit to a shared file drifts, risks accidental commits, and replaces the team version.
The edited shared file sits on a branch that will drift from main. Every rebase risks conflicts, the engineer can no longer run the original version on that branch, and one careless push publishes the terse style to the whole team.
Check your understanding · explain the design in your own words
Where does a personal version of a team skill go so nobody else is affected?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Skill frontmatter — the three options the exam names
Study: Skill frontmatter — the three options the exam names Skill Slash command
Return to Foundations Mock Exam 3 · Q660's situation and clause-by-clause explanation
Answer
**B.** Personal customization belongs in ~/.claude/skills/ under a different name: it is not shared through git, and the distinct name means it never hides or conflicts with the team skill. Reusing the same name makes one version shadow the other, so the engineer loses easy access to the team version. A local-branch edit drifts and leaks into commits, and a project CLAUDE.md line changes behaviour for every teammate.Q661. In phase one, a Claude Code session mapped how apps/api calls the deprecated ledger v1 client. For phase two, the engineer spawns three subagents, one per service, to plan the migration. Each subagent spends its first twenty minutes rediscovering the same call graph, and two reach different conclusions about a shared wrapper. What should change before phase two starts? (Select ONE.) A) Configure the subagents to inherit the main session's full conversation history automatically, so each one sees all of phase one exactly as it happened. B) Give each subagent a larger turn limit so it has enough time to rediscover the call graph and still finish its migration plan. C) Write a concise summary of the phase-one findings, including the call graph and the wrapper decision, and include it in each subagent's initial prompt. D) Run the three subagents one after another instead of in parallel, so each can read the files the previous subagent already opened.
Understand Foundations Mock Exam 3 · Q661 · the situation and each part of the question
The real situation behind this question
Phase one of the ledger v1 removal went well: Claude Code traced every call path and the engineer decided to keep one shared wrapper for now. Phase two was meant to be fast, with three parallel subagents planning per-service changes. Instead, each one started by re-tracing the same code, and two of them made different assumptions about the wrapper. The engineer now has conflicting plans and wasted time.
Read the question in parts
Part 1 · two reach different conclusions about a shared wrapper
without a common baseline, parallel workers make inconsistent decisions about the same shared code.
Part 2 · What should change before phase two starts?
the fix belongs at the boundary between phases, in what each new subagent receives.
What you are being asked to decide
New subagents keep redoing work the last phase already finished. What do you give them? Tests summarizing one phase's findings and injecting them into the next phase's subagents.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Phase summary | a short written record of the call graph and decisions from phase one, handed to each new subagent |
| Subagent | a separate Claude worker that starts with only its own prompt, not the main session's history |
Study: Scratchpads & crash-recovery manifests Subagent Subagent handoff
Understand Foundations Mock Exam 3 · Q661's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Phase-one knowledge never reached the phase-two subagents. A concise summary of findings and decisions, injected into each subagent's initial prompt, gives them one shared baseline. Inheritance does not exist by default, and sequencing or more turns do not transfer knowledge.
Connect the design to the situation
Three migration subagents each rediscovering the same call graph and disagreeing on a wrapper.
Best answer: C. Subagents start with only what their prompt gives them, so summarizing phase-one findings and injecting that summary gives every subagent the same baseline and the same wrapper decision. Subagents do not automatically inherit the parent conversation, and forcing that would also carry all the verbose discovery noise. Running sequentially shares no context, and more turns pays for the duplicated work instead of removing it.
The decisive evidence in the stem
Each subagent spends its first twenty minutes rediscovering the same call graph
The phase-one knowledge is not reaching the next phase, so it must be summarized and placed in each subagent's initial context.
Official objective tested: Task 5.4 · Manage context effectively in large codebase exploration
What each choice would do here
A · Why this does not meet the full requirement
Configure the subagents to inherit the main session's full conversation history automatically, so each one sees all of phase one exactly as it happened.
Subagents do not inherit parent history, and full history would bring the noise along too.
Subagents in Claude Code start with their own prompt, not the parent conversation, so this is not how they work. Even if the whole history were pasted in, each subagent would carry hours of verbose exploration output, crowding its context.
B · Why this does not meet the full requirement
Give each subagent a larger turn limit so it has enough time to rediscover the call graph and still finish its migration plan.
Funds the duplicated discovery instead of removing it, and disagreements remain.
Each subagent now has room to redo the twenty-minute discovery and still finish. The waste is paid for rather than removed, and without the shared decision the plans can still disagree about the wrapper.
C · Why this meets the requirement
Write a concise summary of the phase-one findings, including the call graph and the wrapper decision, and include it in each subagent's initial prompt.
Gives every subagent the same baseline and decision, removing rediscovery and disagreement.
The engineer asks the main session for a one-page summary: the call graph, the files involved, and the decision to keep the wrapper. Each subagent's prompt starts with that summary. They skip rediscovery and plan from the same agreed facts.
D · Why this does not meet the full requirement
Run the three subagents one after another instead of in parallel, so each can read the files the previous subagent already opened.
Sequential runs share no context, so each subagent still starts from nothing.
The subagents now run one after another, so the phase takes three times as long. Each still starts with an empty context, because reading files in an earlier subagent leaves nothing in the next one's prompt.
Check your understanding · explain the design in your own words
New subagents keep redoing work the last phase already finished. What do you give them?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Scratchpads & crash-recovery manifests
Study: Scratchpads & crash-recovery manifests Subagent Subagent handoff
Return to Foundations Mock Exam 3 · Q661's situation and clause-by-clause explanation
Answer
**C.** Subagents start with only what their prompt gives them, so summarizing phase-one findings and injecting that summary gives every subagent the same baseline and the same wrapper decision. Subagents do not automatically inherit the parent conversation, and forcing that would also carry all the verbose discovery noise. Running sequentially shares no context, and more turns pays for the duplicated work instead of removing it.Q662. The ledger-core maintainers report that Claude Code keeps applying the UI team's Storybook and CSS rules while they work on money arithmetic, because every convention sits in the 900-line root CLAUDE.md. They want each package to load only the shared standards files that its own maintainers choose, such as docs/standards/money.md. Which change best meets this goal? (Select ONE.) A) Turn each standards file into a project skill in .claude/skills/ whose description names the package, so Claude loads it whenever the work seems related. B) Keep the single root CLAUDE.md but add a heading for each package and a line asking Claude to apply only the section that matches the current package. C) Give each package its own CLAUDE.md with @import lines for only the standards its maintainers select, and trim the root to universal rules. D) Move every section of the root file into separate files under .claude/rules/ without paths frontmatter, so each topic sits in its own file and is easier to edit.
Understand Foundations Mock Exam 3 · Q662 · the situation and each part of the question
The real situation behind this question
Tallyforge's root CLAUDE.md started small and grew every time a team added a rule. Now the ledger-core engineers, who write careful integer money arithmetic, see Claude suggest CSS naming advice and Storybook story layouts while they work. The UI team is not wrong to want its rules, but those rules have nothing to do with ledger code. The ledger maintainers know exactly which two or three shared standards matter to them and want that choice to be theirs.
Read the question in parts
Part 1 · every convention sits in the 900-line root CLAUDE.md
the current design loads every team's rules into every session, whatever package is being edited.
Part 2 · that its own maintainers choose
the selection is a human decision made per package, so the mechanism must let owners list files explicitly.
What you are being asked to decide
How do you let each package load only the standards it needs from a huge shared CLAUDE.md? Tests using @import in package-level CLAUDE.md files to keep memory modular.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| @import | a line in a CLAUDE.md file that pulls another file's text into memory, here a chosen standards file |
| Package-level CLAUDE.md | a CLAUDE.md inside packages/ledger-core that Claude Code loads when work happens in that folder |
Study: CLAUDE.md — the memory hierarchy CLAUDE.md Claude config files
Understand Foundations Mock Exam 3 · Q662's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The owners must choose which standards load per package. A package-level CLAUDE.md with @import lines is the mechanism for an explicit, owner-maintained selection. Rules files without paths, inferred headings, and skills all fail to make the selection explicit and reliable.
Connect the design to the situation
Money rules for ledger-core, Storybook rules for ui, all stuck in one 900-line root file.
Best answer: C. A package-level CLAUDE.md with @import lines lets the people who know that package choose exactly which shared standards load there, while the root keeps only rules every package needs. Splitting into rules files without paths frontmatter only tidies the text, because every such file still loads at session start. Per-package headings rely on Claude inferring which section applies, and skills load only when the model decides they fit.
The decisive evidence in the stem
load only the shared standards files that its own maintainers choose
The requirement is selective inclusion decided by package owners, which is exactly what @import inside a package-level CLAUDE.md provides.
Official objective tested: Task 3.1 · Configure CLAUDE.md files with appropriate hierarchy, scoping, and modular organization
What each choice would do here
A · Why this does not meet the full requirement
Turn each standards file into a project skill in .claude/skills/ whose description names the package, so Claude loads it whenever the work seems related.
Skills are on-demand procedures the model may or may not choose, not standing conventions.
Each standard becomes a skill that loads only when Claude matches its description to the task. Some ledger sessions would load the money rules and some would not, so a standing convention becomes optional, which is the opposite of what the maintainers want.
B · Why this does not meet the full requirement
Keep the single root CLAUDE.md but add a heading for each package and a line asking Claude to apply only the section that matches the current package.
Asking Claude to infer the right section is the unreliable behaviour the team already sees.
The file is the same size and still loads completely. Claude must decide from the conversation which heading applies, which is the same inference that already fails today. Maintainers also cannot choose their own imports without editing the shared file.
C · Why this meets the requirement
Give each package its own CLAUDE.md with @import lines for only the standards its maintainers select, and trim the root to universal rules.
Owners pick the imports per package, and the root shrinks to rules that truly apply everywhere.
packages/ledger-core/CLAUDE.md contains a few lines such as @docs/standards/money.md and @docs/standards/errors.md. Claude Code loads that file when work enters the package, and the imports bring in only those standards. The root CLAUDE.md keeps universal rules like commit style.
D · Why this does not meet the full requirement
Move every section of the root file into separate files under .claude/rules/ without paths frontmatter, so each topic sits in its own file and is easier to edit.
Rules files without paths frontmatter all load at session start, so the noise stays the same.
The text is now spread over ten tidy files, but Claude Code still loads every one of them at the start of each session because none has a paths field. Ledger work still carries the Storybook and CSS rules, so the reported problem does not change.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative package-level CLAUDE.md with imports
# packages/ledger-core/CLAUDE.md
Ledger core: pure arithmetic, no I/O.
@../../docs/standards/money.md
@../../docs/standards/errors.mdIllustrative paths. The package file states its scope and imports only the two shared standards its maintainers chose; the UI rules are never imported here.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
How do you let each package load only the standards it needs from a huge shared CLAUDE.md?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: CLAUDE.md — the memory hierarchy
Study: CLAUDE.md — the memory hierarchy CLAUDE.md Claude config files
Return to Foundations Mock Exam 3 · Q662's situation and clause-by-clause explanation
Answer
**C.** A package-level CLAUDE.md with @import lines lets the people who know that package choose exactly which shared standards load there, while the root keeps only rules every package needs. Splitting into rules files without paths frontmatter only tidies the text, because every such file still loads at session start. Per-package headings rely on Claude inferring which section applies, and skills load only when the model decides they fit.Q663. An engineer asks Claude Code to generate a mapper from legacy CSV headers to camelCase DTO fields. The prose instructions describe the naming rules in detail, yet results stay inconsistent: acct_no_2 became acctNo2 in one run and accountNumber2 in another, and IBAN_CD became ibanCd once and iBANCode once. What is the most effective next step? (Select ONE.) A) Give Claude two or three concrete header-to-field examples, including acct_no_2 and IBAN_CD with the exact expected names, and ask it to regenerate the mapper. B) Ask Claude to interview the engineer about naming preferences before it writes any code, so hidden considerations come out before the next attempt. C) Rewrite the prose instructions with more precise wording about abbreviations, acronyms and trailing digits, and add a sentence asking Claude to apply them strictly. D) Switch the session to plan mode so Claude must describe its full naming approach first and wait for approval before generating the mapper again.
Understand Foundations Mock Exam 3 · Q663 · the situation and each part of the question
The real situation behind this question
Tallyforge is replacing an old CSV import with typed DTOs. The engineer wrote a careful paragraph about abbreviations, acronyms and trailing digits, but Claude's mapper keeps changing between runs. Reviewers cannot approve code whose field names drift, because downstream services depend on those names. The engineer knows exactly what each tricky header should become; the question is how to get that across reliably.
Read the question in parts
Part 1 · acct_no_2 became acctNo2 in one run and accountNumber2 in another
the same input yields different outputs, a classic sign that prose is being interpreted rather than followed.
Part 2 · What is the most effective next step?
the answer should be the highest-leverage change, not merely a plausible extra effort.
What you are being asked to decide
Claude keeps naming fields differently despite detailed rules. What fixes that fastest? Tests using concrete input/output examples when prose is interpreted inconsistently.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Input/output example | a pair such as acct_no_2 becoming accountNumber2 that shows the exact transformation wanted |
| Inconsistent results | the same header producing different field names on different runs because the rule text is read differently |
Study: Iterative refinement: getting Claude from "close" to "right" Few-shot Deterministic
Understand Foundations Mock Exam 3 · Q663's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Detailed prose has already produced inconsistent names. Two or three concrete input/output pairs covering the varying headers show the transformation directly. More prose, planning or an interview do not remove the interpretation step.
Connect the design to the situation
acct_no_2 mapped two different ways, IBAN_CD mapped two different ways.
Best answer: A. When prose is interpreted inconsistently, two or three concrete input/output examples are the most effective way to show the exact transformation, and examples that cover the cases that varied remove the ambiguity directly. More precise prose repeats the method that already failed. Plan mode and the interview pattern help with design and unknown considerations, but the expected outputs here are known and simply need showing.
The decisive evidence in the stem
The prose instructions describe the naming rules in detail, yet results stay inconsistent
Detailed prose has already been tried and fails, which is the signal to switch to concrete input/output examples of the transformation.
Official objective tested: Task 3.5 · Apply iterative refinement techniques for progressive improvement
What each choice would do here
A · Why this meets the requirement
Give Claude two or three concrete header-to-field examples, including acct_no_2 and IBAN_CD with the exact expected names, and ask it to regenerate the mapper.
Concrete pairs for the very headers that varied show the transformation with no room for reading.
The engineer adds pairs such as acct_no_2 to accountNumber2 and IBAN_CD to ibanCode, plus one ordinary header. Claude now sees the exact pattern for abbreviations, digits and acronyms, and the regenerated mapper follows it consistently across runs.
B · Why this does not meet the full requirement
Ask Claude to interview the engineer about naming preferences before it writes any code, so hidden considerations come out before the next attempt.
Interviews surface unknown considerations; the engineer already knows the exact target names.
Claude asks questions about naming taste, which surfaces nothing new because the engineer already knows every expected name. The session spends time talking while the actual fix, showing the expected outputs, is still missing.
C · Why this does not meet the full requirement
Rewrite the prose instructions with more precise wording about abbreviations, acronyms and trailing digits, and add a sentence asking Claude to apply them strictly.
More prose is the method that already produced inconsistent interpretations.
The paragraph gets longer and more careful, but it is still prose that Claude must interpret. Edge cases like acronyms followed by codes remain open to reading, so the drift between runs is likely to continue in a slightly different place.
D · Why this does not meet the full requirement
Switch the session to plan mode so Claude must describe its full naming approach first and wait for approval before generating the mapper again.
Planning helps with design choices; here the expected names are known and only need showing.
Claude writes a plan describing its naming approach, and the engineer approves it. The plan is again prose, so it can be read differently at generation time, and the session pays a planning step for a task with no design question.
Check your understanding · explain the design in your own words
Claude keeps naming fields differently despite detailed rules. What fixes that fastest?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Iterative refinement: getting Claude from "close" to "right"
Study: Iterative refinement: getting Claude from "close" to "right" Few-shot Deterministic
Return to Foundations Mock Exam 3 · Q663's situation and clause-by-clause explanation
Answer
**A.** When prose is interpreted inconsistently, two or three concrete input/output examples are the most effective way to show the exact transformation, and examples that cover the cases that varied remove the ambiguity directly. More precise prose repeats the method that already failed. Plan mode and the interview pattern help with design and unknown considerations, but the expected outputs here are known and simply need showing.Scenario 2 · Multi-Agent Research System
Q664. The doc_analysis subagent has two tools: lookup_document, which searches the PDFs a client uploaded for this engagement, and search_archive, which searches Marrowfield's past published reports. Both descriptions read "Searches documents for relevant information." Logs show the subagent often queries the archive when the analyst asked about the client's own studies. What is the most effective first fix? (Select ONE.) A) Rewrite both descriptions to state each tool's source, input format, example queries and when to use it instead of the other tool. B) Add a keyword router in front of the subagent that sends any request mentioning the client's name to lookup_document before the model chooses. C) Add a system prompt line telling the subagent to prefer lookup_document in general and use search_archive only when nothing else works. D) Merge both tools into one search tool that queries the client PDFs and the archive together and returns all the matches in one list.
Understand Foundations Mock Exam 3 · Q664 · the situation and each part of the question
The real situation behind this question
Marrowfield's analysts often ask what the client's own studies say, and they also sometimes ask what Marrowfield concluded in earlier reports. The doc_analysis subagent has a tool for each, but someone copied one description onto both. Now client questions are frequently answered from Marrowfield's old reports, which looks unprofessional and sometimes contradicts the client's newer data. The team wants the subagent to pick the right collection.
Read the question in parts
Part 1 · searches the PDFs a client uploaded for this engagement
the two tools serve different collections, a difference the descriptions currently hide.
Part 2 · What is the most effective first fix?
the answer should be the simplest change that addresses the root cause before adding new layers.
What you are being asked to decide
Two tools have the same description and the agent picks the wrong one. What do you fix first? Tests writing tool descriptions that clearly differentiate similar tools.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Tool description | the text in each tool definition that tells the model what the tool searches and when to use it |
| Misrouting | the subagent calling search_archive when the question was about the client's own uploaded studies |
Study: Document identity versus words inside it Tool description Tool selection
Understand Foundations Mock Exam 3 · Q664's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Identical descriptions give the model no basis to choose between tools. The first fix is to rewrite them with each tool's source, inputs, examples and boundaries. Routers, blanket preferences and merged tools add risk before the root cause is fixed.
Connect the design to the situation
Client-PDF search and past-report archive search, both described identically.
Best answer: A. Tool descriptions are the main signal the model uses to choose between tools, and two identical descriptions make the choice a coin toss; differentiating source, inputs, examples and boundaries is the first fix. A keyword router adds a fragile layer before the cheap fix is tried. A blanket preference misroutes the legitimate archive questions, and merging the tools mixes client material with Marrowfield's own archive.
The decisive evidence in the stem
Both descriptions read "Searches documents for relevant information."
The model has nothing that distinguishes the two tools, so misrouting follows directly from the descriptions and is fixed there first.
Official objective tested: Task 2.1 · Design effective tool interfaces with clear descriptions and boundaries
What each choice would do here
A · Why this meets the requirement
Rewrite both descriptions to state each tool's source, input format, example queries and when to use it instead of the other tool.
Gives the model the distinguishing information it uses to choose between the tools.
lookup_document now says it searches only the PDFs this client uploaded, with examples like "what does the 2023 shopper survey say". search_archive says it searches Marrowfield's past published reports and is for questions about earlier conclusions. The subagent now has clear grounds to choose.
B · Why this does not meet the full requirement
Add a keyword router in front of the subagent that sends any request mentioning the client's name to lookup_document before the model chooses.
Adds a brittle pre-routing layer before the simpler description fix is tried.
Requests naming the client go to lookup_document, but analysts often ask about the client's studies without the name, and some archive questions mention the client too. The router misfires in both directions while the confusing descriptions remain.
C · Why this does not meet the full requirement
Add a system prompt line telling the subagent to prefer lookup_document in general and use search_archive only when nothing else works.
A blanket preference breaks the cases where the archive is the right source.
The subagent now uses lookup_document almost always. Questions about Marrowfield's earlier conclusions get answered from client PDFs or not at all, so one misrouting pattern is replaced by another, and the descriptions still say nothing useful.
D · Why this does not meet the full requirement
Merge both tools into one search tool that queries the client PDFs and the archive together and returns all the matches in one list.
Mixes two different collections and makes source attribution harder.
One tool returns a mixed list from both collections. The subagent must work out which results came from the client and which from Marrowfield, citations get muddled, and client-confidential material sits next to published archive material.
Check your understanding · explain the design in your own words
Two tools have the same description and the agent picks the wrong one. What do you fix first?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Document identity versus words inside it
Study: Document identity versus words inside it Tool description Tool selection
Return to Foundations Mock Exam 3 · Q664's situation and clause-by-clause explanation
Answer
**A.** Tool descriptions are the main signal the model uses to choose between tools, and two identical descriptions make the choice a coin toss; differentiating source, inputs, examples and boundaries is the first fix. A keyword router adds a fragile layer before the cheap fix is tried. A blanket preference misroutes the legitimate archive questions, and merging the tools mixes client material with Marrowfield's own archive.Q665. A client uploaded 11 PDFs. Three are scanned images with no text layer, so doc_analysis cannot read them. It currently returns status success with findings from the other eight and no mention of the three, and the final report states that "client documents show no data on retailer margins," a topic covered in one of the scans. What should doc_analysis return instead? (Select ONE.) A) The eight documents' findings plus, for each unreadable PDF, the failure type, what was attempted, and possible alternatives such as OCR, so the coordinator can decide. B) The same success status and findings, but after first retrying each scanned PDF three more times in case the text becomes readable. C) The eight documents' findings plus an empty findings list marked success for each scanned PDF, so every document has an entry in the output. D) A failure status for the whole subagent call with no findings, so the coordinator knows something went wrong and can rerun the analysis from the start.
Understand Foundations Mock Exam 3 · Q665 · the situation and each part of the question
The real situation behind this question
The client had sent a scanned distributor survey of retailer margins, printed and signed by participating stores. Marrowfield's system could not read it, said nothing, and the report then told the client's board that the client's documents contained no data on retailer margins. The client noticed immediately and was unhappy. The team wants failures like this surfaced so the system, or a person, can do something about them.
Read the question in parts
Part 1 · returns status success with findings from the other eight and no mention of the three
the failure is silently suppressed, so downstream agents treat missing data as absent data.
Part 2 · so doc_analysis cannot read them
this is an access failure with a known cause, and a known remedy exists outside the subagent.
What you are being asked to decide
Some documents could not be read and the report pretended they were empty. What should the subagent report? Tests returning partial results with structured failure context instead of silent success.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Partial results | the findings from the eight readable PDFs, kept and returned even though three PDFs failed |
| Access failure | the scans could not be read, which is different from a document that was read and had no matches |
Study: Error propagation: what a subagent reports when it fails Graceful degradation Error taxonomy
Understand Foundations Mock Exam 3 · Q665's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Three documents failed to be read and that failure was reported as success. The subagent should return its partial results plus structured context on each failure so the coordinator can recover. Whole-call failure, futile retries and empty success entries all lose information.
Connect the design to the situation
Eight readable PDFs, three image-only scans, and a false "no data" claim.
Best answer: A. Structured error context with partial results lets the coordinator recover: it keeps the eight good results and can request OCR or ask the client, and synthesis can flag the gap. Failing the whole call discards good work. Retrying a missing text layer cannot succeed, and empty success entries tell the coordinator that the scans held nothing, which caused the false statement.
The decisive evidence in the stem
a topic covered in one of the scans
The absence was an access failure, not a valid empty result, so it must be reported as a failure with context rather than as success.
Official objective tested: Task 5.3 · Implement error propagation strategies across multi-agent systems
What each choice would do here
A · Why this meets the requirement
The eight documents' findings plus, for each unreadable PDF, the failure type, what was attempted, and possible alternatives such as OCR, so the coordinator can decide.
Keeps the good findings and gives the coordinator what it needs to recover the three scans.
doc_analysis returns findings for eight documents and three error entries: type unreadable scan, attempted text extraction, suggested OCR or client re-upload. The coordinator requests OCR for the three, and if that fails, synthesis marks retailer margins as a coverage gap instead of claiming there is no data.
B · Why this does not meet the full requirement
The same success status and findings, but after first retrying each scanned PDF three more times in case the text becomes readable.
Retrying cannot create a missing text layer, so it only wastes time.
Each scan is retried three times and fails identically, because the text layer does not exist. The run wastes time and then reports success as before, so the false statement about retailer margins still appears in the report.
C · Why this does not meet the full requirement
The eight documents' findings plus an empty findings list marked success for each scanned PDF, so every document has an entry in the output.
Presents an access failure as a valid empty result, which caused the false claim.
Each scan now has an entry that says success with no findings. The coordinator and synthesis read that as the document having no relevant content, which is exactly what produced the false "no data" claim.
D · Why this does not meet the full requirement
A failure status for the whole subagent call with no findings, so the coordinator knows something went wrong and can rerun the analysis from the start.
Throws away eight documents of valid analysis because of three failures.
The coordinator sees one failure and nothing else. It must rerun all eleven documents, the three scans fail again, and the eight good analyses are repeated for nothing. The run may exceed its budget with the scans still unread.
Check your understanding · explain the design in your own words
Some documents could not be read and the report pretended they were empty. What should the subagent report?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Error propagation: what a subagent reports when it fails
Study: Error propagation: what a subagent reports when it fails Graceful degradation Error taxonomy
Return to Foundations Mock Exam 3 · Q665's situation and clause-by-clause explanation
Answer
**A.** Structured error context with partial results lets the coordinator recover: it keeps the eight good results and can request OCR or ask the client, and synthesis can flag the gap. Failing the whole call discards good work. Retrying a missing text layer cannot succeed, and empty success entries tell the coordinator that the scans held nothing, which caused the false statement.Q666. An analyst finished a 40-minute session in which the coordinator analyzed 120 client documents and web sources for a pet-food market study. The client now wants two alternative report framings, one positioning its new range as premium and one as a value line, and the analyst wants to compare them side by side without redoing the analysis. Which approach fits best? (Select ONE.) A) Resume the analysis session, generate the premium framing, then continue in the same session to generate the value framing from exactly where the first one stopped. B) Start two new sessions, one per framing, and have each one repeat the full document and web analysis before writing its framing. C) Resume the analysis session once and ask the coordinator to produce both framings together in one response so they share every assumption. D) Fork the analysis session twice with fork_session, giving one branch the premium framing and the other the value framing, while the original stays unchanged.
Understand Foundations Mock Exam 3 · Q666 · the situation and each part of the question
The real situation behind this question
The pet-food client cannot decide how to present its new range to retail buyers: as a premium line or as a value line. Marrowfield's analyst already has a complete analysis of 120 documents and sources. Writing each framing from scratch would cost time and money, and writing one after the other in the same session would let the first argument colour the second. The client wants a fair comparison.
Read the question in parts
Part 1 · compare them side by side
the two outputs must be independent of each other to be a fair comparison.
Part 2 · a 40-minute session
the shared analysis is expensive, so repeating it per framing is costly.
What you are being asked to decide
Two different reports must build on one finished analysis. How do you branch without redoing work? Tests fork_session for divergent exploration from a shared baseline.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| fork_session | an Agent SDK option used with resume that copies a session's history into a new, independent session |
| Shared baseline | the finished 40-minute analysis that both framings should start from unchanged |
Study: Named sessions: resume, continue, fork, or start fresh Checkpoint Agent SDK
Understand Foundations Mock Exam 3 · Q666's answer · full reasoning and worked examples
Claude synthesized · the point, straight
One expensive analysis must feed two independent framings. fork_session branches the session so each framing starts from the same baseline without affecting the other. Continuing, restarting or combining framings either repeats the work or mixes the outputs.
Connect the design to the situation
One completed pet-food market analysis and two framings to compare: premium and value.
Best answer: D. fork_session creates independent branches from a shared analysis baseline, so each framing starts from the same 40 minutes of work without influencing the other. Continuing in one session lets the first framing shape the second. Two fresh sessions repeat the costly analysis, and one response with both framings mixes them in a single context, which defeats an independent side-by-side comparison.
The decisive evidence in the stem
without redoing the analysis
The analysis is a reusable baseline and the framings must be independent, which is exactly what forking a session provides.
Official objective tested: Task 1.7 · Manage session state, resumption, and forking
What each choice would do here
A · Why this does not meet the full requirement
Resume the analysis session, generate the premium framing, then continue in the same session to generate the value framing from exactly where the first one stopped.
The second framing starts from a context already shaped by the first.
The premium framing is written first and stays in the session's history. When the same session writes the value framing, the earlier arguments and emphasis are in context and can leak into it, so the comparison is no longer independent.
B · Why this does not meet the full requirement
Start two new sessions, one per framing, and have each one repeat the full document and web analysis before writing its framing.
Pays for the 40-minute analysis twice and may produce different baselines.
Each new session re-reads 120 documents and sources, costing another 40 minutes each. The two analyses may also differ slightly, so differences between the framings may come from different baselines rather than from the framing itself.
C · Why this does not meet the full requirement
Resume the analysis session once and ask the coordinator to produce both framings together in one response so they share every assumption.
Mixes both framings in one context, so they are not independent.
One response must hold both framings. The model writes them together in a single context, so each framing is shaped by the other, and the response may become long and compressed, giving neither framing full depth.
D · Why this meets the requirement
Fork the analysis session twice with fork_session, giving one branch the premium framing and the other the value framing, while the original stays unchanged.
Both branches inherit the same analysis and evolve independently, ready for side-by-side comparison.
The application resumes the saved session ID with fork_session set, twice. Each fork gets a new session ID and a copy of the analysis history. One branch writes the premium framing, the other the value framing, and the original session stays available for any later variant.
Check your understanding · explain the design in your own words
Two different reports must build on one finished analysis. How do you branch without redoing work?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Named sessions: resume, continue, fork, or start fresh
Study: Named sessions: resume, continue, fork, or start fresh Checkpoint Agent SDK
Return to Foundations Mock Exam 3 · Q666's situation and clause-by-clause explanation
Answer
**D.** fork_session creates independent branches from a shared analysis baseline, so each framing starts from the same 40 minutes of work without influencing the other. Continuing in one session lets the first framing shape the second. Two fresh sessions repeat the costly analysis, and one response with both framings mixes them in a single context, which defeats an independent side-by-side comparison.Q667. Each client engagement has hundreds of uploaded documents in nested folders. Traces show the coordinator spends six to eight tool calls per run on list_folder and get_file_info just to learn which documents exist before it can plan any delegation. The document MCP server is maintained by Marrowfield. What change best reduces these exploratory calls? (Select ONE.) A) Add a list_all_documents tool that returns the full catalog in one call, and instruct the coordinator to call it at the start of every run. B) Cache the results of list_folder and get_file_info on the server, so repeated exploratory calls during a run return faster than before. C) Expose the engagement's document catalog as an MCP resource (titles, dates, topics) that the host gives the coordinator at the start of each run. D) Paste a copy of each client's document list into the coordinator's system prompt by hand once a week, so the coordinator never needs to explore.
Understand Foundations Mock Exam 3 · Q667 · the situation and each part of the question
The real situation behind this question
Clients upload documents throughout an engagement, often into deep folder trees. Before Marrowfield's coordinator can decide what to send to doc_analysis, it needs to know what is there, so it walks the folders with listing tools. That exploration takes several turns per run, uses budget, and sometimes stops early, missing documents in deeper folders. Marrowfield owns the document server and can change what it offers.
Read the question in parts
Part 1 · six to eight tool calls per run
the exploration has a real, repeated cost in turns and budget.
Part 2 · The document MCP server is maintained by Marrowfield
the team can add new MCP capabilities to the server rather than working around it.
What you are being asked to decide
The coordinator wastes calls just discovering which documents exist. How do you show it the catalog? Tests exposing content catalogs as MCP resources to avoid exploratory tool calls.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| MCP resource | content an MCP server exposes for reading, here a catalog of the engagement's documents |
| Host | the application side of MCP that reads the resource and puts the catalog in the coordinator's context |
Study: MCP resources & config scoping — two details tested by file path MCP resource MCP host
Understand Foundations Mock Exam 3 · Q667's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The coordinator's calls only discover what content exists. Exposing the catalog as an MCP resource that the host provides at run start removes those exploratory calls. Caching, a listing tool or a hand-maintained copy keep the calls or go stale.
Connect the design to the situation
Six to eight folder-listing calls per run before any real work starts.
Best answer: C. MCP resources expose content catalogs so the agent can see what data exists without spending tool calls exploring; the host reads the resource and puts the catalog in the coordinator's context at the start. Caching makes calls faster but the model still has to request them. A single listing tool still depends on the model calling it, and a hand-pasted weekly list goes stale as clients upload.
The decisive evidence in the stem
just to learn which documents exist
The calls are exploration of a catalog, which is the job MCP resources were designed for, rather than actions that need tools.
Official objective tested: Task 2.4 · Integrate MCP servers into Claude Code and agent workflows
What each choice would do here
A · Why this does not meet the full requirement
Add a list_all_documents tool that returns the full catalog in one call, and instruct the coordinator to call it at the start of every run.
Still a tool the model must remember to call, and the full list may be huge.
One call replaces several, which helps, but the coordinator must still decide to call it, and for hundreds of documents the returned list may be large. It is a tool doing a resource's job, still costing a turn every run.
B · Why this does not meet the full requirement
Cache the results of list_folder and get_file_info on the server, so repeated exploratory calls during a run return faster than before.
Faster calls are still calls the model must decide to make.
list_folder and get_file_info respond faster, but the coordinator still spends six to eight turns calling them, each turn costing a model call. Runs are a little quicker while the pattern of exploring before planning stays the same.
C · Why this meets the requirement
Expose the engagement's document catalog as an MCP resource (titles, dates, topics) that the host gives the coordinator at the start of each run.
The coordinator starts each run already knowing what documents exist, with no exploration calls.
The server publishes a catalog resource per engagement listing each document's title, date and topic. At run start the host reads it and adds a compact version to the coordinator's context. The coordinator plans delegation immediately and reads document details only when needed.
D · Why this does not meet the full requirement
Paste a copy of each client's document list into the coordinator's system prompt by hand once a week, so the coordinator never needs to explore.
A manual weekly copy goes stale whenever clients upload new documents.
The system prompt holds last week's list. Documents uploaded since then are invisible, so the coordinator either misses them or falls back to exploring, and someone must keep updating the prompts by hand for every client.
Check your understanding · explain the design in your own words
The coordinator wastes calls just discovering which documents exist. How do you show it the catalog?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: MCP resources & config scoping — two details tested by file path
Study: MCP resources & config scoping — two details tested by file path MCP resource MCP host
Return to Foundations Mock Exam 3 · Q667's situation and clause-by-clause explanation
Answer
**C.** MCP resources expose content catalogs so the agent can see what data exists without spending tool calls exploring; the host reads the resource and puts the catalog in the coordinator's context at the start. Caching makes calls faster but the model still has to request them. A single listing tool still depends on the model calling it, and a hand-pasted weekly list goes stale as clients upload.Q668. Marrowfield's coordinator loop ends a run as soon as a response contains any text block. Logs show many runs stopping right after the coordinator writes "Next I will send these PDFs to doc_analysis" alongside a tool_use block, so no analysis ever happens and the report is built from search results alone. What change fixes the loop's control flow? (Select ONE.) A) Continue the loop while stop_reason is "tool_use", running the requested tools and appending their results, and end it only when stop_reason is "end_turn". B) Add a system prompt rule telling the coordinator never to write any text in a response that also requests a tool, so the text check works. C) Keep the text check but also cap the loop at 25 iterations, so runs that never produce a final text block are still stopped at a safe point. D) End the loop only when the coordinator's text contains the phrase FINAL REPORT, and instruct the coordinator to write that exact phrase once it is completely done.
Understand Foundations Mock Exam 3 · Q668 · the situation and each part of the question
The real situation behind this question
Marrowfield's engineers noticed that some briefing reports had no citations to client documents at all, even when clients had uploaded dozens of PDFs. Tracing the runs showed the coordinator had planned to send PDFs for analysis, said so in a sentence, and then the run simply ended. The loop treated any text as a sign of completion. The team needs runs to stop only when the coordinator has truly finished.
Read the question in parts
Part 1 · ends a run as soon as a response contains any text block
the current termination test looks at content type, not at the API's stop signal.
Part 2 · no analysis ever happens
the requested tool calls are never executed, so the run's later steps are silently skipped.
What you are being asked to decide
The loop stops whenever the model writes text, even mid-task. What should decide when it stops? Tests loop control on stop_reason instead of text content or iteration caps.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| stop_reason | the API response field that says why the model stopped: tool_use means it wants a tool run, end_turn means it is done |
| Agentic loop | your application code that calls the model, runs requested tools, appends results and calls again |
Study: The agentic loop — the exam's core object Stop reason Agent loop
Understand Foundations Mock Exam 3 · Q668's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A tool request beside some text means the model is not done. The loop should branch on stop_reason, continuing on tool_use and ending on end_turn. Text checks, magic phrases, prompt rules and iteration caps are unreliable or secondary signals.
Connect the design to the situation
A coordinator that announces its next step in text and gets cut off before running it.
Best answer: A. The loop must branch on stop_reason: "tool_use" means run the tools, append the results and call again, and "end_turn" means the model has finished. Checking for assistant text, parsing a magic phrase, or forbidding text by prompt all treat natural language as a completion signal, which is unreliable. An iteration cap is a safety limit, not the primary stopping mechanism, and it does not fix the early exit.
The decisive evidence in the stem
alongside a tool_use block
The response was still requesting a tool, so its stop_reason was tool_use and the loop should have continued regardless of any text in the response.
Official objective tested: Task 1.1 · Design and implement agentic loops for autonomous task execution
What each choice would do here
A · Why this meets the requirement
Continue the loop while stop_reason is "tool_use", running the requested tools and appending their results, and end it only when stop_reason is "end_turn".
Uses the structured signal the API provides for exactly this decision.
Each turn, the code checks stop_reason. On tool_use it runs every requested tool, appends the assistant content and the tool results to messages, and calls the API again. On end_turn it returns the final answer. A sentence next to a tool call no longer ends the run.
B · Why this does not meet the full requirement
Add a system prompt rule telling the coordinator never to write any text in a response that also requests a tool, so the text check works.
Relies on a prompt rule to keep a flawed text check working, and it can still fail.
The model usually obeys, but prompt rules are probabilistic, so some responses will still mix text and tool calls. Each of those runs ends early, and the underlying design flaw of checking text for completion is still there.
C · Why this does not meet the full requirement
Keep the text check but also cap the loop at 25 iterations, so runs that never produce a final text block are still stopped at a safe point.
A cap is a safety net; the text check still ends runs before the tools run.
Runs that write text next to a tool request still stop immediately, because the text check is unchanged. The cap only matters for runs that never write text, so the missing-analysis bug remains while a new arbitrary limit is added.
D · Why this does not meet the full requirement
End the loop only when the coordinator's text contains the phrase FINAL REPORT, and instruct the coordinator to write that exact phrase once it is completely done.
Parsing a phrase from natural language is an unreliable completion signal.
The loop now waits for a magic phrase. If the coordinator forgets it, the run goes on too long; if it writes the phrase while still planning, the run ends early. Natural-language parsing replaces one fragile signal with another.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Loop control on stop_reason (illustrative application code)
while True:
response = client.messages.create(model=MODEL, max_tokens=4096, tools=TOOLS, messages=messages)
messages.append({"role": "assistant", "content": response.content})
if response.stop_reason != "tool_use":
break
results = [run_tool(block) for block in response.content if block.type == "tool_use"]
messages.append({"role": "user", "content": results})Illustrative: MODEL, TOOLS and run_tool are application-owned. The loop continues on tool_use whatever text the response also contains, and stops on any other stop_reason such as end_turn; a separate safety cap may exist but is not the stopping rule.
Not supplied in this example · settings and defaults
context_management — not supplied here. No server compaction strategy is enabled by this body. Host/manual compaction is separate.
output_config — not supplied here. No output_config schema or effort override is supplied. A prompt asking for JSON does not provide schema enforcement.
tool_choice — not supplied here. With tools supplied, the default is auto: the model chooses whether to request a tool. Without tools, no supplied tool can be selected.
system — not supplied here. No application system instructions are supplied through this field. User messages still provide task text.
stop_sequences — not supplied here. No custom stop strings are configured. Generation can still stop for end_turn, tool_use, max_tokens, or another documented reason.
stream — not supplied here. For a direct non-streaming create/parse call, the result is one message rather than an event stream. A stream helper configures this separately.
thinking — not supplied here. No explicit thinking override is shown. Behavior depends on the selected model; omission does not universally mean thinking is off.
cache_control — not supplied here. No top-level automatic cache marker is supplied. Check nested system/tool/content blocks for separate cache_control markers.
metadata — not supplied here. No application user reference is supplied through metadata. Authentication still comes from the request credentials.
betas — not explicitly supplied. No beta list appears in these calls. SDK/client configuration can add headers; inspect those before assuming no beta header is sent.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The loop stops whenever the model writes text, even mid-task. What should decide when it stops?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: The agentic loop — the exam's core object
Study: The agentic loop — the exam's core object Stop reason Agent loop
Return to Foundations Mock Exam 3 · Q668's situation and clause-by-clause explanation
Answer
**A.** The loop must branch on stop_reason: "tool_use" means run the tools, append the results and call again, and "end_turn" means the model has finished. Checking for assistant text, parsing a magic phrase, or forbidding text by prompt all treat natural language as a completion signal, which is unreliable. An iteration cap is a safety limit, not the primary stopping mechanism, and it does not fix the early exit.Q669. Reports often omit findings from client PDFs even though doc_analysis returned them. The coordinator's delegation to synthesis says only "Synthesize the findings gathered so far into a briefing," and the synthesis subagent's output cites web sources alone. Logs show doc_analysis returned 14 findings with page numbers. What should change in how synthesis is invoked? (Select ONE.) A) Give the synthesis subagent the load_document tool so it can re-read the client PDFs itself whenever it needs more details from the uploaded documents. B) Include the full web_search and doc_analysis findings in the synthesis prompt as structured data, with each finding's source URL or document page. C) Raise the synthesis subagent's turn limit so that it has enough time to locate and gather the findings gathered so far on its own. D) Configure the synthesis subagent's definition so that it inherits the coordinator's conversation history and can read the doc_analysis results from there.
Understand Foundations Mock Exam 3 · Q669 · the situation and each part of the question
The real situation behind this question
Marrowfield's clients pay partly for the analysis of their own documents, so a report that ignores those documents is a serious failure. The doc_analysis subagent did its job and returned fourteen findings with page numbers. The coordinator then asked synthesis to use the findings gathered so far, as if synthesis could see them. It could not, so the report cited only the web.
Read the question in parts
Part 1 · doc_analysis returned 14 findings with page numbers
the information exists in the coordinator's context, so the failure is in the handoff, not in the analysis.
Part 2 · cites web sources alone
synthesis received some findings, probably those still mentioned in its prompt, but not the document ones.
What you are being asked to decide
Synthesis was told to use findings it never received. How do you get the findings to it? Tests passing complete prior findings explicitly in a subagent's prompt.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Context isolation | each subagent starts with only its own prompt and does not see the coordinator's earlier conversation |
| Structured handoff | passing findings as data with separate fields for content and source, so attribution survives |
Study: Coordinator handoffs: wait, pass context, then continue Subagent handoff Context isolation Provenance
Understand Foundations Mock Exam 3 · Q669's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Subagents start with only their prompt, so a reference to findings gathered so far points at nothing. The coordinator must pass the complete findings, as structured data with source metadata, in the synthesis prompt. Inheritance switches, extra tools and more turns do not deliver the missing context.
Connect the design to the situation
Fourteen document findings with page numbers that never reach the synthesis subagent.
Best answer: B. Subagents do not inherit the coordinator's context; anything synthesis needs must be passed explicitly in its prompt, and structured data keeps content separate from attribution metadata. There is no automatic inheritance to configure. Re-reading PDFs duplicates doc_analysis work and widens synthesis's tools, and more turns cannot reveal findings that were never given to it.
The decisive evidence in the stem
says only "Synthesize the findings gathered so far into a briefing,"
The prompt refers to findings the subagent cannot see, because a subagent starts with only what its prompt contains.
Official objective tested: Task 1.3 · Configure subagent invocation, context passing, and spawning
What each choice would do here
A · Why this does not meet the full requirement
Give the synthesis subagent the load_document tool so it can re-read the client PDFs itself whenever it needs more details from the uploaded documents.
Repeats doc_analysis work and gives synthesis a tool outside its role.
Synthesis re-reads the PDFs, duplicating the document analysis and spending budget. It may extract different or weaker findings than doc_analysis did, and its expanded tool set invites it to do analysis work instead of synthesis.
B · Why this meets the requirement
Include the full web_search and doc_analysis findings in the synthesis prompt as structured data, with each finding's source URL or document page.
Gives synthesis the actual findings and their sources, which it otherwise never sees.
The coordinator builds the synthesis prompt with two structured lists: web findings with URLs, and document findings with document names and page numbers. Synthesis now works from all the evidence, and report_writer receives citations it can render for every claim.
C · Why this does not meet the full requirement
Raise the synthesis subagent's turn limit so that it has enough time to locate and gather the findings gathered so far on its own.
More turns cannot reveal findings that were never put in the prompt.
Synthesis has more turns but still no access to the findings, because they were never placed in its context. It may spend the extra turns writing a longer report from the same web sources, which hides the real problem.
D · Why this does not meet the full requirement
Configure the synthesis subagent's definition so that it inherits the coordinator's conversation history and can read the doc_analysis results from there.
Subagents do not inherit parent history; there is no such inheritance to switch on.
There is no setting that makes a subagent automatically see the coordinator's history in this design. Synthesis would still start with only its prompt, so the document findings remain missing, and the team wastes time searching for a switch that does not exist.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative structured findings passed in the synthesis prompt
{"question": "Demand for refillable cleaning products in Germany", "web_findings": [{"claim": "Refill purchases grew in the first quarter", "source_url": "https://example.org/report", "published": "2024-03"}], "document_findings": [{"claim": "Refill shelf space rose at 40% of audited stores", "document": "client-retail-audit.pdf", "page": 12}]}Illustrative values. Content and attribution metadata sit in separate fields, so synthesis can use every finding and keep its source attached.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Synthesis was told to use findings it never received. How do you get the findings to it?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Coordinator handoffs: wait, pass context, then continue
Study: Coordinator handoffs: wait, pass context, then continue Subagent handoff Context isolation Provenance
Return to Foundations Mock Exam 3 · Q669's situation and clause-by-clause explanation
Answer
**B.** Subagents do not inherit the coordinator's context; anything synthesis needs must be passed explicitly in its prompt, and structured data keeps content separate from attribution metadata. There is no automatic inheritance to configure. Re-reading PDFs duplicates doc_analysis work and widens synthesis's tools, and more turns cannot reveal findings that were never given to it.Q670. Inside doc_analysis, your application makes direct Messages API calls with three tools: extract_document_metadata, extract_findings and compare_with_sources. Metadata such as publication date must be extracted before anything else, but in 15% of documents the model goes straight to extract_findings and the dates are never captured. How should the first request be configured? (Select ONE.) A) Keep tool_choice on auto and add a system prompt line telling the model that metadata extraction must always come before every other tool. B) Set tool_choice to "any" on the first request, so the model must call one of the three tools instead of replying with plain text. C) Keep tool_choice on auto and add a PostToolUse step that fills in missing dates afterwards by searching each document's text for a year. D) Set tool_choice to {"type": "tool", "name": "extract_document_metadata"} on the first request, then use auto on the follow-up requests for the other tools.
Understand Foundations Mock Exam 3 · Q670 · the situation and each part of the question
The real situation behind this question
Marrowfield's reports depend on knowing when each document was published, because a 2019 study and a 2024 study can legitimately disagree. The doc_analysis step is supposed to capture metadata first. Usually it does, but on roughly one document in seven the model jumps straight to findings, and those findings end up undated. Synthesis then cannot tell old evidence from new.
Read the question in parts
Part 1 · your application makes direct Messages API calls
the runtime is the Messages API, where tool_choice is a request field the application sets.
Part 2 · in 15% of documents the model goes straight to extract_findings
the current setting lets the model choose order, and it chooses wrongly at a measurable rate.
What you are being asked to decide
One tool must always run first. Which tool_choice setting guarantees that? Tests forced tool selection to make a specific step run first.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| tool_choice | the Messages API request field that controls whether and which tool the model must call |
| Forced tool selection | naming one tool in tool_choice so the model's first response must call extract_document_metadata |
Study: Tool choice: auto, any, or one forced tool tool_choice Forced tool extraction
Understand Foundations Mock Exam 3 · Q670's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A specific tool must run before the others, and auto lets the model skip it. Forcing that tool on the first request guarantees the order, and auto takes over afterwards. "any", prompt rules and after-the-fact guessing do not guarantee the right first step.
Connect the design to the situation
Metadata extraction skipped in 15% of documents, so dates are missing.
Best answer: D. Forcing a specific tool with tool_choice guarantees that extract_document_metadata runs first, and later turns can return to auto for the remaining steps. "any" guarantees some tool call, not this one, so extract_findings can still come first. A prompt rule leaves the 15% failure rate probabilistic, and guessing a year from text afterwards replaces extraction with a fragile heuristic.
The decisive evidence in the stem
must be extracted before anything else
A specific tool must run first, which only forced tool selection guarantees; any and auto both leave the order to the model.
Official objective tested: Task 2.3 · Distribute tools appropriately across agents and configure tool choice
What each choice would do here
A · Why this does not meet the full requirement
Keep tool_choice on auto and add a system prompt line telling the model that metadata extraction must always come before every other tool.
Prompt guidance leaves the ordering failure probabilistic.
Most documents follow the instruction, but a system prompt line is guidance. Some documents will still skip metadata, so the dates stay missing at a lower but non-zero rate, which still breaks synthesis for those documents.
B · Why this does not meet the full requirement
Set tool_choice to "any" on the first request, so the model must call one of the three tools instead of replying with plain text.
Guarantees a tool call but not which one, so findings can still come first.
The model must call a tool, but it may still choose extract_findings first, because "any" lets it pick any of the three. The 15% problem may shrink slightly or not at all, since the choice between tools is unchanged.
C · Why this does not meet the full requirement
Keep tool_choice on auto and add a PostToolUse step that fills in missing dates afterwards by searching each document's text for a year.
Guesses dates from text afterwards instead of extracting them properly.
A step later scans text for something that looks like a year. It may pick a cited year, a footnote or a revision date, so dates become unreliable, and the real extraction step is still being skipped.
D · Why this meets the requirement
Set tool_choice to {"type": "tool", "name": "extract_document_metadata"} on the first request, then use auto on the follow-up requests for the other tools.
Guarantees the metadata call first, then lets the model choose freely in later turns.
The first request names extract_document_metadata in tool_choice, so the response must call it. The application stores the metadata, appends the tool result, and sends follow-up requests with tool_choice auto, where the model calls extract_findings and compare_with_sources as needed.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative first request with a forced tool
{"model": "MODEL_ID", "max_tokens": 1024, "tools": [{"name": "extract_document_metadata", "description": "Extract title, author and publication date.", "input_schema": {"type": "object", "properties": {"title": {"type": "string"}, "published": {"type": ["string", "null"]}}, "required": ["title", "published"]}}], "tool_choice": {"type": "tool", "name": "extract_document_metadata"}, "messages": [{"role": "user", "content": "DOCUMENT TEXT"}]}Illustrative request, other two tools omitted for brevity; MODEL_ID and DOCUMENT TEXT are placeholders. tool_choice names one tool, so the model's response must call it; follow-up requests switch back to auto.
Not supplied in this example · settings and defaults
context_management — not supplied here. No server compaction strategy is enabled by this body. Host/manual compaction is separate.
output_config — not supplied here. No output_config schema or effort override is supplied. A prompt asking for JSON does not provide schema enforcement.
system — not supplied here. No application system instructions are supplied through this field. User messages still provide task text.
stop_sequences — not supplied here. No custom stop strings are configured. Generation can still stop for end_turn, tool_use, max_tokens, or another documented reason.
stream — not supplied here. For a direct non-streaming create/parse call, the result is one message rather than an event stream. A stream helper configures this separately.
thinking — not supplied here. No explicit thinking override is shown. Behavior depends on the selected model; omission does not universally mean thinking is off.
cache_control — not supplied here. No top-level automatic cache marker is supplied. Check nested system/tool/content blocks for separate cache_control markers.
metadata — not supplied here. No application user reference is supplied through metadata. Authentication still comes from the request credentials.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
One tool must always run first. Which tool_choice setting guarantees that?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Tool choice: auto, any, or one forced tool
Study: Tool choice: auto, any, or one forced tool tool_choice Forced tool extraction
Return to Foundations Mock Exam 3 · Q670's situation and clause-by-clause explanation
Answer
**D.** Forcing a specific tool with tool_choice guarantees that extract_document_metadata runs first, and later turns can return to auto for the remaining steps. "any" guarantees some tool call, not this one, so extract_findings can still come first. A prompt rule leaves the 15% failure rate probabilistic, and guessing a year from text afterwards replaces extraction with a fragile heuristic.Q671. For one briefing, web_search found a 2022 trade association study reporting that refill-station sales fell 8% after a deposit scheme began, and doc_analysis found a 2024 retailer panel survey reporting a 3% rise. Synthesis kept only the 2024 figure and cited it as the effect of the scheme. How should synthesis handle these two findings? (Select ONE.) A) Report both figures with their sources, methods and collection dates, and note that the difference may reflect timing rather than a direct contradiction. B) Average the two figures into a single net estimate of about a 2.5% decline, and cite both sources together for that combined number. C) Keep only the 2022 trade association study, since an industry-wide body is more authoritative than one retailer panel, and drop the retailer panel survey. D) Keep only the more recent 2024 figure, since newer data usually reflects current market conditions better, and cite the retailer panel survey as the source.
Understand Foundations Mock Exam 3 · Q671 · the situation and each part of the question
The real situation behind this question
The client's leadership will decide whether to launch a refill range partly from Marrowfield's report. One source says refill sales fell right after a deposit scheme began; another, two years later, says they are up. Both are credible. Synthesis quietly kept the more comforting number. If a board member later finds the 2022 study, the whole report's credibility suffers, and the board may make a launch decision on a misleading picture.
Read the question in parts
Part 1 · Synthesis kept only the 2024 figure
a credible conflicting value was dropped, losing information the reader needs.
Part 2 · cited it as the effect of the scheme
the report presents one value as settled when the evidence is actually mixed and time-dependent.
What you are being asked to decide
Two credible sources disagree and differ in date. How should the report present them? Tests annotating conflicting statistics with sources and dates instead of picking one.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Provenance | the record of which source, method and date each figure came from, kept through synthesis |
| Temporal difference | a gap between figures that may come from measuring at different times, not from one source being wrong |
Study: Provenance — claim-source mappings through synthesis Provenance Audit trail
Understand Foundations Mock Exam 3 · Q671's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Two credible sources disagree, and their dates differ. Synthesis should keep both figures with sources, methods and dates and explain the possible temporal reason. Picking one or averaging them discards or distorts the evidence.
Connect the design to the situation
Refill sales down 8% in a 2022 study and up 3% in a 2024 survey.
Best answer: A. Conflicting values from credible sources should be presented with attribution rather than one being picked, and publication or collection dates let readers see that a time difference may explain the gap. Picking the newer or the more official source arbitrarily discards evidence. Averaging numbers from different methods and periods creates a figure neither source supports.
The decisive evidence in the stem
a 2022 trade association study
The two figures come from different years and methods, so dates and sources must be preserved to interpret the difference rather than resolving it by choosing one.
Official objective tested: Task 5.6 · Preserve information provenance and handle uncertainty in multi-source synthesis
What each choice would do here
A · Why this meets the requirement
Report both figures with their sources, methods and collection dates, and note that the difference may reflect timing rather than a direct contradiction.
Keeps both credible figures, their sources and dates, so readers can interpret the gap honestly.
The briefing shows both: an 8% fall in 2022 from the trade association study, a 3% rise in 2024 from the retailer panel survey, each with method notes. It explains that the first measured the months after the scheme began and the second a later recovery, so readers see a time pattern, not a contradiction.
B · Why this does not meet the full requirement
Average the two figures into a single net estimate of about a 2.5% decline, and cite both sources together for that combined number.
Averaging different methods and periods invents a number neither source reports.
A 2.5% decline appears in the report with both sources cited, but neither source reported that number. The figure mixes an industry study with a retailer survey taken two years apart, so it is precise-looking and meaningless.
C · Why this does not meet the full requirement
Keep only the 2022 trade association study, since an industry-wide body is more authoritative than one retailer panel, and drop the retailer panel survey.
Choosing by source type discards credible evidence without examining it.
The report keeps only the 8% fall. Readers never learn about the later recovery, so the briefing overstates the long-term harm. The decision to drop the survey is based on source type alone, not on any evaluation of its method.
D · Why this does not meet the full requirement
Keep only the more recent 2024 figure, since newer data usually reflects current market conditions better, and cite the retailer panel survey as the source.
Newer is not automatically right, and the 2022 evidence disappears.
The report keeps only the 3% rise. Readers never learn that refill sales fell at first, which may matter greatly for a launch plan that cannot survive a bad first year. The choice looks like cherry-picking if the earlier study surfaces.
Check your understanding · explain the design in your own words
Two credible sources disagree and differ in date. How should the report present them?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Provenance — claim-source mappings through synthesis
Study: Provenance — claim-source mappings through synthesis Provenance Audit trail
Return to Foundations Mock Exam 3 · Q671's situation and clause-by-clause explanation
Answer
**A.** Conflicting values from credible sources should be presented with attribution rather than one being picked, and publication or collection dates let readers see that a time difference may explain the gap. Picking the newer or the more official source arbitrarily discards evidence. Averaging numbers from different methods and periods creates a figure neither source supports.Q672. Analysts reviewing a refill-products market report find that the synthesis covers consumer attitudes and pricing in depth but says almost nothing about packaging regulation, which the client's question named explicitly. The current pipeline makes one search pass, one analysis pass and one synthesis pass, then writes the report. What design change best addresses this? (Select ONE.) A) Have the coordinator check synthesis against the question's required topics, send targeted queries for gaps, and re-run synthesis. B) Instruct the synthesis subagent to fill any gap from its own general knowledge when the gathered sources do not cover a topic the client asked about. C) Ask web_search to return three times as many results on its single pass, so the first round is more likely to include sources on every topic. D) Give the synthesis subagent its own search_web tool so it can look up missing topics by itself while it writes, without involving the coordinator.
Understand Foundations Mock Exam 3 · Q672 · the situation and each part of the question
The real situation behind this question
The client, a mid-sized detergent brand, asked a specific question: how would a refill range fare on consumer attitudes, on pricing, and under the new packaging regulations. Marrowfield's report was strong on the first two and nearly silent on the third. Each subagent did its job; the pipeline simply never checked whether the combined result answered the whole question. The analysts want the system to notice and fix gaps before delivery.
Read the question in parts
Part 1 · one search pass, one analysis pass and one synthesis pass
the pipeline has no step that evaluates the output and goes back for more.
Part 2 · says almost nothing about packaging regulation
the failure is a specific, detectable coverage gap rather than poor quality overall.
What you are being asked to decide
The report missed a topic the client asked about. How should the system catch and fill that gap? Tests a coordinator refinement loop that re-delegates targeted work until coverage is sufficient.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Refinement loop | the coordinator checks the draft synthesis, sends targeted follow-up work, and asks for a new synthesis |
| Coverage criteria | the topics the client's question requires, used by the coordinator to judge whether the synthesis is complete |
Study: Successful workers can still produce an incomplete report Evaluator-optimizer Hub-and-spoke
Understand Foundations Mock Exam 3 · Q672's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The question names a topic the synthesis did not cover. The coordinator should evaluate the synthesis against the question, re-delegate targeted research, and re-run synthesis until coverage is sufficient. General knowledge, bigger first passes and cross-role search tools do not close the gap reliably.
Connect the design to the situation
A report strong on consumer attitudes and pricing but silent on packaging rules.
Best answer: A. An iterative refinement loop lets the coordinator evaluate synthesis output for gaps, send targeted queries back to search and analysis, and re-invoke synthesis until the required coverage exists. Filling gaps from general knowledge produces uncited claims. Tripling first-pass results adds volume without targeting the gap, and giving synthesis a search tool spreads search work outside its role and the coordinator's control.
The decisive evidence in the stem
which the client's question named explicitly
There is a clear coverage criterion the coordinator can check, so a targeted re-delegation loop can close the gap with cited sources.
Official objective tested: Task 1.2 · Orchestrate multi-agent systems with coordinator-subagent patterns
What each choice would do here
A · Why this meets the requirement
Have the coordinator check synthesis against the question's required topics, send targeted queries for gaps, and re-run synthesis.
Checks coverage against the question and closes gaps with new, citable research.
After synthesis, the coordinator compares the draft with the question's three topics and finds packaging regulation thin. It sends web_search and doc_analysis targeted queries about refill packaging rules, passes the new findings to synthesis, and checks again before report_writer runs.
B · Why this does not meet the full requirement
Instruct the synthesis subagent to fill any gap from its own general knowledge when the gathered sources do not cover a topic the client asked about.
Produces uncited claims, which violates the report's citation rule.
Synthesis writes a paragraph on packaging regulation from what the model generally knows. Those claims have no source URL or document page, so they break Marrowfield's rule that every claim is cited, and they may be outdated or wrong for this market.
C · Why this does not meet the full requirement
Ask web_search to return three times as many results on its single pass, so the first round is more likely to include sources on every topic.
More untargeted results may still miss the gap and add noise for analysis.
Search now returns many more results, mostly about consumer attitudes and pricing again because those topics dominate the coverage. Analysis takes longer, the budget suffers, and nothing guarantees the regulation gap is filled.
D · Why this does not meet the full requirement
Give the synthesis subagent its own search_web tool so it can look up missing topics by itself while it writes, without involving the coordinator.
Moves search outside synthesis's role and around the coordinator's control.
Synthesis starts searching while it writes. It now has tools outside its specialty, its searches bypass the coordinator's logging and error handling, and the new sources skip document analysis, so their quality and attribution are uneven.
Check your understanding · explain the design in your own words
The report missed a topic the client asked about. How should the system catch and fill that gap?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Successful workers can still produce an incomplete report
Study: Successful workers can still produce an incomplete report Evaluator-optimizer Hub-and-spoke
Return to Foundations Mock Exam 3 · Q672's situation and clause-by-clause explanation
Answer
**A.** An iterative refinement loop lets the coordinator evaluate synthesis output for gaps, send targeted queries back to search and analysis, and re-invoke synthesis until the required coverage exists. Filling gaps from general knowledge produces uncited claims. Tripling first-pass results adds volume without targeting the gap, and giving synthesis a search tool spreads search work outside its role and the coordinator's control.Q673. Marrowfield's coordinator always runs all four subagents in order. For a client request that reads "summarize what our own uploaded consumer panel studies conclude, no outside sources", it still runs web_search for six minutes, and 30% of runs like this exceed the 30-minute budget. What change best fixes this? (Select ONE.) A) Raise the run budget to 45 minutes for requests that mention client documents, so the full four-stage pipeline can complete without timing out. B) Have the coordinator analyze each request's requirements and invoke only the subagents it needs, skipping web_search when the client limits sources to its own documents. C) Keep the fixed pipeline but tell report_writer to discard any web sources whenever the request says the client wants no outside sources. D) Run all four subagents in parallel instead of in sequence, so the web search time overlaps with document analysis and the total run time drops.
Understand Foundations Mock Exam 3 · Q673 · the situation and each part of the question
The real situation behind this question
Some Marrowfield clients want a briefing that draws only on their own studies, often because outside sources may conflict with their confidential data. The coordinator ignores that and runs the whole pipeline, including web search. Those runs are slow, often exceed the time budget, and sometimes even leak an outside source into the report. The team wants the system to do only the work each request needs.
Read the question in parts
Part 1 · always runs all four subagents in order
the coordinator follows a fixed route instead of deciding based on the request.
Part 2 · 30% of runs like this exceed the 30-minute budget
the unnecessary stage has a measurable cost in missed deadlines.
What you are being asked to decide
The coordinator runs every subagent even when the request makes one useless. What should it do? Tests coordinators that select subagents per query instead of always running the full pipeline.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Coordinator | the agent that reads the request, decides which subagents to call, and combines their results |
| Dynamic selection | choosing per request which subagents are worth running, here skipping web_search |
Study: Coordinator communication from plan to final report Orchestrator Workflow routing
Understand Foundations Mock Exam 3 · Q673's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The request explicitly excludes outside sources, yet the coordinator runs web search anyway. A coordinator should analyze each request and invoke only the subagents it needs. Parallelism, late filtering or a bigger budget all keep the unnecessary work.
Connect the design to the situation
A documents-only request that still triggers six minutes of web search.
Best answer: B. A coordinator should look at what each query actually requires and select which subagents to invoke, rather than routing everything through the full pipeline. Parallel execution still wastes work that should not happen, and synthesis cannot depend on search output that runs alongside it. Discarding results at the end pays for the search anyway, and a larger budget hides the waste.
The decisive evidence in the stem
no outside sources
The request itself rules out web search, so the coordinator should read requirements and skip that subagent instead of running a fixed full pipeline.
Official objective tested: Task 1.2 · Orchestrate multi-agent systems with coordinator-subagent patterns
What each choice would do here
A · Why this does not meet the full requirement
Raise the run budget to 45 minutes for requests that mention client documents, so the full four-stage pipeline can complete without timing out.
Accepts the waste and makes clients wait longer for no benefit.
Runs now have more time, so fewer fail, but every documents-only request still wastes six minutes on search. Clients wait longer than necessary, and the root cause, a coordinator that never chooses, remains.
B · Why this meets the requirement
Have the coordinator analyze each request's requirements and invoke only the subagents it needs, skipping web_search when the client limits sources to its own documents.
Matches the work to the request, removing a stage the client explicitly ruled out.
The coordinator's prompt asks it to decide which subagents a request needs. For a documents-only request it calls doc_analysis, synthesis and report_writer, and never web_search. Runs finish well inside the budget, and no outside source can appear.
C · Why this does not meet the full requirement
Keep the fixed pipeline but tell report_writer to discard any web sources whenever the request says the client wants no outside sources.
Still pays the full search time, then throws the results away.
Web search runs for six minutes, its results flow through synthesis, and report_writer is then told to remove them. The budget problem is unchanged, and outside findings may already have shaped the synthesis before being dropped.
D · Why this does not meet the full requirement
Run all four subagents in parallel instead of in sequence, so the web search time overlaps with document analysis and the total run time drops.
Overlaps unwanted work instead of removing it, and stage dependencies limit parallelism.
Web search now runs at the same time as document analysis, so wall-clock time may drop, but the system still spends tokens and tool calls on a search the client ruled out. Synthesis also must wait for every branch, so the gain is limited.
Check your understanding · explain the design in your own words
The coordinator runs every subagent even when the request makes one useless. What should it do?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Coordinator communication from plan to final report
Study: Coordinator communication from plan to final report Orchestrator Workflow routing
Return to Foundations Mock Exam 3 · Q673's situation and clause-by-clause explanation
Answer
**B.** A coordinator should look at what each query actually requires and select which subagents to invoke, rather than routing everything through the full pipeline. Parallel execution still wastes work that should not happen, and synthesis cannot depend on search output that runs alongside it. Discarding results at the end pays for the search anyway, and a larger budget hides the waste.Q674. Analysts review a random 10% of reports, and measured citation accuracy is 96% overall. A client then found misattributed figures in a report built mostly from scanned retailer sales reports. Leadership wants to reduce review for claims the system marks as high-confidence. Which TWO changes should Marrowfield make before reducing review? (Select TWO.) A) Calibrate the claim-level confidence thresholds against a labeled validation set of checked claims before using those scores to decide what skips review. B) Measure citation accuracy separately by source type and claim type, using stratified random samples that include high-confidence claims, before cutting review anywhere. C) Ask the synthesis model to rate its own confidence in each claim and skip human review for any claim it rates above 0.9. D) Raise the uniform random review sample from 10% to 20% of reports, so the overall accuracy estimate becomes more precise for leadership.
Understand Foundations Mock Exam 3 · Q674 · the situation and each part of the question
The real situation behind this question
Marrowfield's leadership saw a 96% citation accuracy figure and asked why analysts still review so much. Then a client found wrong figures in a report built from scanned sales reports, which are hard for the system to read accurately. The analysts suspect the scanned documents are a weak spot that the average hides. Before any review is reduced, they want evidence that high-confidence claims are reliable in every segment.
Read the question in parts
Part 1 · built mostly from scanned retailer sales reports
a specific source type may perform much worse than the average, so it must be measured on its own.
Part 2 · claims the system marks as high-confidence
the proposed routing depends on confidence scores, which must be shown to be calibrated first.
What you are being asked to decide
Overall accuracy looks great but one kind of source fails. What must be in place before reviewing less? Tests segment-level accuracy measurement and calibrated confidence before reducing human review.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Stratified sampling | drawing review samples from each source and claim type separately, including high-confidence claims |
| Calibration | checking that a confidence score of, say, 0.9 really means about 90% correct on labeled examples |
Study: Confidence calibration & stratified sampling (human-review routing) Stratified sampling Calibration Multiple-response item
Understand Foundations Mock Exam 3 · Q674's answer · full reasoning and worked examples
Claude synthesized · the point, straight
An overall accuracy figure can hide a weak segment, and raw confidence scores are not proof of accuracy. Measure accuracy per segment with stratified samples and calibrate confidence against labeled data before routing. A bigger uniform sample or self-rated confidence leaves the risk hidden.
Connect the design to the situation
96% overall citation accuracy hiding errors in scanned sales reports.
Best answer: AB. An overall 96% can hide poor accuracy on segments like scanned sales reports, so accuracy must be measured per segment with stratified samples that include high-confidence claims. Confidence scores are useful for routing only after calibration against labeled data. A bigger uniform sample still averages across segments, and uncalibrated self-reported confidence is an unreliable signal for skipping review.
The decisive evidence in the stem
measured citation accuracy is 96% overall
An aggregate metric can mask a weak segment such as scanned sales reports, so per-segment measurement and calibrated confidence are needed before review is cut.
Official objective tested: Task 5.5 · Design human review workflows and confidence calibration
What each choice would do here
A · Why this does not meet the full requirement
Calibrate the claim-level confidence thresholds against a labeled validation set of checked claims before using those scores to decide what skips review.
Makes confidence scores trustworthy enough to route review before relying on them.
Analysts label a few hundred claims and compare them with the system's confidence scores. They find that 0.9 corresponds to about 80% correct on scanned sources, so they set thresholds per segment from data rather than trusting the raw score.
B · Why this does not meet the full requirement
Measure citation accuracy separately by source type and claim type, using stratified random samples that include high-confidence claims, before cutting review anywhere.
Reveals weak segments that the overall 96% hides, including errors among high-confidence claims.
Analysts sample claims from each source type, such as web pages, text PDFs and scanned PDFs, and each claim type, including those marked high-confidence. Scanned sales-report figures turn out to be 81% accurate, so review stays in place there while it can safely shrink for text sources.
C · Why this does not meet the full requirement
Ask the synthesis model to rate its own confidence in each claim and skip human review for any claim it rates above 0.9.
Uncalibrated self-reported confidence is an unreliable reason to skip review.
The model rates most of its claims highly, including the misattributed sales figures. Skipping review above 0.9 would remove human checks from exactly the claims that went wrong, because self-reported confidence was never checked against real accuracy.
D · Why this does not meet the full requirement
Raise the uniform random review sample from 10% to 20% of reports, so the overall accuracy estimate becomes more precise for leadership.
A larger uniform sample still averages over segments and hides the weak one.
The overall estimate becomes more precise, perhaps 96.2% with a narrower margin, but it still blends all segments. The weak scanned sales-report segment remains hidden in the average, so leadership could still cut review where it is most needed.
Check your understanding · explain the design in your own words
Overall accuracy looks great but one kind of source fails. What must be in place before reviewing less?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Confidence calibration & stratified sampling (human-review routing)
Study: Confidence calibration & stratified sampling (human-review routing) Stratified sampling Calibration Multiple-response item
Return to Foundations Mock Exam 3 · Q674's situation and clause-by-clause explanation
Answer
**AB.** An overall 96% can hide poor accuracy on segments like scanned sales reports, so accuracy must be measured per segment with stratified samples that include high-confidence claims. Confidence scores are useful for routing only after calibration against labeled data. A bigger uniform sample still averages across segments, and uncalibrated self-reported confidence is an unreliable signal for skipping review.Q675. For broad topics, Marrowfield's coordinator splits research into four independent subtopics and delegates each to web_search. Traces show it requests one subagent per turn and waits for each result before requesting the next, so the search phase takes about 24 minutes of the 30-minute budget. The subtopics do not depend on each other. What change best reduces the search phase time? (Select ONE.) A) Merge the four subtopics into one larger delegation to a single web_search subagent, so the coordinator waits for only one result. B) Send the four subtopic searches through the Message Batches API as one batch, so they are processed together and collected when the batch completes. C) Have the coordinator request all four subagents in a single response, with one Task (Agent) tool call per subtopic, so they run in parallel. D) Instruct each web_search subagent to return shorter results, so each sequential delegation finishes sooner and the four calls fit the budget.
Understand Foundations Mock Exam 3 · Q675 · the situation and each part of the question
The real situation behind this question
Broad topics like refillable cleaning products need research on consumer attitudes, pricing, retail channels and regulation. These four searches have nothing to do with each other, yet the coordinator handles them like a queue: ask, wait, ask, wait. Most of the run's time disappears in that queue, and later stages are squeezed. The team wants the same research done in a fraction of the time.
Read the question in parts
Part 1 · The subtopics do not depend on each other
nothing forces an order, so the delegations can safely run at the same time.
Part 2 · about 24 minutes of the 30-minute budget
the sequential search phase leaves almost no time for analysis, synthesis and writing.
What you are being asked to decide
Four independent searches run one after another. How do you run them at the same time? Tests spawning parallel subagents with multiple delegation calls in one coordinator response.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Task (Agent) tool | the Agent SDK's delegation tool; older material calls it Task, current docs call it Agent |
| Parallel spawning | the coordinator requests several subagents in one response so the runtime runs them together |
Study: Sessions, forking, and spawning — the mechanics the exam names Parallelization Subagent
Understand Foundations Mock Exam 3 · Q675's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Four independent subtopics are serialized across turns. Emitting all four delegation calls in one coordinator response lets them run in parallel. Batches, merged delegations or shorter outputs keep the wait or break latency.
Connect the design to the situation
Four unrelated subtopics searched sequentially, using 24 of 30 minutes.
Best answer: C. Independent subagents can run in parallel when the coordinator emits multiple Task (current SDKs call it Agent) tool calls in one response rather than one per turn. The Batches API has no latency guarantee and is wrong for a blocking 30-minute run. Merging subtopics into one subagent removes parallelism and dilutes focus, and shorter results trim the edges while keeping the sequential wait.
The decisive evidence in the stem
requests one subagent per turn and waits for each result
The subtasks are independent but serialized across turns, so issuing all the delegation calls in a single response lets them run concurrently.
Official objective tested: Task 1.3 · Configure subagent invocation, context passing, and spawning
What each choice would do here
A · Why this does not meet the full requirement
Merge the four subtopics into one larger delegation to a single web_search subagent, so the coordinator waits for only one result.
One subagent doing four topics is still sequential inside and less focused.
One subagent now researches four topics in one context. It works through them in sequence internally, so time barely improves, and its attention is split across unrelated topics, which tends to make each part shallower.
B · Why this does not meet the full requirement
Send the four subtopic searches through the Message Batches API as one batch, so they are processed together and collected when the batch completes.
Batches have no latency guarantee and suit work that can wait, not a 30-minute run.
The searches are submitted as a batch, which offers lower cost but no promise about when results arrive. Batch requests also cannot run the search tools mid-request. A blocking 30-minute run cannot wait on that, so this trades one problem for a worse one.
C · Why this meets the requirement
Have the coordinator request all four subagents in a single response, with one Task (Agent) tool call per subtopic, so they run in parallel.
Independent delegations in one response run concurrently, cutting the wait to the slowest one.
The coordinator's single response contains four delegation tool calls, one per subtopic. The Agent SDK runs the four web_search subagents concurrently and returns all four results to the coordinator, so the phase takes about as long as the slowest subtopic instead of all four added together.
D · Why this does not meet the full requirement
Instruct each web_search subagent to return shorter results, so each sequential delegation finishes sooner and the four calls fit the budget.
Shorter outputs save a little time but keep the four sequential waits.
Each search returns less text, so each call is a bit faster, but the coordinator still waits for four calls in a row. The search phase shrinks only modestly, and the shorter results may drop details later stages need.
Check your understanding · explain the design in your own words
Four independent searches run one after another. How do you run them at the same time?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Sessions, forking, and spawning — the mechanics the exam names
Study: Sessions, forking, and spawning — the mechanics the exam names Parallelization Subagent
Return to Foundations Mock Exam 3 · Q675's situation and clause-by-clause explanation
Answer
**C.** Independent subagents can run in parallel when the coordinator emits multiple Task (current SDKs call it Agent) tool calls in one response rather than one per turn. The Batches API has no latency guarantee and is wrong for a blocking 30-minute run. Merging subtopics into one subagent removes parallelism and dilutes focus, and shorter results trim the edges while keeping the sequential wait.Q676. Besides open-ended briefings, Marrowfield runs a weekly market digest: fetch the same six regulator and trade-association sources, extract new items, summarize each, then format one digest. The team runs it through the dynamic coordinator, which sometimes skips a source or reorders steps, so digests vary week to week and a missed source went unnoticed for a month. Which design fits the digest best? (Select ONE.) A) The same dynamic coordinator with a stronger prompt that lists the six sources and asks it to always include every one of them each week. B) A dynamic coordinator that first maps which sources look most newsworthy this week and then plans an adaptive investigation around those sources. C) A fixed sequential pipeline that runs fetch, extract, summarize and format for all six sources every week, with a check after each step. D) Four parallel subagents that each pick sources they consider relevant, followed by a synthesis step that merges whatever the four return.
Understand Foundations Mock Exam 3 · Q676 · the situation and each part of the question
The real situation behind this question
The weekly digest is Marrowfield's simplest product: six official sources, the same four steps, every Monday. Because the team already had a clever coordinator for briefings, they ran the digest through it too. The coordinator kept making choices nobody wanted it to make, and one week it silently skipped the packaging regulator. Nobody noticed for a month, until a client asked why a major announcement was missing.
Read the question in parts
Part 1 · sometimes skips a source or reorders steps
the dynamic planner introduces variation into a task that should be identical each time.
Part 2 · a missed source went unnoticed for a month
the current design has no checkpoint that verifies each expected step happened.
What you are being asked to decide
A weekly job always does the same steps on the same sources. Fixed pipeline or dynamic planner? Tests choosing prompt chaining for predictable work and dynamic decomposition for open-ended work.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Prompt chaining | a fixed sequence of model steps where each step's output feeds the next, with checks in between |
| Dynamic decomposition | a coordinator inventing subtasks as it learns, suited to open-ended research, not to a fixed digest |
Study: Workflows vs agents — Anthropic's decision rule Prompt chaining Decomposition
Understand Foundations Mock Exam 3 · Q676's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The digest has fixed inputs and fixed steps every week. Prompt chaining with checks between steps gives consistent output and catches missing sources. Dynamic or self-selecting designs belong to open-ended research, not to a known procedure.
Connect the design to the situation
A six-source weekly digest that a flexible coordinator keeps running differently.
Best answer: C. The digest is a predictable, repeated task with known steps and sources, which suits prompt chaining: a fixed sequence with checks between steps. Dynamic decomposition is for open-ended investigation where subtasks depend on what is found. A stronger prompt keeps a probabilistic planner in charge of a fixed procedure, and adaptive or self-selecting designs reintroduce the variation that caused the missed source.
The decisive evidence in the stem
fetch the same six regulator and trade-association sources
The steps and inputs are identical every week, so a fixed sequential pipeline is more reliable than letting a coordinator re-plan the route each time.
Official objective tested: Task 1.6 · Design task decomposition strategies for complex workflows
What each choice would do here
A · Why this does not meet the full requirement
The same dynamic coordinator with a stronger prompt that lists the six sources and asks it to always include every one of them each week.
Leaves a planner in charge of a fixed procedure, so skips stay possible.
The coordinator gets a firmer instruction, and most weeks it follows it. It is still a planner making choices, so on some weeks it will still skip or reorder, and without a step check a skip can again go unnoticed.
B · Why this does not meet the full requirement
A dynamic coordinator that first maps which sources look most newsworthy this week and then plans an adaptive investigation around those sources.
Adaptive planning is for open questions; here it invites skipping sources.
The coordinator now explores which sources matter this week, which is ideal for an open question but wrong here. A quiet week for one regulator may lead it to drop that source, which is exactly the failure the digest must avoid.
C · Why this meets the requirement
A fixed sequential pipeline that runs fetch, extract, summarize and format for all six sources every week, with a check after each step.
A known procedure runs the same way each week, and the step checks catch a missing source.
Code runs the same chain each Monday: fetch all six sources, extract new items, summarize each, then format. After the fetch step, a check confirms six non-empty results, so a missing source fails loudly. Digests are consistent, and the dynamic coordinator stays for open-ended briefings.
D · Why this does not meet the full requirement
Four parallel subagents that each pick sources they consider relevant, followed by a synthesis step that merges whatever the four return.
Self-selected sources bring back the variation that caused the missed source.
Each subagent decides which sources to read, so coverage depends on four independent judgments. Two may choose the same source and none may choose another. The merge step cannot restore a source nobody fetched.
Check your understanding · explain the design in your own words
A weekly job always does the same steps on the same sources. Fixed pipeline or dynamic planner?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Workflows vs agents — Anthropic's decision rule
Study: Workflows vs agents — Anthropic's decision rule Prompt chaining Decomposition
Return to Foundations Mock Exam 3 · Q676's situation and clause-by-clause explanation
Answer
**C.** The digest is a predictable, repeated task with known steps and sources, which suits prompt chaining: a fixed sequence with checks between steps. Dynamic decomposition is for open-ended investigation where subtasks depend on what is found. A stronger prompt keeps a probabilistic planner in charge of a fixed procedure, and adaptive or self-selecting designs reintroduce the variation that caused the missed source.Q677. The load_document MCP tool returns the text "Operation failed" for three different problems: a password-protected PDF, a file ID that does not exist, and a storage service timeout. The doc_analysis subagent retries every failure five times, wasting about four minutes per run, and never tells the coordinator which documents need the client's help. What should the tool return instead? (Select ONE.) A) The same "Operation failed" text, with the subagent's prompt changed to retry each failed document only twice before it moves on to the next document. B) An isError result with an errorCategory such as permission, validation or transient, an isRetryable flag, and a short human-readable description of the cause. C) A raised exception that stops the whole research run, so an engineer can inspect the logs and fix the document problem before any retry. D) An empty successful result for any failed document, so the subagent continues with the remaining documents instead of spending its limited time on retries.
Understand Foundations Mock Exam 3 · Q677 · the situation and each part of the question
The real situation behind this question
Clients upload all sorts of files: some are password-protected, some uploads fail halfway, and the storage service occasionally times out. The load_document tool reports all of these the same way. The subagent, unable to tell them apart, retries everything repeatedly and then gives up quietly. Analysts only discover a week later that a key sales-data PDF was locked and could have been unlocked with one email to the client.
Read the question in parts
Part 1 · retries every failure five times
the agent cannot tell retryable from non-retryable failures, so it wastes attempts on permanent ones.
Part 2 · never tells the coordinator which documents need the client's help
the error content is too vague for the system to route problems to the right person.
What you are being asked to decide
One vague error message hides three different problems. What should the tool report? Tests structured MCP error responses with category and retryability.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| isError | the MCP result flag that tells the agent this tool call failed rather than returned content |
| isRetryable | a field the tool adds so the agent knows a timeout may succeed later but a locked PDF will not |
Study: The MCP error contract — isError and structured error metadata Error taxonomy MCP server
Understand Foundations Mock Exam 3 · Q677's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Three different failures share one vague message, so the agent cannot choose a recovery. Structured errors with a category, an isRetryable flag and a description let it retry only transient failures and report the rest. Fewer retries, silent empty results or aborting the run all mishandle the failures.
Connect the design to the situation
A locked PDF, a missing file and a storage timeout all reported as "Operation failed".
Best answer: B. Structured error metadata lets the agent tell a retryable timeout from a non-retryable permission or validation problem, so it retries only what can succeed and reports the rest. A lower retry count still wastes retries on permanent failures and hides the cause. Returning empty success hides the failure entirely, and terminating the run on one bad document throws away all other work.
The decisive evidence in the stem
for three different problems
The failures need different recovery actions, which the agent can choose only if the tool tells it the category and whether a retry can help.
Official objective tested: Task 2.2 · Implement structured error responses for MCP tools
What each choice would do here
A · Why this does not meet the full requirement
The same "Operation failed" text, with the subagent's prompt changed to retry each failed document only twice before it moves on to the next document.
Fewer retries still waste attempts on permanent failures and hide the cause.
The subagent now retries twice instead of five times, so less time is wasted, but every locked PDF and missing ID still gets two pointless retries. The coordinator still never learns why documents failed, so nobody asks the client for a password.
B · Why this meets the requirement
An isError result with an errorCategory such as permission, validation or transient, an isRetryable flag, and a short human-readable description of the cause.
Gives the agent what it needs to retry the timeout and report the locked and missing files.
The locked PDF returns isError with category permission, isRetryable false and a note that a password is needed. The missing ID returns validation, not retryable. The timeout returns transient, retryable. The subagent retries only the timeout and reports the other two to the coordinator for client follow-up.
C · Why this does not meet the full requirement
A raised exception that stops the whole research run, so an engineer can inspect the logs and fix the document problem before any retry.
Destroys a whole run's progress because of one bad document.
One locked PDF stops the whole run, discarding web search, analysis of the other documents and all elapsed budget. An engineer must intervene, even though the right action was simply to report the locked file and continue.
D · Why this does not meet the full requirement
An empty successful result for any failed document, so the subagent continues with the remaining documents instead of spending its limited time on retries.
Hides the failure, so the report silently lacks those documents.
Failed documents look like documents with no content. The subagent moves on happily, the coordinator thinks every document was analyzed, and the report may state that the client's documents contain no evidence on a topic when the evidence was simply unreadable.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative structured error from load_document
{"isError": true, "content": [{"type": "text", "text": "{\"errorCategory\": \"permission\", \"isRetryable\": false, \"document_id\": \"doc-118\", \"description\": \"PDF is password-protected; ask the client for the password.\"}"}]}Illustrative values. isError marks the failure in the MCP result; the text content carries the category, retryability and a description the agent can act on and pass to the coordinator.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
One vague error message hides three different problems. What should the tool report?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: The MCP error contract — isError and structured error metadata
Study: The MCP error contract — isError and structured error metadata Error taxonomy MCP server
Return to Foundations Mock Exam 3 · Q677's situation and clause-by-clause explanation
Answer
**B.** Structured error metadata lets the agent tell a retryable timeout from a non-retryable permission or validation problem, so it retries only what can succeed and reports the rest. A lower retry count still wastes retries on permanent failures and hides the cause. Returning empty success hides the failure entirely, and terminating the run on one bad document throws away all other work.Q678. To keep things flexible, the report_writer subagent was given every tool in the system, 14 in total, including search_web and fetch_page. Reviews show report_writer now runs its own searches while formatting and inserts new statistics that never went through doc_analysis or synthesis, and some have no citation. What change best fixes this? (Select ONE.) A) Restrict report_writer to the formatting and citation tools its role needs, and route new research needs through the coordinator. B) Give report_writer a larger model so it can tell better when outside research would improve the report and when it is not necessary. C) Keep all 14 tools but add a system prompt line telling report_writer not to search the web or fetch pages while it formats the report. D) Keep all 14 tools and add a final check that deletes any statistic in the report that does not appear anywhere in the synthesis output.
Understand Foundations Mock Exam 3 · Q678 · the situation and each part of the question
The real situation behind this question
When Marrowfield built the system, giving every subagent every tool seemed harmless and flexible. Now report_writer, whose only job is to turn synthesis into a polished briefing, has started doing research on its own. It finds new numbers, drops them into the report, and sometimes forgets to cite them. Analysts are now spending their review time removing statistics nobody can trace.
Read the question in parts
Part 1 · inserts new statistics that never went through doc_analysis or synthesis
material bypasses the pipeline's analysis and attribution steps, undermining report quality.
Part 2 · some have no citation
the misuse directly breaks the rule that every claim must cite a source.
What you are being asked to decide
The report writer has search tools and uses them. How do you stop it doing research? Tests restricting each subagent's tools to its role.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Scoped tool access | giving report_writer only the tools its formatting role needs, nothing for research |
| Capability bloat | a subagent holding far more tools than its job needs, which leads to misuse and worse tool choice |
Study: Reuse implementation without exposing unrestricted tools Least-privilege tooling Capability bloat
Understand Foundations Mock Exam 3 · Q678's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A formatting agent holding research tools misuses them. Scope each subagent's tools to its role and route new research needs through the coordinator. Prompt rules, after-the-fact deletion and bigger models leave the misplaced tools in place.
Connect the design to the situation
A formatting subagent with web search that adds uncited statistics.
Best answer: A. Agents given tools outside their specialization tend to misuse them, and too many tools also degrade selection; scoping report_writer to its role removes the misuse at the source while the coordinator handles new research. A prompt line keeps the tools available and only guides. A deletion check treats symptoms after budget is spent, and a larger model still has the wrong tools.
The decisive evidence in the stem
was given every tool in the system, 14 in total
The writer holds tools outside its role, which invites cross-specialization misuse that scoped tool access removes.
Official objective tested: Task 2.3 · Distribute tools appropriately across agents and configure tool choice
What each choice would do here
A · Why this meets the requirement
Restrict report_writer to the formatting and citation tools its role needs, and route new research needs through the coordinator.
Removes the tools that enable the misuse and keeps research inside the coordinated path.
report_writer's definition now lists only tools for layout, tables and citation rendering. It cannot search or fetch. If formatting reveals a missing number, it says so in its output, and the coordinator decides whether to send a targeted query to web_search.
B · Why this does not meet the full requirement
Give report_writer a larger model so it can tell better when outside research would improve the report and when it is not necessary.
A stronger model with the wrong tools is still positioned to misuse them.
The larger model may make somewhat better judgments about when to search, but it still has search tools outside its role. Misuse becomes less frequent at best, and the system pays more per run while the root cause stays.
C · Why this does not meet the full requirement
Keep all 14 tools but add a system prompt line telling report_writer not to search the web or fetch pages while it formats the report.
Guidance only; the tools stay available and the misuse can continue.
report_writer still sees search_web and fetch_page in its tool list. Most runs obey the instruction, but prompt guidance is probabilistic, so some runs will still search, and the 14-tool menu continues to make tool choice less reliable.
D · Why this does not meet the full requirement
Keep all 14 tools and add a final check that deletes any statistic in the report that does not appear anywhere in the synthesis output.
Cleans up after the misuse and still spends budget on the searches.
report_writer still searches and spends time and tokens doing so. A later check removes unmatched statistics, but legitimate rewording of synthesis numbers may also be deleted, and the waste and the design flaw remain.
Check your understanding · explain the design in your own words
The report writer has search tools and uses them. How do you stop it doing research?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Reuse implementation without exposing unrestricted tools
Study: Reuse implementation without exposing unrestricted tools Least-privilege tooling Capability bloat
Return to Foundations Mock Exam 3 · Q678's situation and clause-by-clause explanation
Answer
**A.** Agents given tools outside their specialization tend to misuse them, and too many tools also degrade selection; scoping report_writer to its role removes the misuse at the source while the coordinator handles new research. A prompt line keeps the tools available and only guides. A deletion check treats symptoms after budget is spent, and a larger model still has the wrong tools.Scenario 3 · Developer Productivity with Claude
Q679. Yesterday an engineer used Atlas in a named session, billing-map, to analyze 40 files of the billing service and draft a refactoring plan. Overnight a teammate merged a pull request that changed 3 of those 40 files. Today the engineer wants to continue the plan without paying for a full re-analysis. What should the engineer do? (Select ONE.) A) Start a new session and have Atlas re-read all 40 files from scratch, so every part of the plan is based on fresh reads of the code. B) Resume billing-map and continue planning directly, since 37 of the 40 analyzed files are still unchanged and most of the earlier analysis is still valid. C) Fork billing-map into a new branch and continue planning there, so the original session stays untouched in case the changes cause problems. D) Resume billing-map and tell Atlas which three files changed in the merged pull request, asking it to re-read only those files and update the plan.
Understand Foundations Mock Exam 3 · Q679 · the situation and each part of the question
The real situation behind this question
The engineer spent most of yesterday with Atlas mapping the billing service and drafting a careful refactoring plan. This morning they see that a teammate merged a change touching three of the files in that analysis. Starting over would waste a day of good work, but continuing blindly might produce a plan that conflicts with the new code. They want the cheapest path that still keeps the plan correct.
Read the question in parts
Part 1 · without paying for a full re-analysis
the engineer wants to reuse the earlier work, which points toward resuming the session.
Part 2 · a named session, billing-map
the earlier context is saved and can be resumed by name.
What you are being asked to decide
A saved analysis is mostly still true but three files changed. Resume, restart or fork? Tests resuming a session and informing it about specific file changes.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Resume | continuing a saved session with its earlier messages and tool results, which still hold the old file contents |
| Targeted re-analysis | re-reading only the three changed files instead of exploring all 40 again |
Study: Named sessions: resume, continue, fork, or start fresh Checkpoint Agent SDK
Understand Foundations Mock Exam 3 · Q679's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Most of the saved analysis is valid, and three files are stale. Resume the session and name the changed files for targeted re-reading. Resuming blindly keeps stale data, restarting wastes valid work, and forking copies the staleness.
Connect the design to the situation
A 40-file analysis with 3 files changed overnight by a teammate.
Best answer: D. When most prior context is still valid, resuming is right, but a resumed session does not re-read files, so it must be told exactly which files changed for targeted re-analysis. Resuming without that note plans against stale contents of three files. A full re-read wastes the valid analysis, and a fork copies the same stale history without fixing it.
The decisive evidence in the stem
changed 3 of those 40 files
Most of the analysis is still valid but part is stale, so resume and point the session at the specific changed files.
Official objective tested: Task 1.7 · Manage session state, resumption, and forking
What each choice would do here
A · Why this does not meet the full requirement
Start a new session and have Atlas re-read all 40 files from scratch, so every part of the plan is based on fresh reads of the code.
Throws away a mostly valid analysis and pays for 40 file reads again.
Atlas reads all 40 files again and rebuilds the analysis. The result is correct, but most of a day's work is repeated for no gain, which is exactly the cost the engineer wanted to avoid.
B · Why this does not meet the full requirement
Resume billing-map and continue planning directly, since 37 of the 40 analyzed files are still unchanged and most of the earlier analysis is still valid.
The session still holds the old contents of three files and will plan against them.
Atlas still holds yesterday's version of the three changed files. It continues planning as if nothing changed, so parts of the plan may refer to functions that were renamed or removed, and the engineer discovers the mismatch during implementation.
C · Why this does not meet the full requirement
Fork billing-map into a new branch and continue planning there, so the original session stays untouched in case the changes cause problems.
A fork inherits the same stale history, so the problem moves with it.
The fork copies yesterday's history into a new session, including the stale contents of the three files. Planning continues in the fork with the same outdated view, so the fork protects the original but fixes nothing.
D · Why this meets the requirement
Resume billing-map and tell Atlas which three files changed in the merged pull request, asking it to re-read only those files and update the plan.
Keeps the valid analysis and refreshes exactly the part that became stale.
The engineer resumes billing-map and writes: invoice_calc.go, ledger_client.go and retry.go changed in the merged pull request; re-read those three and revise the plan where they matter. Atlas reads three files, adjusts two steps of the plan, and continues.
Check your understanding · explain the design in your own words
A saved analysis is mostly still true but three files changed. Resume, restart or fork?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Named sessions: resume, continue, fork, or start fresh
Study: Named sessions: resume, continue, fork, or start fresh Checkpoint Agent SDK
Return to Foundations Mock Exam 3 · Q679's situation and clause-by-clause explanation
Answer
**D.** When most prior context is still valid, resuming is right, but a resumed session does not re-read files, so it must be told exactly which files changed for targeted re-analysis. Resuming without that note plans against stale contents of three files. A full re-read wastes the valid analysis, and a fork copies the same stale history without fixing it.Q680. Atlas's scheduled bot must never force-push and must never edit files under infra/prod/; such changes need a human-approved pull request. The system prompt states both rules, yet last week one run force-pushed a branch. The team must guarantee these rules in the Agent SDK configuration. Which change does that? (Select ONE.) A) List only safe commands such as git commit and normal git push in allowed_tools, so a force push and edits under infra/prod/ are no longer available to the bot. B) Move both rules to the top of the system prompt, mark them as critical, and add an example of a refused force push, so the model treats them as top priority. C) Add a PostToolUse hook that detects a force push or an infra/prod/ edit after it happens and immediately notifies the team channel with the details. D) Register a PreToolUse hook that denies force-push Bash calls and Edit or Write calls under infra/prod/, telling Atlas to open a pull request instead.
Understand Foundations Mock Exam 3 · Q680 · the situation and each part of the question
The real situation behind this question
The scheduled Atlas bot works on branches overnight. Harborlight's rule is simple: no force pushes, and production infrastructure changes always go through a reviewed pull request. Last week a run hit a merge conflict and force-pushed to resolve it, overwriting a colleague's commit. The prompt said not to. Leadership now wants a control that holds every time, not an instruction the model usually follows.
Read the question in parts
Part 1 · The system prompt states both rules
guidance is already present and has already failed, so the answer must be enforcement.
Part 2 · such changes need a human-approved pull request
a good control should not only block but also redirect the agent to the approved path.
What you are being asked to decide
Prompt rules did not stop a force push. What setting truly blocks it? Tests PreToolUse interception over prompts and pre-approval lists for guaranteed compliance.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| PreToolUse hook | code that inspects each tool call before it runs and can deny it with a reason |
| allowed_tools | an Agent SDK option that pre-approves tools so they run without asking; it does not block unlisted calls by itself |
Study: Agent SDK hooks: block a call, clean up a result Hook Tool availability versus permissions Guardrail
Understand Foundations Mock Exam 3 · Q680's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The rule must hold every time and prompt guidance already failed. A PreToolUse hook denies the forbidden calls before they run and redirects to a pull request. allowed_tools only pre-approves, prompts only guide, and PostToolUse only reports afterwards.
Connect the design to the situation
A bot that force-pushed despite a prompt rule against it.
Best answer: D. A PreToolUse hook runs before the tool executes and can deny the call deterministically, then redirect Atlas to the pull-request path. allowed_tools pre-approves the listed tools; it does not by itself stop other calls, so it is not a guarantee. Prompt emphasis is still probabilistic, and a PostToolUse alert fires after the damage is done.
The decisive evidence in the stem
must guarantee these rules
A guarantee needs code that intercepts the outgoing tool call and refuses it, not guidance and not a list that only pre-approves tools.
Official objective tested: Task 1.5 · Apply Agent SDK hooks for tool call interception and data normalization
What each choice would do here
A · Why this does not meet the full requirement
List only safe commands such as git commit and normal git push in allowed_tools, so a force push and edits under infra/prod/ are no longer available to the bot.
Pre-approval lists do not restrict on their own, so this is not a guarantee.
The safe commands now run without approval prompts, but listing them does not stop other commands in this setup, so a force push could still run. The team believes it has a block when it only has pre-approval, which is worse than knowing there is none.
B · Why this does not meet the full requirement
Move both rules to the top of the system prompt, mark them as critical, and add an example of a refused force push, so the model treats them as top priority.
Stronger guidance still fails sometimes, as last week showed.
The model follows the rules more often, but a merge-conflict situation can still lead it to force-push. Prompt priority is not enforcement, so the control fails exactly in the unusual runs where it matters most.
C · Why this does not meet the full requirement
Add a PostToolUse hook that detects a force push or an infra/prod/ edit after it happens and immediately notifies the team channel with the details.
Reports the damage after it has already happened.
A force push still happens and a colleague's commit is still overwritten. Seconds later the team channel gets an alert. Detection helps recovery, but the rule was to prevent the action, not to report it.
D · Why this meets the requirement
Register a PreToolUse hook that denies force-push Bash calls and Edit or Write calls under infra/prod/, telling Atlas to open a pull request instead.
Blocks the forbidden calls before they run and points Atlas to the approved path.
The hook checks Bash commands for push with force flags and Edit or Write paths under infra/prod/. Matching calls are denied before execution, and the reason tells Atlas to open a pull request. The model reads the reason and takes that path, and the rule holds every run.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative PreToolUse hook registration
from claude_agent_sdk import ClaudeAgentOptions, HookMatcher
async def block_unsafe(input_data, tool_use_id, context):
tool_input = input_data.get("tool_input", {})
command = tool_input.get("command", "")
path = tool_input.get("file_path", "")
if "push" in command and ("--force" in command or " -f" in command) or path.startswith("infra/prod/"):
return {"hookSpecificOutput": {"hookEventName": "PreToolUse", "permissionDecision": "deny", "permissionDecisionReason": "Not allowed for the bot. Open a pull request for human approval."}}
return {}
options = ClaudeAgentOptions(hooks={"PreToolUse": [HookMatcher(matcher="Bash|Edit|Write", hooks=[block_unsafe])]})Illustrative and simplified: a production check would parse commands more carefully. The hook runs before every Bash, Edit or Write call and denies the forbidden ones with a reason that redirects Atlas.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Prompt rules did not stop a force push. What setting truly blocks it?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Agent SDK hooks: block a call, clean up a result
Study: Agent SDK hooks: block a call, clean up a result Hook Tool availability versus permissions Guardrail
Return to Foundations Mock Exam 3 · Q680's situation and clause-by-clause explanation
Answer
**D.** A PreToolUse hook runs before the tool executes and can deny the call deterministically, then redirect Atlas to the pull-request path. allowed_tools pre-approves the listed tools; it does not by itself stop other calls, so it is not a guarantee. Prompt emphasis is still probabilistic, and a PostToolUse alert fires after the damage is done.Q681. Atlas's system prompt says, "When the user asks about a service, always check the service catalog first." Tool descriptions for catalog_lookup, Grep and Read are clear and specific. Yet questions like "what does this service class's retry method do" trigger catalog_lookup instead of reading the code. What should the team change first? (Select ONE.) A) Add few-shot examples of code questions answered with Grep and Read, while keeping the existing catalog instruction in the system prompt unchanged. B) Rename catalog_lookup to service_metadata_lookup and extend its description further, so its purpose is even clearer to the model than it is today. C) Add a routing classifier in front of Atlas that detects code questions and removes catalog_lookup from the tool list for those particular requests. D) Reword the instruction: use the catalog for ownership, deployment and dependency metadata, and read the code for implementation questions.
Understand Foundations Mock Exam 3 · Q681 · the situation and each part of the question
The real situation behind this question
Harborlight engineers often ask Atlas about specific classes, and many class names end in Service. An early version of the system prompt told Atlas to check the catalog whenever someone asks about a service, meaning a deployed microservice. Now, whenever the word appears, Atlas looks up catalog metadata instead of reading the code. Engineers get ownership details when they wanted to understand a method.
Read the question in parts
Part 1 · always check the service catalog first
the instruction is unconditional and keyed to a common word, so it fires far beyond its intent.
Part 2 · What should the team change first?
the answer should be the direct fix to the identified cause before adding new components.
What you are being asked to decide
One word in the system prompt sends the agent to the wrong tool. What do you change? Tests reviewing system prompts for keyword-sensitive instructions that override tool descriptions.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Keyword-sensitive instruction | a system prompt rule that fires whenever a word appears, here the word service |
| Tool selection | the model's choice of which tool to call, shaped by descriptions and by system prompt wording |
Study: Remove irrelevant tools or explain useful ones? System prompt Tool selection
Understand Foundations Mock Exam 3 · Q681's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The tool descriptions are fine, but a keyword-triggered system prompt rule overrides them. Rewriting that rule to state the catalog's real purpose removes the unintended association. Classifiers, renames and examples work around a sentence that should simply be fixed.
Connect the design to the situation
The word service in a code question triggering a catalog lookup.
Best answer: D. Keyword-sensitive wording in a system prompt can override good tool descriptions: "service" in any question triggers the catalog rule. Rewriting the instruction to state what the catalog is for removes the unintended association. A classifier adds a layer before fixing the cause, the descriptions are already clear, and examples work against an instruction that still says always.
The decisive evidence in the stem
Tool descriptions for catalog_lookup, Grep and Read are clear and specific
The descriptions are not the problem, so the misrouting comes from the keyword-triggered system prompt rule, which must be reworded.
Official objective tested: Task 2.1 · Design effective tool interfaces with clear descriptions and boundaries
What each choice would do here
A · Why this does not meet the full requirement
Add few-shot examples of code questions answered with Grep and Read, while keeping the existing catalog instruction in the system prompt unchanged.
Examples fight an instruction that still says always check the catalog.
Examples show Grep and Read for code questions, while the system prompt still says always check the catalog. The model receives conflicting signals, so routing becomes inconsistent rather than correct.
B · Why this does not meet the full requirement
Rename catalog_lookup to service_metadata_lookup and extend its description further, so its purpose is even clearer to the model than it is today.
Improves descriptions that are already fine while the overriding rule stays.
The renamed tool has an even better description, but the system prompt still says to check the catalog first whenever a service is mentioned. The instruction outranks the description, so the misrouting continues.
C · Why this does not meet the full requirement
Add a routing classifier in front of Atlas that detects code questions and removes catalog_lookup from the tool list for those particular requests.
Adds machinery around a problem caused by one sentence.
A classifier runs before every request and strips catalog_lookup for code questions. It sometimes misclassifies mixed questions, adds latency and maintenance, and the unconditional sentence remains in the prompt, ready to cause the next misroute.
D · Why this meets the requirement
Reword the instruction: use the catalog for ownership, deployment and dependency metadata, and read the code for implementation questions.
Removes the unintended keyword trigger by stating what the catalog is actually for.
The instruction now reads: use catalog_lookup for questions about who owns a deployed service, where it runs, or what it depends on; for questions about how code works, read the code. Code questions mentioning a Service class now go to Grep and Read.
Check your understanding · explain the design in your own words
One word in the system prompt sends the agent to the wrong tool. What do you change?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Remove irrelevant tools or explain useful ones?
Study: Remove irrelevant tools or explain useful ones? System prompt Tool selection
Return to Foundations Mock Exam 3 · Q681's situation and clause-by-clause explanation
Answer
**D.** Keyword-sensitive wording in a system prompt can override good tool descriptions: "service" in any question triggers the catalog rule. Rewriting the instruction to state what the catalog is for removes the unintended association. A classifier adds a layer before fixing the cause, the descriptions are already clear, and examples work against an instruction that still says always.Q682. Harborlight runs a code_search MCP server that indexes symbols across all 300 repositories and returns call sites with file and line. Its tool description says only "Searches code." Traces show Atlas using Grep in the current checkout for cross-repository questions and missing callers in other repositories about 70% of the time. What should the team do first? (Select ONE.) A) Replace the code_search server with a custom MCP server built by the platform team that wraps Grep across a local copy of every repository. B) Remove Grep from Atlas's tool list entirely, so code_search becomes the only search tool available and Atlas must use it for every code search in any repository. C) Add a system prompt line telling Atlas to always use code_search for every code search it runs, including quick searches within the current checkout. D) Expand code_search's description: all 300 repositories, symbol-aware call sites with file and line, preferred over Grep for cross-repository caller questions.
Understand Foundations Mock Exam 3 · Q682 · the situation and each part of the question
The real situation behind this question
Harborlight invested in a cross-repository code index so engineers could find every caller of a shared library. Atlas was given the tool but rarely uses it. When asked who calls a billing function, it greps the current repository and reports a handful of callers, missing dozens elsewhere. Engineers trust those answers and make breaking changes. The index works; Atlas just does not know what it offers.
Read the question in parts
Part 1 · returns call sites with file and line
the MCP tool has real advantages that its description hides from the model.
Part 2 · about 70% of the time
the misselection is frequent and has a measurable cost in missed callers.
What you are being asked to decide
A powerful MCP search tool is ignored in favour of Grep. What do you fix first? Tests enhancing MCP tool descriptions so agents prefer more capable tools when appropriate.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| MCP tool description | the text the code_search server sends with its tool, which the model reads when choosing tools |
| Grep | the built-in content search tool, limited here to the current checkout |
Study: Remove irrelevant tools or explain useful ones? Tool description Claude Code MCP tools
Understand Foundations Mock Exam 3 · Q682's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The capable MCP tool loses to Grep because its description hides its scope and outputs. Expanding the description to say what it covers, what it returns and when to prefer it fixes the choice. Removing Grep, forcing the MCP tool everywhere or rebuilding the server overcorrect.
Connect the design to the situation
A cross-repo symbol index described as "Searches code." losing to Grep.
Best answer: D. Agents pick between tools largely from their descriptions, and a two-word description gives Atlas no reason to prefer the more capable MCP tool over familiar Grep; explaining its scope, outputs and when to use it is the first fix. Removing Grep loses a tool that is right for local text searches. An always-use rule overcorrects, and rebuilding the server addresses a problem the description causes.
The decisive evidence in the stem
Its tool description says only "Searches code."
The model cannot see the MCP tool's advantages, so it defaults to the built-in tool; describing capabilities and outputs fixes the choice.
Official objective tested: Task 2.4 · Integrate MCP servers into Claude Code and agent workflows
What each choice would do here
A · Why this does not meet the full requirement
Replace the code_search server with a custom MCP server built by the platform team that wraps Grep across a local copy of every repository.
Rebuilds infrastructure to fix what a description change can fix.
The team spends weeks building and maintaining a custom server and keeping copies of 300 repositories in sync. The new tool would face the same selection problem if its description were vague, so the real cause is untouched.
B · Why this does not meet the full requirement
Remove Grep from Atlas's tool list entirely, so code_search becomes the only search tool available and Atlas must use it for every code search in any repository.
Loses a fast, correct tool for searches inside the current checkout.
Atlas can only use code_search now. Simple searches for a string in the current file tree go to a remote index that may lag behind uncommitted local changes, so some local answers get worse, and the vague description still gives the model little guidance.
C · Why this does not meet the full requirement
Add a system prompt line telling Atlas to always use code_search for every code search it runs, including quick searches within the current checkout.
Overcorrects and sends simple local searches to a heavier remote tool.
Atlas now uses code_search for everything, including quick local text searches where Grep is faster and sees uncommitted edits. The rule fixes the cross-repository case by breaking the local case, and the description still explains nothing.
D · Why this meets the requirement
Expand code_search's description: all 300 repositories, symbol-aware call sites with file and line, preferred over Grep for cross-repository caller questions.
Shows the model when the MCP tool is the better choice, while keeping Grep for local searches.
The new description says code_search queries a symbol index over all 300 repositories, resolves definitions and references, returns each call site with repository, file and line, and is the right tool for questions about callers or usages beyond this checkout. Atlas starts choosing it for those questions.
Check your understanding · explain the design in your own words
A powerful MCP search tool is ignored in favour of Grep. What do you fix first?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Remove irrelevant tools or explain useful ones?
Study: Remove irrelevant tools or explain useful ones? Tool description Claude Code MCP tools
Return to Foundations Mock Exam 3 · Q682's situation and clause-by-clause explanation
Answer
**D.** Agents pick between tools largely from their descriptions, and a two-word description gives Atlas no reason to prefer the more capable MCP tool over familiar Grep; explaining its scope, outputs and when to use it is the first fix. Removing Grep loses a tool that is right for local text searches. An always-use rule overcorrects, and rebuilding the server addresses a problem the description causes.Q683. When Atlas cannot finish an unattended framework migration, it opens a ticket for the on-call engineer containing only its last message, such as "I was unable to complete the migration." On-call engineers cannot see Atlas's session transcript and spend about 40 minutes rediscovering what happened. What should the ticket contain? (Select ONE.) A) The same short message, but with Atlas instructed to retry the migration three more times before it opens the ticket for the engineer. B) The complete session transcript exported as an attachment, so the on-call engineer can read every step Atlas took from the beginning of the run. C) A structured handoff: repository and branch, what Atlas attempted, the root cause it found, the failing command and an excerpt of its output, and a recommended next action. D) A severity label and the name of the failing service, so the on-call engineer can prioritize the ticket quickly and then investigate from scratch.
Understand Foundations Mock Exam 3 · Q683 · the situation and each part of the question
The real situation behind this question
Atlas handles routine framework migrations overnight, and most succeed. When one fails, the on-call engineer gets a ticket that says only that the migration failed. They must check out the branch, re-run the build, and work out what Atlas tried, often at an inconvenient hour. Atlas usually knew exactly why it got stuck; that knowledge just never made it into the ticket.
Read the question in parts
Part 1 · containing only its last message
the current handoff carries no facts, cause or recommendation, only a status.
Part 2 · spend about 40 minutes rediscovering what happened
the cost of a poor handoff is repeated investigation by a human.
What you are being asked to decide
Atlas gives up and hands over a one-line ticket. What should a useful handoff contain? Tests compiling structured handoff summaries for humans without the transcript.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Structured handoff | a ticket with fixed fields for branch, attempts, root cause, evidence and next action |
| Human in the loop | the on-call engineer who takes over when Atlas cannot finish the chore |
Study: Escalation design (scenario 1 territory) Handoff HITL
Understand Foundations Mock Exam 3 · Q683's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The on-call engineer has no transcript. The handoff must carry the specific context, root cause, evidence and recommended action. A full transcript, more retries or a triage label do not replace a structured summary.
Connect the design to the situation
An on-call engineer spending 40 minutes rediscovering a failed migration.
Best answer: C. A human who lacks the transcript needs a structured handoff with the key facts, the root cause and a recommended action, so they can continue rather than restart. A full transcript is long and forces the engineer to dig for the same facts. Extra retries delay the handoff without improving it, and a label plus service name still leaves 40 minutes of rediscovery.
The decisive evidence in the stem
cannot see Atlas's session transcript
The recipient has no context, so the handoff itself must carry the specific facts, cause and next step they need to act.
Official objective tested: Task 1.4 · Implement multi-step workflows with enforcement and handoff patterns
What each choice would do here
A · Why this does not meet the full requirement
The same short message, but with Atlas instructed to retry the migration three more times before it opens the ticket for the engineer.
Delays the handoff and still sends a message with no useful content.
Atlas retries three times and fails the same way each time, because the cause is not transient. The ticket arrives later with the same one-line message, so the engineer loses more time and still starts from scratch.
B · Why this does not meet the full requirement
The complete session transcript exported as an attachment, so the on-call engineer can read every step Atlas took from the beginning of the run.
Hands over everything and leaves the engineer to dig out the key facts.
The engineer receives a long transcript with hundreds of tool calls and outputs. The facts are in there somewhere, but finding the root cause still takes a long read, and the engineer gets no recommendation about what to do next.
C · Why this meets the requirement
A structured handoff: repository and branch, what Atlas attempted, the root cause it found, the failing command and an excerpt of its output, and a recommended next action.
Gives the engineer the facts, cause and next step needed to continue at once.
The ticket lists repo and branch, the four modules migrated, the build failure in module five, the root cause Atlas found (a removed API used by a generated client), the failing command with a short log excerpt, and a recommendation to regenerate the client. The engineer acts in minutes.
D · Why this does not meet the full requirement
A severity label and the name of the failing service, so the on-call engineer can prioritize the ticket quickly and then investigate from scratch.
Helps triage but still leaves the investigation to start from nothing.
The ticket is easy to sort and assign, but the engineer still knows nothing about what was attempted or why it failed. The 40 minutes of rediscovery remain, now with a label at the top.
Check your understanding · explain the design in your own words
Atlas gives up and hands over a one-line ticket. What should a useful handoff contain?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Escalation design (scenario 1 territory)
Study: Escalation design (scenario 1 territory) Handoff HITL
Return to Foundations Mock Exam 3 · Q683's situation and clause-by-clause explanation
Answer
**C.** A human who lacks the transcript needs a structured handoff with the key facts, the root cause and a recommended action, so they can continue rather than restart. A full transcript is long and forces the engineer to dig for the same facts. Extra retries delay the handoff without improving it, and a label plus service name still leaves 40 minutes of rediscovery.Q684. Atlas's coordinator delegates to three subagents: code_explorer, catalog_lookup and boilerplate_gen. To save a round trip, the team let code_explorer call boilerplate_gen directly. Since then, failed generations never reach the coordinator, traces show work the coordinator cannot explain, and engineers sometimes get boilerplate for the wrong service. What change best restores control? (Select ONE.) A) Route all communication between subagents through the coordinator, so it decides every delegation, sees every result and handles every error consistently. B) Add a shared message bus that all three subagents can publish to and read from, so each one sees what the other two are doing in real time as work proceeds. C) Give every subagent the tools of the other two, so no subagent ever needs to call another one and round trips disappear completely. D) Add detailed logging inside each subagent, so engineers can reconstruct direct calls between subagents from the logs after a failure.
Understand Foundations Mock Exam 3 · Q684 · the situation and each part of the question
The real situation behind this question
Atlas worked well while every request went through the coordinator. Then the team allowed one shortcut: code_explorer could ask boilerplate_gen for code directly, saving a step. Soon engineers received boilerplate for the wrong service, and when generation failed, nobody was told. The coordinator's traces showed gaps it could not explain. The team needs to know where every piece of work came from and what happened to it.
Read the question in parts
Part 1 · let code_explorer call boilerplate_gen directly
a peer-to-peer link bypasses the coordinator's control of delegation and errors.
Part 2 · traces show work the coordinator cannot explain
observability has been lost because communication no longer passes through the hub.
What you are being asked to decide
Subagents now call each other directly and things go missing. How do you get control back? Tests routing all subagent communication through the coordinator.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Hub-and-spoke | a design where every subagent talks only to the coordinator, never directly to another subagent |
| Coordinator | the Atlas agent that delegates, collects results and handles errors for all subagents |
Study: Coordinator communication from plan to final report Hub-and-spoke Orchestrator
Understand Foundations Mock Exam 3 · Q684's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A direct subagent link bypassed the coordinator, so errors and decisions vanished. Routing all communication through the coordinator restores observability, consistent error handling and controlled flow. Buses, logs and tool sharing do not put a single owner back in charge.
Connect the design to the situation
code_explorer calling boilerplate_gen directly, with failures invisible to the coordinator.
Best answer: A. In a hub-and-spoke design the coordinator manages all inter-subagent communication, which gives observability, consistent error handling and controlled information flow. A shared bus spreads coordination across agents and makes flow harder to control. Logs help investigation after the fact but do not restore error handling or delegation decisions, and giving everyone every tool causes cross-specialization misuse.
The decisive evidence in the stem
failed generations never reach the coordinator
Direct subagent-to-subagent calls bypass the hub, so errors and decisions escape the one component responsible for them.
Official objective tested: Task 1.2 · Orchestrate multi-agent systems with coordinator-subagent patterns
What each choice would do here
A · Why this meets the requirement
Route all communication between subagents through the coordinator, so it decides every delegation, sees every result and handles every error consistently.
Puts every delegation, result and error back where it can be seen and handled.
code_explorer returns its findings to the coordinator, which decides whether and how to call boilerplate_gen, with the right service context. Generation failures come back to the coordinator, which retries, reports or escalates, and every step appears in its trace.
B · Why this does not meet the full requirement
Add a shared message bus that all three subagents can publish to and read from, so each one sees what the other two are doing in real time as work proceeds.
Spreads coordination across agents and makes the flow harder to control.
All subagents now publish and subscribe. Any agent can react to any message, so the flow becomes even harder to follow, and error handling is now spread across three agents with different behaviour instead of living in one place.
C · Why this does not meet the full requirement
Give every subagent the tools of the other two, so no subagent ever needs to call another one and round trips disappear completely.
Causes agents to misuse tools outside their roles and widens every tool list.
Every subagent now has every tool, so code_explorer generates boilerplate itself. Tool lists grow, selection gets less reliable, and each agent starts doing work outside its specialty, which is a new source of wrong-service output.
D · Why this does not meet the full requirement
Add detailed logging inside each subagent, so engineers can reconstruct direct calls between subagents from the logs after a failure.
Helps explain failures afterwards but changes nothing about who handles them.
Each subagent writes detailed logs. After a failure, an engineer can piece together what code_explorer asked boilerplate_gen, but the failure still never reached the coordinator at runtime, so the engineer still received bad output or nothing.
Check your understanding · explain the design in your own words
Subagents now call each other directly and things go missing. How do you get control back?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Coordinator communication from plan to final report
Study: Coordinator communication from plan to final report Hub-and-spoke Orchestrator
Return to Foundations Mock Exam 3 · Q684's situation and clause-by-clause explanation
Answer
**A.** In a hub-and-spoke design the coordinator manages all inter-subagent communication, which gives observability, consistent error handling and controlled information flow. A shared bus spreads coordination across agents and makes flow harder to control. Logs help investigation after the fact but do not restore error handling or delegation decisions, and giving everyone every tool causes cross-specialization misuse.Q685. Harborlight engineers also use Claude Code directly in their repositories. The platform team wants every engineer who clones the payments repo to get the service catalog MCP server automatically, each authenticating with their own token. Separately, one engineer wants to trial an experimental profiler MCP server for themselves without affecting teammates. Which TWO configurations should they use? (Select TWO.) A) Define the service catalog server in the repository's .mcp.json, committed to git, with its Authorization header set to Bearer ${CATALOG_TOKEN} from each engineer's environment. B) Define the experimental profiler server in the repository's .mcp.json and ask teammates to ignore it until the engineer finishes the trial. C) Define the service catalog server in the repository's .mcp.json with a shared team token written directly into the header, since the repository is private. D) Define the experimental profiler server in that engineer's user-level configuration in ~/.claude.json, so it is available only on their machine.
Understand Foundations Mock Exam 3 · Q685 · the situation and each part of the question
The real situation behind this question
The service catalog MCP server lets Claude Code answer questions about ownership and dependencies, and the platform team wants every payments engineer to have it without manual setup. Each engineer has a personal catalog token tied to their own permissions. Meanwhile, one performance-minded engineer found an experimental profiler server and wants to try it quietly for a week before recommending it to anyone else.
Read the question in parts
Part 1 · get the service catalog MCP server automatically
the shared server must be defined in a file that travels with the repository.
Part 2 · without affecting teammates
the experimental server must live in configuration that only this engineer's machine reads.
What you are being asked to decide
One MCP server is for the whole team and one is a personal trial. Where does each go? Tests project-scoped .mcp.json with env expansion versus user-scoped personal servers.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| .mcp.json | the project-level file in the repo root that lists MCP servers shared with everyone who clones it |
| ${CATALOG_TOKEN} | an environment-variable reference that Claude Code fills from each engineer's shell, so no token is committed |
Study: MCP resources & config scoping — two details tested by file path .mcp.json Team environment config Multiple-response item
Understand Foundations Mock Exam 3 · Q685's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Shared team tooling belongs in the committed .mcp.json, with ${VAR} expansion so each engineer uses their own token. A personal experiment belongs in user-scoped ~/.claude.json. Committed tokens and experiments in the shared file leak secrets or affect teammates.
Connect the design to the situation
A team service catalog server and one engineer's experimental profiler.
Best answer: AD. Project-scoped .mcp.json is how a team shares MCP servers through version control, and ${VAR} expansion lets each engineer authenticate with their own token without committing secrets. Personal or experimental servers belong in user-scoped ~/.claude.json. A token in the committed file leaks a secret into git history, and an experimental server in .mcp.json reaches every teammate.
The decisive evidence in the stem
each authenticating with their own token
The shared config must carry no secret, which environment-variable expansion in .mcp.json provides, while the personal trial belongs at user scope.
Official objective tested: Task 2.4 · Integrate MCP servers into Claude Code and agent workflows
What each choice would do here
A · Why this does not meet the full requirement
Define the service catalog server in the repository's .mcp.json, committed to git, with its Authorization header set to Bearer ${CATALOG_TOKEN} from each engineer's environment.
Shares the server through git while each engineer's own token stays out of the file.
The committed .mcp.json lists the catalog server with "Authorization": "Bearer ${CATALOG_TOKEN}". Each engineer exports their own token, Claude Code substitutes it at load time, and everyone who clones the repo gets the server with their own permissions and no secret in git.
B · Why this does not meet the full requirement
Define the experimental profiler server in the repository's .mcp.json and ask teammates to ignore it until the engineer finishes the trial.
Pushes an unfinished experiment onto every teammate's sessions.
Every teammate's Claude Code now tries to connect to an experimental server they did not ask for. Some will be prompted to approve it, others may use its tools unexpectedly, and the trial is no longer private or low-risk.
C · Why this does not meet the full requirement
Define the service catalog server in the repository's .mcp.json with a shared team token written directly into the header, since the repository is private.
Commits a secret to git history and makes everyone share one identity.
Everyone gets the server, but a real token now sits in git history, where anyone with repository access, including future contractors and forks, can read it. All engineers also act with one shared identity, so the catalog's per-user permissions are lost.
D · Why this does not meet the full requirement
Define the experimental profiler server in that engineer's user-level configuration in ~/.claude.json, so it is available only on their machine.
Keeps the experiment on one machine, invisible to teammates.
The engineer adds the profiler server in their user-level ~/.claude.json. Claude Code loads it in their sessions alongside the project servers. Teammates never see it, and if the trial goes well the engineer can propose moving it to .mcp.json.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative project .mcp.json with environment expansion
{"mcpServers": {"service-catalog": {"type": "http", "url": "https://catalog.internal.example/mcp", "headers": {"Authorization": "Bearer ${CATALOG_TOKEN}"}}}}Illustrative URL. The file is committed; ${CATALOG_TOKEN} is filled from each engineer's environment when Claude Code loads the config, so no secret is stored in git.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
One MCP server is for the whole team and one is a personal trial. Where does each go?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: MCP resources & config scoping — two details tested by file path
Study: MCP resources & config scoping — two details tested by file path .mcp.json Team environment config Multiple-response item
Return to Foundations Mock Exam 3 · Q685's situation and clause-by-clause explanation
Answer
**AD.** Project-scoped .mcp.json is how a team shares MCP servers through version control, and ${VAR} expansion lets each engineer authenticate with their own token without committing secrets. Personal or experimental servers belong in user-scoped ~/.claude.json. A token in the committed file leaks a secret into git history, and an experimental server in .mcp.json reaches every teammate.Q686. Atlas began as a hand-written loop over the Messages API. A developer trimmed history between iterations to save tokens, so every call carried just the engineer's question and the newest tool output. In traces, the model greps for PaymentRetryPolicy four times in a row and never opens the files its first grep found. Which loop change solves this? (Select ONE.) A) Keep sending only the latest result, and add a cache that returns the earlier output instantly whenever the model repeats an identical Grep. B) Keep sending only the latest result, but add a system prompt line that tells the model never to repeat a search it has already run. C) Keep sending only the latest result, and stop the loop after three tool calls so a repeated search cannot continue for very long. D) Append each assistant tool_use response and its matching tool_result to messages, and resend the full history on every call.
Understand Foundations Mock Exam 3 · Q686 · the situation and each part of the question
The real situation behind this question
An Atlas prototype answers questions like "where is the payment retry policy defined and who calls it". A developer trimmed each request to keep token costs low, sending only the question and the newest tool output. The model kept starting over: it searched, read a file, then searched for the same thing again. The prototype never answered, and the token bill grew anyway because of the repeated calls.
Read the question in parts
Part 1 · greps for PaymentRetryPolicy four times in a row
the model is unaware of its own earlier actions, a symptom of missing history.
Part 2 · to save tokens
the trimming was a cost optimization that removed information the loop needs.
What you are being asked to decide
The loop forgets its earlier searches and repeats them. What must it send each time? Tests appending tool results to conversation history between loop iterations.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| messages list | the full conversation your application resends on every Messages API call, including tool calls and results |
| tool_result | the user-role content block that carries a tool's output back to the model for its next decision |
Study: The agentic loop — the exam's core object Messages array tool_result
Understand Foundations Mock Exam 3 · Q686's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The model can only build on history it receives. Appending each tool_use and tool_result and resending the full history is what makes the loop progress. Prompt rules, caches and caps cannot replace the missing context.
Connect the design to the situation
The same Grep run four times because earlier results were never resent.
Best answer: D. The model reasons about its next action from the conversation history it receives, so each assistant tool_use and its tool_result must be appended and the whole history resent. Without that history the model cannot know what it already searched. A prompt rule asks it to remember what it was never shown, a cache speeds up the repetition, and a cap simply stops an agent that cannot progress.
The decisive evidence in the stem
every call carried just the engineer's question and the newest tool output
The model never sees its earlier calls and results, so it cannot build on them, which is why the loop repeats itself.
Official objective tested: Task 1.1 · Design and implement agentic loops for autonomous task execution
What each choice would do here
A · Why this does not meet the full requirement
Keep sending only the latest result, and add a cache that returns the earlier output instantly whenever the model repeats an identical Grep.
Makes the repetition cheaper but leaves the model unable to progress.
The repeated Grep returns instantly from the cache, so each wasted iteration is cheaper. The model still receives no history, still repeats itself, and still never reaches the callers, so the prototype keeps failing quickly instead of slowly.
B · Why this does not meet the full requirement
Keep sending only the latest result, but add a system prompt line that tells the model never to repeat a search it has already run.
The model cannot avoid repeating searches whose results it is never shown.
The model is told not to repeat searches, but it cannot see any earlier searches, so it has no way to obey. It may stop searching altogether or guess, and the loop still cannot build an answer from findings it no longer has.
C · Why this does not meet the full requirement
Keep sending only the latest result, and stop the loop after three tool calls so a repeated search cannot continue for very long.
Stops a loop that is broken instead of fixing why it cannot progress.
The loop stops after three tool calls. Because the model never sees what it found, those three calls are usually a search, a read and the same search again. The run ends without an answer, so the cap turns a slow failure into a fast one.
D · Why this meets the requirement
Append each assistant tool_use response and its matching tool_result to messages, and resend the full history on every call.
The model sees every earlier call and result, so it builds on them instead of repeating.
After each response, the loop appends the assistant content with its tool_use blocks, runs the tools, and appends a user message with the matching tool_result blocks. The next request carries all of it. The model sees it already found the policy file and moves on to its callers.
Check your understanding · explain the design in your own words
The loop forgets its earlier searches and repeats them. What must it send each time?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: The agentic loop — the exam's core object
Study: The agentic loop — the exam's core object Messages array tool_result
Return to Foundations Mock Exam 3 · Q686's situation and clause-by-clause explanation
Answer
**D.** The model reasons about its next action from the conversation history it receives, so each assistant tool_use and its tool_result must be appended and the whole history resent. Without that history the model cannot know what it already searched. A prompt rule asks it to remember what it was never shown, a cache speeds up the repetition, and a cap simply stops an agent that cannot progress.Q687. In unattended mode, Atlas bumps dependencies and then calls the deployment MCP server's create_preview tool. The system prompt says to run the test suite and confirm it passes before creating a preview. In 4% of runs Atlas creates a preview from a failing commit, and a downstream team then tests broken builds. What change best prevents this? (Select ONE.) A) Run a nightly audit that finds previews created from failing commits, deletes them, and posts a summary of all the deleted previews to the team's channel. B) Add a programmatic gate, such as a PreToolUse hook, that blocks create_preview unless run_tests has returned a pass for the current commit in this session. C) Add three few-shot examples to the system prompt that show Atlas running the tests, reading a pass, and only then calling create_preview. D) Rewrite the system prompt instruction in capital letters and repeat it at the end of the prompt, so the requirement to test first stands out much more clearly.
Understand Foundations Mock Exam 3 · Q687 · the situation and each part of the question
The real situation behind this question
Atlas's scheduled dependency bumps save engineers hours each week. Each bump ends with a preview environment that the payments QA team uses for exploratory testing. Several times a month, though, the preview comes from a commit whose tests failed, and QA spends a morning chasing bugs that the test suite had already caught. The instruction to test first is in the prompt; the model simply does not follow it every time.
Read the question in parts
Part 1 · The system prompt says to run the test suite
guidance is already in place, so more guidance is unlikely to close the gap fully.
Part 2 · a downstream team then tests broken builds
each violation has a real cost, which justifies deterministic enforcement.
What you are being asked to decide
A prompt says to test before deploying, but 4% of runs skip it. How do you guarantee the order? Tests programmatic prerequisites over prompt instructions for required ordering.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Prerequisite gate | code that refuses create_preview until run_tests has passed for this commit |
| PreToolUse hook | an Agent SDK function that runs before a tool call and can deny it with a reason |
Study: Harness controls — what makes an agent production-grade Hook Guardrail
Understand Foundations Mock Exam 3 · Q687's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The test-first instruction already exists and still fails 4% of the time. A programmatic gate that blocks create_preview until tests pass for that commit gives a guarantee. Louder prompts, examples or audits only lower or detect the failure.
Connect the design to the situation
Preview deployments created from failing commits despite a test-first instruction.
Best answer: B. When an ordering rule must hold every time, a programmatic prerequisite that blocks the downstream tool until the prerequisite succeeded gives a guarantee that prompt guidance cannot. Louder wording and few-shot examples may lower the 4% but leave a non-zero failure rate. A nightly audit cleans up after the downstream team has already tested broken builds.
The decisive evidence in the stem
In 4% of runs Atlas creates a preview from a failing commit
Prompt guidance already exists and still fails measurably, so the order must be enforced in code that checks the prerequisite before the tool runs.
Official objective tested: Task 1.4 · Implement multi-step workflows with enforcement and handoff patterns
What each choice would do here
A · Why this does not meet the full requirement
Run a nightly audit that finds previews created from failing commits, deletes them, and posts a summary of all the deleted previews to the team's channel.
Detects the harm after the downstream team has already been affected.
Broken previews still get created and still get tested by QA during the day. At night the audit deletes them and reports. The team learns about failures, but the harm, wasted QA time, has already happened by then.
B · Why this meets the requirement
Add a programmatic gate, such as a PreToolUse hook, that blocks create_preview unless run_tests has returned a pass for the current commit in this session.
Code checks the prerequisite every time, so the bad order cannot happen.
A PreToolUse hook on create_preview looks up whether run_tests returned pass for the current commit in this session. If not, it denies the call with a reason telling Atlas to run the tests first. No preview can be created from an untested or failing commit.
C · Why this does not meet the full requirement
Add three few-shot examples to the system prompt that show Atlas running the tests, reading a pass, and only then calling create_preview.
Examples improve compliance but cannot guarantee it.
The examples show the right sequence, and Atlas follows it more often. Yet the model can still skip the tests in an unusual run, so failing previews still appear occasionally, and the team has no guarantee to point to.
D · Why this does not meet the full requirement
Rewrite the system prompt instruction in capital letters and repeat it at the end of the prompt, so the requirement to test first stands out much more clearly.
Louder guidance is still guidance, with a non-zero failure rate.
The instruction is now more prominent, and violations may fall from 4% to perhaps 2%. They do not reach zero, so the QA team still receives broken previews from time to time, and nothing in code checks the order.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative PreToolUse gate on create_preview
async def require_green_tests(input_data, tool_use_id, context):
commit = input_data.get("tool_input", {}).get("commit")
if TEST_RESULTS.get(commit) != "pass":
return {"hookSpecificOutput": {"hookEventName": "PreToolUse", "permissionDecision": "deny", "permissionDecisionReason": "Run run_tests on this commit and get a pass before create_preview."}}
return {}Illustrative Agent SDK hook; TEST_RESULTS is application state filled when run_tests returns. Registered with a HookMatcher for the create_preview tool, it blocks the call until the prerequisite is met.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
A prompt says to test before deploying, but 4% of runs skip it. How do you guarantee the order?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Harness controls — what makes an agent production-grade
Study: Harness controls — what makes an agent production-grade Hook Guardrail
Return to Foundations Mock Exam 3 · Q687's situation and clause-by-clause explanation
Answer
**B.** When an ordering rule must hold every time, a programmatic prerequisite that blocks the downstream tool until the prerequisite succeeded gives a guarantee that prompt guidance cannot. Louder wording and few-shot examples may lower the 4% but leave a non-zero failure rate. A nightly audit cleans up after the downstream team has already tested broken builds.Q688. An engineer asks Atlas where the retry budget for billing exports is calculated. Atlas starts by using Glob to list all 900 files under billing/ and then Reads them one by one, and it runs low on context before answering. Engineers expect an answer within a few tool calls. What approach should Atlas use for this kind of question? (Select ONE.) A) Read all 900 files in parallel subagents, each returning a short summary, and then search those summaries for the retry budget. B) Switch Atlas to a model with a larger context window, so reading all 900 files fits before it has to answer the engineer. C) Grep for identifiers such as retryBudget to find entry points, then Read those files and follow their imports. D) Glob for **/Retry.java across billing/ and Read every matching file in full before answering, so no relevant file is missed.
Understand Foundations Mock Exam 3 · Q688 · the situation and each part of the question
The real situation behind this question
Engineers use Atlas as a fast guide to unfamiliar code. One asked a simple question: where is the retry budget for billing exports calculated? Atlas tried to read the whole billing folder, ran out of room, and gave a vague answer after many minutes. A senior engineer would have searched for a likely name, opened two files and followed one import. The team wants Atlas to explore like that.
Read the question in parts
Part 1 · Engineers expect an answer within a few tool calls
the approach must be targeted, not exhaustive, to be useful in daily work.
Part 2 · using Glob to list all 900 files
Atlas begins by enumerating files instead of searching their contents.
What you are being asked to decide
Atlas reads a whole folder to answer one question. How should it search instead? Tests Grep for content search plus incremental Read instead of reading everything.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Grep | the built-in tool that searches inside files for text such as retryBudget |
| Glob | the built-in tool that finds files by name pattern, not by what they contain |
Study: Built-in tools — the selection criteria (Read, Write, Edit, Bash, Grep, Glob) Grep Glob
Understand Foundations Mock Exam 3 · Q688's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Reading everything upfront exhausts context and time. Grep for the identifier or message to find entry points, then Read and follow imports. Name-based Glob, mass summaries or a bigger window keep the wasteful pattern.
Connect the design to the situation
900 files read one by one to find one calculation.
Best answer: C. Grep searches file contents, so it finds where the retry budget is mentioned, and Read then follows imports from those entry points, building understanding incrementally. Globbing filenames assumes the logic lives in a file named Retry and still reads everything that matches. Summarizing 900 files is expensive and lossy, and a bigger window keeps the read-everything approach.
The decisive evidence in the stem
Reads them one by one, and it runs low on context
Reading everything upfront exhausts context, so Atlas should locate entry points by content search and read only what the trace requires.
Official objective tested: Task 2.5 · Select and apply built-in tools (Read, Write, Edit, Bash, Grep, Glob) effectively
What each choice would do here
A · Why this does not meet the full requirement
Read all 900 files in parallel subagents, each returning a short summary, and then search those summaries for the retry budget.
Spends heavily on summaries that may drop the detail being searched for.
Hundreds of subagents read and summarize files, costing far more than the question is worth. Summaries may not mention the retry budget detail, so the final search over summaries can miss it anyway.
B · Why this does not meet the full requirement
Switch Atlas to a model with a larger context window, so reading all 900 files fits before it has to answer the engineer.
Keeps the read-everything habit and just delays running out of space.
The larger window holds more files, but reading 900 files is still slow and expensive, and long contexts dilute attention. The engineer waits a long time for something a few targeted searches would answer.
C · Why this meets the requirement
Grep for identifiers such as retryBudget to find entry points, then Read those files and follow their imports.
Finds the right files by content and reads only what the trace needs.
Atlas greps billing/ for retryBudget and the export log message, finds three hits, reads ExportScheduler.java, sees the budget comes from RetryBudgetCalculator, reads that file, and answers with file and line in four tool calls.
D · Why this does not meet the full requirement
Glob for **/Retry.java across billing/ and Read every matching file in full before answering, so no relevant file is missed.
Filenames may not mention retries, and it still reads many files in full.
Glob finds files with Retry in the name, but the calculation lives in ExportScheduler.java, which the pattern misses. Atlas reads many retry-named files in full, uses a lot of context, and may still answer wrongly.
Check your understanding · explain the design in your own words
Atlas reads a whole folder to answer one question. How should it search instead?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Built-in tools — the selection criteria (Read, Write, Edit, Bash, Grep, Glob)
Study: Built-in tools — the selection criteria (Read, Write, Edit, Bash, Grep, Glob) Grep Glob
Return to Foundations Mock Exam 3 · Q688's situation and clause-by-clause explanation
Answer
**C.** Grep searches file contents, so it finds where the retry budget is mentioned, and Read then follows imports from those entry points, building understanding incrementally. Globbing filenames assumes the logic lives in a file named Retry and still reads everything that matches. Summarizing 900 files is expensive and lossy, and a bigger window keeps the read-everything approach.Q689. Atlas must change timeout_seconds from 30 to 45 in the payments block of a generated config.yaml. The file has four service blocks that are byte-for-byte identical for 30 lines, differing only in a section header 40 lines above each. Edit fails because the target text is not unique. What should Atlas do to make the change reliably? (Select ONE.) A) Use Bash to run sed on the first line that matches timeout_seconds: 30, since the payments block is listed first in most config files. B) Run Edit with replace_all enabled, so every matching timeout_seconds line in the file is changed from 30 to 45 in one call. C) Retry the same Edit call several times, since an Edit that fails on a large file may succeed on a later attempt. D) Read the full file, change only the payments block's timeout in the loaded content, and Write the complete updated file back.
Understand Foundations Mock Exam 3 · Q689 · the situation and each part of the question
The real situation behind this question
Harborlight's service configs are generated from a template, so every service block looks the same until someone changes one. The payments team asked for a longer timeout on its own service only. Atlas tried a targeted Edit, but the matching text appears four times, so the tool refused. Getting it wrong would change timeouts for services whose owners did not ask, and one of them is latency-sensitive.
Read the question in parts
Part 1 · differing only in a section header 40 lines above each
the only distinguishing text is far from the target, so a small unique anchor does not exist.
Part 2 · Edit fails because the target text is not unique
the built-in Edit tool requires a unique match and has told Atlas it cannot find one.
What you are being asked to decide
Edit cannot find a unique match. How do you change just one of four identical blocks? Tests the Read plus Write fallback when Edit has no unique anchor text.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Edit | the built-in tool that replaces one exact, unique text match in a file |
| Read plus Write | loading the whole file, changing it, and writing the full new content back |
Study: Built-in tools — the selection criteria (Read, Write, Edit, Bash, Grep, Glob) Edit Write Read
Understand Foundations Mock Exam 3 · Q689's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The target text is not unique, so Edit cannot work. Read the full file, change the payments block, and Write it back. replace_all, blind retries and first-match sed either change too much or guess.
Connect the design to the situation
Four identical YAML blocks and a timeout that must change in only one.
Best answer: D. When Edit cannot find unique anchor text, the reliable fallback is Read to load the full file, make the targeted change, and Write the whole file back. replace_all changes all four services. Retrying an identical Edit hits the same non-unique match, and a sed on the first match relies on an assumption about block order that may be false.
The decisive evidence in the stem
byte-for-byte identical for 30 lines
No short anchor near the target is unique, so Edit's unique-match requirement cannot be met and the Read plus Write fallback applies.
Official objective tested: Task 2.5 · Select and apply built-in tools (Read, Write, Edit, Bash, Grep, Glob) effectively
What each choice would do here
A · Why this does not meet the full requirement
Use Bash to run sed on the first line that matches timeout_seconds: 30, since the payments block is listed first in most config files.
Relies on a guess about block order that may change the wrong service.
sed changes the first match. If the generator lists services alphabetically, the first block may be accounts, not payments, so the wrong service changes silently and the payments timeout stays at 30.
B · Why this does not meet the full requirement
Run Edit with replace_all enabled, so every matching timeout_seconds line in the file is changed from 30 to 45 in one call.
Changes all four services, three of them wrongly.
All four timeout_seconds values become 45. Payments gets what it asked for, but three other services, including a latency-sensitive one, now wait longer before failing, and their owners discover the change only through behaviour.
C · Why this does not meet the full requirement
Retry the same Edit call several times, since an Edit that fails on a large file may succeed on a later attempt.
The text is still not unique, so the same failure repeats.
Each retry sends the same old text, which still appears four times, so Edit refuses every time. Atlas wastes turns and either gives up or falls back to something riskier later.
D · Why this meets the requirement
Read the full file, change only the payments block's timeout in the loaded content, and Write the complete updated file back.
Changes exactly the payments block with full knowledge of the file's structure.
Atlas reads config.yaml, locates the payments header, finds that block's timeout_seconds line, changes 30 to 45 in the loaded text, and writes the full file. A diff shows exactly one changed line under the payments section.
Check your understanding · explain the design in your own words
Edit cannot find a unique match. How do you change just one of four identical blocks?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Built-in tools — the selection criteria (Read, Write, Edit, Bash, Grep, Glob)
Study: Built-in tools — the selection criteria (Read, Write, Edit, Bash, Grep, Glob) Edit Write Read
Return to Foundations Mock Exam 3 · Q689's situation and clause-by-clause explanation
Answer
**D.** When Edit cannot find unique anchor text, the reliable fallback is Read to load the full file, make the targeted change, and Write the whole file back. replace_all changes all four services. Retrying an identical Edit hits the same non-unique match, and a sed on the first match relies on an assumption about block order that may be false.Q690. An engineering manager asks Atlas to "add meaningful tests to billing-reconciler," a 180-file legacy service with no tests. Atlas currently starts at the first file alphabetically and writes tests file by file. After two days, most new tests cover logging helpers and config parsing, while the money-moving code is still untested. How should Atlas decompose this task? (Select ONE.) A) Map the structure, find high-impact areas such as money paths, then follow a prioritized plan that adapts as dependencies appear. B) Set a target of 80% line coverage for the service and have Atlas keep writing tests for whichever files raise the coverage number fastest. C) Use a fixed prompt chain that runs the same generate-tests step on every file in alphabetical order, with a review step after each file. D) Spawn 180 parallel subagents, one per file, each writing tests for its own file, and merge all of their test files together at the end.
Understand Foundations Mock Exam 3 · Q690 · the situation and each part of the question
The real situation behind this question
billing-reconciler moves real money between internal ledgers, and nobody has dared change it for years because it has no tests. The manager hoped Atlas would make it safe to modify. Two days in, Atlas has written dozens of tests, but they are for logging and configuration utilities near the start of the alphabet. The code that actually reconciles payments has none. The manager wants the effort spent where it reduces risk.
Read the question in parts
Part 1 · starts at the first file alphabetically
the current order has no relation to importance, so effort lands on low-value code.
Part 2 · a 180-file legacy service with no tests
the task is open-ended and the structure is unknown, which suits adaptive planning.
What you are being asked to decide
Testing a big legacy service file by file covers the wrong code. How should the work be broken down? Tests adaptive decomposition for open-ended tasks: map, prioritize, adapt.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Adaptive decomposition | planning subtasks from what mapping reveals, and changing the plan as new dependencies appear |
| High-impact areas | the parts of billing-reconciler where a bug costs most, such as code that moves money |
Study: Workflows vs agents — Anthropic's decision rule Decomposition Agentic system
Understand Foundations Mock Exam 3 · Q690's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The task is open-ended, and the current order ignores risk. Atlas should map the service, prioritize high-impact areas, and adapt the plan as dependencies appear. Fixed chains, per-file fan-out and coverage chasing spend effort where it matters least.
Connect the design to the situation
Two days of tests for logging helpers while payment code stays untested.
Best answer: A. Open-ended work like testing a legacy codebase calls for adaptive decomposition: map the structure, find the high-impact areas, and follow a prioritized plan that changes as dependencies are discovered. A fixed per-file chain suits predictable reviews, not prioritization. One subagent per file ignores impact and cross-file dependencies, and chasing a coverage number rewards easy helpers over money paths.
The decisive evidence in the stem
the money-moving code is still untested
The current decomposition ignores impact, so the task needs a mapping and prioritization step that adapts to what is discovered.
Official objective tested: Task 1.6 · Design task decomposition strategies for complex workflows
What each choice would do here
A · Why this meets the requirement
Map the structure, find high-impact areas such as money paths, then follow a prioritized plan that adapts as dependencies appear.
Puts tests where the risk is and adjusts the plan as the code reveals itself.
Atlas first maps entry points, data flow and change history. It finds that three packages handle settlement and reversal and change most often. It writes tests there first, and when it discovers those packages depend on a clock utility, it adds that to the plan before continuing.
B · Why this does not meet the full requirement
Set a target of 80% line coverage for the service and have Atlas keep writing tests for whichever files raise the coverage number fastest.
Optimizes a number that easy helper code can satisfy.
Atlas quickly writes many small tests for simple helpers, which raises coverage fastest. The 80% target may even be reached while complex settlement code stays thin, because coverage does not measure which code matters.
C · Why this does not meet the full requirement
Use a fixed prompt chain that runs the same generate-tests step on every file in alphabetical order, with a review step after each file.
A fixed order repeats the current failure with more ceremony.
Every file gets the same treatment in the same order. The review steps make each file's tests better, but the money paths are still reached only after weeks, because alphabetical order says nothing about where risk lives.
D · Why this does not meet the full requirement
Spawn 180 parallel subagents, one per file, each writing tests for its own file, and merge all of their test files together at the end.
Ignores priorities and cross-file dependencies, and multiplies cost.
180 subagents each test one file in isolation. Many files are trivial, so much effort is wasted, and tests for files that depend on each other are written without seeing those dependencies, so they mock heavily or break. Cost rises sharply.
Check your understanding · explain the design in your own words
Testing a big legacy service file by file covers the wrong code. How should the work be broken down?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Workflows vs agents — Anthropic's decision rule
Study: Workflows vs agents — Anthropic's decision rule Decomposition Agentic system
Return to Foundations Mock Exam 3 · Q690's situation and clause-by-clause explanation
Answer
**A.** Open-ended work like testing a legacy codebase calls for adaptive decomposition: map the structure, find the high-impact areas, and follow a prioritized plan that changes as dependencies are discovered. A fixed per-file chain suits predictable reviews, not prioritization. One subagent per file ignores impact and cross-file dependencies, and chasing a coverage number rewards easy helpers over money paths.Q691. When explaining incidents, Atlas combines events from three MCP servers. The issue tracker returns Unix epoch seconds, the deployment server returns ISO 8601 with local offsets, and the service catalog returns relative strings such as "3 days ago." Atlas sometimes orders events wrongly in its timelines. Two of the servers belong to other teams. What is the most reliable fix? (Select ONE.) A) Add a system prompt section that explains each server's timestamp format and asks the model to convert all of them to UTC before ordering events. B) Ask the other two teams to change their MCP servers to return ISO 8601 UTC, and wait for their releases before changing anything in Atlas. C) Add a convert_timestamp tool that the model can call whenever it is unsure how to compare two timestamps from different servers. D) Add a PostToolUse hook in Atlas that converts every timestamp in these tools' results to ISO 8601 UTC before the model reads them.
Understand Foundations Mock Exam 3 · Q691 · the situation and each part of the question
The real situation behind this question
Engineers ask Atlas what happened during an incident: when the bug was filed, when the deploy went out, when the service owner changed. Atlas pulls events from three systems that each speak a different time dialect. Most of the time it gets the order right, but sometimes a deploy appears before the bug it fixed. Engineers have stopped trusting Atlas's timelines, which were meant to save them time during incidents.
Read the question in parts
Part 1 · returns relative strings such as "3 days ago."
some formats need a reference time to convert, which is easy in code and error-prone for a model.
Part 2 · What is the most reliable fix?
the answer should give the same correct result every time, not just most of the time.
What you are being asked to decide
Three tools return times in three formats and the agent mixes them up. Where do you fix it? Tests PostToolUse hooks to normalize heterogeneous tool data.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| PostToolUse hook | an Agent SDK function that runs after a tool returns and can change the result before the model reads it |
| Normalization | converting every timestamp to one format, here ISO 8601 UTC, by code rather than by the model |
Study: Agent SDK hooks: block a call, clean up a result Hook Deterministic
Understand Foundations Mock Exam 3 · Q691's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Atlas cannot change the source formats, and the model converts them unreliably. A PostToolUse hook normalizes every timestamp in code before the model reads it. Prompts, waiting on other teams or optional tools leave the conversion to chance.
Connect the design to the situation
Epoch seconds, local ISO times and "3 days ago" in one incident timeline.
Best answer: D. A PostToolUse hook transforms tool results deterministically before the model processes them, so every timestamp arrives in one format whatever the source server. Prompt-based conversion leaves the arithmetic to the model and fails sometimes. Waiting on other teams delays the fix indefinitely, and an optional conversion tool depends on the model noticing when it is unsure.
The decisive evidence in the stem
Two of the servers belong to other teams
Atlas cannot change the sources, so normalization must happen in Atlas's own harness between the tool result and the model.
Official objective tested: Task 1.5 · Apply Agent SDK hooks for tool call interception and data normalization
What each choice would do here
A · Why this does not meet the full requirement
Add a system prompt section that explains each server's timestamp format and asks the model to convert all of them to UTC before ordering events.
Leaves conversion to the model, which already makes mistakes with it.
The model now knows the formats and tries to convert them, but converting epochs and relative times mentally is exactly where it makes mistakes. Timelines improve somewhat, yet ordering errors continue in a fraction of incidents.
B · Why this does not meet the full requirement
Ask the other two teams to change their MCP servers to return ISO 8601 UTC, and wait for their releases before changing anything in Atlas.
Depends on other teams' schedules while the bug continues.
The two other teams add the request to their backlogs. Months may pass before both release, and until then Atlas keeps ordering events wrongly. Some formats, like relative strings in the catalog, may never change.
C · Why this does not meet the full requirement
Add a convert_timestamp tool that the model can call whenever it is unsure how to compare two timestamps from different servers.
Relies on the model noticing when to call it, which it often does not.
The model can call the conversion tool, but it often does not realise it is unsure, so it compares raw values directly. Each call also costs a turn, and timelines stay unreliable whenever the model skips the tool.
D · Why this meets the requirement
Add a PostToolUse hook in Atlas that converts every timestamp in these tools' results to ISO 8601 UTC before the model reads them.
Code converts every timestamp the same way before the model ever sees a mixed format.
The hook runs after each of the three tools. It turns epoch seconds, offset times and relative strings (using the response time) into ISO 8601 UTC. The model receives consistent timestamps and orders events correctly because it no longer converts anything itself.
Check your understanding · explain the design in your own words
Three tools return times in three formats and the agent mixes them up. Where do you fix it?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Agent SDK hooks: block a call, clean up a result
Study: Agent SDK hooks: block a call, clean up a result Hook Deterministic
Return to Foundations Mock Exam 3 · Q691's situation and clause-by-clause explanation
Answer
**D.** A PostToolUse hook transforms tool results deterministically before the model processes them, so every timestamp arrives in one format whatever the source server. Prompt-based conversion leaves the arithmetic to the model and fails sometimes. Waiting on other teams delays the fix indefinitely, and an optional conversion tool depends on the model noticing when it is unsure.Q692. The issue tracker MCP tool search_issues returns an empty list both when a project has no matching issues and when Atlas's token lacks access to that project. Engineers asking about restricted security projects are told "there are no open bugs," which is false. The issue tracker server is maintained by Harborlight. What should search_issues return for the access case? (Select ONE.) A) An isError result with a permission error category, isRetryable set to false, and a description naming the project the token cannot read. B) The same empty list, plus a system prompt line telling Atlas to mention that results may be incomplete whenever a search returns nothing at all. C) A successful result containing one placeholder issue titled "access denied," so the agent sees something instead of an empty result list. D) The same empty list, with Atlas configured to retry each empty search three times in case access problems are only temporary.
Understand Foundations Mock Exam 3 · Q692 · the situation and each part of the question
The real situation behind this question
Security bugs live in restricted tracker projects, and Atlas's service token cannot read them. When an engineer asks about open security bugs in the payments service, the tool returns nothing, and Atlas confidently reports that there are none. One engineer nearly shipped a change on that basis before a colleague pointed out an open critical issue. The tool's owners can change what it returns.
Read the question in parts
Part 1 · which is false
the current behaviour produces confident wrong answers, not just missing information.
Part 2 · The issue tracker server is maintained by Harborlight
the team can fix the tool's response contract rather than working around it in prompts.
What you are being asked to decide
"No results" and "no access" look the same. How should the tool tell them apart? Tests distinguishing access failures from valid empty results in tool responses.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Valid empty result | the search ran successfully and truly found no matching issues |
| isError | the MCP result flag that tells Atlas the call failed, so the empty answer is not a real answer |
Study: The MCP error contract — isError and structured error metadata Error taxonomy MCP server
Understand Foundations Mock Exam 3 · Q692's answer · full reasoning and worked examples
Claude synthesized · the point, straight
An empty list currently means either no matches or no access. The tool must return an access failure as a structured, non-retryable permission error and keep empty lists for genuine no-match results. Caveats, retries and placeholder data do not separate the two cases.
Connect the design to the situation
Restricted security projects reported as having no open bugs.
Best answer: A. An access failure and a valid empty result mean different things, and the tool must say which happened: a permission error that is not retryable lets Atlas tell the engineer it could not check. A blanket caveat on every empty result spoils the valid ones. Retrying a permission problem wastes calls, and a fake issue disguises an error as data.
The decisive evidence in the stem
both when a project has no matching issues and when Atlas's token lacks access
Two different outcomes share one response, so the tool must separate an access failure from a successful query with no matches.
Official objective tested: Task 2.2 · Implement structured error responses for MCP tools
What each choice would do here
A · Why this meets the requirement
An isError result with a permission error category, isRetryable set to false, and a description naming the project the token cannot read.
Lets Atlas report a permission problem honestly instead of a false no-bugs answer.
For restricted projects the tool returns isError with category permission, not retryable, naming the project. Atlas tells the engineer it cannot see that project's issues and suggests asking the security team. Genuine empty results still come back as empty lists.
B · Why this does not meet the full requirement
The same empty list, plus a system prompt line telling Atlas to mention that results may be incomplete whenever a search returns nothing at all.
Adds doubt to every genuine empty result without fixing the restricted case.
Every empty result now comes with a warning that it may be incomplete, including the many that are genuinely empty. Engineers learn to ignore the warning, and Atlas still cannot say which projects it could not read.
C · Why this does not meet the full requirement
A successful result containing one placeholder issue titled "access denied," so the agent sees something instead of an empty result list.
Disguises an error as data, which the model may misread or repeat.
Atlas receives what looks like a real issue titled access denied. It may count it as one open bug, summarize it oddly, or mix it into results, because errors dressed as data are easy for the model to misinterpret.
D · Why this does not meet the full requirement
The same empty list, with Atlas configured to retry each empty search three times in case access problems are only temporary.
Retries a failure that will not change, wasting calls.
Each restricted search is tried three more times and returns the same empty list, because the token's permissions do not change. The calls are wasted, and Atlas still reports no bugs after the retries.
Check your understanding · explain the design in your own words
"No results" and "no access" look the same. How should the tool tell them apart?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: The MCP error contract — isError and structured error metadata
Study: The MCP error contract — isError and structured error metadata Error taxonomy MCP server
Return to Foundations Mock Exam 3 · Q692's situation and clause-by-clause explanation
Answer
**A.** An access failure and a valid empty result mean different things, and the tool must say which happened: a permission error that is not retryable lets Atlas tell the engineer it could not check. A blanket caveat on every empty result spoils the valid ones. Retrying a permission problem wastes calls, and a fake issue disguises an error as data.Q693. When an engineer asks how a legacy billing flow works, Atlas's coordinator sends code_explorer a 14-step script: Glob *.java in billing/, Read each file, then list classes ending in Service, and so on. It works for Java services but fails on the Go services and on flows that cross into the ledger repository. How should the coordinator's delegation prompt change? (Select ONE.) A) Add a second 14-step script for Go services and a third for cross-repository flows, and have the coordinator choose the script by language. B) State the question to answer, the evidence required such as file paths and call chains, and the expected output, and let code_explorer choose its own search steps. C) Keep the Java script but add a final step telling code_explorer to adapt the earlier steps if the code turns out to be in another language. D) Replace the script with a single line asking code_explorer to explain the billing flow, and leave every other detail to the subagent.
Understand Foundations Mock Exam 3 · Q693 · the situation and each part of the question
The real situation behind this question
Harborlight's billing system grew over fifteen years, first in Java and later in Go, with key logic living in a separate ledger repository. Atlas's coordinator was written when everything was Java, and it still tells code_explorer exactly what to do, one step at a time. For newer services that script finds nothing useful. Engineers asking about modern flows get confident but empty answers.
Read the question in parts
Part 1 · a 14-step script
the coordinator dictates procedure, which only works when the code matches the script's assumptions.
Part 2 · It works for Java services
the script is not wrong; it is too specific to generalize to other cases.
What you are being asked to decide
A step-by-step script breaks whenever the code is different. What should the coordinator send instead? Tests delegation prompts that give goals and quality criteria instead of procedures.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Goal-based delegation | telling code_explorer what to find out and what evidence counts, not which commands to run |
| Quality criteria | the requirements a good answer must meet, such as named files and a complete call chain |
Study: Coordinator handoffs: wait, pass context, then continue Subagent handoff Decomposition
Understand Foundations Mock Exam 3 · Q693's answer · full reasoning and worked examples
Claude synthesized · the point, straight
A step-by-step script fails whenever the code differs from its assumptions. The coordinator should state the goal, the required evidence and the output, and let the subagent choose its steps. More scripts, vague adapt steps or bare one-liners keep brittleness or lose the quality bar.
Connect the design to the situation
A Java-only exploration script failing on Go services and cross-repo flows.
Best answer: B. Delegation prompts that specify goals and quality criteria rather than step-by-step procedure let a subagent adapt to what it finds, such as Go code or another repository. More scripts multiply brittle procedures that still break on the next unexpected case. An adapt-if-needed footnote leaves the wrong procedure in charge, and a one-line prompt drops the criteria that define a good answer.
The decisive evidence in the stem
fails on the Go services and on flows that cross into the ledger repository
A fixed procedure breaks whenever reality differs from its assumptions, so the subagent needs goals and criteria to plan its own steps.
Official objective tested: Task 1.3 · Configure subagent invocation, context passing, and spawning
What each choice would do here
A · Why this does not meet the full requirement
Add a second 14-step script for Go services and a third for cross-repository flows, and have the coordinator choose the script by language.
More fixed scripts still fail on the next case nobody scripted.
The coordinator now maintains three scripts and must pick one. A flow that starts in Java and ends in Go fits none of them, and every new pattern requires yet another script, so maintenance grows and the brittleness remains.
B · Why this meets the requirement
State the question to answer, the evidence required such as file paths and call chains, and the expected output, and let code_explorer choose its own search steps.
Gives the subagent a clear target and standard while letting it adapt its method.
The prompt now says: explain how a refund moves from API to ledger; cite each file and function in the chain; flag any step you cannot confirm; return a numbered call chain. code_explorer greps Go code, follows imports into the ledger repo, and returns evidence in the required shape.
C · Why this does not meet the full requirement
Keep the Java script but add a final step telling code_explorer to adapt the earlier steps if the code turns out to be in another language.
Keeps a Java procedure in charge and leaves adaptation vague.
code_explorer still runs the Java steps first and finds little. The final adapt step gives no criteria for what a good answer looks like, so results for Go services become inconsistent and depend on how the subagent interprets adapt.
D · Why this does not meet the full requirement
Replace the script with a single line asking code_explorer to explain the billing flow, and leave every other detail to the subagent.
Removes the criteria, so answers vary in depth and evidence.
code_explorer is free to choose its approach but has no standard for evidence or output. Some answers cite files, others give summaries without proof, and the coordinator cannot check completeness because it never stated what complete means.
Check your understanding · explain the design in your own words
A step-by-step script breaks whenever the code is different. What should the coordinator send instead?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Coordinator handoffs: wait, pass context, then continue
Study: Coordinator handoffs: wait, pass context, then continue Subagent handoff Decomposition
Return to Foundations Mock Exam 3 · Q693's situation and clause-by-clause explanation
Answer
**B.** Delegation prompts that specify goals and quality criteria rather than step-by-step procedure let a subagent adapt to what it finds, such as Go code or another repository. More scripts multiply brittle procedures that still break on the next unexpected case. An adapt-if-needed footnote leaves the wrong procedure in charge, and a one-line prompt drops the criteria that define a good answer.Scenario 4 · Claude Code for Continuous Integration
D3 · Prompting & Structured Output
Q694. A validator checks each structured review finding before posting, and failures are retried with the validation error appended. Last week's failures fell into four groups. The team wants to keep retry-with-feedback only where it can work and route the other groups elsewhere. For which TWO groups is a retry with the specific validation error likely to fix the finding? (Select TWO.) A) Findings whose line number points outside the changed hunks of the diff, although the issue described is in a changed function nearby. B) Findings that must cite the approved design document, which lives on an internal wiki page that is not part of the review input. C) Findings whose suggested_fix uses a variable name from before a rename that is visible in the same diff the model was given. D) Findings whose required ticket_id is missing because the linked tickets exist only in the issue tracker, which the job never provides.
Understand Foundations Mock Exam 3 · Q694 · the situation and each part of the question
The real situation behind this question
Brightmoor validates every finding before it reaches a pull request, because a comment on the wrong line or with broken code wastes developer time. The validator's retries help sometimes and loop uselessly other times, costing money and delaying reviews. The team pulled last week's failures into four groups and wants to know which ones retries can actually repair, so the rest can be handled another way.
Read the question in parts
Part 1 · route the other groups elsewhere
the decision is which failures to retry and which need a different fix, such as adding data.
Part 2 · failures are retried with the validation error appended
the retry mechanism already includes specific feedback, so the question is when that feedback can succeed.
What you are being asked to decide
Which validation failures can a retry with feedback actually fix? Tests telling retry-fixable errors from errors caused by missing information.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Retry with error feedback | sending the diff, the failed finding and the exact validation error back to the model for correction |
| Missing source information | a fact the finding needs that exists only outside the review input, so no retry can produce it |
Study: Validation, retry, and feedback loops: when a retry can fix it Validation repair Multiple-response item
Understand Foundations Mock Exam 3 · Q694's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Retry with error feedback works when the correct answer is already in the input, like a hunk range or a rename in the diff. When the needed fact lives only in an external tracker or wiki, retries fail or fabricate. Those groups need the data supplied or a different route.
Connect the design to the situation
Wrong line numbers and stale variable names versus missing tickets and wiki citations.
Best answer: AC. Retries with specific error feedback work when the needed information is in the input and the problem is a structural or reference mistake: the correct line and the renamed variable are both visible in the diff. Retries cannot fix findings whose required information exists only in an external system or document that was never provided; those need the data added or a different route.
The decisive evidence in the stem
a retry with the specific validation error
Feedback helps only when the model can correct itself from what it was given, so the deciding question is whether the missing fact is in the input.
Official objective tested: Task 4.4 · Implement validation, retry, and feedback loops for extraction quality
What each choice would do here
A · Why this does not meet the full requirement
Findings whose line number points outside the changed hunks of the diff, although the issue described is in a changed function nearby.
The diff shows the correct changed lines, so feedback lets the model point to the right one.
The retry says: line 212 is outside the changed hunks, which cover lines 180 to 205 in this file. The model looks at the diff it already has, sees the bug is on line 197, and corrects the finding. The information was there; only the reference was wrong.
B · Why this does not meet the full requirement
Findings that must cite the approved design document, which lives on an internal wiki page that is not part of the review input.
The wiki content was never provided, so no retry can cite it correctly.
The retry says the design document citation is missing. The model never saw the wiki page, so it cannot quote or link it correctly, and may invent a plausible title. The fix is to include the document in the input or drop the requirement.
C · Why this does not meet the full requirement
Findings whose suggested_fix uses a variable name from before a rename that is visible in the same diff the model was given.
The rename is in the diff, so feedback lets the model use the current name.
The retry says: suggested_fix uses amountUsd, which this diff renames to amountCents. The model sees the rename in its input and rewrites the fix with the current name. The error is a reference mistake that the model can correct from its own input.
D · Why this does not meet the full requirement
Findings whose required ticket_id is missing because the linked tickets exist only in the issue tracker, which the job never provides.
The ticket data is not in the input, so retries can only guess or fail again.
The retry says ticket_id is missing. The model has no access to the issue tracker, so it can only leave the field empty again or invent an ID. Each retry costs money and either fails or fabricates; the fix is to provide ticket data or make the field optional.
Check your understanding · explain the design in your own words
Which validation failures can a retry with feedback actually fix?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Validation, retry, and feedback loops: when a retry can fix it
Study: Validation, retry, and feedback loops: when a retry can fix it Validation repair Multiple-response item
Return to Foundations Mock Exam 3 · Q694's situation and clause-by-clause explanation
Answer
**AC.** Retries with specific error feedback work when the needed information is in the input and the problem is a structural or reference mistake: the correct line and the renamed variable are both visible in the diff. Retries cannot fix findings whose required information exists only in an external system or document that was never provided; those need the data added or a different route.D3 · Prompting & Structured Output
Q695. Brightmoor wants to keep posting high-value inline comments while sending doubtful findings somewhere cheaper for developers to check. Reviewers have a labeled set of 1,200 past findings marked accepted or dismissed. Inline comments should be limited to findings likely to be accepted, and the rest should go to one collapsible summary comment. Which design fits best? (Select ONE.) A) Add a verification pass that attaches a confidence score to each finding, set the inline threshold from the labeled set, and post lower-confidence findings in the summary. B) Post every finding inline as today, and add a reaction button so developers can mark each comment as useful or not useful for later analysis. C) Ask the review model to report its own confidence with each finding, and post inline any finding with a stated confidence of 0.8 or higher. D) Run the review twice in the same session and post inline only the findings that appear in both runs, sending the rest to the summary.
Understand Foundations Mock Exam 3 · Q695 · the situation and each part of the question
The real situation behind this question
Brightmoor's developers want fewer inline comments, but the team does not want to throw doubtful findings away, because some of them are real. A collapsible summary is a good home for those. The question is which findings deserve to be inline. The reviewers have spent months marking past findings as accepted or dismissed, and the team wants to use that work rather than guess.
Read the question in parts
Part 1 · Inline comments should be limited to findings likely to be accepted
routing must predict acceptance, which requires scores checked against outcomes.
Part 2 · the rest should go to one collapsible summary comment
doubtful findings are kept and shown, not deleted, so routing rather than filtering is needed.
What you are being asked to decide
How do you decide which findings go inline and which go to a summary? Tests verification passes with confidence scores calibrated on labeled data for routing.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Verification pass | a second step that re-checks each finding and attaches a confidence score used for routing |
| Calibrated threshold | a cut-off chosen from labeled past findings so it matches the real chance a finding is accepted |
Study: Independent review and multi-pass review Calibration Golden set
Understand Foundations Mock Exam 3 · Q695's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The team needs routing that predicts acceptance and already has labeled outcomes. A verification pass with per-finding confidence, calibrated on those labels, sets a meaningful inline threshold. Raw self-ratings, feedback buttons and correlated reruns do not deliver calibrated routing.
Connect the design to the situation
1,200 labeled past findings used to set the inline-comment threshold.
Best answer: A. A verification pass that reports confidence with each finding enables routing, and the labeled set of accepted and dismissed findings is what calibrates the threshold so it reflects real acceptance rates. A fixed 0.8 on uncalibrated self-reported confidence is a guess. Reaction buttons gather data but route nothing, and two runs in one session are correlated rather than independent.
The decisive evidence in the stem
a labeled set of 1,200 past findings marked accepted or dismissed
Labeled outcomes make it possible to calibrate confidence thresholds, so routing can be based on measured acceptance rather than raw self-ratings.
Official objective tested: Task 4.6 · Design multi-instance and multi-pass review architectures
What each choice would do here
A · Why this meets the requirement
Add a verification pass that attaches a confidence score to each finding, set the inline threshold from the labeled set, and post lower-confidence findings in the summary.
Routes by confidence whose meaning has been measured against real accept and dismiss outcomes.
Each finding passes through a verification step that outputs a confidence score. The team plots scores against the 1,200 labels and finds that above 0.72, 85% were accepted, so 0.72 becomes the inline threshold. Lower findings appear in the summary, and the threshold is re-checked monthly.
B · Why this does not meet the full requirement
Post every finding inline as today, and add a reaction button so developers can mark each comment as useful or not useful for later analysis.
Collects feedback but leaves all the noise inline.
Developers now see the same number of inline comments plus a button. Feedback accumulates for later analysis, but today's noise is unchanged, and the request to keep inline comments high-value is not met.
C · Why this does not meet the full requirement
Ask the review model to report its own confidence with each finding, and post inline any finding with a stated confidence of 0.8 or higher.
Uses a raw self-rating with an arbitrary cut-off nobody has checked.
The model rates most findings 0.8 or above, including many style comments that developers dismiss. Nobody has checked what 0.8 means in practice, so the inline set stays noisy and the labeled data goes unused.
D · Why this does not meet the full requirement
Run the review twice in the same session and post inline only the findings that appear in both runs, sending the rest to the summary.
Correlated runs agree on their shared mistakes, so agreement proves little.
Both runs share the same prompt and context, so they mostly produce the same findings, including the same false positives. Agreement between correlated runs says little about acceptance, and the cost of review doubles.
Check your understanding · explain the design in your own words
How do you decide which findings go inline and which go to a summary?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Independent review and multi-pass review
Study: Independent review and multi-pass review Calibration Golden set
Return to Foundations Mock Exam 3 · Q695's situation and clause-by-clause explanation
Answer
**A.** A verification pass that reports confidence with each finding enables routing, and the labeled set of accepted and dismissed findings is what calibrates the threshold so it reflects real acceptance rates. A fixed 0.8 on uncalibrated self-reported confidence is a guess. Reaction buttons gather data but route nothing, and two runs in one session are correlated rather than independent.D3 · Prompting & Structured Output
Q696. The CI job generates missing unit tests and then, in the same Claude Code session, asks Claude to "review these tests critically before posting." Several posted tests assert the current buggy behaviour, for example expecting a refund of zero for partial cancellations, and the self-review approved them. What change will most improve the review of generated tests? (Select ONE.) A) Keep the review in the same session and rewrite the review instruction to demand that Claude find at least three real problems in every set of generated tests before posting. B) Review the generated tests in a separate, independent Claude Code invocation that receives the code, the tests and the requirements but not the generator's reasoning. C) Keep the review in the same session and enable extended thinking, so Claude reasons more deeply about each test before approving it. D) Keep the review in the same session and run it twice in a row, posting only the tests that both review passes approve.
Understand Foundations Mock Exam 3 · Q696 · the situation and each part of the question
The real situation behind this question
Brightmoor's test generator writes tests by reading the current code. When the code has a bug, the generator sometimes writes a test that expects the bug, then the same session reviews and approves it. Developers merge these tests, and now the test suite defends the bug. One test enshrined a zero refund for partial cancellations, which finance found weeks later. The team wants a reviewer that thinks independently.
Read the question in parts
Part 1 · the self-review approved them
the current review shares the generator's blind spot, so asking it to try harder will not help.
Part 2 · assert the current buggy behaviour
the failure is subtle: the tests pass, but they encode a defect as expected behaviour.
What you are being asked to decide
The session that wrote the tests also approved them. How do you get a real review? Tests independent review instances over self-review in the same session.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Self-review | the same session that generated the tests checking them, with all its earlier reasoning still in context |
| Independent instance | a separate Claude invocation that sees the code and tests fresh, without the generator's assumptions |
Study: Independent review and multi-pass review Context isolation LLM-as-judge
Understand Foundations Mock Exam 3 · Q696's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The reviewer shares the generator's reasoning, so it approves tests built on the same mistaken assumption. An independent instance, given code, tests and requirements but not the generator's context, catches these issues. Extended thinking, quotas and repeated passes stay inside the same blind spot.
Connect the design to the situation
Tests asserting a zero refund bug, approved by the session that wrote them.
Best answer: B. A model reviewing its own work in the same session keeps its generation reasoning and tends to agree with earlier decisions; an independent instance without that context is more effective at catching subtle issues. Extended thinking and repeated passes in the same session keep the same assumptions. A quota of three problems produces invented issues rather than real ones.
The decisive evidence in the stem
in the same Claude Code session
The reviewer shares the generator's reasoning context, which makes it unlikely to question tests built on that reasoning, so an independent instance is needed.
Official objective tested: Task 4.6 · Design multi-instance and multi-pass review architectures
What each choice would do here
A · Why this does not meet the full requirement
Keep the review in the same session and rewrite the review instruction to demand that Claude find at least three real problems in every set of generated tests before posting.
A quota invents problems instead of finding the real ones.
Claude dutifully lists three problems per set, often minor naming or style points it invents to meet the quota. The real issue, a test expecting buggy behaviour, may or may not be among them, and developers learn to ignore the list.
B · Why this meets the requirement
Review the generated tests in a separate, independent Claude Code invocation that receives the code, the tests and the requirements but not the generator's reasoning.
A fresh reviewer has no earlier reasoning to defend, so it questions the tests.
A second claude -p job receives the module code, the new tests, and the requirement that partial cancellations refund the unused portion. It has never seen the generator's reasoning, so it notices that a test expects zero and flags it as contradicting the requirement.
C · Why this does not meet the full requirement
Keep the review in the same session and enable extended thinking, so Claude reasons more deeply about each test before approving it.
Deeper thinking inside the same context still starts from the same assumptions.
Claude thinks longer, but from inside the same context where it decided the current behaviour was correct. It now produces longer reasons for approving the same tests, so the buggy expectations still pass review.
D · Why this does not meet the full requirement
Keep the review in the same session and run it twice in a row, posting only the tests that both review passes approve.
Two passes in the same context tend to agree with each other.
The second pass sees the first pass's approval in the same context and usually agrees. Two correlated reviews give false confidence, and tests that encode bugs continue to be posted.
Check your understanding · explain the design in your own words
The session that wrote the tests also approved them. How do you get a real review?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Independent review and multi-pass review
Study: Independent review and multi-pass review Context isolation LLM-as-judge
Return to Foundations Mock Exam 3 · Q696's situation and clause-by-clause explanation
Answer
**B.** A model reviewing its own work in the same session keeps its generation reasoning and tends to agree with earlier decisions; an independent instance without that context is more effective at catching subtle issues. Extended thinking and repeated passes in the same session keep the same assumptions. A quota of three problems produces invented issues rather than real ones.D3 · Prompting & Structured Output
Q697. In the legacy adapters/ package, broad except Exception blocks are an accepted pattern when they log the error and re-raise a domain error at an integration boundary. The review flags all of them, and developers dismiss those findings. But last month a broad except that silently swallowed a purchase error caused an incident. How should the team teach the review the difference? (Select ONE.) A) Turn off the error-handling category entirely, since its findings in adapters/ are dismissed so often that developers no longer trust any of them. B) Post-filter findings with a regular expression that removes any comment about except Exception, so the pattern is never flagged anywhere. C) Add prompt examples contrasting a boundary handler that logs and re-raises with one that swallows the error, explaining the reasoning for each. D) Add every file path in adapters/ to a skip list in the prompt, so broad except blocks in those files are never reported by the review.
Understand Foundations Mock Exam 3 · Q697 · the situation and each part of the question
The real situation behind this question
Brightmoor's adapters talk to external platform store APIs, which fail in many strange ways. The team deliberately catches broad exceptions there, logs them, and converts them into clear domain errors. The review flags every one, and developers have learned to dismiss them. Then a handler that caught an error and did nothing caused a player's purchase to vanish silently. The team needs the review to tell these two cases apart.
Read the question in parts
Part 1 · when they log the error and re-raise a domain error at an integration boundary
acceptability depends on what the handler does, which examples can show.
Part 2 · developers dismiss those findings
flagging the acceptable pattern creates false positives that erode trust.
What you are being asked to decide
Some broad exception handlers are fine and some are dangerous. How does the review learn which is which? Tests few-shot examples that separate acceptable patterns from genuine issues.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Contrasting examples | pairs in the prompt showing an acceptable handler and a harmful one, each with the reason |
| Acceptable pattern | a broad handler that logs and re-raises a domain error, which the team considers correct at boundaries |
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Negative control
Understand Foundations Mock Exam 3 · Q697's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The same syntax is acceptable or harmful depending on behaviour. Contrasting few-shot examples with reasoning teach the review that distinction and let it generalize. Skip lists, disabling and regex filters remove the real bugs along with the noise.
Connect the design to the situation
Log-and-re-raise handlers that are fine and a swallowing handler that caused an incident.
Best answer: C. Few-shot examples that contrast acceptable code with genuine issues, with the reasoning, teach the model to generalize the distinction to new code instead of matching fixed cases. A path skip list would also hide the swallowed-error bug. Disabling the category or filtering by regular expression removes the very finding that would have prevented the incident.
The decisive evidence in the stem
a broad except that silently swallowed a purchase error caused an incident
The same syntax can be fine or dangerous depending on behaviour, so the model needs contrasting examples rather than a blanket rule to skip or flag.
Official objective tested: Task 4.2 · Apply few-shot prompting to improve output consistency and quality
What each choice would do here
A · Why this does not meet the full requirement
Turn off the error-handling category entirely, since its findings in adapters/ are dismissed so often that developers no longer trust any of them.
Removes the findings that would catch the next incident.
No error-handling findings appear anywhere. The false positives vanish, along with every real error-handling bug in the codebase, including the kind that caused last month's incident.
B · Why this does not meet the full requirement
Post-filter findings with a regular expression that removes any comment about except Exception, so the pattern is never flagged anywhere.
Mechanically deletes exactly the finding that mattered last month.
A regular expression deletes every finding mentioning except Exception, including the one about the swallowed purchase error. The filter cannot tell behaviour from syntax, which is the whole distinction that matters here.
C · Why this meets the requirement
Add prompt examples contrasting a boundary handler that logs and re-raises with one that swallows the error, explaining the reasoning for each.
Teaches the behaviour that matters, so new code is judged by what it does, not how it looks.
The prompt shows one handler that logs and raises StoreUnavailable, labelled acceptable with the reason, and one that catches and passes, labelled a defect because the purchase silently disappears. The review stops flagging boundary handlers and flags handlers that swallow errors, even in new files.
D · Why this does not meet the full requirement
Add every file path in adapters/ to a skip list in the prompt, so broad except blocks in those files are never reported by the review.
Would also hide the swallowing handler that caused the incident.
The review never comments on any file in adapters/. Acceptable handlers stop being flagged, but so does the next handler that swallows a purchase error in that package, so the incident can repeat with no warning.
Check your understanding · explain the design in your own words
Some broad exception handlers are fine and some are dangerous. How does the review learn which is which?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Few-shot examples for ambiguous cases and varied documents
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Negative control
Return to Foundations Mock Exam 3 · Q697's situation and clause-by-clause explanation
Answer
**C.** Few-shot examples that contrast acceptable code with genuine issues, with the reasoning, teach the model to generalize the distinction to new code instead of matching fixed cases. A path skip list would also hide the swallowed-error bug. Disabling the category or filtering by regular expression removes the very finding that would have prevented the incident.D3 · Prompting & Structured Output
Q698. The nightly test-generation job runs an agentic loop: Claude writes a test, requests a run_pytest tool call, reads the failure, and revises, usually over six to ten tool rounds per module. A manager proposes moving this job to the Message Batches API to lower cost, since results are not needed until morning. What is the main problem with the proposal as described? (Select ONE.) A) Batch results arrive in random order, so the script would be unable to tell which generated tests belong to which module once the whole batch completes. B) The Message Batches API does not accept tool definitions at all, so the run_pytest tool could not even be offered to the model inside a batch request. C) A batch request cannot run your run_pytest tool mid-request and continue, so each tool round would need a new batch submission with its own processing wait. D) Batch processing is only suitable for blocking workflows such as pre-merge checks, so an overnight job is the wrong kind of workload for it.
Understand Foundations Mock Exam 3 · Q698 · the situation and each part of the question
The real situation behind this question
The nightly test generator is one of Brightmoor's most useful jobs: it writes tests, runs them, and fixes them until they pass. The finance team noticed its API cost and a manager suggested batch processing, since nobody looks at the tests before morning. On paper it sounds perfect. The engineers need to explain clearly what would actually happen to a loop that needs to run pytest between every model step.
Read the question in parts
Part 1 · since results are not needed until morning
the latency argument for batch is reasonable, so the flaw must lie elsewhere.
Part 2 · requests a run_pytest tool call, reads the failure, and revises
each step needs the application to run a tool and return its result before the model continues.
What you are being asked to decide
Why does an agentic test-writing loop not fit the batch API, even overnight? Tests that batch requests cannot execute tools mid-request in a multi-turn loop.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Message Batches API | an asynchronous way to send many independent requests and collect each single response later |
| Tool round | one cycle where Claude requests run_pytest, your code runs it, and the result goes back for the next step |
Study: Message Batches API — the cost/latency lever (tested by contract) Batch API Agent loop
Understand Foundations Mock Exam 3 · Q698's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The job is a multi-turn loop that runs a tool between model steps. A batch request returns one response and cannot execute the tool and continue, so every round becomes another batch with its own wait. Ordering, tool support and timing are not the problem.
Connect the design to the situation
Six to ten pytest rounds per module proposed for batch processing.
Best answer: C. A batch request returns a single response; when the model requests a client-side tool, the application must run it and send a follow-up request, so a six-to-ten round loop becomes six to ten batch submissions, each possibly waiting hours. Results are matched by custom_id, so ordering is not the problem. Tool definitions can be sent, and batch processing suits overnight work, not blocking checks.
The decisive evidence in the stem
usually over six to ten tool rounds per module
The workload depends on multi-turn tool execution, which a single batch request cannot perform, so every round would become a separate batch.
Official objective tested: Task 4.5 · Design efficient batch processing strategies
What each choice would do here
A · Why this does not meet the full requirement
Batch results arrive in random order, so the script would be unable to tell which generated tests belong to which module once the whole batch completes.
custom_id matches each result to its request, so ordering is handled.
Each batch result carries the custom_id set on its request, so the script knows exactly which module each response belongs to. Ordering is not a real obstacle, and focusing on it would miss the actual problem with the loop.
B · Why this does not meet the full requirement
The Message Batches API does not accept tool definitions at all, so the run_pytest tool could not even be offered to the model inside a batch request.
Tool definitions can be included; executing them mid-request is what is missing.
Batch requests accept the same request body as normal calls, including tools. The model can request run_pytest in a batch response; what it cannot do is have that tool executed and continue within the same request.
C · Why this meets the requirement
A batch request cannot run your run_pytest tool mid-request and continue, so each tool round would need a new batch submission with its own processing wait.
Each tool round needs a new submission, so the loop turns into many slow batches.
Round one goes in a batch; the response asks for run_pytest. The script runs it and must submit round two as a new batch, which may take hours. With six to ten rounds per module, the job could take days, so the overnight deadline cannot be met.
D · Why this does not meet the full requirement
Batch processing is only suitable for blocking workflows such as pre-merge checks, so an overnight job is the wrong kind of workload for it.
Reverses the rule: batch suits work that can wait, like overnight jobs.
This states the rule backwards. Overnight, latency-tolerant work is exactly what batch processing suits, and blocking checks are what it does not suit. The real issue is the multi-turn tool loop, not the time of day.
Check your understanding · explain the design in your own words
Why does an agentic test-writing loop not fit the batch API, even overnight?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Message Batches API — the cost/latency lever (tested by contract)
Study: Message Batches API — the cost/latency lever (tested by contract) Batch API Agent loop
Return to Foundations Mock Exam 3 · Q698's situation and clause-by-clause explanation
Answer
**C.** A batch request returns a single response; when the model requests a client-side tool, the application must run it and send a follow-up request, so a six-to-ten round loop becomes six to ten batch submissions, each possibly waiting hours. Results are matched by custom_id, so ordering is not the problem. Tool definitions can be sent, and batch processing suits overnight work, not blocking checks.Q699. When the tech lead runs Claude Code locally, reviews follow Brightmoor's review standards, such as always flagging unparameterized SQL. The CI job on GitHub Actions ignores those standards. Running /memory locally shows the standards are loaded from ~/.claude/CLAUDE.md, while the repository's CLAUDE.md contains only build commands. What should the team change? (Select ONE.) A) Copy the tech lead's ~/.claude/CLAUDE.md into the CI runner's home directory during each job, so the runner loads the same personal file as the lead. B) Ask each developer to copy the standards into their own ~/.claude/CLAUDE.md, so every local session and review follows the same rules. C) Add the review standards to the repository's .claude/settings.json, so Claude Code applies them as configuration in every environment. D) Move the review standards into the repository, in the project CLAUDE.md or a .claude/rules/ file, so every checkout, including CI, loads them.
Understand Foundations Mock Exam 3 · Q699 · the situation and each part of the question
The real situation behind this question
The tech lead wrote Brightmoor's review standards months ago and kept refining them, always in their own global Claude Code file. On their laptop every review is sharp. The CI reviewer, which every developer relies on, seems to have never heard of them. Running /memory finally showed why. The team wants the standards to apply consistently wherever Claude Code reviews Brightmoor code.
Read the question in parts
Part 1 · the repository's CLAUDE.md contains only build commands
the shared project memory exists but lacks the standards, so CI has nothing to load.
Part 2 · When the tech lead runs Claude Code locally
the good behaviour depends on one person's environment, a sign of user-level configuration.
What you are being asked to decide
Review rules work on the lead's laptop but not in CI. Where should they live? Tests diagnosing user-level versus project-level CLAUDE.md placement.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| User-level CLAUDE.md | ~/.claude/CLAUDE.md, read only on the machine of the person who owns that home folder |
| /memory | a Claude Code command that shows which memory files are loaded, used here to find the cause |
Study: CLAUDE.md — the memory hierarchy CLAUDE.md Settings precedence
Understand Foundations Mock Exam 3 · Q699's answer · full reasoning and worked examples
Claude synthesized · the point, straight
/memory shows the standards come from a user-level file that only the lead's machine reads. Team standards belong in project-level memory committed to the repository, which the CI checkout loads. Copying personal files, using settings.json or asking for personal copies does not reach CI reliably.
Connect the design to the situation
Review standards in a personal file that the CI runner never reads.
Best answer: D. User-level ~/.claude/CLAUDE.md applies only on that person's machine and is not shared through version control, so CI never sees it; team standards belong in project-level memory committed to the repository. Copying a personal file into the runner couples CI to one person's private file. settings.json holds runtime configuration, not instructions, and per-developer copies still leave CI without them.
The decisive evidence in the stem
the standards are loaded from ~/.claude/CLAUDE.md
The standards live in a user-level file that only the tech lead's machine reads, which explains why the CI checkout never loads them.
Official objective tested: Task 3.1 · Configure CLAUDE.md files with appropriate hierarchy, scoping, and modular organization
What each choice would do here
A · Why this does not meet the full requirement
Copy the tech lead's ~/.claude/CLAUDE.md into the CI runner's home directory during each job, so the runner loads the same personal file as the lead.
Makes CI depend on one person's private, unversioned file.
The job copies a personal file from somewhere into the runner. It is not versioned, changes whenever the lead edits it, and may contain the lead's unrelated personal preferences, so CI reviews become unpredictable and tied to one person.
B · Why this does not meet the full requirement
Ask each developer to copy the standards into their own ~/.claude/CLAUDE.md, so every local session and review follows the same rules.
Keeps the standards personal, so CI still never sees them.
Developers' local sessions improve, assuming they keep their copies in sync. The CI runner still has no user-level file, so the automated reviews, which matter most, continue to ignore the standards.
C · Why this does not meet the full requirement
Add the review standards to the repository's .claude/settings.json, so Claude Code applies them as configuration in every environment.
settings.json configures behaviour; it is not where instructions are loaded from.
settings.json holds runtime configuration such as permissions and hooks, not natural-language instructions for Claude. Standards placed there are not loaded as memory, so the CI reviewer still ignores them.
D · Why this meets the requirement
Move the review standards into the repository, in the project CLAUDE.md or a .claude/rules/ file, so every checkout, including CI, loads them.
Puts team standards where every checkout, including the CI runner, loads them.
The standards move into the repository's CLAUDE.md or a .claude/rules/review.md file and are committed. The CI checkout now contains them, so claude -p loads them on every run, and new developers get them automatically. /memory in CI-like runs confirms the file loads.
Check your understanding · explain the design in your own words
Review rules work on the lead's laptop but not in CI. Where should they live?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: CLAUDE.md — the memory hierarchy
Study: CLAUDE.md — the memory hierarchy CLAUDE.md Settings precedence
Return to Foundations Mock Exam 3 · Q699's situation and clause-by-clause explanation
Answer
**D.** User-level ~/.claude/CLAUDE.md applies only on that person's machine and is not shared through version control, so CI never sees it; team standards belong in project-level memory committed to the repository. Copying a personal file into the runner couples CI to one person's private file. settings.json holds runtime configuration, not instructions, and per-developer copies still leave CI without them.D3 · Prompting & Structured Output
Q700. To cut the 31% dismissal rate, the team added "Be conservative and only report issues you are highly confident about" to the review prompt. Two weeks later dismissals are at 29%, and developers still dismiss naming nits, style preferences and comments about patterns the codebase uses everywhere. What change will most improve precision? (Select ONE.) A) Replace the instruction with explicit criteria: report behaviour-changing bugs, security issues and data-loss risks, and skip style, naming and established local patterns. B) Keep the instruction and post only the three findings with the highest model-stated confidence on each pull request, dropping all the others. C) Strengthen the instruction to "only report issues you are at least 95% confident about" and ask the model to state its confidence for each finding. D) Move the review to a larger, more capable model while keeping the current prompt, since better judgment should reduce noisy findings.
Understand Foundations Mock Exam 3 · Q700 · the situation and each part of the question
The real situation behind this question
Brightmoor's developers are drowning in review comments about variable names and formatting choices, while the occasional real bug gets lost among them. The team tried telling Claude to be more careful, and almost nothing changed. The developers can say exactly which kinds of comments they ignore. The team needs the review to stop producing those kinds of comments and keep producing the valuable ones.
Read the question in parts
Part 1 · Two weeks later dismissals are at 29%
the vague instruction had almost no effect, so the method itself is the problem.
Part 2 · What change will most improve precision?
the goal is fewer false positives among reported findings, not fewer findings overall.
What you are being asked to decide
"Be conservative" did not reduce noise. What kind of instruction will? Tests explicit report-and-skip criteria over vague confidence instructions.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Explicit criteria | a concrete list of finding types to report and to skip, written into the review prompt |
| Confidence-based filtering | asking the model to report only what it feels sure about, which does not define what is worth reporting |
Study: Explicit criteria: say what to report and what to skip Calibration System prompt
Understand Foundations Mock Exam 3 · Q700's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The dismissed comments fall into clear categories. Explicit criteria for what to report and what to skip remove them, while confidence wording barely helps. Thresholds, caps and bigger models do not define what a useful finding is.
Connect the design to the situation
Style and naming comments still dismissed after a be-conservative instruction.
Best answer: A. General instructions like "be conservative" barely improve precision, while specific categorical criteria for what to report and what to skip remove whole classes of noise. A stricter confidence threshold is still confidence-based filtering, which the evidence shows is weak. A top-three cap drops real bugs on busy pull requests, and a bigger model with vague criteria still lacks the team's definition of a worthwhile finding.
The decisive evidence in the stem
developers still dismiss naming nits, style preferences and comments about patterns the codebase uses everywhere
The noise falls into identifiable categories, so explicit report-or-skip criteria can remove it where confidence wording did not.
Official objective tested: Task 4.1 · Design prompts with explicit criteria to improve precision and reduce false positives
What each choice would do here
A · Why this meets the requirement
Replace the instruction with explicit criteria: report behaviour-changing bugs, security issues and data-loss risks, and skip style, naming and established local patterns.
Removes the dismissed categories directly and tells the model what counts as worth reporting.
The prompt now lists what to report (logic errors that change behaviour, injection and auth flaws, data loss) and what to skip (formatting, naming, patterns used consistently in the repo). Style and naming comments disappear, and dismissals drop because the categories developers rejected are no longer produced.
B · Why this does not meet the full requirement
Keep the instruction and post only the three findings with the highest model-stated confidence on each pull request, dropping all the others.
Caps volume arbitrarily and can drop real bugs on large pull requests.
Each pull request gets at most three comments. On a large change with five real bugs, two are dropped, while a confidently stated style nit may survive. Volume falls but precision and recall both suffer.
C · Why this does not meet the full requirement
Strengthen the instruction to "only report issues you are at least 95% confident about" and ask the model to state its confidence for each finding.
A stricter confidence wording is the same weak lever, with uncalibrated numbers added.
The model now attaches a confidence figure to each finding and reports fewer borderline items, but its confidence is not calibrated. It can be very confident about a naming preference, so style comments continue and the numbers give a false sense of rigour.
D · Why this does not meet the full requirement
Move the review to a larger, more capable model while keeping the current prompt, since better judgment should reduce noisy findings.
A stronger model still does not know the team's definition of a useful finding.
The larger model writes more polished comments, but the prompt still does not say what the team considers noise. It may even find more subtle style points to raise, so dismissals stay high while cost rises.
Check your understanding · explain the design in your own words
"Be conservative" did not reduce noise. What kind of instruction will?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Explicit criteria: say what to report and what to skip
Study: Explicit criteria: say what to report and what to skip Calibration System prompt
Return to Foundations Mock Exam 3 · Q700's situation and clause-by-clause explanation
Answer
**A.** General instructions like "be conservative" barely improve precision, while specific categorical criteria for what to report and what to skip remove whole classes of noise. A stricter confidence threshold is still confidence-based filtering, which the evidence shows is weak. A top-three cap drops real bugs on busy pull requests, and a bigger model with vague criteria still lacks the team's definition of a worthwhile finding.D3 · Prompting & Structured Output
Q701. The nightly security audit calls the Messages API directly. The prompt asks Claude to "respond only with a JSON array of findings," and about 3% of responses fail to parse because of trailing commentary, missing brackets or unescaped quotes. The parser then drops the whole file's findings. What is the most reliable way to get schema-compliant output? (Select ONE.) A) Define a record_findings tool whose input_schema describes the findings, force it with tool_choice, and read the tool_use input. B) Keep the prompt and prefill the assistant's reply with an opening bracket, so the model is pushed to start its answer as a JSON array. C) Keep the prompt and add a retry that resends the same request whenever the response fails to parse, up to three times for each file. D) Keep the prompt and lower the temperature to zero, so responses become more predictable and the JSON is less likely to contain mistakes.
Understand Foundations Mock Exam 3 · Q701 · the situation and each part of the question
The real situation behind this question
Brightmoor's nightly audit scans every file for security debt and stores findings in a dashboard that the security team reviews each morning. When a response cannot be parsed, every finding for that file is lost, and the security team never learns about it. Three percent sounds small, but across the whole repository that means dozens of files each night with no findings recorded, some of them sensitive.
Read the question in parts
Part 1 · then drops the whole file's findings
each parse failure silently loses real security findings, so reliability matters.
Part 2 · calls the Messages API directly
the runtime is the API, where tool definitions and tool_choice are set by the application.
What you are being asked to decide
Asking for JSON in the prompt fails 3% of the time. What guarantees valid structure? Tests tool use with JSON schemas for reliable structured output.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| input_schema | the JSON Schema in the tool definition that the model's tool input must match |
| tool_use block | the response content block holding the tool name and its structured input, read by your code |
Study: Structured output — the engineering ladder tool_use Forced tool extraction JSON Schema
Understand Foundations Mock Exam 3 · Q701's answer · full reasoning and worked examples
Claude synthesized · the point, straight
JSON requested in prompt text is not enforced. A schema-defined tool, forced with tool_choice, returns structured input the application reads directly. Retries, prefill and low temperature only make valid JSON more likely.
Connect the design to the situation
Nightly audit responses with trailing text and broken brackets.
Best answer: A. Tool use with a JSON schema is the most reliable way to get schema-compliant structured output, because the model fills tool input that matches the schema instead of writing free-form JSON text. Retrying catches failures after the fact and still depends on luck. Prefilling and lowering temperature make good JSON more likely but do not eliminate syntax errors.
The decisive evidence in the stem
respond only with a JSON array of findings
JSON requested through prompt wording is not enforced, so syntax failures continue until output is produced through a schema-defined tool.
Official objective tested: Task 4.3 · Enforce structured output using tool use and JSON schemas
What each choice would do here
A · Why this meets the requirement
Define a record_findings tool whose input_schema describes the findings, force it with tool_choice, and read the tool_use input.
Produces output through a schema-defined tool, removing JSON syntax failures.
The request defines record_findings with an input_schema for an array of objects with file, line, severity and description, and tool_choice names it. The model's response is a tool_use block whose input matches the schema, and the application reads it directly. Parse failures stop.
B · Why this does not meet the full requirement
Keep the prompt and prefill the assistant's reply with an opening bracket, so the model is pushed to start its answer as a JSON array.
Helps the start of the answer but does not guarantee valid JSON overall.
The model starts with a bracket, so trailing commentary before the array disappears. It can still leave a bracket unclosed, put a quote unescaped, or add text after the array, so some responses still fail to parse.
C · Why this does not meet the full requirement
Keep the prompt and add a retry that resends the same request whenever the response fails to parse, up to three times for each file.
Catches failures after they happen and adds cost, without preventing them.
Failed responses are sent again, and most succeed on a second try, but each failure costs another call. A small share still fails three times and is dropped, and nothing about the request prevents the next malformed answer.
D · Why this does not meet the full requirement
Keep the prompt and lower the temperature to zero, so responses become more predictable and the JSON is less likely to contain mistakes.
Reduces randomness but does not enforce any structure.
Responses become more repeatable, but a repeatable mistake is still a mistake. Unescaped quotes and missing brackets depend on content, not randomness, so the failure rate drops a little at best.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative extraction tool with a forced call
{"tools": [{"name": "record_findings", "description": "Record security findings for one file.", "input_schema": {"type": "object", "properties": {"findings": {"type": "array", "items": {"type": "object", "properties": {"line": {"type": "integer"}, "severity": {"type": "string", "enum": ["low", "medium", "high", "critical"]}, "description": {"type": "string"}}, "required": ["line", "severity", "description"]}}}, "required": ["findings"]}}], "tool_choice": {"type": "tool", "name": "record_findings"}}Illustrative fragment of a Messages API request. The forced tool call returns findings as tool input matching the schema, so the application reads structured data instead of parsing free text.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
Asking for JSON in the prompt fails 3% of the time. What guarantees valid structure?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Structured output — the engineering ladder
Study: Structured output — the engineering ladder tool_use Forced tool extraction JSON Schema
Return to Foundations Mock Exam 3 · Q701's situation and clause-by-clause explanation
Answer
**A.** Tool use with a JSON schema is the most reliable way to get schema-compliant structured output, because the model fills tool input that matches the schema instead of writing free-form JSON text. Retrying catches failures after the fact and still depends on luck. Prefilling and lowering temperature make good JSON more likely but do not eliminate syntax errors.Q702. The CI job's test proposals are often rejected. Developers say about half duplicate scenarios that the existing test files already cover, and many others test trivial getters while ignoring the team's fixtures for fake platform stores. The job currently gives Claude only the changed source files. What change will most improve the test proposals? (Select ONE.) A) Add a post-processing step that removes any proposed test whose name matches the name of an existing test function in the repository. B) Move test generation to a larger model, keeping the same inputs, so it can infer the team's fixtures and coverage from the changed files alone. C) Ask the job to generate twice as many test proposals per pull request, and let developers choose the most useful ones from the larger list. D) Include each changed module's existing test files in context, and document valuable-test criteria and available fixtures in CLAUDE.md.
Understand Foundations Mock Exam 3 · Q702 · the situation and each part of the question
The real situation behind this question
Brightmoor's test suite is large and well organized, with shared fixtures that simulate each platform store. The CI job proposes tests for every change, but it never sees that suite. Developers keep rejecting tests that already exist under other names, and tests that check simple getters while the risky store paths stay untested. The job could be valuable if it knew what the team already has.
Read the question in parts
Part 1 · duplicate scenarios that the existing test files already cover
the model cannot see existing coverage, so it re-proposes what exists.
Part 2 · ignoring the team's fixtures for fake platform stores
project conventions are not reaching the model, which is what CLAUDE.md is for.
What you are being asked to decide
Generated tests duplicate existing ones and ignore team fixtures. What must the job provide? Tests providing existing tests in context and documenting test standards in CLAUDE.md for CI.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| CLAUDE.md | the repository file Claude Code reads in CI for project context, such as testing standards and fixtures |
| Context engineering | choosing what the CI job puts in front of Claude, here the existing test files |
Study: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory) CLAUDE.md Context engineering
Understand Foundations Mock Exam 3 · Q702's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Claude never sees existing tests or team conventions. Providing the existing test files in context and documenting test criteria and fixtures in CLAUDE.md fixes both duplication and low value. More output, name filters or bigger models cannot supply missing context.
Connect the design to the situation
Half of proposed tests already exist, and the fake-store fixtures go unused.
Best answer: D. Claude can avoid duplicates only if it sees the existing tests, and CLAUDE.md is how CI-invoked Claude Code gets project context such as what makes a test valuable and which fixtures exist. More proposals add review load without fixing quality. Name matching misses duplicates with different names, and a larger model cannot infer tests and fixtures it was never shown.
The decisive evidence in the stem
The job currently gives Claude only the changed source files
The existing tests and fixture conventions are missing from the input, so the fix is to provide them in context and in CLAUDE.md.
Official objective tested: Task 3.6 · Integrate Claude Code into CI/CD pipelines
What each choice would do here
A · Why this does not meet the full requirement
Add a post-processing step that removes any proposed test whose name matches the name of an existing test function in the repository.
Catches only same-named duplicates; most duplicates have different names.
Proposals named exactly like existing tests are removed, but duplicates usually have different names, such as test_refund_partial versus test_partial_refund. Most duplicates remain, and the getter tests and missing fixtures are untouched.
B · Why this does not meet the full requirement
Move test generation to a larger model, keeping the same inputs, so it can infer the team's fixtures and coverage from the changed files alone.
No model can infer test files and fixtures it was never given.
The larger model writes more polished tests, but it still never sees the existing suite or the fixtures. It cannot know what is already covered, so duplicates and fixture-less tests continue at a higher cost.
C · Why this does not meet the full requirement
Ask the job to generate twice as many test proposals per pull request, and let developers choose the most useful ones from the larger list.
More proposals from the same inputs mean more duplicates to reject.
Developers now receive twice as many proposals, still without knowledge of existing tests or fixtures. The proportion of duplicates stays about the same, so reviewers do twice the work to find a few useful tests.
D · Why this meets the requirement
Include each changed module's existing test files in context, and document valuable-test criteria and available fixtures in CLAUDE.md.
Shows Claude what is already covered and how the team writes valuable tests.
The job adds each changed module's test file to the prompt. CLAUDE.md gains a short section: test store failure paths with the fake-store fixtures, skip trivial accessors. Proposals now target uncovered branches and use the fixtures, and the rejection rate falls sharply.
Check your understanding · explain the design in your own words
Generated tests duplicate existing ones and ignore team fixtures. What must the job provide?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory)
Study: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory) CLAUDE.md Context engineering
Return to Foundations Mock Exam 3 · Q702's situation and clause-by-clause explanation
Answer
**D.** Claude can avoid duplicates only if it sees the existing tests, and CLAUDE.md is how CI-invoked Claude Code gets project context such as what makes a test valuable and which fixtures exist. More proposals add review load without fixing quality. Name matching misses duplicates with different names, and a larger model cannot infer tests and fixtures it was never shown.D3 · Prompting & Structured Output
Q703. The audit's finding schema makes cwe_id a required string. Security reviewers find that many findings for business-logic flaws, which have no clear CWE mapping, carry CWE numbers that do not fit, such as CWE-79 on a rounding error. The dashboard groups findings by cwe_id. What schema change best addresses this? (Select ONE.) A) Keep cwe_id required and add a validation step that rejects any CWE number outside a list of the twenty most common web weaknesses. B) Make cwe_id nullable so it can be null when no CWE applies, and add a category enum that includes "other" with a detail string for unmapped flaws. C) Remove cwe_id from the schema entirely and ask reviewers to assign CWE numbers by hand to every finding on the dashboard each morning instead. D) Keep cwe_id required and add an instruction telling the model to choose the closest matching CWE number whenever no exact mapping exists for a finding.
Understand Foundations Mock Exam 3 · Q703 · the situation and each part of the question
The real situation behind this question
Brightmoor's security team uses the audit dashboard grouped by CWE to plan fixes. Many of the most serious findings in a game backend are business-logic flaws: rounding, duplicate item grants, race conditions in currency balances. These rarely map cleanly to a CWE, yet the schema demands one. The model obliges with numbers that look official and mean nothing, and the dashboard groups a rounding bug with cross-site scripting.
Read the question in parts
Part 1 · makes cwe_id a required string
the schema requires a value even when the honest answer is that none applies.
Part 2 · The dashboard groups findings by cwe_id
fabricated values are not harmless, because they mis-sort findings for the security team.
What you are being asked to decide
A required field forces made-up values when nothing fits. How should the schema change? Tests nullable fields and other-plus-detail enums to prevent fabricated values.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Nullable field | a schema field that may be null, so the model can say no CWE applies instead of inventing one |
| Other plus detail | an enum value such as other paired with a free-text field that describes the unmapped flaw |
Study: Schema design details that prevent hallucination (tested by name) Schema missing values Closed schema
Understand Foundations Mock Exam 3 · Q703's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Some findings genuinely have no CWE, yet the schema requires one. Making the field nullable and adding an other-plus-detail category lets the model answer honestly. Closest-match rules, allowlists or removing the field keep fabrication or lose value.
Connect the design to the situation
CWE-79 attached to a rounding bug because cwe_id is required.
Best answer: B. A required field forces the model to supply a value even when the source has none, which invites fabrication; a nullable field plus an "other" category with detail lets it state honestly that no CWE applies. Closest-match instructions institutionalize the bad guesses. A top-twenty allowlist still forces a number onto unmapped flaws, and removing the field loses real mappings and shifts all the work to people.
The decisive evidence in the stem
which have no clear CWE mapping
The information does not exist for these findings, so a required field forces the model to invent a value, which a nullable design avoids.
Official objective tested: Task 4.3 · Enforce structured output using tool use and JSON schemas
What each choice would do here
A · Why this does not meet the full requirement
Keep cwe_id required and add a validation step that rejects any CWE number outside a list of the twenty most common web weaknesses.
Still forces a number onto flaws that have no fitting CWE.
Findings with rare CWE numbers are rejected and retried. The model then picks one of the twenty allowed numbers, which fits a logic flaw even less, so fabrication moves into the allowlist rather than disappearing.
B · Why this meets the requirement
Make cwe_id nullable so it can be null when no CWE applies, and add a category enum that includes "other" with a detail string for unmapped flaws.
Lets the model state that no CWE applies and still classify the flaw usefully.
cwe_id becomes string or null, and a new category enum includes injection, auth, logic and other, with a category_detail string. A rounding bug arrives as cwe_id null, category logic, with a detail note. The dashboard shows it under logic instead of beside cross-site scripting.
C · Why this does not meet the full requirement
Remove cwe_id from the schema entirely and ask reviewers to assign CWE numbers by hand to every finding on the dashboard each morning instead.
Throws away valid mappings and adds daily manual work.
The audit no longer records any CWE, including the many correct ones for injection and auth findings. Reviewers must classify every finding by hand each morning, which is slower and loses information the model could provide well.
D · Why this does not meet the full requirement
Keep cwe_id required and add an instruction telling the model to choose the closest matching CWE number whenever no exact mapping exists for a finding.
Tells the model to keep guessing, which is the current problem.
The model now picks the nearest CWE on purpose. Rounding bugs get numbers for numeric errors that may be loosely related, others get worse matches, and the dashboard still mixes unrelated flaws under official-looking codes.
Check your understanding · explain the design in your own words
A required field forces made-up values when nothing fits. How should the schema change?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Schema design details that prevent hallucination (tested by name)
Study: Schema design details that prevent hallucination (tested by name) Schema missing values Closed schema
Return to Foundations Mock Exam 3 · Q703's situation and clause-by-clause explanation
Answer
**B.** A required field forces the model to supply a value even when the source has none, which invites fabrication; a nullable field plus an "other" category with detail lets it state honestly that no CWE applies. Closest-match instructions institutionalize the bad guesses. A top-twenty allowlist still forces a number onto unmapped flaws, and removing the field loses real mappings and shifts all the work to people.D3 · Prompting & Structured Output
Q704. Brightmoor records when developers dismiss a finding, but the record holds only the comment text. When the team tries to analyze last month's 31% dismissal rate, it cannot tell which code constructs keep producing dismissed findings, because the same issue is worded many different ways. What change best enables this analysis? (Select ONE.) A) Track the overall dismissal rate per week on a dashboard, so the team can see whether its prompt changes are reducing dismissals. B) Add a confidence field to each finding and compare the average confidence of dismissed findings with the average of accepted ones. C) Ask developers to type a short free-text reason every time they dismiss a finding, and store those reasons next to the original comment text in the log. D) Add a detected_pattern field to each structured finding that names the code construct that triggered it, and record that field with every dismissal.
Understand Foundations Mock Exam 3 · Q704 · the situation and each part of the question
The real situation behind this question
The team knows that more than a third of the bot's findings are dismissed and wants to fix the worst offenders first. But each dismissal record contains only the comment text, and the model describes the same kind of issue in dozens of ways. An engineer spent a day reading dismissed comments by hand and still could not say which patterns dominate. The team needs data it can group.
Read the question in parts
Part 1 · the record holds only the comment text
the current data has no structured field that identifies what triggered each finding.
Part 2 · which code constructs keep producing dismissed findings
the analysis needs every finding grouped by the code construct that triggered it.
What you are being asked to decide
Dismissal records cannot be grouped. What field makes the false-positive patterns visible? Tests adding detected_pattern fields to findings for dismissal analysis.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| detected_pattern | a structured field naming the construct that triggered a finding, such as broad-except or n-plus-one-query |
| Dismissal analysis | grouping dismissed findings by cause so the team can fix the criteria that produce noise |
Study: Validation, retry, and feedback loops: when a retry can fix it Feedback loop architecture Observability tooling
Understand Foundations Mock Exam 3 · Q704's answer · full reasoning and worked examples
Claude synthesized · the point, straight
The team cannot group dismissals because findings carry only free text. A detected_pattern field gives each finding a stable label to analyze. Free-text reasons, confidence averages and overall rates cannot show where the false positives come from.
Connect the design to the situation
A 31% dismissal rate nobody can break down by cause.
Best answer: D. A detected_pattern field gives every finding a stable label for the construct that triggered it, so dismissals can be grouped and the patterns behind false positives found. Free-text reasons from developers are inconsistent and add friction. Average confidence does not say which constructs cause noise, and a weekly overall rate shows whether things change, not where the problem is.
The decisive evidence in the stem
the same issue is worded many different ways
Free text cannot be grouped reliably, so each finding needs a structured field that names the triggering pattern for systematic analysis.
Official objective tested: Task 4.4 · Implement validation, retry, and feedback loops for extraction quality
What each choice would do here
A · Why this does not meet the full requirement
Track the overall dismissal rate per week on a dashboard, so the team can see whether its prompt changes are reducing dismissals.
Tracks the trend but cannot point to the cause.
The weekly chart shows dismissals falling or rising after each prompt change. It helps confirm progress but cannot tell the team which patterns are responsible, so each change remains a guess.
B · Why this does not meet the full requirement
Add a confidence field to each finding and compare the average confidence of dismissed findings with the average of accepted ones.
Shows whether confidence differs, not which constructs cause the noise.
Dismissed findings turn out to have slightly lower average confidence. That says little about which constructs produce noise, and because confidence is not calibrated, it does not point to any specific criteria to fix.
C · Why this does not meet the full requirement
Ask developers to type a short free-text reason every time they dismiss a finding, and store those reasons next to the original comment text in the log.
Free text is inconsistent and adds work for every developer on every dismissal.
Developers write reasons like not relevant, wrong, or nothing at all. The reasons vary as much as the comments did, many dismissals have none, and developers resent the extra step. The team still cannot group findings by construct.
D · Why this meets the requirement
Add a detected_pattern field to each structured finding that names the code construct that triggered it, and record that field with every dismissal.
Gives each finding a groupable label, so noisy patterns stand out in the dismissal data.
Each finding now includes detected_pattern, for example broad-except-at-boundary or unparameterized-query. Dismissals are logged with it. A simple query shows that two patterns account for half of all dismissals, so the team rewrites the criteria for those two first.
Check your understanding · explain the design in your own words
Dismissal records cannot be grouped. What field makes the false-positive patterns visible?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Validation, retry, and feedback loops: when a retry can fix it
Study: Validation, retry, and feedback loops: when a retry can fix it Feedback loop architecture Observability tooling
Return to Foundations Mock Exam 3 · Q704's situation and clause-by-clause explanation
Answer
**D.** A detected_pattern field gives every finding a stable label for the construct that triggered it, so dismissals can be grouped and the patterns behind false positives found. Free-text reasons from developers are inconsistent and add friction. Average confidence does not say which constructs cause noise, and a weekly overall rate shows whether things change, not where the problem is.Q705. When a developer pushes new commits to an open pull request, the CI job re-runs claude -p on the full diff. Developers complain that it re-posts comments they already fixed and repeats open findings in new wording, so one pull request collected 19 near-duplicate comments. What change should the team make to the re-run? (Select ONE.) A) Delete all of the bot's earlier comments on the pull request before each re-run, then post the complete new set of findings. B) Pass the earlier findings into the re-run's context and ask Claude to report only new or still-unaddressed issues. C) Review only the newest commit's diff on re-runs, so Claude sees just the latest changes and cannot comment on older code at all. D) Have the posting script skip any new comment whose text exactly matches an earlier comment, so identical duplicates are never posted twice.
Understand Foundations Mock Exam 3 · Q705 · the situation and each part of the question
The real situation behind this question
Developers at Brightmoor push fixes in response to the bot's comments, then watch the bot comment on the same issues again, sometimes after they were fixed. One active pull request ended up with nineteen comments that said roughly the same things. Developers began muting the bot entirely. The team needs re-reviews to behave like a colleague who remembers the last round of feedback.
Read the question in parts
Part 1 · re-posts comments they already fixed
the re-run cannot tell fixed issues from open ones because it has no memory of earlier findings.
Part 2 · re-runs claude -p on the full diff
each run is a fresh non-interactive invocation with no earlier context unless the job provides it.
What you are being asked to decide
Each re-review repeats old comments. What should the re-run know? Tests including prior findings in context so re-reviews report only new or unresolved issues.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| claude -p | Claude Code's non-interactive print mode, which the CI job uses to run each review |
| Prior findings | the earlier review's structured results, passed into the re-run so Claude can compare against them |
Study: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory) Headless CI team enforcement
Understand Foundations Mock Exam 3 · Q705's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Each re-run is a fresh invocation that knows nothing about earlier findings, and duplicates are reworded. Passing prior findings into context and asking only for new or unaddressed issues prevents them. Text matching, narrower diffs and deleting history do not.
Connect the design to the situation
19 near-duplicate comments on one pull request after several pushes.
Best answer: B. Including prior findings in the re-run's context lets Claude compare them with the new diff and report only new or still-unaddressed issues, avoiding duplicates. Exact-text matching misses duplicates written in new wording. Reviewing only the newest commit misses interactions with earlier changes and cannot confirm fixes, and deleting old comments loses the discussion threads attached to them.
The decisive evidence in the stem
repeats open findings in new wording
The duplicates are semantic, not textual, so the model itself must know the earlier findings to avoid restating them.
Official objective tested: Task 3.6 · Integrate Claude Code into CI/CD pipelines
What each choice would do here
A · Why this does not meet the full requirement
Delete all of the bot's earlier comments on the pull request before each re-run, then post the complete new set of findings.
Destroys developer replies and discussion attached to the old comments.
Old comments disappear along with developers' replies and the reasoning in those threads. The new set still repeats unresolved issues in new wording, and reviewers lose the history of what was discussed.
B · Why this meets the requirement
Pass the earlier findings into the re-run's context and ask Claude to report only new or still-unaddressed issues.
Lets Claude recognize what it already said and what is now fixed.
The job stores the last review's JSON findings and passes them into the next claude -p run with an instruction to compare. Claude marks the fixed findings as resolved, skips those still being discussed unless they worsened, and posts only genuinely new issues.
C · Why this does not meet the full requirement
Review only the newest commit's diff on re-runs, so Claude sees just the latest changes and cannot comment on older code at all.
Misses cross-commit issues and cannot tell which old findings are fixed.
The re-run sees only the latest commit, so it cannot notice that a new change breaks something introduced earlier in the pull request. It also cannot confirm that earlier findings were addressed, so developers lose that feedback.
D · Why this does not meet the full requirement
Have the posting script skip any new comment whose text exactly matches an earlier comment, so identical duplicates are never posted twice.
Misses the duplicates that are written differently.
Exactly identical comments are skipped, but Claude rarely words the same finding identically twice. Most duplicates still appear, and fixed issues can still be re-reported in new words because the model never learned they were fixed.
Check your understanding · explain the design in your own words
Each re-review repeats old comments. What should the re-run know?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory)
Study: Claude Code in CI/CD (scenario 5 — CI/CD automation — territory) Headless CI team enforcement
Return to Foundations Mock Exam 3 · Q705's situation and clause-by-clause explanation
Answer
**B.** Including prior findings in the re-run's context lets Claude compare them with the new diff and report only new or still-unaddressed issues, avoiding duplicates. Exact-text matching misses duplicates written in new wording. Reviewing only the newest commit misses interactions with earlier changes and cannot confirm fixes, and deleting old comments loses the discussion threads attached to them.D3 · Prompting & Structured Output
Q706. The review job already uses --json-schema with fields for file, line, severity, issue and suggested_fix, and every response parses. But the text inside those fields varies widely: some issues read "consider refactoring this," some suggested fixes are empty strings, and others are full paragraphs. Detailed prose instructions about writing style are already in the prompt. What change will most improve consistency? (Select ONE.) A) Add minLength constraints to the issue and suggested_fix fields in the JSON schema, so short or empty values are rejected during validation. B) Add two to four example findings to the prompt showing a specific issue, its impact and a concrete fix in the desired style. C) Raise the model's temperature setting slightly, so the wording of findings becomes more varied and less repetitive across pull requests. D) Add more detailed prose instructions describing how long each field should be, which words to avoid, and what a concrete suggested fix means.
Understand Foundations Mock Exam 3 · Q706 · the situation and each part of the question
The real situation behind this question
Brightmoor's posting script works perfectly now that the review returns valid JSON. The trouble is what developers read. One comment says consider refactoring this, with no reason. Another has a blank suggested fix. A third is a whole essay. The team wrote paragraphs of style guidance, and still the quality of each comment depends on luck. Developers want every comment to say what is wrong, why it matters, and what to change.
Read the question in parts
Part 1 · every response parses
the structure is solved; the remaining problem is the quality and consistency of the content.
Part 2 · some suggested fixes are empty strings
the model does not reliably know what a complete, actionable fix looks like.
What you are being asked to decide
The JSON is valid but the text in it varies wildly. How do you make findings consistent? Tests few-shot examples for consistent, actionable output when instructions are not enough.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| Few-shot examples | a few complete sample findings in the prompt that show the exact style of issue and fix wanted |
| Schema versus content | the schema guarantees the fields exist; it does not make the text inside them useful |
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Prompt versus schema
Understand Foundations Mock Exam 3 · Q706's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Structure is already enforced, but prose instructions leave the content inconsistent. Two to four example findings show the exact style of an actionable comment. More prose, length limits or higher temperature do not teach what good looks like.
Connect the design to the situation
Valid JSON findings with vague issues and empty or bloated fixes.
Best answer: B. When detailed instructions alone still produce inconsistent output, a few targeted examples are the most effective way to show exactly what an actionable finding looks like. More prose repeats what has already failed. Schema length limits block empty strings but not vague or rambling text, and a higher temperature increases variation rather than reducing it.
The decisive evidence in the stem
Detailed prose instructions about writing style are already in the prompt
Instructions have already been tried and output is still inconsistent, which is the signal that few-shot examples are needed.
Official objective tested: Task 4.2 · Apply few-shot prompting to improve output consistency and quality
What each choice would do here
A · Why this does not meet the full requirement
Add minLength constraints to the issue and suggested_fix fields in the JSON schema, so short or empty values are rejected during validation.
Blocks empty fields but accepts vague or rambling text of any length.
Empty suggested fixes now fail validation, so the model writes something, often a generic sentence like review this code. The schema accepts it because it meets the length rule, so vague findings remain and some runs need retries.
B · Why this meets the requirement
Add two to four example findings to the prompt showing a specific issue, its impact and a concrete fix in the desired style.
Shows concretely what a good finding looks like, which instructions alone could not convey.
The prompt now contains three findings: one bug, one security issue, one performance issue, each with a specific issue sentence, its impact, and a fix showing the changed code. The model follows those examples, and comments become consistently specific and actionable.
C · Why this does not meet the full requirement
Raise the model's temperature setting slightly, so the wording of findings becomes more varied and less repetitive across pull requests.
Increases variation, which is the opposite of the goal.
Wording varies more between runs, so findings become even less predictable. Temperature affects randomness of word choice, not the model's understanding of what an actionable finding is, so the core problem gets worse.
D · Why this does not meet the full requirement
Add more detailed prose instructions describing how long each field should be, which words to avoid, and what a concrete suggested fix means.
Repeats the approach that already produced inconsistent text.
The style section grows longer, and some findings improve, but prose describing good comments is interpreted differently from run to run. The variation in quality continues because the model still has not seen what a good finding actually looks like.
Walk through complete payloads or code · every step explained
Illustrative examples, not recorded live calls. Check each block's direction and endpoint: API requests, API responses, MCP messages, and configuration files are different contracts.
Illustrative few-shot finding in the review prompt
{"file": "store/refund.py", "line": 88, "severity": "high", "issue": "refund_amount is compared to the original charge in dollars, but charges are stored in cents, so refunds up to 100 times the charge pass the check.", "suggested_fix": "Compare cents to cents: if refund_cents > charge.amount_cents: raise RefundTooLarge()"}Illustrative example placed in the prompt. It demonstrates the expected specificity: the issue names the defect and its impact, and the fix shows the concrete change.
Which omitted settings use defaults or leave features unconfigured?
Check your understanding · explain the design in your own words
The JSON is valid but the text in it varies wildly. How do you make findings consistent?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Few-shot examples for ambiguous cases and varied documents
Study: Few-shot examples for ambiguous cases and varied documents Few-shot Prompt versus schema
Return to Foundations Mock Exam 3 · Q706's situation and clause-by-clause explanation
Answer
**B.** When detailed instructions alone still produce inconsistent output, a few targeted examples are the most effective way to show exactly what an actionable finding looks like. More prose repeats what has already failed. Schema length limits block empty strings but not vague or rambling text, and a higher temperature increases variation rather than reducing it.D3 · Prompting & Structured Output
Q707. Dismissal data by category shows that security findings are accepted 88% of the time, while documentation-accuracy findings are dismissed 74% of the time. Developers now skim past every bot comment, including security ones. The team needs time to rewrite the documentation criteria. What should it do right now? (Select ONE.) A) Keep every category on and add a note to each documentation-accuracy comment saying that this category is still experimental and may safely be ignored. B) Turn off the documentation-accuracy category for now, keep security and other trusted categories on, and re-enable it once its criteria are fixed. C) Turn off all bot comments until the documentation criteria are rewritten, so developers are not exposed to any noisy findings during the change. D) Keep every category on and lower the number of documentation findings to one per pull request, so their noise has much less effect on developer trust.
Understand Foundations Mock Exam 3 · Q707 · the situation and each part of the question
The real situation behind this question
Brightmoor's security findings are genuinely good: developers fix almost nine in ten of them. But the bot also comments heavily on whether docstrings match the code, and most of those comments are wrong. Developers have learned that bot comments are usually noise, so they now scroll past the security findings too. Rewriting the documentation criteria properly will take a few weeks of testing.
Read the question in parts
Part 1 · security findings are accepted 88% of the time
at least one category is valuable and should keep running.
Part 2 · The team needs time to rewrite the documentation criteria
the permanent fix is not ready, so a temporary measure is needed now.
What you are being asked to decide
One noisy category makes developers ignore all comments. What do you do while you fix it? Tests temporarily disabling a high false-positive category to restore trust.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| False positive rate | the share of a category's findings that developers dismiss as wrong or useless |
| Developer trust | whether developers still read bot comments, which noise in one category erodes for all |
Study: Explicit criteria: say what to report and what to skip Evaluation metrics Feedback loop architecture
Understand Foundations Mock Exam 3 · Q707's answer · full reasoning and worked examples
Claude synthesized · the point, straight
One category's false positives are destroying trust in an accurate category. Disable that category temporarily, keep the trusted ones, and re-enable it after its criteria are fixed. Labels, caps or a full shutdown either keep the noise or lose the value.
Connect the design to the situation
88% accepted security findings drowned out by 74% dismissed doc comments.
Best answer: B. High false-positive categories undermine trust in accurate ones, so temporarily disabling the noisy category restores trust while its criteria are improved, and the valuable security findings keep flowing. An experimental label still trains developers to skim. Turning everything off throws away the accepted security findings, and one noisy comment per pull request still erodes trust.
The decisive evidence in the stem
Developers now skim past every bot comment, including security ones
One noisy category is damaging trust in an accurate one, which is the case for temporarily disabling just that category.
Official objective tested: Task 4.1 · Design prompts with explicit criteria to improve precision and reduce false positives
What each choice would do here
A · Why this does not meet the full requirement
Keep every category on and add a note to each documentation-accuracy comment saying that this category is still experimental and may safely be ignored.
Labelled noise is still noise, and it still teaches developers to skim.
Documentation comments keep appearing with an extra line saying they may be ignored. Developers ignore them, and the habit of ignoring bot comments in general continues. Security findings still compete for attention with a stream of labelled noise.
B · Why this meets the requirement
Turn off the documentation-accuracy category for now, keep security and other trusted categories on, and re-enable it once its criteria are fixed.
Stops the trust damage at its source while keeping the valuable categories working.
The review prompt stops producing documentation-accuracy findings. Pull requests now get mostly security and logic comments, which developers usually accept, so they start reading the bot again. Meanwhile the team rewrites the documentation criteria, tests them on past pull requests, and turns the category back on when it performs.
C · Why this does not meet the full requirement
Turn off all bot comments until the documentation criteria are rewritten, so developers are not exposed to any noisy findings during the change.
Sacrifices accurate security findings to fix one bad category.
No bot comments appear for weeks. The noise is gone, but so are the security findings developers were fixing nine times in ten. Real vulnerabilities may merge during the pause, which is a much worse outcome than noisy documentation comments.
D · Why this does not meet the full requirement
Keep every category on and lower the number of documentation findings to one per pull request, so their noise has much less effect on developer trust.
Reduces the noise but keeps a stream of mostly wrong comments.
Each pull request shows at most one documentation comment, which is still wrong about three times in four. The volume of noise falls, but developers keep seeing bad comments from the bot and keep skimming.
Check your understanding · explain the design in your own words
One noisy category makes developers ignore all comments. What do you do while you fix it?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Explicit criteria: say what to report and what to skip
Study: Explicit criteria: say what to report and what to skip Evaluation metrics Feedback loop architecture
Return to Foundations Mock Exam 3 · Q707's situation and clause-by-clause explanation
Answer
**B.** High false-positive categories undermine trust in accurate ones, so temporarily disabling the noisy category restores trust while its criteria are improved, and the valuable security findings keep flowing. An experimental label still trains developers to skim. Turning everything off throws away the accepted security findings, and one noisy comment per pull request still erodes trust.D3 · Prompting & Structured Output
Q708. The nightly security audit now submits about 2,000 per-file requests through the Message Batches API. Last night 37 requests failed: 29 exceeded the context limit because they were large generated files, and 8 hit transient server errors. The current script resubmits the whole batch whenever any request fails. What should the script do instead? (Select ONE.) A) Move the 37 failed files to synchronous Messages API calls with the same prompts, so they complete immediately without another batch. B) Use each result's custom_id to resubmit only the 37 failed requests, splitting the 29 oversized files into chunks and resending the 8 transient failures unchanged. C) Resubmit the whole batch of about 2,000 requests again, so the results from both runs can be compared and the most complete one kept. D) Resubmit only the 37 failed requests exactly as they were, since retrying them unchanged usually succeeds on a second batch run.
Understand Foundations Mock Exam 3 · Q708 · the situation and each part of the question
The real situation behind this question
Brightmoor moved its nightly audit to batch processing because nobody needs results until morning. The move worked, except for the failure handling: one failed request triggers a complete resubmission, doubling cost and sometimes pushing results past the morning review. Most failures come from huge generated files, with a handful of transient errors. The team wants each failure handled precisely, with no repeated work.
Read the question in parts
Part 1 · 8 hit transient server errors
these requests were fine and can be resent as they are.
Part 2 · resubmits the whole batch whenever any request fails
the current approach repeats successful work instead of targeting failures.
What you are being asked to decide
A few batch requests failed for different reasons. What should be resubmitted, and how? Tests resubmitting only failed batch items by custom_id, with fixes matched to the failure.
Keep all the stated requirements in view. An option may be useful elsewhere while addressing only part of this situation.
Words and related concepts · open glossary explanations
| Term | Meaning here |
|---|---|
| custom_id | the identifier the script sets on each batch request and uses to match each result to its file |
| Chunking | splitting a large generated file into smaller pieces so each request fits the context limit |
Study: Message Batches API — the cost/latency lever (tested by contract) Batch API Batch workflow Chunking strategy
Understand Foundations Mock Exam 3 · Q708's answer · full reasoning and worked examples
Claude synthesized · the point, straight
Only 37 of about 2,000 requests failed, for two different reasons. Use custom_id to resubmit just those, chunking the oversized ones and retrying the transient ones unchanged. Whole-batch resubmission, unchanged resends or switching APIs either waste work or repeat the failure.
Connect the design to the situation
37 failures out of 2,000: oversized files and transient errors.
Best answer: B. custom_id lets the script match results to requests, so only failed items are resubmitted, each with the fix its failure needs: chunking for context overflows and a plain retry for transient errors. Resending oversized requests unchanged fails again. Resubmitting the whole batch repeats about 1,960 successful requests, and switching to synchronous calls with the same oversized prompts still overflows.
The decisive evidence in the stem
29 exceeded the context limit because they were large generated files
These failures need a modification, chunking, before resubmission, while transient failures can simply be retried, and only failed items need resending.
Official objective tested: Task 4.5 · Design efficient batch processing strategies
What each choice would do here
A · Why this does not meet the full requirement
Move the 37 failed files to synchronous Messages API calls with the same prompts, so they complete immediately without another batch.
Changes the API but not the oversized prompts, so they still fail.
The 37 files run immediately through the synchronous API. The 8 transient failures succeed, but the 29 oversized prompts still exceed the context limit there too, because the API path does not change how much text a request holds.
B · Why this meets the requirement
Use each result's custom_id to resubmit only the 37 failed requests, splitting the 29 oversized files into chunks and resending the 8 transient failures unchanged.
Resends only what failed, each with the change its failure type needs.
The script reads results, collects the 37 failed custom_ids, splits each of the 29 large files into chunks with new custom_ids such as file-12-part-2, and resends those with the 8 transient failures as a small batch. Results merge by custom_id, and the rest of the night's results stand.
C · Why this does not meet the full requirement
Resubmit the whole batch of about 2,000 requests again, so the results from both runs can be compared and the most complete one kept.
Repeats nearly 2,000 successful requests for no benefit.
Almost 2,000 requests that already succeeded are processed again, doubling the night's cost and time. The 29 oversized requests still fail in the second run, so the comparison gains nothing and results arrive later.
D · Why this does not meet the full requirement
Resubmit only the 37 failed requests exactly as they were, since retrying them unchanged usually succeeds on a second batch run.
Oversized requests resent unchanged will exceed the limit again.
The 8 transient failures probably succeed on the second run, but the 29 oversized requests are still too large and fail again. The script may loop, and the security team gets no findings for the largest generated files.
Check your understanding · explain the design in your own words
A few batch requests failed for different reasons. What should be resubmitted, and how?
Describe the situation, identify the controlling requirement, and explain what the chosen design does before and after the critical step. Then choose one alternative and explain which part of this situation it fails to address. Use the example rather than memorizing the answer letter.
Study: Message Batches API — the cost/latency lever (tested by contract)
Study: Message Batches API — the cost/latency lever (tested by contract) Batch API Batch workflow Chunking strategy
Return to Foundations Mock Exam 3 · Q708's situation and clause-by-clause explanation