Anthropic CCA-F (Claude Certified Architect - Foundations (CCAR-F)) Practice Test 37

Question 360

A hook script itself crashes during a mandatory policy check. What production behavior is safest?

  1. Check protected-path checks in a pre-tool permission handler
  2. Conduct a PostToolUse handler after successful file-edit tools
  3. Read result payload semantics in a post-tool validation hook
  4. Fail closed or suspend the protected action according to explicit policy

Explanation

Correct Answer

D:

When the decision service is unavailable, a high-risk action should not silently proceed. The policy needs a defined error path and observable failure state.

Incorrect Answers

A:

A programmatic check can compare the requested path to restricted locations before access occurs; this contributes to denying sensitive file reads before access without meeting the need for handling a failed mandatory policy check.

B:

A post-tool callback can inspect the completed edit and trigger formatting or verification in response; that serves reacting to a completed editing tool, whereas the case requires handling a failed mandatory policy check.

C:

Because transport success does not necessarily mean business success, the measure supports detecting business failure despite transport success rather than the needed handling a failed mandatory policy check.

Question 361

A refactor repeatedly fails with the same stack trace, and the agent proposes the same edit each time. What workflow change helps?

  1. Decouple reproducible regressions from known nondeterministic failures
  2. Include a focused regression test that reproduces the bug before or with the fix
  3. Implement the failing edge case to tests and implement the smallest correction
  4. Analyze the root cause before attempting another identical patch

Explanation

Correct Answer

D:

Repeated unmodified retries do not add evidence. Inspecting the failure path, inputs and assumptions can reveal the missing dependency or incorrect hypothesis.

Incorrect Answers

A:

A single intermittent result is weak evidence; this may support interpreting flaky test signals correctly but cannot alone meet the requirement for escaping a repetitive unsuccessful repair loop.

B:

A targeted test captures the desired behavior and guards against future regressions; the stated problem requires escaping a repetitive unsuccessful repair loop rather than establishing a regression test for a repaired defect.

C:

Treating review feedback as a concrete test turns a discovered omission into durable coverage; a method suited to incorporating edge-case feedback into tests does not meet the need for escaping a repetitive unsuccessful repair loop.

Question 362

A batch processor changes its output schema version without warning and downstream parsers fail. What governance step is useful?

  1. Confirm tenant authorization and business references against the system of record
  2. Version the result contract and test consumers before deploying schema changes
  3. Supplement schema validity with independent source-backed checks
  4. Tag required properties and disallow additional properties in the output schema

Explanation

Correct Answer

B:

Structured outputs create a stable interface that downstream systems depend upon. Even valid new JSON can be incompatible with older consumer expectations.

Incorrect Answers

A:

JSON types and patterns cannot establish whether an identifier is authorized for the caller; that relates to validating authorization beyond JSON shape, not the necessary managing downstream compatibility of structured outputs.

C:

A schema constrains representation, not factual truth; the deciding condition is managing downstream compatibility of structured outputs, whereas this action concerns distinguishing schema conformance from factual accuracy.

D:

Required fields and closed object shapes prevent silently missing or invented keys; the option would serve forbidding missing and unexpected JSON fields, not managing downstream compatibility of structured outputs as specified in the stem.

Question 363

A worker attempts a tool invocation not included in its declared permissions. How should the runtime react?

  1. Permit a privileged diagnostics component inspect logs and return sanitized findings
  2. Reject the unauthorized call and report a permission denial to orchestration
  3. Drop the email-sending tool while keeping read and draft capabilities
  4. Furnish the coordinator lookup access and confine refund mutations to the authorized specialist

Explanation

Correct Answer

B:

A capability boundary must be enforced at execution time. Silently granting the requested tool would defeat the separation established in agent configuration.

Incorrect Answers

A:

Dedicated diagnostics isolates sensitive infrastructure data while providing actionable summaries; in this scenario, segregating diagnostic access from regular agents is secondary to enforcing a denied capability at runtime.

C:

When addressing separating drafting from outbound delivery permissions, tool distribution should distinguish generating a proposed communication from transmitting it; the present task instead calls for enforcing a denied capability at runtime.

D:

Partitioning capabilities prevents the orchestration role from bypassing specialist approval; isolating privileged refund capability and enforcing a denied capability at runtime require different controls in this situation.

Question 364

One conditional rule imposes Python formatting on TypeScript changes. What editorial fix restores clarity?

  1. Publish Python formatting requirements in the always-loaded shared instruction file without excluding TypeScript paths
  2. Correct overlapping conditions and specify one unambiguous policy
  3. Employ a recursive path pattern matching Terraform files across modules
  4. Focus on tightening the rule's paths glob to target only migration files
  5. Split language-specific guidance into separate path-targeted rule files

Explanation

Correct Answer

E:

Distinct rules with distinct globs avoid contradictory language conventions. A mixed rule creates noise and can lead the agent to select the wrong formatter.

Incorrect Answers

A:

Global instructions would continue forcing Python formatting guidance onto unrelated TypeScript edits. Scope the rule to Python files or directories with a correct path selector.

B:

Conflicting active instructions can make outcomes nondeterministic; the action supports preventing contradictory conditional instructions but falls short of separating language-specific rules in this case.

C:

Recursive globs represent a class of files regardless of module depth; this can serve covering nested infrastructure files consistently, but leaves the requirement for separating language-specific rules unmet.

D:

A narrower glob controls the rule's applicability; that addresses narrowing a conditional rule's file scope, whereas this case calls for separating language-specific rules.

Question 365

A coding task requires discovery, design and editing, and editing before discovery often breaks tests. What plan is preferable?

  1. Focus on grouping closely related low-cost tasks into a meaningful worker assignment
  2. Require data normalization before downstream analysis
  3. Sequence exploration, plan approval and implementation as dependent tasks
  4. Include concurrency limits and a work queue to the task scheduler

Explanation

Correct Answer

C:

Staging the work lets decisions use verified repository context. Premature mutation can amplify incorrect assumptions and complicate rollback.

Incorrect Answers

A:

Because excessive decomposition multiplies setup and context cost, the measure supports avoiding overfragmentation of delegated work rather than the needed decomposing dependent coding stages.

B:

The task graph must express actual data dependencies; its benefits for reflecting real data dependencies in the task graph do not resolve the need for decomposing dependent coding stages.

D:

Capacity-aware scheduling controls rate limits and tool contention; this contributes to scheduling within available execution capacity without meeting the need for decomposing dependent coding stages.

Question 366

A scheduled batch runs near account rate limits and many tasks remain queued. What operational design helps?

  1. Assign a unique custom_id to every request and match returned results by that identifier
  2. Monitor pending request limits and pace submissions by available capacity
  3. Retain outcomes by input ID and create a retry queue from non-success statuses
  4. Dispatch independent requests through the asynchronous Message Batches API

Explanation

Correct Answer

B:

Batch queues remain subject to provider limits and account constraints. Capacity-aware scheduling reduces unexpected expiration or throttling.

Incorrect Answers

A:

Batch completion order is not guaranteed; a method suited to correlating out-of-order batch results does not meet the need for respecting throughput limits when batching.

C:

Structured reconciliation lets teams preserve successful results and focus intervention on failures; that may serve constructing targeted post-batch retries, but it is no substitute for respecting throughput limits when batching.

D:

Batch processing targets high-volume work without low-latency requirements and can reduce cost; this may support selecting asynchronous processing for independent bulk work but cannot alone meet the requirement for respecting throughput limits when batching.

Question 367

A controller loses its in-memory state when a worker restarts. What architecture makes agent state resilient?

  1. Branch the existing session into an isolated alternative branch
  2. Audit the persisted operation ID against the payment system before retrying
  3. Record message order and essential tool-result linkage along with session metadata
  4. Save checkpoint or session data in durable storage outside the worker process
  5. Log and compare policy versions before accepting the fork's recommendation

Explanation

Correct Answer

D:

External persistence allows another process to resume execution after a crash. Solely in-memory histories vanish with the worker and break workflow continuity.

Incorrect Answers

A:

Forking supports experimentation from a shared starting point while separating subsequent messages; the deciding condition is surviving worker restarts with durable sessions, whereas this action concerns branching session state without overwriting the original.

B:

A durable transcript does not guarantee whether the external effect committed; the option would serve reconciling external actions after session interruption, not surviving worker restarts with durable sessions as specified in the stem.

C:

Resumable state includes structured execution history, not merely the final natural-language summary; this addresses checkpointing structured agent progress, while the question is about surviving worker restarts with durable sessions.

E:

Although a session branch can retain a different configuration snapshot, the choice addresses detecting configuration drift across forks and not the requested surviving worker restarts with durable sessions.

Question 368

A refactor must identify all relevant matches before changes, and inspection of existing files may not use a shell. Which TWO built-in-tool workflow choices satisfy these limits? Choose TWO.

  1. Inspect each existing source file with Read rather than shell-based cat commands
  2. Use Glob alone to locate every occurrence of a function name inside file contents
  3. Use Bash to print all source files and search their contents before editing
  4. Grep for content references, Read each affected file, then make reviewed Edit operations

Explanation

Correct Answers

A:

Choosing direct file inspection over shell execution adds a necessary safeguard: reading file content through the dedicated tool avoids an unrestricted shell surface; matching the tool to the operation supports least privilege and clearer audit traces.

D:

A search-first workflow reveals scope and avoids blind global replacement. Focused edits can be tested incrementally and preserve unrelated source.

Incorrect Answers

B:

Glob matches path patterns; it does not search text inside files. Content references should be found with Grep and then inspected with Read, which does not invoke a shell.

C:

A shell-based inspection directly violates the stated no-shell constraint. Built-in Grep and Read provide the relevant discovery and inspection capabilities.

Question 369

An agent should ordinarily decide whether it needs a CRM tool instead of being forced to call one on every turn. Which tool-selection strategy fits?

  1. Permit automatic tool selection based on the available tool definitions
  2. Handle and execute both tool calls, returning their respective results
  3. Handle the output as truncated and continue or retry with an adequate token budget
  4. Produce the completed assistant message to the caller

Explanation

Correct Answer

A:

Automatic selection lets Claude choose between answering and requesting a tool when appropriate. Forced invocation would make even simple conversational acknowledgments trigger needless external work.

Incorrect Answers

B:

A single model response can request multiple client tools; the host should process each authorized call and retain its unique tool-use identifier so results cannot be crossed; that addresses handling parallel client-tool calls, whereas this case calls for choosing optional rather than mandatory tool use.

C:

A max_tokens stop means the generation reached the response budget, not that the report passed validation; this concerns detecting token-limit truncation, leaving the requirement for choosing optional rather than mandatory tool use outstanding.

D:

The end_turn reason indicates the model finished its turn; the orchestration loop can surface the produced answer rather than manufacturing another tool step; recognizing a completed model turn and choosing optional rather than mandatory tool use are distinct responsibilities under these constraints.

Question 370

An unfamiliar repository contains a complex checkout flow and the requested modification has hidden side effects. What should happen before editing?

  1. Pinpoint specific tests and acceptance criteria alongside the edit steps
  2. Explore dependencies and produce a change plan before mutation
  3. Share the plan for approval before allowing write-capable execution
  4. Describe deployment order, checkpoints and rollback triggers before execution

Explanation

Correct Answer

B:

Discovery identifies relevant modules, tests and side effects. Plan-first work reduces the chance that the agent patches an isolated line while breaking the wider transaction.

Incorrect Answers

A:

A useful plan describes not just changes but the evidence that will establish success; supporting embedding verification into the implementation plan cannot replace the required mapping dependencies before modifying unfamiliar code.

C:

Sensitive migrations benefit from separating design review from mutation; that serves requiring plan approval for a migration, whereas the case requires mapping dependencies before modifying unfamiliar code.

D:

Because multi-service updates have dependencies and failure domains that cannot be improvised safely, the measure supports preparing release sequencing and rollback rather than the needed mapping dependencies before modifying unfamiliar code.

Claude Certified Architect - Foundations (CCAR-F) (CCA-F) Practice Tests