Architect ProCCAR-P
Practice
Architect Pro overview
Architect Professional Notes
  1. How to Use These Notes
  2. 1From Business Problem to Architecture
  3. 2Choosing the Pattern: Workflows, Agents and Multi-Agent Systems
  4. 3Models and Prompts as Design Decisions
  5. 4Context, Tokens and Prompt Reuse
  6. 5Integration Mechanisms and Capability Scope
  7. 6Retrieval-Augmented Generation
  8. 7Identity, Latency and Observability
  9. 8Evaluation, Testing and Optimization
  10. 9Governance, Safety and Risk
  11. 10Discovery, Communication and the System Lifecycle
  12. 11Team Enablement and Operations
  13. 12Capstone Design Reviews
Unofficial community study guide, not affiliated with or endorsed by Anthropic. Claude is a trademark of Anthropic, PBC.
Architect Pro overview
Architect Professional Notes·8 / 13·22 min read

Chapter 7: Identity, Latency and Observability

Summary: These three objectives are operational. An agent system is only as secure as the identity each hop carries, only as fast as the slowest part of the request you actually tuned, and only as observable as the signal you chose for the question being asked. Pro items reward naming the exact hop, the exact latency component, and the exact signal.

Tool-scope decisions (which tools exist at all) are in Chapter 5. Evaluation metrics and dashboards for quality are in Chapter 8. Guardrails and human review are in Chapter 9.

Most agent security gaps are identity gaps: who the call acts as, and what the token is good for

Objective D3.2: Analyze authentication and authorization requirements to identify security gaps.

The decision

An agent system has several hops, and each one carries a credential. The architect decides, hop by hop, which principal the call acts as and how narrow the credential is. A gap is a hop where the answer is "a shared, long-lived, broad secret" or "nobody checked."

HopCredentialTypical gapControl
App → Claude APIAPI key, Workload Identity Federation token, or App Attest token1Static key in CI; legacy workspace key with no ownerService account plus WIF; identity-backed keys
Agent harness → its own toolsPermission rules, modes and hooks7bypassPermissions with an allow list believed to restrictDeny rules, removed tools, dontAsk, hooks
Agent → MCP serverOAuth access token4Broad scopes granted upfront; token accepted for the wrong audienceAudience validation, least-privilege scopes, step-up
MCP server → downstream APIThe server's own credentialToken passthrough: forwarding the client's token6Server obtains its own token for the downstream API
Agent sandbox → external servicesInjected secretAgent can read the secret and exfiltrate itProxy or vault outside the sandbox8

The Claude API side: identity-backed keys and federation

The Claude API supports API keys, Workload Identity Federation (WIF) and App Attest. API keys and WIF grant the same API access; the difference is lifetime and ownership.1

  • Personal keys act as you, with your roles. A shared personal key acts as one person and breaks when they leave.1
  • Service account keys act as a non-human identity the organization manages. Use them for CI and production services.1
  • Workspace keys are legacy: they belong to the workspace and act as no one, so they survive their creator leaving. Anthropic recommends identity-backed keys or WIF instead.1 The Usage and Cost Analytics API shows the consequence: a workspace key's requests are attributed to the key itself, not to a person or service account.21
  • WIF exchanges a short-lived JWT from an identity provider you already run (AWS IAM, Google Cloud, GitHub Actions, Kubernetes, Entra ID, Okta and others) for a short-lived Claude API token bound to a service account. Token lifetime defaults to 3,600 seconds and is configurable from 60 to 86,400, and never outlives the upstream JWT by more than a small margin.2
  • App Attest is for iOS and macOS apps that call the API directly from the device. Tokens expire after 1 hour and authorize only Messages API calls.1

Two WIF facts produce good distractors. First, WIF is only as strong as your identity provider; a static cloud credential that can mint IdP tokens one step earlier still undermines it.<sup>[1][2]</sup> Second, SDK credential precedence puts ANTHROPIC_API_KEY above the federation variables. A team that configures federation but leaves the old key injected is still using the static key. The migration steps are: configure federation in parallel, confirm which credential wins, unset the key everywhere, then delete it.2

Workspaces are the blast-radius unit on the API side. Every request runs in exactly one workspace and can only reach that workspace's files, batches and skills. Workspaces carry their own spend and rate limits, which can be lower but not higher than the organization's.3 Separate workspaces for development, staging and production mean a leaked dev key cannot read production batch results. Every response carries an anthropic-workspace-id header, so you can confirm which workspace a request actually counted against.3

The MCP side: OAuth with audience binding

MCP authorization is optional, but strongly recommended when a server touches user data, needs per-user audit or rate limits, or runs in an enterprise.5 HTTP servers should follow the OAuth-based spec. Stdio servers should not; they take credentials from the environment instead.4

The flow, in short: the server answers 401 with a pointer to its Protected Resource Metadata; the client discovers the authorization server, registers (pre-registered or dynamic), runs authorization code with PKCE, and sends the access token on each request.5 The rules that matter for gap analysis:

  • Audience binding. Clients must send a resource indicator for the specific MCP server, and servers must validate that a token was issued for them. Servers must not accept or transit other tokens.4
  • No token passthrough. A server that forwards the client's token to a downstream API breaks audit trails, bypasses the downstream service's controls and can create a confused-deputy problem. The spec forbids it.6
  • Scope minimization. Start with a minimal scope set and elevate with targeted WWW-Authenticate scope challenges when a privileged operation is first attempted. Wildcard or omnibus scopes are a listed mistake, as is treating the scopes in a token as sufficient without server-side authorization logic.6
  • Hygiene. Short-lived access tokens, never log Authorization headers or tokens, separate app and resource-server credentials, and never tie authorization to Mcp-Session-Id.5

On the Messages API's MCP connector, you run the OAuth flow, pass the token as authorization_token, and refresh it.9 That makes per-user delegation your application's job: one user's request should carry that user's token, not a shared one.

Whose identity is the agent acting as?

This is the question behind most D3.2 stems. There are two legitimate answers, and the gap is usually mixing them.

PatternThe call acts asRight forRisk if misused
DelegatedThe end user, through their OAuth tokenReading and changing that user's dataA shared token makes every user act as one user
Service identityA service account the agent ownsBack-office work no single user ownsIf the service account is broad, any user can reach anything through the agent

Three details from the pages sharpen this.

  • Managed Agents vault credentials are session-scoped. Every thread in a session, including subagents, gets the same credentials.10 The settings do not narrow what a key allows; limit the key's permissions at the service that issued it.11
  • Telemetry identity is the service's, not the user's. The Agent SDK attaches identity attributes based on the credential it uses to call Anthropic. In a multi-user deployment, those identify your service, not the end user. Inject end-user identity as resource attributes on each query() call if you need a per-user audit trail.12
  • Third-party products cannot reuse claude.ai login. Unless previously approved, Anthropic does not allow third-party developers to offer claude.ai login or its rate limits in products built on the Agent SDK; they use API key authentication.13

Agent permissions: what the harness lets the agent do

In the Agent SDK, a tool call is checked in order: hooks, deny rules, ask rules, permission mode, allow rules, then the canUseTool callback.7 The gap analysis follows from the order.

  • A deny rule wins even in bypassPermissions and even after a hook returned allow.7
  • allowed_tools does not constrain bypassPermissions. allowed_tools=["Read"] with bypassPermissions still approves Bash, Write and Edit.7
  • Auto-approved calls never reach canUseTool, so checks placed there are silently skipped. For a check that must run on every call, use a PreToolUse hook.7
  • A subagent inherits bypassPermissions from the main session.7
  • For a locked-down agent, pair allowedTools with dontAsk, which denies anything that would otherwise prompt.7

For credentials the agent needs but should never see, Anthropic's recommended pattern is a proxy outside the agent's security boundary that injects credentials into outgoing requests, enforces an endpoint allowlist and logs every request.8

Reading the evidence

SymptomLikely gap
Downstream API logs show requests "from" the MCP client's identityToken passthrough6
A stolen token reached tools unrelated to the user's taskOmnibus scopes granted upfront6
Federation configured, but rotation of the old key broke productionANTHROPIC_API_KEY was still winning precedence2
An integration kept working after its author leftLegacy workspace key, owned by no one1
Every user's actions appear under one identity in the SIEMShared service credential; no end-user attributes12
A permission check in canUseTool never firedThe call was auto-approved earlier in the order7

Numbers worth knowing

  • WIF token lifetime: default 3,600 s, range 60–86,400 s.2
  • App Attest tokens: 1 hour, Messages API only.1
  • Console key expiration presets: 3 hours, 1 day, 7 days, 30 days, custom, or Never.1
  • 100 workspaces per organization by default.3

Latency is a budget, and the right knob depends on which part of the latency is too slow

Objective D3.3: Evaluate accuracy-latency trade-offs and justify configuration decisions.

The decision

"Too slow" has components. Time to first token (TTFT) is how long the user waits before anything appears. Output speed is tokens per second after that. Total latency is the end-to-end time, which for an agent includes every model round trip and tool call. Throughput is how much work finishes per hour. Each knob moves a different component, and most cost accuracy, money or both.

Anthropic's latency guide sets the order of work: first engineer a prompt that works without latency constraints, then reduce latency. Optimizing too early hides what top performance looks like.14

The knobs and what each one moves

KnobMovesAccuracy costPrice effectWatch for
Model choiceEverythingReal, on hard tasksLargeHaiku 5.5 is the fastest current model; Fable 5.1 is listed as slower20
EffortOutput tokens, thinking, number of tool callsSome at lower levelsFewer tokensOften a better lever than switching models20
Fast modeOutput speed, up to 2.5xNone (same model)PremiumNot TTFT; Opus 5.5 is generally available, Opus 5 and 4.8 in research preview15
StreamingPerceived latencyNoneNoneRequired by the SDK for large max_tokens to avoid HTTP timeouts17
Prompt cachingTTFT on long, repeated prefixesNoneCheaper repeatsPre-warming removes the first-request miss18
Shorter prompt and outputAll componentsRisk if needed content is cutCheapermax_tokens cuts mid-sentence; ask for brevity instead14
Programmatic tool callingAgent total latency on fan-outNone to slight gainUsually cheaper on fan-outNo gain on strictly sequential calls26
Batch APINothing for interactive use; raises throughputNone50% offMost batches finish within 1 hour; up to 24 hours19

Effort deserves the most attention because it is the first knob the pages recommend. It affects all output tokens, including tool calls and thinking. Lower effort makes fewer and terser tool calls.16 Defaults differ by model: high on most, but medium on Opus 5.5 and Haiku 5.5. Anthropic tells teams to run a fresh effort sweep on their own evals after a model change rather than carry settings over, and notes that Sonnet 5.5's levels are recalibrated relative to Sonnet 5.16 Haiku 5.5 at low may skip a search, stop early or skip a check in long agent prompts; that is the accuracy cost to name.16

Fast mode runs the same model on a faster inference configuration, with no change to intelligence. Its gain is output tokens per second, not TTFT.15 On Opus 5.5 it costs $8 input and $40 output per million tokens, against a standard $4 and $20, so about double.<sup>[15][25]</sup> It has its own rate limit, returns 429 with retry-after when exceeded, and is not available with the Batch API or with a Priority Tier commitment. The response's usage.speed says which speed actually ran.15

Service tiers are a trap for memorized answers. A Priority Tier commitment is no longer sold, and Priority Tier is not supported on the newest models, including Opus 5.5, Sonnet 5.5 and Haiku 5.5.24 Standard tier is best-effort. Priority Tier, for existing commitments, targets 99.5% uptime and falls back to standard beyond committed capacity.24 So "buy Priority Tier" is not a current answer to a latency problem on a current model.

Knob changes interact with caching

Changing output_config.effort between requests always invalidates cached message blocks, and on some models the tool and system caches too. Switching between fast and standard speed invalidates system and message caches.18 A design that flips effort or speed per request can lose more to cache misses than it gains. On models that support it, per-message effort (beta) changes the level mid-conversation while preserving the cache.16

Options ranked by constraint

Dominant constraintPreferAvoid
Interactive chat, first-token waitStreaming plus caching of the static prefix; a faster model at tuned effortFast mode alone (it does not move TTFT)
Long generated answers too slow to finishFast mode on a supported model; ask for shorter outputA hard max_tokens cut that truncates
Agent takes too many round tripsLower effort for routine steps; programmatic tool calling for fan-out; parallel tool callsA bigger model
Cost ceiling, latency tolerantBatch API at 50% off19Fast mode
Accuracy cannot dropKeep model and effort; buy speed with fast mode, caching and streamingDown-shifting model or effort without an eval

Reading the evidence

SymptomLikely cause
Fast mode enabled, users still wait long for the first wordFast mode improves output speed, not TTFT15
Latency and output length changed after a model upgrade with no other changeDifferent default effort, or recalibrated levels; set effort explicitly16
Cache hit rate fell after "adaptive" effort routing per requestTop-level effort changes invalidate the cache18
Intermittent 429 only on fast requestsFast mode's separate rate limit; fall back to standard speed15
Long non-streaming requests time out in the SDKLarge max_tokens needs streaming17
Batch job "slow" at 3 hoursWithin the 24-hour window; Batch is not for interactive latency19

Numbers worth knowing

  • Fast mode: up to 2.5x output speed; Opus 5.5 $8 / $40 per MTok against standard $4 / $20.<sup>[15][25]</sup>
  • Batch: 50% discount; most batches within 1 hour; results by 24 hours.<sup>[19][25]</sup>
  • Default effort: medium on Opus 5.5 and Haiku 5.5; high on Fable 5.1, Sonnet 5.5 and most others.<sup>[16][20]</sup>
  • Priority Tier target: 99.5% uptime, existing commitments only.24

At scale, observability means joining live traces to reconciled cost data, without exporting what you may not store

Objective D3.4: Analyze observability challenges and select monitoring strategies at scale.

The decision

Different questions need different signals. "Why did this run fail?" needs a trace. "Which team spent the most last month?" needs reconciled usage data. "Is spend spiking right now?" needs a near-real-time metric. Picking the wrong source is the most common wrong answer in this objective.

SourceGranularityFreshnessAuthoritative for billing?Best for
Agent SDK / Claude Code OpenTelemetry (metrics, log events, traces)Per request, per tool callExported every 60 s (metrics) and 5 s (logs, traces) by default12No; cost metrics are approximations22Debugging runs, live alerting, per-user audit
SDK result message total_cost_usdPer query()ImmediateNo; a client-side estimate23Development insight, rough budgets
Usage and Cost Analytics APIOrganization, by model, workspace, key, actor, tier, speedRefreshes within about 4 hours, up to 24; revised until about 7 days after month end21Yes, after reconciliationChargeback, finance, top consumers
LLM gatewayEvery request through itReal timeIts own recordsCentral budgets, audit logs, per-developer attribution27

The Analytics API is in beta. It groups by up to five dimensions, including actor (a user, service account, federated cloud identity, or the key itself), and a single request spans at most 31 days.21 The SDK cost-tracking page is blunt: do not bill end users or trigger financial decisions from total_cost_usd.23

Traces: the delegation chain as one tree

The Agent SDK runs the Claude Code CLI as a child process, and the CLI exports the telemetry. Telemetry is off until CLAUDE_CODE_ENABLE_TELEMETRY=1 and an exporter are set. Traces are in beta and need CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1.12 The span tree is what makes multi-agent systems debuggable:

  • claude_code.interaction wraps one turn; claude_code.llm_request wraps each API call with model, latency and token counts; claude_code.tool wraps each tool call, with a child span for the permission wait.12
  • A subagent's spans nest under the parent's claude_code.tool span, so a whole delegation chain is one trace.12
  • The SDK propagates W3C trace context into the CLI, so the agent's spans become children of your application's active span instead of a disconnected root.12
  • In Claude Code events, prompt.id ties every API request and tool result back to the prompt that caused it.22

Problems that appear only at scale

ProblemCauseFix from the pages
Telemetry silently missingExport errors fail silently by defaultCLAUDE_CODE_OTEL_DIAG_STDERR=1 and read stderr12
Spans lost from short jobsBatched export; killed processes lose the bufferShorter export intervals12
SDK message stream corruptedconsole exporter writes to stdout, the SDK's channelNever use console with the SDK12
All agents look like one serviceDefault service.name is claude-codeOverride service name and resource attributes12
Metrics backend cost explodingCustom resource attributes become labels on every seriesOTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES=false22
Developers redirect telemetryPer-developer exporter settingsManaged settings lock the OTLP endpoint; repo settings cannot enable exporters22

Content capture is opt-in, and should stay that way unless approved

Telemetry is structural by default: durations, model and tool names, token counts. Prompt text, tool arguments, tool output and raw API bodies are each behind an opt-in variable (OTEL_LOG_USER_PROMPTS, OTEL_LOG_TOOL_DETAILS, OTEL_LOG_TOOL_CONTENT, OTEL_LOG_RAW_API_BODIES). The page says to leave them unset unless your pipeline is approved to store the data the agent handles.12 Raw file contents are not in metrics or events; with OAuth, user.email is included and goes only to your configured endpoint.22 A stem that asks for "full prompt logging for debugging" in a regulated workload is testing this: the better answer scopes content capture to an approved pipeline or keeps it off and debugs from structure.

Reading the evidence

SymptomLikely cause
Finance totals disagree with the in-app cost dashboardThe dashboard used client estimates; reconcile with the Analytics API23
Spend alert built on the Analytics API fires hours lateData refreshes within about 4 hours, up to 2421
Subagent work invisible in tracesTracing beta not enabled, or the trace was not propagated12
Usage for an integration shows the key as the "actor"Legacy workspace key with no linked identity21
Per-user audit shows only the serviceIdentity attributes reflect the service credential12

Numbers worth knowing

  • Default export intervals: metrics 60 s, traces and logs 5 s.12
  • Analytics API: refresh within about 4 h (up to 24 h); 31-day maximum span; up to 5 group_by dimensions; data from January 1, 2026.21
  • Content capture truncation: 60 KB by default for tool output and inline raw bodies.12

Worked design review: a multi-tenant support agent with one key, one token and no traces

The system. A SaaS company runs a customer-support agent on the Agent SDK in Kubernetes. It serves 40 tenant companies. It reaches the Claude API with a legacy workspace key stored as a CI secret. It reaches the CRM through an MCP server using one OAuth token with full scopes, shared by all tenants. The MCP server forwards that token to the CRM's API. Finance bills tenants from total_cost_usd. Users complain that answers take too long to start appearing.

The constraint that decides. Tenant A's conversations must never be able to read tenant B's CRM records, and every tool call must be attributable to a tenant and a user.

The flawed fixes on the table.

  • "Add a system-prompt rule that the agent may only access the current tenant's records."
  • "Enable audit logging of all prompts and tool output."
  • "Turn on fast mode to fix the slow responses."
  • "Switch the dashboard to the Analytics API so billing is real time."

The better design.

  1. Per-user delegated tokens to the CRM. Each user authorizes the CRM through OAuth; the MCP server validates the token's audience and obtains its own token for the CRM instead of passing the user's through.<sup>[4][6]</sup> Scopes start minimal and step up for write actions.6 The CRM then enforces tenant boundaries, because each call carries a user who belongs to one tenant.
  2. Workload identity for the Claude API. A service account per environment, federated from the Kubernetes service-account token, with the old key unset everywhere and deleted.2 Separate workspaces for staging and production, each with a spend limit.3
  3. Traces with tenant and user attributes. Enable OTel export and tracing beta, set service.name, and inject tenant and user as resource attributes on each query().12 Keep content capture off; the structural events (tool_decision, tool_result, safety_event) give the audit trail.12 Keep the tenant ID out of metric labels if cardinality is a problem.22
  4. Bill from reconciled data. Monthly tenant billing comes from the Analytics API grouped by actor or workspace, not from client estimates.<sup>[21][23]</sup>
  5. Fix the latency component that is slow. The complaint is time to first token. Stream the response and cache the long static system prompt and tool definitions, pre-warming the cache if needed.<sup>[17][18]</sup> Then tune effort on evals.16

Why each tempting alternative loses.

  • The system-prompt rule is guidance, not enforcement. The shared full-scope token still reaches every tenant.
  • Logging all prompts and tool output is a compensating control that also exports customer data to a pipeline nobody approved.
  • Fast mode speeds output after the first token, not the wait before it, at about double the price.
  • The Analytics API is not real time; it refreshes within hours. It is the right source for billing precisely because it is reconciled, not because it is live.

How wrong answers are built

  • "Add a confirmation prompt before CRM writes." Family 1. The cross-tenant reach should not exist; fix the token.
  • "Pass the user's token through the MCP server to the downstream API." This is token passthrough, which the spec forbids.
  • "Migrate to WIF; the static key can stay as a fallback." Family 4. Precedence means the key keeps winning.
  • "allowed_tools limits a bypassPermissions agent to the listed tools." It does not; unlisted tools are approved too.
  • "Enable fast mode to cut time to first token." Family 3. It raises output speed, not TTFT.
  • "Buy Priority Tier for the new model." Family 3. Commitments are no longer sold, and current models are not supported.
  • "Set a low max_tokens to speed up answers." Family 2. It truncates mid-sentence.
  • "Drop to the smallest model to fix slow agent runs." Family 2. Without an eval, it trades away accuracy the stem required; effort and round-trip reduction come first.
  • "Bill customers from the SDK's cost field." Family 3. It is a client-side estimate.
  • "Alert on spend spikes from the Analytics API." Family 3. Its data lags by hours; use live OTel cost metrics for alerting.
  • "Log full prompts and tool output for observability." Family 1, and a data-handling risk.

What to remember

  • Name the hop: app to API, harness to tools, agent to MCP, MCP to downstream, sandbox to secrets.
  • Prefer service accounts and WIF over static keys; unset the old key, because it wins precedence.
  • MCP servers validate token audience and never pass tokens through. Scopes start minimal and step up.
  • Delegated identity for user data, service identity for back-office work. Do not let a shared token make everyone one user.
  • Deny rules and hooks enforce. allowed_tools approves. bypassPermissions approves the rest.
  • Match the latency knob to the component: streaming and caching for TTFT, fast mode for output speed, effort and PTC for agent round trips, Batch for throughput.
  • Set effort explicitly and re-sweep after a model change. Changing it per request can break the cache.
  • OTel for live debugging and alerts, the Analytics API for reconciled cost, never client estimates for billing.
  • Telemetry content capture is opt-in. Keep it off unless the pipeline is approved.

Endnotes for this chapter

  1. API key types and who each acts as, workspace selection, key expiration, WIF's limits, and App Attest token scope and lifetime. Anthropic, "Authentication" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/manage-claude/authentication
  2. Service accounts, federation issuers and rules, token lifetime bounds, credential precedence and the migration steps from API keys. Anthropic, "Workload Identity Federation" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/manage-claude/workload-identity-federation
  3. Workspace scoping of requests and resources, workspace limits, roles, the 100-workspace default and the anthropic-workspace-id header. Anthropic, "Workspaces" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/manage-claude/workspaces
  4. Authorization is optional; HTTP versus stdio requirements; resource indicators; audience validation; servers must not accept or transit other tokens. MCP, "Authorization" (MCP specification, accessed 2026-11-02), https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/index
  5. When to use authorization, the step-by-step OAuth flow, and common pitfalls such as long-lived tokens, logging credentials and session-ID authorization. MCP, "Understanding Authorization in MCP" (MCP docs, accessed 2026-11-02), https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/authorization
  6. Token passthrough, confused deputy and scope minimization, including step-up authorization and common scope mistakes. MCP, "Security Best Practices" (MCP docs, accessed 2026-11-02), https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices
  7. The permission evaluation order, allowed_tools versus bypassPermissions, auto-approved calls skipping canUseTool, dontAsk, and subagent mode inheritance. Anthropic, "Configure permissions" (Claude Code Docs, accessed 2026-11-02), https://code.claude.com/docs/en/agent-sdk/permissions
  8. Security boundaries, least privilege, and the proxy pattern for injecting credentials outside the agent's boundary. Anthropic, "Securely deploying AI agents" (Claude Code Docs, accessed 2026-11-02), https://code.claude.com/docs/en/agent-sdk/secure-deployment
  9. The MCP connector's authorization_token, with the caller responsible for obtaining and refreshing it. Anthropic, "MCP connector" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/agents-and-tools/mcp-connector
  10. Session-scoped vault credentials shared by every thread in a Managed Agents session. Anthropic, "Multiagent orchestration" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration
  11. Limiting a key's permissions at the service that issued it, since sandbox settings do not. Anthropic, "Security risks and sandbox boundaries" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/managed-agents/secure-deployment-risks
  12. How the SDK exports telemetry, span names and nesting, trace-context propagation, export intervals and failure modes, service tagging, end-user attribution and opt-in content capture. Anthropic, "Observability with OpenTelemetry" (Claude Code Docs, accessed 2026-11-02), https://code.claude.com/docs/en/agent-sdk/observability
  13. Third-party developers may not offer claude.ai login or rate limits in Agent SDK products without approval. Anthropic, "Agent SDK overview" (Claude Code Docs, accessed 2026-11-02), https://code.claude.com/docs/en/agent-sdk/overview
  14. Engineer for quality before latency, TTFT and baseline latency, prompt and output length, max_tokens truncation and streaming. Anthropic, "Reducing latency" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-latency
  15. Fast mode's output-speed gain, unchanged intelligence, separate rate limits, usage.speed, Batch and Priority Tier exclusions, pricing and model availability. Anthropic, "Fast mode" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/build-with-claude/fast-mode
  16. Effort levels, per-model defaults and recommendations, effect on tool calls, and per-message effort preserving the cache. Anthropic, "Effort" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/build-with-claude/effort
  17. The SDK requires streaming for large max_tokens to avoid HTTP timeouts. Anthropic, "Streaming messages" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/build-with-claude/streaming
  18. What invalidates the cache (tools, effort, speed), TTFT gains and cache pre-warming. Anthropic, "Prompt caching" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/build-with-claude/prompt-caching
  19. Batch processing completion times and the 24-hour window. Anthropic, "Batch processing" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/build-with-claude/batch-processing
  20. Comparative latency and default effort for current models, and effort as often a better lever than switching models. Anthropic, "Models overview" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/models/overview; and Anthropic, "Choosing the right model" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/about-claude/models/choosing-a-model
  21. The Usage and Cost Analytics API's endpoints, dimensions, actors, date-range limits, beta status and data freshness. Anthropic, "Usage and Cost Analytics API" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api
  22. Claude Code's managed-settings lock on OTLP destinations, cardinality controls, prompt.id correlation, cost metrics as approximations, and privacy defaults. Anthropic, "Monitoring" (Claude Code Docs, accessed 2026-11-02), https://code.claude.com/docs/en/monitoring-usage
  23. total_cost_usd is a client-side estimate and must not drive billing. Anthropic, "Track cost and usage" (Claude Code Docs, accessed 2026-11-02), https://code.claude.com/docs/en/agent-sdk/cost-tracking
  24. The three service tiers, Priority Tier's uptime target and fallback, unsupported models, and commitments no longer being sold. Anthropic, "Service tiers" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/api/service-tiers
  25. Standard and fast-mode prices for Claude Opus 5.5 and the 50% Batch discount. Anthropic, "Pricing" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/about-claude/pricing
  26. Programmatic tool calling removes model round trips between tool calls, with no benefit for strictly sequential workflows. Anthropic, "Programmatic tool calling" (Claude Docs, accessed 2026-11-02), https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling
  27. What an LLM gateway centralizes (credentials, usage attribution, budgets, audit logging) and the cost of operating one. Anthropic, "Other LLM gateways" (Claude Code Docs, accessed 2026-11-02), https://code.claude.com/docs/en/llm-gateway

For detailed info, read the official docs

  • Authentication
    platform.claude.com
  • Workload Identity Federation
    platform.claude.com
  • Workspaces
    platform.claude.com
PreviousChapter 6: Retrieval-Augmented GenerationNextChapter 8: Evaluation, Testing and Optimization