Skip to content

CCAR-P · Domain 4: Evaluation, Testing, and Optimization · 17% of the exam

Task 4.5: Root-Cause Isolation from Logs and Traces

Telling from logs or traces whether a failure comes from the prompt, retrieval, a hallucination, a tool or subagent error or the wrong model, and naming the fix.

Study it

  • Root causes from logs and traces: prompt, retrieval, hallucination, tool or model

    Partly covered by: Tracing a Request

Sample questions

Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.

Question 1 · choose 1

An application-security team runs Claude Code on Claude Opus 5.5 to analyse exploit paths in its own services. On some tasks the analyses are noticeably shallower than usual. Session transcripts for those tasks show a notice that a flagged request was re-run on another model, and the rest of each session continued there. The team suspects its CLAUDE.md instructions. Where does the root cause lie, and what is the corrective action?

  1. AIn the model: flagged cybersecurity requests re-ran on the fallback model; set switchModelsOnFlag to false and apply to the Cyber Verification Program
  2. BIn the prompt: the CLAUDE.md instructions are too vague; rewrite them so that every analysis follows a fixed checklist
  3. CIn retrieval: Claude stopped reading the service code; add the source directories to the session with /add-dir
  4. DIn a hallucination: Claude invented exploit paths; require a citation of the vulnerable line for every finding
Show the answer and why
  • AIn the model: flagged cybersecurity requests re-ran on the fallback model; set switchModelsOnFlag to false and apply to the Cyber Verification Program

    Correct

    Opus 5.5's cybersecurity-flagged requests re-run on a fallback model; asking before switching keeps control, and the program covers legitimate work.

  • BIn the prompt: the CLAUDE.md instructions are too vague; rewrite them so that every analysis follows a fixed checklist

    Incorrect

    The shallow runs follow the model switch shown in the transcript, not a change in the instructions.

  • CIn retrieval: Claude stopped reading the service code; add the source directories to the session with /add-dir

    Incorrect

    The transcript points to a switch to another model, not to code that Claude couldn't reach.

  • DIn a hallucination: Claude invented exploit paths; require a citation of the vulnerable line for every finding

    Incorrect

    The notice shows the request ran on a different model; citations don't change which model analyses the code.

Claude Opus 5.5 runs safety classifiers, most often flagging cybersecurity and biology content. In Claude Code, a cybersecurity-flagged request from Opus 5.5 re-runs on a fallback model, and the session continues there, with a notice in the transcript. Setting switchModelsOnFlag to false makes Claude Code pause and ask instead, and organizations whose legitimate security work is blocked can apply to the Cyber Verification Program.

Question 2 · choose 1

A team's Claude Code sessions run on Opus. To save cost, the triage subagent runs on Haiku, and it hands each serious alert to a deep-analysis subagent that it spawns itself:# .claude/agents/triage.md name: triage model: haiku tools: Agent, Read, Grep --- # .claude/agents/deep-analysis.md name: deep-analysis tools: Read, Grep, BashDeep analyses have become shallow and miss root causes that the same subagent found when the main conversation started it directly. The /tasks view shows deep-analysis running on Haiku in the nested runs. What is the root cause, and what corrective action fits?

  1. AA prompt failure; rewrite the deep-analysis instructions to demand more thorough investigation of each alert
  2. BA model mismatch; add model: inherit to deep-analysis so that it follows the session's model in nested runs
  3. CA retrieval failure; have triage paste the full alert history into each Agent call so that deep-analysis has more context
  4. DA model mismatch; set model: opus in deep-analysis, since a nested subagent otherwise runs on its spawner's model
Show the answer and why
  • AA prompt failure; rewrite the deep-analysis instructions to demand more thorough investigation of each alert

    Incorrect

    The same instructions worked when the subagent ran on Opus; the nested runs differ in the model, not the prompt.

  • BA model mismatch; add model: inherit to deep-analysis so that it follows the session's model in nested runs

    Incorrect

    For a nested subagent, inherit means the spawning subagent's model, which here is Haiku.

  • CA retrieval failure; have triage paste the full alert history into each Agent call so that deep-analysis has more context

    Incorrect

    Context passed in the prompt doesn't change the model; the shallow runs come from the nested subagent's model.

  • DA model mismatch; set model: opus in deep-analysis, since a nested subagent otherwise runs on its spawner's model

    Correct

    By default a nested subagent runs on the model of the subagent that spawned it; its own model field overrides that.

A nested subagent you define runs, by default, on the model of the subagent that spawned it. In this setup triage runs on Haiku, so a deep-analysis subagent with no model field, or with model: inherit, runs on Haiku in the nested case. Setting the model field in its definition runs it on the chosen model wherever it is spawned, and /tasks shows the model each subagent runs on.

Question 3 · choose 1

A search agent on Claude Opus 5 runs with thinking disabled to save tokens, and its system prompt tells the model not to think. Traces show some responses writing a tool call into their visible text, sometimes with internal XML tags, and those calls never run. What does the thinking troubleshooting guide give as the cause and the corrective action?

  1. AThe tool definitions are malformed; regenerate every one of them with strict mode before the next run
  2. BThe model is hallucinating tools; add a list of valid tool names to every user message
  3. CThe context is too long; trim the history so that the model sees fewer earlier results
  4. DRunning with thinking disabled causes it; re-enable thinking and lower effort to control cost
Show the answer and why
  • AThe tool definitions are malformed; regenerate every one of them with strict mode before the next run

    Incorrect

    The guide ties the symptom to running with thinking disabled, not to the tool schemas.

  • BThe model is hallucinating tools; add a list of valid tool names to every user message

    Incorrect

    The tools exist; the call is written into text instead of a tool_use block.

  • CThe context is too long; trim the history so that the model sees fewer earlier results

    Incorrect

    The guide's cause is thinking being disabled, made worse by rules not to think.

  • DRunning with thinking disabled causes it; re-enable thinking and lower effort to control cost

    Correct

    The guide says this occurs on Opus 5 with thinking disabled and recommends re-enabling thinking with lower effort.

The thinking troubleshooting guide says that on Claude Opus 5 with thinking disabled, a response occasionally writes a tool call into its text instead of a tool_use block, or includes internal XML tags; a leaked call never runs, and it stays in the history. System-prompt rules telling the model not to think increase the leakage. Re-enable thinking and use lower effort levels to control token cost.

Practice domain 4 →Practice all domains →