MockCertMockCert
Menu

Test yourself in exam conditions

A full Claude Certified Architect – Professional mock exam: 70 questions in 120 minutes, scored against the real exam's pass mark. Your first one is free.

Start a free mock exam
Domain 3 · 8 topics · about 45 minTopics in this domainTopics

Domain 3 · Overview

Overview

What this domain covers

  1. Topic 1 of 8 · 8 steps + check · 6 minLeast-Privilege Tool ConfigurationWhy fewer tools is better · Scoping a subagent's tools · Removing tools and servers · MCP toolsets: allow or deny · and 1 more
  2. Topic 2 of 8 · 11 steps + check · 6 minAuthentication and Authorization PostureKeep keys out of browsers · Who owns the key · Limit where and how long · Responding to a leak · and 4 more
  3. Topic 3 of 8 · 11 steps + check · 6 minRelieving the Binding Performance ConstraintStart with caching · Cache pricing and lifetime · Levers and their trade-offs · When accuracy binds · and 4 more
  4. Topic 4 of 8 · 10 steps + check · 6 minInstrumentation and Monitoring GapsThree telemetry signals · Tracing is off by default · Redaction hides the detail · Where settings are ignored · and 3 more
  5. Topic 5 of 8 · 8 steps + check · 5 minRetrieval Architecture SelectionLimits of full-corpus context · Pipeline or agentic retrieval · Controlling web search cost · Configuring citations · and 1 more
  6. Topic 6 of 8 · 8 steps + check · 5 minConnection Mechanism SelectionMatch the transport to the server · Connecting from the Messages API · Security and data retention · Handing off to a subagent · and 1 more
  7. Topic 7 of 8 · 9 steps + check · 5 minProgressive Discovery vs. Monolithic Context LoadingEverything in the window counts · Progressive discovery with tool search · When tool search pays off · Caching versus discovery · and 2 more
  8. Topic 8 of 8 · 9 steps + check · 5 minProduction Reliability ControlsRead the failure signature · Which failures to retry · Avoid duplicate tool effects · Size fallback for load · and 2 more

Up next: Least-Privilege Tool Configuration · 8 steps + check · 6 min

Domain 3 · Topic 1 of 8

Least-Privilege Tool Configuration

Step 1 of 8

Think first When you set up an agent or subagent, how do you decide which tools it truly needs and which ones to take away?

Why it matters: Questions show an agent or subagent tool setup and ask which tools to remove, scope down or load in a leaner way.

Give each agent only the tools its job needs. Extra tools add risk, fill the context window and make tool choice less accurate. Remove or restrict the rest, and keep bulky intermediate results out of the conversation.

Step 2 of 8

Term Meaning
Tool allowlist Tools start disabled by default and only the ones you name are enabled.
Tool denylist All tools stay enabled by default and you explicitly disable the unwanted ones.
disallowedTools A subagent field that removes named tools, or whole MCP servers by pattern, from its tool set.
Programmatic tool calling Claude runs one sandboxed script that calls several tools, so intermediate results stay out of history.

Step 3 of 8

Every loaded tool costs context and accuracy. About 50 tools can use 10-20K tokens of context, leaving less room for real work. Tool selection accuracy also drops once more than 30-50 tools load at once. Fewer tools also mean less risk of unintended actions.

Step 4 of 8

List tools and the subagent gets only those. Match the list to the role, as the table shows. Turning on memory also adds Read, Write and Edit, so check it before calling a subagent read-only.

Subagent roles and the tools that fit them

Role Tools What it can do
Code reviewer Read, Grep, Glob Read and search, but not edit files
Doc reviewer Read, Grep Analyze files but never modify them
Code modification Read, Edit, Write, Grep, Glob Full read/write access, no command execution

Exam trap Leaving out the tools field does not give a subagent zero tools. It gets every tool available to subagents.

Step 5 of 8

disallowedTools strips tools from a subagent's set. It accepts tool names and MCP server patterns. mcp__server__* removes every tool from that one server, and mcp__* removes every MCP tool from any server. A tool listed in tools is allowed, but listing it does not pre-approve it.

Exam trap Adding a tool to an AgentDefinition's tools array is not the same as approving it. Listing a tool does not pre-approve it.

Step 6 of 8

Every MCP toolset tool is enabled by default. For an allowlist, set enabled: false in default_config, then enable chosen tools in configs. For a denylist, keep the default and disable unwanted tools. Denylisting write or destructive tools suits read-only assistants or a human check before state changes.

Example: An MCP toolset allowlist: every tool off by default, one tool turned back on.

{
  "default_config": { "enabled": false },
  "configs": {
    "my_tool": { "enabled": true }
  }
}
  • "default_config": { "enabled": false }: the set-level default turns every tool off
  • "my_tool": { "enabled": true }: a tool-specific setting overrides the set-level default

Step 7 of 8

For a small tool set, loading everything upfront is typically faster. With fewer than about 10 tools that fit comfortably, loading them all upfront is typically faster than tool search. Beyond that, trim what reaches the context with the patterns below.

Patterns that keep tools and results out of the context

Pattern What it does What stays out
defer_loading: true Holds back the tool's description at first; used with the tool search tool Tool definitions
Programmatic tool calling One sandboxed script calls several tools in one run Intermediate results
Context editing Removes old tool_result blocks once they have served their purpose Stale tool results

Exam trap Tool search is not always the faster choice. With fewer than about 10 tools that fit comfortably, loading them all upfront is typically faster.

Step 8 of 8

  • Omitting tools hands a subagent every available tool, so list only what its job needs.
  • Turning on memory adds Read, Write and Edit to a subagent's tools.
  • Use disallowedTools with mcp__server__* or mcp__* to strip whole MCP servers.
  • Tool selection accuracy degrades past 30-50 loaded tools, so trim large toolsets.

Sources: Subagents in the SDK - Claude Code Docs (opens in a new tab) · Scale to many tools with tool search - Claude Code Docs (opens in a new tab) · Manage tool context - Claude Platform Docs (opens in a new tab) · MCP connector - Claude Platform Docs (opens in a new tab)

Check

Check: Least-Privilege Tool Configuration

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Authentication and Authorization Posture · 11 steps + check · 6 min

Domain 3 · Topic 2 of 8

Authentication and Authorization Posture

Step 1 of 11

Think first Looking at a Claude integration design, where can a credential leak or be misused, and which control closes each gap?

Why it matters: Questions describe an integration and ask which credential exposure or privilege risk exists and which mitigation addresses it.

Assume any credential can leak, then limit who owns it, where it works, how long it lasts and what it can do. No single control replaces the others, so layer them.

Step 2 of 11

Term Meaning
Service account An organization identity for a workload, so its key does not depend on one person.
Identity-backed key A personal or service account key that stops working when its owner leaves the organization.
IP allowlisting Limiting the addresses from which an API key can be used.
App Attest access token A token scoped to your workspace that expires after 1 hour and authorizes only Messages API calls.

Step 3 of 11

Call the Claude API from your back end, never from page code. Any visitor to a webpage can read a key embedded in its code. A browser-side call design is credential exposure by default.

Exam trap Hiding a key in front-end code is not protection. Any visitor can read it, so the call must move to your back end.

Step 4 of 11

Use identity-backed keys, and service accounts for automation. Personal and service account keys stop working when their identity is removed, so they never outlive their owner. A shared personal key stands in for one person and fails once they leave.

Step 5 of 11

Expiration limits time; IP allowlisting limits place. In the Console, choose expiration at creation: 3 hours, 1, 7 or 30 days, custom or Never. It cannot be changed later. Store keys in a secrets manager and rotate them.

Step 6 of 11

Disable is reversible; delete is permanent. Disable a suspect key to stop it at once; re-enabling returns it to active. Delete archives the key for good. Either way, act on any key you suspect has leaked.

Step 7 of 11

Each token has a fixed lifetime and a narrow scope. An App Attest access token lasts 1 hour; a claude setup-token token lasts 1 year. The setup-token is never saved, so you set it as CLAUDE_CODE_OAUTH_TOKEN yourself.

Scoped Claude tokens compared

Feature App Attest access token claude setup-token OAuth token
Lifetime 1 hour 1 year
What it authorizes Only Messages API calls Only model requests
Scope Your workspace Your Claude subscription on a Pro, Max, Ultra, Team or Enterprise plan

Step 8 of 11

Workload Identity Federation is only as strong as its chain. A long-lived secret earlier in the chain, such as a static cloud credential that can mint identity tokens, can still undermine it. Review the identity provider's configuration too.

Exam trap Adopting federation does not by itself guarantee end-to-end security. A static credential upstream can still mint tokens.

Step 9 of 11

Code tricked into running can misuse any credential it reaches. Use vault credentials, limited networking and approvals for risky actions. MCP credentials never enter the sandbox, and environment variable credentials show only a placeholder. Restrict what each key may do where it was issued.

Exam trap Restricting allowed hosts does not stop an agent using a credential on a host you allowed. These settings do not limit a key's permissions either, so limit those at the service that issued it.

Step 10 of 11

Know where local logins live and what is not enforced. Linux stores credentials in ~/.claude/.credentials.json with mode 0600; macOS uses the Keychain. Claude Code does not check a saved Console credential's organization at startup, so forceLoginOrgUUID is no guarantee.

Step 11 of 11

  • Never put an API key in browser code; call Claude from your back end.
  • Give CI and production services a service account, not a shared personal key.
  • Set expiration and IP allowlisting to limit how long and where a leaked key works.
  • Agent network limits do not limit key permissions; set those at the issuing service.
  • Console key expiration is fixed at creation and cannot be changed later.

Sources: Authentication - Claude Platform Docs (opens in a new tab) · Security risks and sandbox boundaries - Claude Platform Docs (opens in a new tab) · Authentication - Claude Code Docs (opens in a new tab)

Check

Check: Authentication and Authorization Posture

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Relieving the Binding Performance Constraint · 11 steps + check · 6 min

Domain 3 · Topic 3 of 8

Relieving the Binding Performance Constraint

Step 1 of 11

Think first When a Claude system is too slow or not accurate enough, which configuration change fixes it while costing least elsewhere?

Why it matters: Questions name the binding constraint, accuracy, latency or cost, and ask which change relieves it with the least harm to the others.

Turn on prompt caching before any other lever, since every agentic turn resends the whole conversation. Then tune effort before changing the model tier: lower it when cost is too high, restore it when quality falls short.

Step 2 of 11

Term Meaning
Cache pre-warming Loading the system prompt or tool definitions into the cache before a user sends a real request.
Effort A speed and cost control, high by default on most models; on Haiku 5.5, low is the cheapest and fastest level.
Prompt caching Letting the API resume from a stored prompt prefix to save time and money.
TTFT Time to first token: from sending the prompt until the first response token appears.

Step 3 of 11

Turn on prompt caching before any other lever. In an agentic task, every turn resends the whole growing conversation, including the system prompt and tools. Caching that prefix cuts processing time and cost.

Exam trap Caching is not only a cost lever. Resuming from a cached prefix also reduces processing time, so it helps latency too.

Step 4 of 11

Writes cost a little more; reads cost far less. With the 5-minute lifetime, a cache write costs 25% more than base input, while a read costs 10% of it. Each use refreshes the lifetime at no extra cost, so repeated prefixes pay off quickly.

Step 5 of 11

Know what each lever helps and what it costs. Read each row from the gain to the catch. Note that caching helps two things at once: it cuts both processing time and cost.

Configuration levers compared on what they help and what they cost

Lever Relieves Costs
Lower effort Cost and latency Restore effort if quality falls short
Next model tier up Accuracy Compare it on cost per completed task
Batch API Cost, with 50% off every token Results may take up to 24 hours
Prompt caching Latency and cost Cache writes cost 25% more than base input with the 5-minute TTL

Step 6 of 11

Restore effort first, then move up a tier. If quality falls short and you lowered effort, raise it back. Otherwise try the next model tier at its default effort. Effort defaults to high on most models but medium on Opus 5.5 and Haiku 5.5.

Exam trap Jumping straight to a bigger model is not the first move if you lowered effort earlier. Restore effort first, then try the next tier up.

Step 7 of 11

Lower effort on the current model before switching models. If quality is fine but cost is high, try lower effort on the model you use now. Compare options on cost per completed task, not per token, because you pay for completed tasks.

Exam trap The cheapest price per token is not the cheapest system. You pay for completed tasks, so compare cost per completed task.

Step 8 of 11

Fewer tokens processed and generated means a faster response. Haiku 5.5 gives the fastest responses while staying highly capable, and low effort is its fastest level. Shorter prompts and outputs help on any model.

Step 9 of 11

Pre-warm the cache so the first request does not miss. Loading the system prompt or tools into the cache before a user arrives can reduce the first-request miss penalty and lower TTFT. Streaming then shows output early, improving perceived speed.

Step 10 of 11

The Batch API halves cost if results can wait. It takes 50% off every token, cached ones included, but results can arrive any time within 24 hours. So it suits work whose results can wait that long.

Step 11 of 11

  • Turn on prompt caching first; every agentic turn resends the whole conversation.
  • Cost too high but quality fine: lower effort on the current model.
  • Quality too low: restore effort if lowered, else try the next tier up.
  • For speed, Haiku 5.5 at low effort is the fastest option.
  • Compare models on cost per completed task, not cost per token.

Sources: Optimizing for cost and intelligence - Claude Platform Docs (opens in a new tab) · Prompt caching - Claude Platform Docs (opens in a new tab) · Reducing latency - Claude Platform Docs (opens in a new tab)

Check

Check: Relieving the Binding Performance Constraint

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Instrumentation and Monitoring Gaps · 10 steps + check · 6 min

Domain 3 · Topic 4 of 8

Instrumentation and Monitoring Gaps

Step 1 of 10

Think first When a scaled agent system fails quietly, which missing signal let it go unnoticed, and what monitoring would have caught it?

Why it matters: Questions describe a failure nobody saw and ask which instrumentation gap hid it and which monitoring strategy would have surfaced it.

Monitoring only sees what you switch on and route somewhere. Telemetry is often off or redacted by default, and event signals such as webhooks can be missed. Close gaps by enabling the right signals and adding a scheduled check behind them.

Step 2 of 10

Term Meaning
Span A trace record sent to the traces exporter; a subagent's API and tool spans nest under its parent's tool span.
Exporter selector A variable such as OTEL_TRACES_EXPORTER that decides where a telemetry signal is sent.
Offline reviewer A separate job that has Claude read each session's events after they are written.
Managed settings Administrator-controlled settings that can lock telemetry choices for every developer.

Step 3 of 10

Claude Code exports metrics, events and optional traces. Metrics arrive as time series data. Events use the logs/events protocol. Distributed traces through OpenTelemetry are optional, so a team can have dashboards yet no trace of what a session did.

Step 4 of 10

Traces need two flags plus an exporter. Set both CLAUDE_CODE_ENABLE_TELEMETRY=1 and CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1. Then OTEL_TRACES_EXPORTER picks where spans go. Miss any of these and no spans arrive.

Exam trap Turning on telemetry alone does not produce traces. The enhanced telemetry beta flag must also be set to 1.

Step 5 of 10

Spans redact prompts and tool details by default. Prompt text, tool inputs and tool content all stay hidden. Spans can show that a tool ran but not what it received.

Variables that add redacted content back to spans

Content Hidden by default Variable to include it
User prompt text Yes OTEL_LOG_USER_PROMPTS=1
Tool input details Yes OTEL_LOG_TOOL_DETAILS=1
Tool content Yes OTEL_LOG_TOOL_CONTENT=1

Step 6 of 10

Repository settings cannot turn telemetry on. Claude Code ignores exporter variables placed in a repository's .claude/settings.json and .claude/settings.local.json. Use managed settings, the shell or ~/.claude/settings.json instead. A developer can still switch a signal off, so lock the selectors in managed settings too.

Exam trap Claude Code does not pass OTEL_* variables to the processes it spawns. Hooks, MCP servers, language servers and the Bash tool do not inherit them.

Step 7 of 10

Subagent spans nest under the parent's tool span. When the Agent tool spawns a subagent, its API and tool spans sit under the parent's claude_code.tool span. On cost data, the query_source attribute names the subsystem behind a request, such as main or subagent.

Step 8 of 10

Look for claude_code.session.count in the backend. Claude Code emits this metric when a session starts, so its absence points to a broken export. Remember the timing too: metrics export every 60000 ms by default, logs every 5000 ms.

Step 9 of 10

Webhooks can be missed, so poll sessions on a schedule. Managed Agents sends a webhook for each event in the table, but a delivery can go missing. List sessions on a timer and look at any that sit idle. For behavior beyond the agent's grant, run an offline reviewer over session events.

Managed Agents failures and the webhook that reports each

Failure Webhook Backup check
Session reaches a budget session.budget_reached Scheduled session listing
Session terminates session.status_terminated Scheduled session listing
MCP OAuth credential cannot refresh vault_credential.refresh_failed Scheduled session listing

Step 10 of 10

  • Tracing is off by default and needs two enable flags plus a traces exporter.
  • Spans hide prompts, tool inputs and tool content unless the matching variables are set to 1.
  • Telemetry variables in a repository's .claude settings files are ignored.
  • Never rely on webhooks alone: list sessions on a timer and look at idle ones.

Sources: Monitoring - Claude Code Docs (opens in a new tab) · Review and monitor agent sessions - Claude Platform Docs (opens in a new tab)

Check

Check: Instrumentation and Monitoring Gaps

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Retrieval Architecture Selection · 8 steps + check · 5 min

Domain 3 · Topic 5 of 8

Retrieval Architecture Selection

Step 1 of 8

Think first Given a corpus, its queries and a budget, when should Claude use a RAG pipeline, agentic search or the whole corpus in context?

Why it matters: Questions describe a corpus, its queries and latency or cost limits, and ask which retrieval architecture and configuration fit best.

Putting the whole corpus in context is bounded by the model's window and by context rot. Retrieval supplies search results from a fixed pipeline or from tools Claude calls. Citations tie answers to your documents, and dynamic filtering keeps irrelevant search results out of context.

Step 2 of 8

Term Meaning
Context rot The drop in accuracy and recall as the token count in context grows.
Search result block A content block that lets Claude cite your own documents, with the origin and title you supply.
Dynamic filtering Claude writes and runs code to filter web search results before they enter the context window.
Dynamic RAG Retrieval where your custom tools return search results during the conversation.

Step 3 of 8

More context is not automatically better. As the token count grows, accuracy and recall degrade. Window size is a ceiling too: the deprecated Claude Sonnet 4.5, for example, has a 200k-token window. Prompt caching changes what you pay for a repeated corpus, but cached prefixes still fill the window.

Exam trap Prompt caching does not free up context space. It changes what you pay for cached tokens, not whether they count toward the window.

Step 4 of 8

Search results can be fetched ahead or by tools. Pre-fetched or cached content goes straight into user messages. Custom tools that return search results support dynamic RAG. To make retrieval run on every request, force the tool call with tool_choice.

Ways to bring retrieved content to Claude

Approach How content arrives Note
Pre-fetched results Placed directly in user messages Suits pre-fetched or cached content
Custom retrieval tool Your tool returns search results Force it with tool_choice to run every time
Web search tool Claude searches the web as needed Cap searches per turn with max_uses

Step 5 of 8

Each 1,000 web searches cost 10 USD, plus tokens. Its results count as input tokens. Dynamic filtering in web_search_20260209 or later lets Claude filter results with code first, so less irrelevant content reaches context. Claude also skips searching when a request draws on stable knowledge.

Exam trap Basic web search does not filter what it loads. Every result enters the context window, and much of it can be irrelevant.

Step 6 of 8

Citations on search result blocks are off by default. Enable them explicitly, and give every search result in a request the same setting. Claude cites whole text blocks, so split content into smaller blocks for finer citations. These blocks hold text only, not images.

Step 7 of 8

A request can carry up to 600 images or PDF pages. Models with a 200k-token window allow only 100. So check the page count against the model's window size before loading a document set whole.

Step 8 of 8

  • Context rot means a bigger context can lower accuracy and recall.
  • Cached prefixes still count toward the context window.
  • Use custom tools for dynamic RAG and user messages for pre-fetched content.
  • Turn on citations explicitly and split content into small blocks for precise citations.

Sources: Context windows - Claude Platform Docs (opens in a new tab) · Search results - Claude Platform Docs (opens in a new tab) · Web search tool - Claude Platform Docs (opens in a new tab)

Check

Check: Retrieval Architecture Selection

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Connection Mechanism Selection · 8 steps + check · 5 min

Domain 3 · Topic 6 of 8

Connection Mechanism Selection

Step 1 of 8

Think first Given a task's limits on latency, security and state, how do you choose between an MCP server, a direct API call or a subagent handoff?

Why it matters: Questions give latency, security or state constraints and ask which connection mechanism or MCP transport fits them.

Pick the connection that the constraints favor. HTTP suits remote request-response servers, WebSocket suits servers that push events, and stdio suits local system access. A subagent handoff keeps noisy side work in its own context and returns only a summary.

Step 2 of 8

Term Meaning
MCP connector A Messages API feature that reaches remote MCP servers directly, with no separate MCP client.
Stdio server An MCP server that runs as a local process on your own machine.
Subagent A helper with its own context window, system prompt, tool access and permissions.
Vault Where a Managed Agents session gets MCP credentials, so secrets stay out of the agent definition.

Step 3 of 8

HTTP is the recommended transport for remote MCP servers. It is the most widely supported transport for cloud services. It also supports OAuth and the --transport flag. The older SSE transport is deprecated, so use HTTP where you can.

Three MCP server transports compared

Feature HTTP WebSocket Stdio
Where it runs Remote server Remote server Local process on your machine
Best fit Servers that only answer requests Servers that push events unprompted Direct system access or custom scripts
Default idle window 5 minutes 5 minutes 30 minutes

Exam trap WebSocket is not the default pick for remote servers. Use it only when the server pushes events, because it lacks OAuth and the --transport flag.

Step 4 of 8

The MCP connector calls remote servers with no MCP client. Only tool calls from the MCP specification are supported. The server must be public over HTTP, so local stdio servers cannot connect directly. You also handle the OAuth flow and token refresh yourself.

Exam trap A local stdio server cannot be attached to the MCP connector. The connector needs a server that is publicly exposed over HTTP.

Step 5 of 8

MCP connector data falls outside Zero Data Retention. Tool definitions and results exchanged with MCP servers follow Anthropic's standard retention policy. Servers that fetch external content add prompt injection risk. So verify you trust each server before connecting it.

Exam trap A ZDR arrangement does not cover data sent through the MCP connector. That data is kept under the standard retention policy.

Step 6 of 8

A subagent keeps noisy side work out of the main context. Each subagent has its own context window, system prompt, tool access and permissions. It suits a side task that would flood the conversation with logs or file contents. Only its summary comes back.

Step 7 of 8

Define a server inline in a subagent to save main context. A server listed in the subagent's mcpServers field stays out of the main conversation. Its tool descriptions then use no context there. In Managed Agents, each session takes MCP credentials from a vault, not the agent definition.

Step 8 of 8

  • HTTP is the recommended transport for remote MCP servers, and SSE is deprecated.
  • Use WebSocket only for servers that push events, and stdio for local system access.
  • The MCP connector supports only tool calls and needs a public HTTP server.
  • Data exchanged through the MCP connector is not covered by ZDR.
  • Hand noisy side tasks to a subagent, which returns only a summary.

Sources: Connect Claude Code to tools via MCP - Claude Code Docs (opens in a new tab) · Create custom subagents - Claude Code Docs (opens in a new tab) · MCP connector - Claude Platform Docs (opens in a new tab)

Check

Check: Connection Mechanism Selection

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Progressive Discovery vs. Monolithic Context Loading · 9 steps + check · 5 min

Domain 3 · Topic 7 of 8

Progressive Discovery vs. Monolithic Context Loading

Step 1 of 9

Think first When should an agent discover tools and context on demand instead of loading everything into the window up front?

Why it matters: Questions describe a workload's context demands and latency tolerance and ask which loading strategy fits its economics.

Everything in the request counts toward the context window, and more tokens can lower accuracy. Tool search keeps tool definitions out until Claude asks for them, at the price of one extra lookup turn. Prompt caching suits a large but fixed tool list, and it lowers only what you pay.

Step 2 of 9

Term Meaning
Context rot The drop in accuracy and recall as the number of tokens in context grows.
Tool search A way for Claude to find deferred tool definitions on demand instead of loading them all.
Prompt caching Reuse of a stored prompt prefix that cuts cost on later requests, not token count.
Context editing Removing old tool results from history mid-conversation once they have done their job.

Step 3 of 9

Tool definitions, the system prompt and all messages use context. Tool results count too, along with images and documents in messages. More is not automatically better. As tokens pile up, accuracy and recall degrade, which is called context rot.

Exam trap Loading every document and tool "just in case" is not the safe choice. Extra tokens can make the model less accurate, not more.

Step 4 of 9

Deferred tools stay out of context until Claude asks. Mark tools with defer_loading: true and add a tool search tool. Claude then looks up a definition only when it needs one. The cost is one extra turn of latency; the gain is a much smaller baseline context.

Step 5 of 9

Use it at 10 or more tools, or when baseline context grows. It suits a large toolset where most tools are not needed on a given turn. If the workload cannot spare an extra lookup turn, weigh that latency against the context saved.

Step 6 of 9

Caching cuts cost; discovery cuts tokens. The two solve different problems, so pick by what the workload needs to shrink.

Prompt caching and tool search compared

Feature Prompt caching Tool search
Best fit A large but fixed list of tools Many tools, few used each turn
Tokens in context Unchanged; cached prefixes still count Reduced; schemas load on demand
Main cost Writes cost 25% above base input price An extra lookup turn when a tool is needed

Exam trap Caching a huge prompt does not free up the context window. The cached tokens still count; only the price of reusing them drops.

Step 7 of 9

Programmatic tool calling runs a chain of calls as one script. Its intermediate results never enter the conversation history. Context editing removes old tool results once they have served their purpose. It does this without restarting the conversation.

Step 8 of 9

Clearing tool results breaks cached prompt prefixes. When content is cleared, cached prompt prefixes are invalidated. So clear enough tokens to make that invalidation worthwhile. The clear_at_least parameter sets a minimum number of tokens cleared each time.

Step 9 of 9

  • Tool definitions, the system prompt and tool results all use context window space.
  • Tool search trades one extra lookup turn for a much smaller baseline context.
  • Consider tool search at 10 or more tools, most unused on any turn.
  • Prompt caching lowers cost but never lowers the tokens counted in context.

Sources: Context windows - Claude Platform Docs (opens in a new tab) · Manage tool context - Claude Platform Docs (opens in a new tab) · Context editing - Claude Platform Docs (opens in a new tab)

Check

Check: Progressive Discovery vs. Monolithic Context Loading

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Production Reliability Controls · 9 steps + check · 5 min

Domain 3 · Topic 8 of 8

Production Reliability Controls

Step 1 of 9

Think first Reading error traces from a production integration, how do you tell which reliability control fits without causing duplicate side effects?

Why it matters: Questions show error traces or throughput data and ask which retry, rate-limit, idempotency or fallback control fixes the failure safely.

Each failure has its own signature and its own fix. Claude Code retries transient errors with backoff, but it does not re-run a request that fails after a tool call completed. Retry refusals on a fallback model sized for the load.

Step 2 of 9

Term Meaning
Exponential backoff Claude Code's retry pattern for transient failures, up to 10 retries before an error.
Stop reason Part of a successful response that says why generation stopped normally.
Server-side fallback The API retries a request on a fallback model, but only after a safety classifier decline.
Sticky routing After a fallback, later turns of that conversation go straight to the fallback model.

Step 3 of 9

Stop reasons mean success; 4xx and 5xx codes mean failure. An error means request processing failed. A stop reason comes inside a valid response and explains why generation ended. For example, pause_turn means a server-tool loop hit its limit, which is 10 iterations per request by default.

Step 4 of 9

Claude Code retries transient failures before it reports them. It makes up to 10 retries with exponential backoff, then shows an error. Some failures are never retried, as the table shows.

How Claude Code treats common failures

Failure Retried? Why
Temporary 429 throttle Yes It is a transient throttle, retried with backoff
Gateway spend-limit 429 No It is not a throttle
TLS certificate validation failure No, reported on the first attempt The certificate setup needs fixing
TLS handshake timeout Yes It is a transient TLS condition

Exam trap Not every 429 is a throttle. A gateway's spend-limit 429 is not retried, since it is not a throttle.

Step 5 of 9

Claude Code does not re-run a request after a tool call completed. This covers a server error, dropped connection or stalled stream after Claude finished a text block or tool call. A re-run might run those same tool calls a second time. It keeps the completed work and continues the turn from there.

Step 6 of 9

Every fallback attempt counts against its own model's limits. That includes attempts that declined. If the fallback model is rate limited or overloaded, no attempt is made and the refusal comes back. Give it rate limits big enough for your expected volume of refusals.

Step 7 of 9

Fallen-back conversations stick to the fallback model. The routing decision is kept for about 1 hour, within your organization only. It is best-effort, so your code must still handle the requested model being tried again.

Step 8 of 9

Refusals arrive as HTTP 200, so error dashboards miss them. Track refusals as their own signal and alert on the gap between refusals and fallback-served responses. Read rate limits from the Rate Limits API at startup and on a schedule. Each limit is listed by type, such as requests_per_minute.

Step 9 of 9

  • Retry transient failures with backoff, up to 10 times in Claude Code.
  • Claude Code does not re-run a request that fails after a tool call completed, since the tool could run twice.
  • Server-side fallback reacts only to safety classifier declines, not to rate limits or overloads.
  • Instrument refusals separately, because they return HTTP 200.

Sources: Error reference - Claude Code Docs (opens in a new tab) · Refusals and fallback - Claude Platform Docs (opens in a new tab) · Stop reasons and fallback - Claude Platform Docs (opens in a new tab) · Rate Limits API - Claude Platform Docs (opens in a new tab)

Check

Check: Production Reliability Controls

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Domain 3 · after the last topic

Domain 3 review

Each topic's Check tested it on its own; this mixes them.

Mixed quiz

Take the Domain 3 quiz

15 questions mixed from every topic in this domain, each answer explained. Mixing topics is harder than one at a time, and it is what the exam does. No account needed; with a free account your answers also build your estimated exam score.

Flashcards

Domain 3 flashcards

16 cards with this domain's key facts. Flip each one and check what you knew. No account needed.

Test yourself in exam conditions

A full Claude Certified Architect – Professional mock exam: 70 questions in 120 minutes, scored against the real exam's pass mark. Your first one is free.

Start a free mock exam
Next domain · 17% of the examEvaluation, Testing, and Optimization7 topics

Report a problem

On “”. Tell us what looks wrong; we read every report.

What is the problem?

Optional.