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

Question 50

A compliance team needs an audit entry whenever a tool mutates a tracked file. What is a suitable hook strategy?

  1. Audit tool, target and outcome with PostToolUse
  2. Disable logging to avoid exposing tool paths to reviewers
  3. Make the assistant write an audit poem at the end
  4. Log only the user's intention before the tool executes

Explanation

Correct Answer

A:

The hook observes completed work and records what actually happened. Pairing target and status supports traceability of changes.

Incorrect Answers

B:

Avoiding logs defeats the stated compliance need. Sensitive audit records can be protected with access controls.

C:

Generated prose is not a structured event log and may omit failed writes. Audit data should be collected from execution events.

D:

Intent does not prove a file was changed. An outcome record is needed to distinguish attempted from successful mutations.

Question 51

A Claude Code team needs controls at three different points: reject a forbidden shell call before execution, normalize output after an allowed call, and inspect an end-of-turn release condition. Which THREE hook stages are appropriate? Choose THREE.

  1. PostToolUse for normalization of an observed tool result
  2. A user-supplied prompt to override all organizational restrictions
  3. A tool description alone to guarantee pre-execution policy enforcement
  4. A repository rename to trigger all three lifecycle events
  5. PreToolUse for the execution boundary
  6. Stop for an end-of-turn quality check

Explanation

Correct Answers

A:

The post-use event sees the completed operation and can transform returned data while preserving error state. It is unsuitable for pre-execution authorization.

E:

The pre-use event can examine proposed tool inputs and block disallowed invocations before side effects occur. It is the relevant prevention point.

F:

A stop-stage hook can inspect the finalization point, while the host must still enforce any mandatory publication policy. It is distinct from tool interception.

Incorrect Answers

B:

Untrusted user instructions cannot grant authorization. The mandatory controls must remain outside the model.

C:

Descriptions influence model choices but are not deterministic security gates. A prohibited call still needs executor-side blocking.

D:

File naming does not provide the specified hook interceptions. The correct stages correspond to tool and turn lifecycle boundaries.

Question 52

A system must block publication if an automated quality checklist fails after Claude drafts its final answer. What type of hook boundary is most relevant?

  1. Add a Stop-stage check and an enforced release gate
  2. Set a higher token budget and assume quality is now assured
  3. Use a pre-tool hook without inspecting any final content
  4. Rely on the assistant to grade itself without any external criteria

Explanation

Correct Answer

A:

End-of-turn interception can evaluate whether the response meets required criteria. The application must still control final publication if it needs a hard guarantee.

Incorrect Answers

B:

More tokens do not implement the checklist. The gate must evaluate the actual drafted output.

C:

A pre-tool interceptor sees proposed operations, not necessarily the completed answer. It cannot validate a text-only final draft by itself.

D:

Self-assessment can miss defects. A defined checklist or independent validator is required for release assurance.

Question 53

A log enrichment hook adds confidential internal fields to all tool outputs, including those sent to untrusted workers. What is the primary problem?

  1. The hook spreads unrelated sensitive data outside its scope
  2. Renaming the fields would make sensitive values harmless
  3. The issue can be solved by making the output text longer
  4. The hook should always enrich results regardless of destination

Explanation

Correct Answer

A:

Normalization and enrichment should respect the consumer's scope. A shared hook must not leak fields that downstream agents do not need.

Incorrect Answers

B:

Changing labels does not change the confidentiality of underlying data. Authorization and redaction are still required.

C:

Verbosity does not reduce data leakage. The problem is disclosure of the wrong information.

D:

Universal augmentation increases exposure and context cost. Tool-result transformations need purpose and audience constraints.

Question 54

A PreToolUse hook refuses a deployment, but the agent displays a confident success statement. What should the orchestration layer ensure?

  1. Increase the number of independent agents until one bypasses the hook
  2. Mark the hook refusal as successful deployment in the audit log
  3. Suppress the denial details so the assistant can complete quickly
  4. Treat denial as failure and verify the final claim

Explanation

Correct Answer

D:

A prevented tool call is not a successful deployment. The agent must receive an accurate refusal and avoid publishing a false outcome.

Incorrect Answers

A:

Circumventing a mandatory control is an architectural defect. Workers should share the enforcement boundary.

B:

Reclassifying a block as success destroys policy traceability. The transaction never ran.

C:

Hiding refusal evidence encourages another unapproved attempt or false success. Explicit status is needed.

Question 55

A developer wants to log every subagent start with a correlation ID before workers begin. Which integration is most direct?

  1. Modify each worker's task to print a decorative banner instead
  2. Record only final token usage without parent-child identifiers
  3. Wait for a customer-facing summary and guess the number of workers
  4. Use the subagent-start event hook and attach the parent's trace context

Explanation

Correct Answer

D:

A lifecycle hook can capture spawning events and link child work to the originating orchestration run. It avoids inferring starts from text later.

Incorrect Answers

A:

Generated banners are not dependable structured events. The hook can record starts without altering the task.

B:

Usage alone cannot reconstruct which agent started or why. Trace correlation is needed for investigation.

C:

Final prose may omit or misstate delegation. Lifecycle telemetry belongs at the event boundary.

Question 56

A tool-hook pipeline sometimes rewrites monetary values while trimming logs. Which design rule should prevent this regression?

  1. Disable schema validation to accept any transformed output
  2. Remove all number fields from tool responses
  3. Use typed, tested transformations that preserve key fields
  4. Permit arbitrary model rewriting of all numerical results

Explanation

Correct Answer

C:

A hook may normalize presentation but must not silently alter semantic values. Unit tests should verify that amounts and status are unchanged.

Incorrect Answers

A:

Relaxing contracts hides errors rather than preventing them. Reliable hooks must respect the downstream data schema.

B:

Discarding amounts prevents the agent from deciding or reporting on financial results. Redaction should be targeted to genuinely unnecessary fields.

D:

Free-form generation can introduce rounding or factual changes. Financial observations require deterministic preservation.

Question 57

A team notices that its PreToolUse hook creates a second refund request every time it inspects the first. What is the defect?

  1. The assistant needs a larger context to distinguish the requests
  2. The refund tool must be called twice for reliable confirmation
  3. The guard should log fewer details but keep the extra request
  4. The guard creates side effects, breaking idempotent checks

Explanation

Correct Answer

D:

A pre-execution interceptor should not duplicate the very mutation it reviews. Its decision path must avoid unplanned external writes.

Incorrect Answers

A:

An implementation side effect occurs regardless of the model's memory. The hook itself needs repair.

B:

Duplicate payments are not a verification mechanism. Confirmation should inspect the original transaction state.

C:

Changing log verbosity leaves the duplicate side effect intact. The hook implementation must be corrected.

Question 58

A long-running agent compacts context and loses a mandatory customer approval token. What could a compaction-related hook help implement?

  1. Persist approvals and restore verified facts after compaction
  2. Treat all approvals as permanent whenever earlier text is dropped
  3. Ask the model to invent the missing approval token afterward
  4. Turn compaction off for all sessions regardless of duration

Explanation

Correct Answer

A:

A lifecycle interception point can preserve durable control facts before context changes. Approval authority must still be validated by the host.

Incorrect Answers

B:

Absence of context is not proof of an active grant. Expiry and scope still need checking.

C:

Authorization artifacts cannot be recreated from guesses. Missing proof requires recovery from an authoritative store.

D:

Unbounded history can exceed context limits and inflate cost. A targeted state strategy addresses the missing approval evidence.

Question 59

A developer registers a broad PostToolUse hook that formats results but obscures failures. What is the correct acceptance test?

  1. Preserve error status and failure details after transformation
  2. Ignore failure cases because the model can retry automatically
  3. Check only whether the transformed text is shorter
  4. Declare success if the hook completes without throwing

Explanation

Correct Answer

A:

A formatting layer must not convert an exception into apparent success. Tests should cover both success and error shapes for each matched tool.

Incorrect Answers

B:

Retries require accurate failure signals. Masking them prevents informed recovery and may repeat side effects.

C:

Compression alone cannot establish correctness. The decisive property is whether the consumer still sees the real outcome.

D:

A functioning hook can still produce misleading payloads. Correctness includes semantic preservation.

Question 60

A research task asks for five unrelated competitor profiles and one comparative summary. Which decomposition yields the clearest critical path?

  1. Write the comparison before any profiles have been retrieved
  2. Assign all workers the entire comparison and publish every output
  3. Execute profiles serially despite no rate or resource constraint
  4. Gather profiles in parallel; synthesize after verification

Explanation

Correct Answer

D:

The profiles have no prerequisite dependency on one another. Aggregation waits for their evidence and resolves differences centrally.

Incorrect Answers

A:

Synthesis cannot be grounded without the component findings. This reverses the information dependency.

B:

Duplicating the final task creates redundant answers with no integration owner. Workers should have nonoverlapping responsibilities.

C:

Unnecessary serialization extends latency. Independent read-only subtasks can safely proceed concurrently.

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