Skip to content

CCAR-P · Domain 3: Integration · 21% of the exam

Task 3.8: Production Reliability Controls

Reading error traces or throughput data from a live integration and choosing the control that fixes the pattern (rate-limit handling, retries with backoff, idempotent side-effecting tools, fallback routing) without causing duplicate effects.

Study it

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

A nightly claude -p job uses a local stdio MCP server for its inventory lookups. Traces show that the server's process sometimes exits partway through a run; the next inventory call then waits briefly and succeeds, and the run completes. A platform engineer proposes a watchdog that restarts the whole job whenever the server's process exits. What does the trace pattern show, and is the watchdog needed?

  1. AClaude Code starts the stdio server again on the next call to one of its tools, so the run recovers without the watchdog
  2. BThe server stays marked as failed until someone selects Reconnect in /mcp, so the watchdog is needed to recover
  3. CClaude Code retries the server three times with backoff and then ends the run, so the watchdog must catch the failure
  4. DThe run continues without the server's tools after the exit, so the watchdog is the only way to get them back
Show the answer and why
  • AClaude Code starts the stdio server again on the next call to one of its tools, so the run recovers without the watchdog

    Correct

    In a claude -p run, a stdio server whose process exits mid-session is started again the next time Claude calls one of its tools.

  • BThe server stays marked as failed until someone selects Reconnect in /mcp, so the watchdog is needed to recover

    Incorrect

    Waiting for Reconnect in /mcp is the interactive behaviour; a -p run restarts the server on the next tool call.

  • CClaude Code retries the server three times with backoff and then ends the run, so the watchdog must catch the failure

    Incorrect

    Three retries apply to an HTTP or SSE server's first connection, not to a stdio process that exits mid-session.

  • DThe run continues without the server's tools after the exit, so the watchdog is the only way to get them back

    Incorrect

    Continuing without the tools describes a stdio server whose first connection fails, not one that exits mid-session.

Claude Code handles a stdio server differently by how it runs. In an interactive session, a server whose process exits is marked failed until you select Reconnect in /mcp. In a claude -p run or an Agent SDK session, Claude Code starts the server again the next time Claude calls one of its tools, and the call runs once the server connects. Restarting the whole job would repeat work the run has already done.

Question 2 · choose 2

An unattended Python Claude Agent SDK pipeline on a long-lived Linux host files tickets through a remote HTTP MCP server that authorizes with OAuth and issues refresh tokens. Today the pipeline copies an access token into the server's headers. About one run in twenty finishes "successfully" with no tickets filed: traces show that the token had expired by the time the run connected, the server rejected it, and the agent carried on without its tools. Which TWO controls address this failure pattern? (Choose TWO.)

  1. AMove the ticketing server to stdio, since Claude Code retries a stdio server's first connection three times before giving up on it
  2. BPut a long-lived static bearer token in the server's headers, so that Claude Code retries authentication errors when it connects at startup
  3. CRely on Claude Code's background retries, which reconnect the server during the run even after it rejects the access token at connection time
  4. DReplace the copied token with a stored login made once with claude mcp login on the host, whose refresh token renews an expired token
  5. EMake a headersHelper the server's only Authorization source, so that a rejected token is retried with a fresh credential
Show the answer and why
  • AMove the ticketing server to stdio, since Claude Code retries a stdio server's first connection three times before giving up on it

    Incorrect

    Those retries apply to HTTP and SSE servers after transient errors; a stdio server's first connection isn't retried.

  • BPut a long-lived static bearer token in the server's headers, so that Claude Code retries authentication errors when it connects at startup

    Incorrect

    Authentication errors aren't retried with static credentials, because they need a configuration change.

  • CRely on Claude Code's background retries, which reconnect the server during the run even after it rejects the access token at connection time

    Incorrect

    Background retries follow transient errors such as a 5xx response or a timeout; an authentication error isn't one.

  • DReplace the copied token with a stored login made once with claude mcp login on the host, whose refresh token renews an expired token

    Correct

    When a server rejects a stored token, Claude Code refreshes it with the stored refresh token, reconnects and retries once.

  • EMake a headersHelper the server's only Authorization source, so that a rejected token is retried with a fresh credential

    Correct

    Claude Code retries an authentication error when a headersHelper is the only source of the Authorization header.

To use an OAuth server in an Agent SDK run, complete the sign-in from an interactive session first, for example with claude mcp login. When an OAuth server you signed in to rejects the stored token with 401 and the stored login has a refresh token, Claude Code refreshes the token, reconnects and retries the request once. Claude Code retries an HTTP or SSE server's first connection after transient errors, but not after an authentication error, unless a headersHelper is the only source of the Authorization header: it re-runs the helper on each attempt and can pick up a fresh credential.

Question 3 · choose 1

An on-call engineer is reading a trace of intermittent 500 api_error responses from the Messages API and wants Anthropic support to investigate specific failed calls. What identifier does the errors documentation say to include?

  1. AThe model ID and the exact time of day of each failed request, taken from the client's own log
  2. BThe request ID from the request-id header or the request_id field in the error body
  3. CThe API key used for the calls, so that support can look them up
  4. DThe SDK's retry count for each call, read from the client's log
Show the answer and why
  • AThe model ID and the exact time of day of each failed request, taken from the client's own log

    Incorrect

    The documentation points to the request ID that every response carries.

  • BThe request ID from the request-id header or the request_id field in the error body

    Correct

    Every API response includes a unique request-id header, and error bodies carry the same ID.

  • CThe API key used for the calls, so that support can look them up

    Incorrect

    Support needs the request ID; an API key is a secret to keep.

  • DThe SDK's retry count for each call, read from the client's log

    Incorrect

    The documentation names the request ID for support cases.

Every API response includes a unique request-id header, and error responses carry the same identifier as a request_id field. The errors documentation says to retry 500 errors with exponential backoff and, if they persist, contact support with the request ID; the Python and TypeScript SDKs expose it as _request_id.

Practice domain 3 →Practice all domains →