Claude Certified Architect Foundations CCA-F Exam Questions
A developer is implementing streaming for their Claude integration. They want to display a 'typing'indicator while Claude is generating thinking blocks, and switch to displaying text when the responsetext starts. Which streaming events signal this transition?
Correct Answer: B
A developer is implementing streaming for their Claude integration. They want to display a 'typing'indicator while Claude is generating thinking blocks, and switch to displaying text when the responsetext starts. Which streaming events signal this transition?
A. A 'phase_change' event indicates the switch from thinking to text generation
B. The content_block_stop event for the thinking block followed by content_block_start for the text block signals the transition
C. The message_delta event includes a 'current_phase' field
D. Thinking and text generation happen in separate streaming connections
content_block_start (type: "thinking") ? show typing indicator
delta events... ? still thinking
content_block_stop ? thinking done ?
content_block_start (type: "text") ? switch to text display ?
delta events... ? stream text to UI
content_block_stop ? response completecontent_block_stopending the thinking block ? hide typing indicatorcontent_block_startwith type"text"? begin displaying streamed text
phase_change event- This event does not exist in the Anthropic streaming API
- A made-up event — don't be fooled by plausible-sounding names in exam questions
message_delta includes a current_phase field- Also does not exist —
message_deltacarries token usage and stop reasons, not phase information - Another fabricated field
- Completely false — everything happens over a single streaming connection
- Splitting connections would be architecturally bizarre and unnecessary
Content blocks are the fundamental unit of streaming structure in Claude's APIEach block has a clear lifecycle —
start ? deltas ? stop — and the type field on content_block_start tells you exactly what's coming. This is how you build responsive, accurate streaming UIs.A team builds an MCP tool that manages Kubernetes clusters. The tool includes operations likescale_deployment, delete_pod, and drain_node. These are high-impact operations that should requireconfirmation. How should the tool design handle dangerous operations?
Correct Answer: D
The correct answer is D. Why D is correct: The two-phase execution pattern (dry run + confirmation token) is the proper engineering solution for dangerous operations. Here's how it works:
Phase 1 — Preview:
User/Claude calls scale_deployment(replicas=0)
Tool returns: {
"preview": "This will scale deployment 'api-server' to 0 replicas,
causing downtime for all users",
"confirmation_token": "abc123xyz",
"expires_in": 60
}
Phase 2 — Execute:
Claude shows preview to user, user confirms
Tool called again with confirmation_token: "abc123xyz"
? Operation executesWhy this is the right approach:
- Confirmation is enforced at the code/tool level — not dependent on Claude's behavior
- The preview gives Claude and the user full understanding of consequences before acting
- The token ensures the exact same operation is confirmed (no bait-and-switch)
- Token expiry prevents stale confirmations from executing later
- This is a well-established pattern in infrastructure tooling (Terraform plan ? apply, kubectl dry-run ? apply)
Why the others are wrong: A. 'DANGEROUS:' prefix in description, rely on Claude to warn
- Relies entirely on Claude's behavior — not guaranteed or enforceable
- Claude might warn inconsistently or skip warnings under certain prompting
- Critical safety must live in code, not prompts (recurring principle)
B. Separate MCP server with admin credentials
- Adds access control but doesn't solve the confirmation problem
- An admin with credentials can still accidentally trigger dangerous operations
- Credentials ? confirmation of intent
C. Require user to type 'CONFIRM'
- Better than A, but still weak — it's just a string check with no context
- Doesn't show the user what they're confirming (no preview)
- Can become muscle memory — users type CONFIRM without reading
- No token means no guarantee the confirmed action matches what executes
The key principle:
High-impact irreversible operations need enforcement at the tool level with a preview-before-execute pattern
This is the same philosophy as the logging and safety questions — anything critical must be handled in infrastructure/code, not left to Claude or user discipline alone.
A senior developer is optimizing their token costs. They discover that 60% of their API cost comesfrom input tokens (most content is repeated context). Only 15% comes from output tokens, and 25%from thinking tokens. What optimization provides the biggest cost reduction?
Correct Answer: D
The correct answer is D. Why D is correct: The math is straightforward — attack the biggest cost first.
Prompt caching charges cache reads at only 10% of the base input price — a 90% discount on that category. Since input tokens are 60% of total cost:
Without caching: 60% of bill = input tokens
With caching: 60% × 10% = 6% of bill for same content
Savings = ~54% reduction in total API costThis is the highest leverage optimization by far — especially when the developer already confirmed that "most content is repeated context," which is exactly the use case prompt caching is designed for. Why the others are wrong: A. Reduce output length (15% of cost)
- You're optimizing the smallest slice of the bill
- Even cutting output tokens by 50% only saves ~7.5% total
- Low leverage
B. Reduce thinking budget (25% of cost)
- Better than A, but thinking tokens often directly affect output quality
- Cutting thinking to save cost can degrade the very results you're paying for
- Still less leverage than caching the 60%
C. Switch to a smaller model
- Reduces costs across all categories proportionally
- But sacrifices capability and quality — may not be acceptable for the use case
- Also doesn't exploit the specific insight that repeated context is the problem
- Blunt instrument vs. targeted fix
The key principle:
Always optimize the largest cost driver first, and use the tool designed specifically for that problem
Prompt caching exists precisely for repeated context scenarios. When 60% of your cost is repeated input and caching gives a 90% discount on that — it's not even a close call.
A developer is configuring Claude Code for a project that uses both JavaScript and Rust. TheJavaScript code follows Prettier formatting while Rust follows rustfmt conventions. How shouldCLAUDE.md handle this dual-language setup?
Correct Answer: C
The correct answer is C. Why C is correct: Using glob-based rules in .claude/rules/ is the most precise and scalable approach for a dual-language setup:
.claude/
rules/
javascript.md # applies to **/*.js, **/*.ts
rust.md # applies to **/*.rsEach rules file only activates when Claude is working on files that match its glob pattern. So:
- Editing a
.jsfile ? Prettier rules load automatically - Editing a
.rsfile ? rustfmt rules load automatically - No cross-contamination between language conventions
Why this is best:
- Rules are context-activated — Claude gets exactly the relevant rules for the file it's editing
- Clean separation of concerns — each language's conventions live in their own file
- Scales easily — adding a 3rd language (Python, Go, etc.) is just adding another rules file
- No cognitive overhead — Claude isn't processing Rust rules while editing JavaScript
Why the others are wrong: A. Both conventions in root CLAUDE.md with section headers
- Claude loads all rules for every file regardless of language
- Risk of confusion or mixing conventions when context switching
- Works but is less precise than glob-based targeting
B. Separate CLAUDE.md in js/ and rust/ directories
- Only works if your project is strictly separated by directory
- Real projects often have mixed structures or shared directories
- Less flexible than glob patterns which match by file extension regardless of location
D. Rely on formatters, skip CLAUDE.md entirely
- Formatters handle auto-formatting but Claude still needs to know conventions when writing new code
- Without rules, Claude may generate code that passes logic but fails formatting checks
- Leaves Claude without guidance on style decisions formatters don't enforce
The key principle:
Glob-based rules give Claude precise, context-aware instructions — the right rules for the right files at the right time
This is the most targeted and maintainable architecture for multi-language projects in Claude Code.
Your organization is building a document review agent that processes hundreds of contracts daily. Eachcontract review generates a structured report. They want to measure the quality of reviews over time todetect drift or degradation. What evaluation architecture supports continuous quality monitoring?
Correct Answer: D
D describes a layered evaluation architecture — which is the recommended approach for continuous quality monitoring at scale. Let's break it down:
This gives you:
- Full coverage for structural issues
- Deep quality scoring without the cost of running LLM eval on everything
- Human judgment where it matters most
This is exactly how production AI monitoring systems are designed — not one method alone, but complementary layers. Why the others fall short: A. 5% manual review weekly
- Too slow to detect drift in real time
- Human-only evaluation doesn't scale to hundreds of contracts daily
- Weekly cadence means problems can go undetected for days
B. Second Claude pass on every review
- Expensive and slow at 100% coverage
- LLM evaluating LLM output can have correlated blind spots — Claude may consistently miss the same errors
- Not sustainable as volume grows
C. Template structure comparison only
- Only catches formatting/structural deviations
- Completely misses content quality, accuracy, and reasoning issues
- Too shallow for meaningful quality monitoring