Trap gym: all 30 exam traps
The exam's questions are easy to read. The hard part is the answers: every wrong option is a sensible practice that is wrong here. Below is every trap the exam guide sets up, each with the one-line rule that beats it. Open a trap to change the setting yourself in a simulator, watch what happens, then try exam-style questions.
Jump to: D1 D2 D3 D4 D5 · 28 simulator pages cover 30 of 30 traps.
D1 Agentic Architecture & Orchestration
Keep the loop going while stop_reason is "tool_use" and stop when it is "end_turn"; never stop because of the reply's wording or an iteration cap.
If whole topics are missing from the result and every subagent did its job, the coordinator split the task too narrowly, so fix the coordinator, not the subagents.
A subagent knows only what its prompt tells it, so pass findings and sources explicitly, and launch parallel subagents as several Task calls in one response.
A rule that must hold every time, like verifying identity before a refund, goes in a hook or gate; a preference can stay in the prompt.
Use a PostToolUse hook to tidy mixed formats, such as dates and status codes, before Claude sees the result, instead of asking Claude to do it.
If the steps are known in advance, use a fixed chain of prompts; let Claude choose the steps only when they depend on what is found along the way.
Resume when nothing has changed, fork to try another approach from the same starting point, and start a new session with a summary when the earlier tool results are out of date.
D2 Tool Design & MCP Integration
If Claude picks the wrong tool, first improve the tool descriptions (what each does, its inputs, its edge cases, when not to use it) before adding routers or new tools.
Return a structured error that says what failed and whether a retry can help; never return an empty success, a generic "failed" or a crash.
Give each agent the 4 or 5 tools its job needs, not all 18, with a small shared tool only for a need that comes up often.
tool_choice set to "auto" lets Claude choose between text and a tool, "any" forces it to call some tool, and naming one tool forces that exact tool, for example to run extraction first.
A server the team shares goes in the project .mcp.json with secrets written as ${VAR}, a personal or experimental one goes in your user config, and Claude gets a tool for things it must do and a resource for things it must read.
Use Grep to search inside files and Glob to find files by name pattern, use Edit for a small targeted change, and when Edit fails because the text appears more than once, Read the whole file and Write it back.
D3 Claude Code Configuration & Workflows
Team rules go in the project CLAUDE.md, personal ones in ~/.claude/CLAUDE.md, rules for one kind of file spread across folders in .claude/rules with paths, a task you start yourself in a command, and a long procedure needed only sometimes in a skill.
Make a small, settled change directly; use plan mode for big, many-file or undecided changes, and send long searches to the Explore subagent.
Show concrete input and output examples for a transformation, write tests first when the right behaviour is known but fixes keep breaking cases, and let Claude interview you first when nobody has said exactly what's wanted.
In CI, run Claude Code with -p so it doesn't wait for input, use --output-format json with --json-schema for results a script can parse, and put the project's testing and review standards in CLAUDE.md.
D4 Prompt Engineering & Structured Output
To cut false positives, give categorical criteria such as "flag a comment only when it contradicts the code"; telling Claude to "be conservative" or report "only high-confidence" findings doesn't raise precision.
If the output is inconsistent or the ambiguous cases go wrong even with clear instructions, add 2 to 4 targeted examples that show the reasoning and the format, instead of writing longer instructions.
A schema stops syntax errors but not wrong values, so make a field optional or nullable when the value may not be in the document, and retry with the specific error only when the information is actually there.
When an extraction fails a check, retry with the specific error attached, but don't retry when the value isn't in the document at all.
Use the Batch API at half price only when nobody is waiting and no back-and-forth tool calls are needed; anything someone waits on, like a pre-merge check, calls the API directly.
Review with a separate Claude instance that didn't write the code, and review large changes file by file before one pass across all the files.
D5 Context Management & Reliability
Keep exact facts such as amounts, dates and promises in a case-facts block and trim tool results to the fields you need; a bigger context window or a running summary blurs the numbers.
Escalate when the customer asks for a person, when there's a policy exception or gap, or when the agent can't make progress; never on sentiment or self-rated confidence.
When a lookup returns more than one customer, ask the person for an identifier such as an order number or email; never guess which one is meant.
"No results" and "couldn't reach the system" are different answers: report a failure as a failure with what was tried, and an empty search as a valid empty result.
In a long codebase exploration, save key findings to a scratchpad file, send verbose exploration to subagents, and use /compact when the context fills.
A high overall accuracy can hide one weak document type or field, so measure accuracy by type and field with stratified random samples before automating.
Keep every claim linked to its source through the synthesis, and when two sources disagree, show both with their sources and dates instead of picking one.