01-projects/phdata

CCA-Foundations — Harness Mechanics Cheat Sheet (from practice-exam 1 misses)

2026-06-14·study-aid·status: active·source: built from founder's first practice-exam misses (50/60); Claude Code specifics verified vs docs.claude.com via claude-code-guide 2026-06-14
certanthropicclaude-codestudy-aid

CCA-F Cheat Sheet — the clusters where points leaked (practice exam 1: 50/60)

Built from the 10 misses. Claude Code mechanics below were verified against current docs (claude-code-guide, 2026-06-14) — one exam answer (Q10) is flagged as questionable vs current behavior.

Cluster A — precise harness mechanics + timing (highest ROI; ~half the misses)

Mechanic The fact (verified) Exam Q
Stop hook Fires once per task/turn completion (each user-input → response cycle), NOT once per session. 3 task completions in one session = 3 firings. Can block the turn ending (exit 2). Distinct from SessionEnd (fires once at session termination; cannot block). Q48 ✓ exam right
PostToolUse hook Fires after the tool runs but BEFORE the model sees the output, and CAN modify it (updatedToolOutput in hookSpecificOutput) — so it's a valid place to redact/trim a large tool result before it hits context. Q10 ⚠️ exam answer is shaky — see note
Subagent comms Subagents cannot talk to each other directly (no shared queue/memory). Canonical pattern is parent-mediated: each subagent returns via the Agent tool result; parent routes data to the next subagent. Shared filesystem = workaround, not an official channel. Q34 ✓ exam right
Skill (SKILL.md) triggers Intent-based / contextual matching on the skill's description (model decides relevance), NOT exact-string keyword match. Auto-activates without a confirm prompt unless disable-model-invocation: true (used for side-effecting skills like /deploy). Q42 ✓ exam right
MCP resource updates Server sends a resources/updated notification to the client; the client re-fetches and decides whether to inject into context. Server does not push directly into the model's context window — the notification is advisory. Q27 ✓ exam right

⚠️ Q10 note (worth knowing for the real exam): the practice exam marked "use a PostToolUse hook" WRONG, reasoning that PostToolUse "fires after Claude already received the response" (too late to save tokens). Per current docs that reasoning is backwards — PostToolUse can modify output before the model processes it, so it IS a legitimate place to trim. The exam's "extract at the tool-result handler before insertion" is also fine, but its justification is outdated/oversimplified. Don't internalize the exam's wrong mental model. (If the course teaches the exam's version, that's a course/exam-version gap, not a real Claude Code behavior.)

Cluster B — "plausible neighbor" definitions (your DE reflex grabs the wrong term)

Cluster C — "BEST/minimizes/root-cause" → pick the canonical pattern, not what you'd build

You answered like a builder; the exam wants the textbook pattern. On these stems, ask "what pattern are they teaching," not "what would I do."

Test-taking adjustments

  1. On "BEST / minimizes / root cause" stems → canonical pattern, not pragmatic-real-world.
  2. When two answers say nearly the same thing (Q26 C-vs-D, Q42 keyword-vs-intent) → pick the one with the more precise mechanism wording (the exam is testing whether you know the exact term).
  3. Don't argue with broken questions in your head and lose time — flag, pick the intended answer, move on.

Per-miss index

D1: Q12 idempotency · Q22 episodic/semantic · Q24 fan-out/fan-in · Q48 Stop hook → all Cluster A/B. D2: Q27 MCP notify → A. D3: Q26 scope-not-absolutes (weak Q) · Q34 parent-mediated · Q42 intent-triggers → A/C. D5: Q10 PostToolUse (exam shaky) · Q35 subagent delegation → A/C. D4: clean sweep.

Related