AI

CCA-F Study Day 28: Full Exam Simulation — Cross-Domain Scenario Blitz

CCA-F Study Day 28: Full Exam Simulation — Cross-Domain Scenario Blitz

Today's Focus

You've reviewed individual domains for a week. Today we simulate the actual exam experience: scenario-based questions that span 2-3 domains simultaneously. The CCA-F presents 4 of 6 scenarios, each testing overlapping concepts. The hardest questions require you to synthesize knowledge from agentic architecture (D1), tool design (D2), Claude Code (D3), prompt engineering (D4), and reliability (D5) in a single answer. This is where the exam separates candidates who memorized from candidates who internalized.


Core Concept: How Cross-Domain Questions Work

The exam's 6 scenarios each intersect multiple domains:

Scenario Primary Domain Secondary Domains Tested
Customer Support Agent D1 (Agentic Architecture) D2 (tools/MCP), D5 (escalation)
Code Generation w/ Claude Code D3 (Claude Code) D1 (agentic loop), D4 (prompting)
Multi-Agent Research System D1 (Orchestration) D5 (context/errors), D2 (tools)
Developer Productivity D3 (Claude Code) D2 (built-in tools/MCP)
CI/CD with Claude Code D3 (CI/CD) D1 (session isolation), D4 (structured output)
Structured Data Extraction D4 (Prompt Engineering) D2 (tool_use schemas), D5 (validation)

Exam strategy: When reading a question, first identify which scenario you're in, then mentally activate the relevant domain knowledge for BOTH the primary and secondary domains.


Anti-Patterns & Exam Traps: The Cross-Domain Gotchas

The exam's distractors combine anti-patterns from two domains to create convincing wrong answers. Watch for these combos:

  1. D1 + D5 Trap: "Use sentiment analysis to trigger escalation" (wrong: combines prompt-based logic with incorrect escalation criteria). Correct: programmatic checks on task complexity + circuit breaker pattern.
  2. D2 + D4 Trap: "Add a confidence_score field to the tool schema and let the model self-report accuracy" (wrong: self-reported confidence in structured output). Correct: validation-retry loop with programmatic checks against schema constraints.
  3. D1 + D3 Trap: "Run the generator and reviewer in the same Claude Code session to share context" (wrong: same-session self-review). Correct: claude -p with separate sessions for generator and reviewer.
  4. D3 + D5 Trap: "Add instructions in CLAUDE.md to never modify .env files" (wrong: prompt-based enforcement for critical rules). Correct: Use hooks with PreToolUse to programmatically deny writes to .env files.
  5. D4 + D2 Trap: "Return an empty array when no matching records are found" (wrong: suppressing empty results as success). Correct: Structured error response with is_error: false but a result_count: 0 field and human-readable context.

Code Example: Cross-Domain Architecture (D1 + D2 + D5)

This pattern shows a Customer Support agent with proper tool error handling, escalation logic, and hook-based compliance. It tests all three domains simultaneously:

import anthropic
import json

# DOMAIN 2: Structured error responses in tool results
def execute_tool(name, input_data):
    try:
        result = tool_registry[name](**input_data)
        return {"is_error": False, "data": result}
    except AuthError:
        return {
            "is_error": True,
            "errorCategory": "authentication",
            "isRetryable": False,
            "context": "Session expired. Customer must re-authenticate."
        }
    except RateLimitError:
        return {
            "is_error": True,
            "errorCategory": "rate_limit",
            "isRetryable": True,
            "context": "Rate limit hit. Retry after 2 seconds."
        }

# DOMAIN 5: Programmatic escalation (NOT sentiment-based)
def check_escalation(tool_results, turn_count):
    consecutive_failures = sum(
        1 for r in tool_results[-3:] if r.get("is_error")
    )
    # Escalate on: 3+ consecutive tool failures (circuit breaker)
    if consecutive_failures >= 3:
        return {"escalate": True, "reason": "circuit_breaker_tripped"}
    # Escalate on: task exceeds complexity threshold
    if turn_count > 15:
        return {"escalate": True, "reason": "complexity_threshold"}
    return {"escalate": False}

# DOMAIN 1: Hook for compliance (deterministic, not prompt-based)
def compliance_hook(event_type, data):
    """PreToolUse hook: block PII-modifying operations"""
    if event_type == "tool_start":
        if data["tool_name"] == "update_customer" and "ssn" in data["input"]:
            return {"action": "BLOCK", "reason": "PII modification requires human approval"}
    return {"action": "ALLOW"}

# DOMAIN 1: The agentic loop with proper termination
client = anthropic.Anthropic()
messages = [{"role": "user", "content": customer_query}]
tool_results_history = []
turn = 0

while True:
    response = client.messages.create(
        model="claude-sonnet-4-20250514",
        max_tokens=1024,
        system=system_prompt,
        tools=support_tools,  # D2: 4-5 focused tools
        messages=messages
    )
    
    # D1: ONLY check stop_reason for termination
    if response.stop_reason == "end_turn":
        break
    
    turn += 1
    for block in response.content:
        if block.type == "tool_use":
            # D1: Run compliance hook BEFORE execution
            hook_result = compliance_hook("tool_start", {
                "tool_name": block.name, "input": block.input
            })
            if hook_result["action"] == "BLOCK":
                result = {"is_error": True, "errorCategory": "compliance",
                         "isRetryable": False, "context": hook_result["reason"]}
            else:
                result = execute_tool(block.name, block.input)
            
            tool_results_history.append(result)
            
            # D5: Check escalation after each tool result
            esc = check_escalation(tool_results_history, turn)
            if esc["escalate"]:
                hand_off_to_human(esc["reason"])
                break
    
    messages.append({"role": "assistant", "content": response.content})
    messages.append({"role": "user", "content": [
        {"type": "tool_result", "tool_use_id": block.id,
         "content": json.dumps(result)}
    ]})

🎬 Video to Watch

Anthropic's Secret: How We Build Multi-Agent AI (Discover AI / YouTube)

Covers the engineering approaches Anthropic's team uses to create multi-agent systems, including theoretical foundations and practical implementation. Watch the section on coordination patterns and error propagation between agents; it maps directly to how the exam tests cross-domain scenarios.


📖 Reading

Building Effective Agents (Anthropic Engineering Blog) — Re-read this with fresh eyes. Focus on the "When to use agents" decision framework and the pattern descriptions. After 27 days of study, you'll notice nuances you missed the first time.

Building Agents with the Claude Agent SDK (June 2026) — Latest SDK patterns and best practices.


🛠️ Hands-On Exercise: 30-Minute Exam Simulation

Set a timer for 30 minutes. Answer these 6 scenario questions (one per scenario type) without looking at notes. Write your answer AND explain why the other options are wrong. Grade yourself afterward.

Scenario 1 (Customer Support): A customer support agent needs to enforce a policy: refunds over $500 require manager approval. The BEST implementation is:

  • A) Add "Never process refunds over $500 without asking for manager approval" to the system prompt
  • B) Create a PreToolUse hook that intercepts calls to process_refund where amount > 500 and returns a deny decision
  • C) Add a confidence threshold: if the model is less than 90% confident the refund is appropriate, escalate
  • D) Use a separate verification agent in the same session to double-check refund amounts

Scenario 2 (Multi-Agent Research): A research coordinator dispatches 3 subagents to investigate different aspects of a topic. One subagent's tool calls fail 4 times consecutively. The correct architecture:

  • A) The subagent retries indefinitely with exponential backoff until success
  • B) The coordinator monitors subagent results; after the 3rd consecutive failure, it trips a circuit breaker, marks that research path as failed, and synthesizes from the 2 successful subagents
  • C) The subagent reports low confidence in its results, triggering the coordinator to escalate to a human
  • D) The coordinator runs a single-session agent that performs all 3 research tasks sequentially to avoid failure isolation complexity

Scenario 3 (Structured Data Extraction): An invoice extraction system produces output where the total_amount field occasionally contains the subtotal instead of the grand total. The BEST fix is:

  • A) Add "Make sure total_amount is the grand total including tax, not the subtotal" to the prompt
  • B) Implement a validation-retry loop: check if total_amount equals sum(line_items) + tax; if not, feed the specific error back and retry up to 3 times
  • C) Add a confidence_score field and flag any extraction where confidence is below 0.8 for human review
  • D) Run 3 extraction passes and take the majority vote for total_amount

Quick Quiz

Q1. A CI/CD pipeline uses Claude Code to review PRs. The architect wants the same Claude instance to both generate fix suggestions and then verify those suggestions are correct. This design is problematic because:

  • A) Claude Code cannot run in non-interactive mode
  • B) The verification will be biased by reasoning context from the generation phase (same-session self-review anti-pattern)
  • C) Tool execution is not supported in CI/CD mode
  • D) The CLAUDE.md file cannot be loaded in pipeline environments

Q2. An agent has 22 tools defined. Users report it frequently selects the wrong tool. The architectural fix is:

  • A) Improve all 22 tool descriptions with more detail
  • B) Add a routing prompt that tells the model which tool to use for each query type
  • C) Distribute tools across specialist subagents (4-5 tools each) using a hub-and-spoke pattern
  • D) Use tool_choice to force a specific tool based on keyword matching in the user's message

Q3. A CLAUDE.md file at the project root says "Never modify files in /config/". A developer needs to ensure this rule is enforced deterministically (not just advisory). The correct approach is:

  • A) The CLAUDE.md instruction is sufficient since it's at project root (highest priority)
  • B) Add a PreToolUse hook that denies write operations targeting /config/ paths
  • C) Set effort level to "plan" mode so Claude only suggests changes without executing them
  • D) Add the same instruction to the user-level ~/.claude/CLAUDE.md for redundancy

Answers

Exercise: 1=B (hook is deterministic), 2=B (circuit breaker + graceful degradation), 3=B (validation-retry with specific error feedback)

Quiz: Q1=B, Q2=C, Q3=B

Why wrong answers are wrong:

  • Q1: A is factually wrong (-p flag exists). C/D are fabricated limitations.
  • Q2: A doesn't solve the root cause (too many tools). B is prompt-based enforcement. D is brittle keyword matching, not architectural.
  • Q3: A is wrong because CLAUDE.md is advisory, not deterministic. C changes the workflow entirely. D doesn't add enforcement.

Tomorrow's Preview

Day 29: Timed Practice Exam (60 questions, 120 minutes) with full scenario simulation and score breakdown by domain.