From cacc20346da4e30519e0536caf0aa8ade8a70b70 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2026 05:32:23 +0000 Subject: [PATCH] docs: Claude Code v2.1.309 - Claude Models on Google Cloud splits into Anthropic-managed and Google-managed; sandbox escape fixes Co-Authored-By: claude-yolo[bot] --- content/.metadata.json | 1466 +++--- content/CHANGELOG.md | 82 + content/claude-code-manifest.json | 40 +- .../connectors/building/authentication.md | 51 +- .../building/directory-vs-custom.md | 2 +- .../building/managing-your-listing.md | 2 + .../claude/connectors/building/submission.md | 6 +- content/claude/cowork/changelog.md | 22 + content/claude/cowork/hipaa-setup.md | 4 +- content/claude/cowork/monitoring.md | 2 +- .../claude-desktop/admin-console.md | 2 +- .../third-party/claude-desktop/bedrock.md | 142 +- .../third-party/claude-desktop/bootstrap.md | 144 +- .../third-party/claude-desktop/browser.md | 2 +- .../third-party/claude-desktop/claude-api.md | 12 +- .../claude-desktop/configuration-changelog.md | 6 + .../claude-desktop/configuration-format.md | 161 + .../claude-desktop/configuration.md | 4349 +++++++++++++---- .../claude-desktop/credential-helper.md | 2 +- .../third-party/claude-desktop/extensions.md | 2 +- .../third-party/claude-desktop/foundry.md | 83 +- .../third-party/claude-desktop/gateway.md | 291 +- .../claude-desktop/installation.md | 46 +- .../third-party/claude-desktop/mantle.md | 142 +- .../claude/third-party/claude-desktop/mdm.md | 4 +- .../third-party/claude-desktop/models.md | 2 +- .../claude-desktop/network-proxy.md | 2 +- .../claude-desktop/ssh-remote-sessions.md | 58 +- .../third-party/claude-desktop/telemetry.md | 2 +- .../third-party/claude-desktop/vertex.md | 201 +- content/en/about-claude/model-deprecations.md | 2 +- .../models/model-ids-and-versions.md | 6 +- .../optimizing-for-cost-and-intelligence.md | 33 +- content/en/about-claude/pricing.md | 142 +- .../use-case-guides/commerce-agents.md | 2 +- .../use-case-guides/content-moderation.md | 260 +- .../use-case-guides/customer-support-chat.md | 50 +- .../use-case-guides/legal-summarization.md | 138 +- .../use-case-guides/ticket-routing.md | 12 +- .../agent-skills/claude-api-skill.md | 4 +- .../agents-and-tools/agent-skills/overview.md | 2 +- .../agent-skills/quickstart.md | 4 +- content/en/agents-and-tools/mcp-connector.md | 60 +- .../mcp-tunnels/quickstart.md | 2 +- .../agents-and-tools/tool-use/advisor-tool.md | 65 +- .../en/agents-and-tools/tool-use/bash-tool.md | 40 +- .../tool-use/browser-use-sdk.md | 10 +- .../tool-use/browser-use-tool.md | 52 +- .../tool-use/build-a-tool-using-agent.md | 134 +- .../tool-use/computer-use-tool.md | 72 +- .../agents-and-tools/tool-use/define-tools.md | 4 +- .../tool-use/fine-grained-tool-streaming.md | 38 +- .../agents-and-tools/tool-use/memory-tool.md | 70 +- .../en/agents-and-tools/tool-use/overview.md | 50 +- .../tool-use/parallel-tool-use.md | 16 +- .../tool-use/programmatic-tool-calling.md | 259 +- .../agents-and-tools/tool-use/server-tools.md | 23 +- .../tool-use/text-editor-tool.md | 328 +- .../tool-use/tool-reference.md | 2 +- .../agents-and-tools/tool-use/tool-runner.md | 108 +- .../tool-use/tool-search-tool.md | 2 +- .../tool-use/tool-use-with-prompt-caching.md | 2 +- .../tool-use/web-fetch-tool.md | 14 +- .../tool-use/web-search-tool.md | 10 +- content/en/api/beta-headers.md | 14 +- content/en/api/beta.md | 57 +- content/en/api/beta/organization.md | 57 +- .../beta/organization/plugin_marketplaces.md | 12 +- .../plugin_marketplaces/validate_archive.md | 6 +- .../validate_repository.md | 6 +- content/en/api/beta/organization/plugins.md | 47 +- .../api/beta/organization/plugins/create.md | 4 +- .../en/api/beta/organization/plugins/list.md | 4 +- .../api/beta/organization/plugins/retrieve.md | 4 +- .../api/beta/organization/plugins/update.md | 15 +- .../api/beta/organization/plugins/versions.md | 16 +- .../organization/plugins/versions/create.md | 4 +- .../organization/plugins/versions/list.md | 4 +- .../organization/plugins/versions/retrieve.md | 4 +- .../en/api/beta/organization/rate_limits.md | 4 +- .../api/beta/organization/rate_limits/list.md | 2 +- .../beta/organization/spend_limits/list.md | 24 +- .../en/api/beta/organization/workspaces.md | 4 +- .../organization/workspaces/rate_limits.md | 6 +- .../workspaces/rate_limits/list.md | 2 +- .../workspaces/rate_limits/update.md | 2 +- ...cloud-anthropic-managed-iam-permissions.md | 244 + content/en/api/cli/beta.md | 57 +- content/en/api/compliance.md | 8 + content/en/api/compliance/activities.md | 16 + content/en/api/compliance/activities/list.md | 8 + content/en/api/csharp/beta.md | 57 +- content/en/api/errors.md | 14 +- content/en/api/go/beta.md | 57 +- content/en/api/java/beta.md | 57 +- content/en/api/migration-2026-10-21.md | 162 +- content/en/api/organization.md | 6 +- content/en/api/organization/rate_limits.md | 4 +- .../en/api/organization/rate_limits/list.md | 2 +- content/en/api/organization/workspaces.md | 4 +- .../organization/workspaces/rate_limits.md | 6 +- .../workspaces/rate_limits/list.md | 2 +- .../workspaces/rate_limits/update.md | 2 +- content/en/api/overview.md | 21 +- content/en/api/php/beta.md | 29 +- content/en/api/python/beta.md | 57 +- content/en/api/rate-limits.md | 72 +- content/en/api/ruby/beta.md | 57 +- content/en/api/service-tiers.md | 18 +- content/en/api/typescript/beta.md | 57 +- content/en/api/versioning.md | 2 +- .../en/build-with-claude/batch-processing.md | 335 +- .../en/build-with-claude/cache-diagnostics.md | 2 +- content/en/build-with-claude/citations.md | 64 +- .../claude-in-amazon-bedrock.md | 12 +- .../claude-in-microsoft-foundry.md | 12 +- .../anthropic-managed.md | 847 ++++ .../google-managed.md | 763 +++ .../claude-models-on-google-cloud/overview.md | 79 + .../claude-on-amazon-bedrock-legacy.md | 112 +- .../claude-platform-on-aws.md | 115 +- .../compaction-background.md | 4 +- .../compaction-keep-recent-turns.md | 2 +- .../build-with-claude/compaction-on-demand.md | 9 +- .../compaction-thinking-blocks.md | 2 +- .../build-with-claude/compaction-threshold.md | 76 +- .../en/build-with-claude/context-editing.md | 14 +- content/en/build-with-claude/effort.md | 14 +- .../en/build-with-claude/extended-thinking.md | 2 +- .../en/build-with-claude/fallback-credit.md | 18 +- content/en/build-with-claude/fast-mode.md | 69 +- content/en/build-with-claude/files.md | 5 +- .../handling-stop-reasons.md | 112 +- .../mid-conversation-effort-example.md | 353 +- .../mid-conversation-system-messages.md | 91 +- .../build-with-claude/multilingual-support.md | 2 +- content/en/build-with-claude/overview.md | 2 +- content/en/build-with-claude/pdf-support.md | 429 +- .../build-with-claude/preserved-thinking.md | 38 +- .../en/build-with-claude/prompt-caching.md | 518 +- .../claude-prompting-best-practices.md | 6 +- .../prompting-claude-fable-5-1.md | 13 +- .../prompting-claude-haiku-5-5.md | 4 +- .../prompting-claude-opus-4-8.md | 4 +- .../prompting-claude-opus-5.md | 2 +- .../prompting-claude-sonnet-5.md | 2 +- .../refusals-and-fallback.md | 55 +- .../en/build-with-claude/search-results.md | 52 +- content/en/build-with-claude/skills-guide.md | 42 +- content/en/build-with-claude/streaming.md | 32 +- .../build-with-claude/structured-outputs.md | 88 +- content/en/build-with-claude/task-budgets.md | 18 +- .../thinking-steering-and-cost.md | 1327 +++-- .../thinking-tool-workflows.md | 25 +- content/en/build-with-claude/thinking.md | 26 +- .../en/build-with-claude/token-counting.md | 278 +- .../build-with-claude/vision-coordinates.md | 18 +- content/en/build-with-claude/vision.md | 180 +- .../working-with-messages.md | 28 +- content/en/claude_api_primer.md | 8 +- .../cli-sdks-libraries/cli/authentication.md | 2 +- .../libraries/openai-sdk.md | 26 +- content/en/cli-sdks-libraries/overview.md | 22 +- content/en/cli-sdks-libraries/sdks/csharp.md | 12 +- content/en/cli-sdks-libraries/sdks/go.md | 72 +- content/en/cli-sdks-libraries/sdks/java.md | 385 +- content/en/cli-sdks-libraries/sdks/php.md | 90 +- content/en/cli-sdks-libraries/sdks/python.md | 29 +- content/en/cli-sdks-libraries/sdks/ruby.md | 12 +- .../en/cli-sdks-libraries/sdks/typescript.md | 8 +- .../agent-sdk/file-checkpointing.md | 4 +- .../claude-code/agent-sdk/observability.md | 11 +- .../docs/claude-code/agent-sdk/permissions.md | 4 +- .../en/docs/claude-code/agent-sdk/skills.md | 6 +- .../claude-code/agent-sdk/slash-commands.md | 6 +- .../docs/claude-code/agent-sdk/typescript.md | 2 + content/en/docs/claude-code/agent-teams.md | 5 + content/en/docs/claude-code/changelog.md | 95 + content/en/docs/claude-code/checkpointing.md | 12 +- .../claude-code/claude-apps-gateway-deploy.md | 16 +- .../docs/claude-code/claude-apps-gateway.md | 16 + .../claude-code/claude-code-on-the-web.md | 6 +- .../en/docs/claude-code/claude-projects.md | 6 +- content/en/docs/claude-code/costs.md | 4 +- .../en/docs/claude-code/desktop-changelog.md | 40 +- content/en/docs/claude-code/desktop.md | 40 +- content/en/docs/claude-code/env-vars.md | 1 + content/en/docs/claude-code/errors.md | 159 +- .../en/docs/claude-code/features-overview.md | 6 +- content/en/docs/claude-code/glossary.md | 4 +- content/en/docs/claude-code/hooks.md | 15 +- content/en/docs/claude-code/keybindings.md | 1 + content/en/docs/claude-code/mcp.md | 17 +- content/en/docs/claude-code/memory.md | 34 +- .../en/docs/claude-code/monitoring-usage.md | 96 +- content/en/docs/claude-code/network-config.md | 10 +- content/en/docs/claude-code/permissions.md | 4 +- .../claude-code/plugins/mods/interface.md | 22 +- .../claude-code/plugins/mods/reference.md | 28 +- .../claude-code/plugins/mods/troubleshoot.md | 17 +- .../claude-code/plugins/troubleshooting.md | 4 + content/en/docs/claude-code/prompt-caching.md | 2 +- content/en/docs/claude-code/remote-control.md | 2 +- content/en/docs/claude-code/sandboxing.md | 2 +- content/en/docs/claude-code/sessions.md | 9 + .../en/docs/claude-code/settings-reference.md | 7 + content/en/docs/claude-code/skills.md | 21 +- content/en/docs/claude-code/slash-commands.md | 21 +- content/en/docs/claude-code/sub-agents.md | 7 +- .../en/docs/claude-code/tools-reference.md | 13 +- .../en/docs/claude-code/troubleshooting.md | 2 +- content/en/docs/claude-code/ultrareview.md | 25 +- content/en/docs/claude-code/vs-code.md | 46 +- content/en/docs/claude-code/worktrees.md | 4 + content/en/get-started.md | 4 +- content/en/home.md | 4 +- .../en/manage-claude/access-transparency.md | 28 +- content/en/manage-claude/admin-api.md | 2 +- .../manage-claude/api-and-data-retention.md | 7 +- content/en/manage-claude/authentication.md | 56 +- .../claude-code-analytics-api.md | 2 +- content/en/manage-claude/cmek.md | 1 + .../en/manage-claude/compliance-sessions.md | 4 +- content/en/manage-claude/data-residency.md | 28 +- .../manage-claude/inference-hooks-endpoint.md | 4 +- content/en/manage-claude/opentelemetry.md | 18 +- content/en/manage-claude/opentelemetry/api.md | 22 +- content/en/manage-claude/opentelemetry/sdk.md | 19 +- content/en/manage-claude/plugins-api.md | 14 +- content/en/manage-claude/usage-cost-api.md | 4 + .../user-profiles-verification-portal.md | 2 +- content/en/manage-claude/user-profiles.md | 26 +- content/en/manage-claude/wif-providers/aws.md | 256 +- .../en/manage-claude/wif-providers/azure.md | 360 +- content/en/manage-claude/wif-providers/gcp.md | 166 +- .../wif-providers/github-actions.md | 72 +- .../manage-claude/wif-providers/kubernetes.md | 70 +- .../en/manage-claude/wif-providers/okta.md | 208 +- .../en/manage-claude/wif-providers/spiffe.md | 14 +- content/en/manage-claude/wif-reference.md | 4 +- .../workload-identity-federation.md | 96 +- content/en/manage-claude/workspaces.md | 2 +- content/en/managed-agents/agent-setup.md | 4 +- content/en/managed-agents/budgets.md | 4 +- .../managed-agents/choosing-an-environment.md | 8 +- content/en/managed-agents/define-outcomes.md | 15 +- content/en/managed-agents/dreams.md | 5 +- content/en/managed-agents/environments.md | 2 +- content/en/managed-agents/event-deltas.md | 26 +- .../en/managed-agents/events-and-streaming.md | 33 +- content/en/managed-agents/files.md | 22 +- content/en/managed-agents/github.md | 11 +- content/en/managed-agents/mcp-connector.md | 8 +- content/en/managed-agents/memory.md | 85 +- content/en/managed-agents/migration.md | 13 +- .../multiagent-orchestration.md | 21 +- content/en/managed-agents/overview.md | 2 +- .../en/managed-agents/permission-policies.md | 53 +- content/en/managed-agents/quickstart.md | 21 +- .../managed-agents/scheduled-deployments.md | 4 - .../managed-agents/secure-deployment-risks.md | 16 +- .../en/managed-agents/secure-deployment.md | 12 +- .../self-hosted-sandboxes-custom-tools.md | 33 +- .../self-hosted-sandboxes-memory.md | 2 + .../self-hosted-sandboxes-operations.md | 4 +- .../self-hosted-sandboxes-security.md | 2 +- .../self-hosted-sandboxes-workers.md | 28 +- .../managed-agents/self-hosted-sandboxes.md | 4 +- .../en/managed-agents/session-operations.md | 14 +- content/en/managed-agents/session-threads.md | 13 +- content/en/managed-agents/sessions.md | 16 +- content/en/managed-agents/skills.md | 5 +- .../managed-agents/tools-web-restrictions.md | 5 +- content/en/managed-agents/tools.md | 6 +- content/en/managed-agents/vaults.md | 6 - content/en/managed-agents/webhooks.md | 2 +- content/en/managed-agents/workflow-runs.md | 6 +- .../en/models/fable-5-1/migration-guide.md | 26 +- content/en/models/fable-5-1/overview.md | 27 +- .../models/fable-5-1/whats-new-fable-5-1.md | 17 +- content/en/models/fable-5/overview.md | 27 +- content/en/models/haiku-4-5/overview.md | 31 +- .../en/models/haiku-5-5/migration-guide.md | 26 +- content/en/models/haiku-5-5/overview.md | 27 +- .../models/haiku-5-5/whats-new-haiku-5-5.md | 36 +- content/en/models/mythos-5-1/overview.md | 24 +- content/en/models/mythos-5/overview.md | 24 +- content/en/models/opus-4-5/overview.md | 29 +- content/en/models/opus-4-6/overview.md | 27 +- content/en/models/opus-4-7/overview.md | 27 +- content/en/models/opus-4-8/overview.md | 27 +- content/en/models/opus-5-5/migration-guide.md | 45 +- content/en/models/opus-5-5/overview.md | 29 +- .../en/models/opus-5-5/whats-new-opus-5-5.md | 24 +- content/en/models/opus-5/overview.md | 27 +- content/en/models/overview.md | 43 +- content/en/models/sonnet-4-5/overview.md | 31 +- content/en/models/sonnet-4-6/overview.md | 27 +- .../en/models/sonnet-5-5/migration-guide.md | 35 +- content/en/models/sonnet-5-5/overview.md | 31 +- .../models/sonnet-5-5/whats-new-sonnet-5-5.md | 32 +- content/en/models/sonnet-5/overview.md | 27 +- content/en/release-notes/overview.md | 24 +- content/en/test-and-evaluate/develop-tests.md | 54 +- .../handle-streaming-refusals.md | 5 +- .../.claude-plugin/marketplace.json | 2 +- ...how-do-i-log-out-of-all-active-sessions.md | 2 +- ...retention-controls-for-enterprise-plans.md | 22 +- ...k-settings-on-team-and-enterprise-plans.md | 2 +- .../10593882-share-and-unshare-chats.md | 6 +- ...ith-local-mcp-servers-on-claude-desktop.md | 2 +- content/support/11101966-use-voice-mode.md | 8 +- ...the-claude-lti-in-canvas-by-instructure.md | 2 +- ...being-asked-to-verify-my-payment-method.md | 2 +- .../11869629-use-claude-with-android-apps.md | 2 +- ...or-team-and-seat-based-enterprise-plans.md | 10 +- ...12173-get-started-with-claude-in-chrome.md | 2 +- ...eam-plan-from-monthly-to-annual-billing.md | 4 +- ...11783-create-and-edit-files-with-claude.md | 6 +- .../12157520-claude-code-usage-analytics.md | 2 +- .../support/12260368-use-incognito-chats.md | 2 +- .../support/12293051-use-claude-in-xcode.md | 2 +- ...age-usage-credits-for-paid-claude-plans.md | 2 +- ...6728-troubleshoot-claude-error-messages.md | 2 +- .../support/12512180-use-skills-in-claude.md | 2 +- ...d-using-the-desktop-extension-allowlist.md | 8 +- .../12618689-use-claude-code-in-the-cloud.md | 6 +- ...-quick-entry-with-claude-desktop-on-mac.md | 2 +- ...analytics-for-team-and-enterprise-plans.md | 24 +- ...902405-claude-in-chrome-troubleshooting.md | 2 +- ...2446-claude-in-chrome-permissions-guide.md | 10 +- .../12997503-team-plan-billing-faqs.md | 2 +- .../13132885-set-up-single-sign-on-sso.md | 8 +- ...3133195-set-up-jit-or-scim-provisioning.md | 6 +- ...1-configuring-session-security-settings.md | 6 +- .../13189465-log-in-to-your-claude-account.md | 2 +- .../13325567-account-management-faqs.md | 2 +- ...13345190-get-started-with-claude-cowork.md | 10 +- ...13371040-log-in-to-your-console-account.md | 2 +- ...ude-cowork-on-team-and-enterprise-plans.md | 8 +- ...13641943-visual-and-interactive-content.md | 6 +- .../support/13837440-use-plugins-in-claude.md | 4 +- ...gn-tasks-from-anywhere-in-claude-cowork.md | 4 +- ...ur-tasks-with-projects-in-claude-cowork.md | 12 +- ...sync-works-for-enterprise-organizations.md | 4 +- ...-up-your-design-system-in-claude-design.md | 4 +- ...min-guide-for-team-and-enterprise-plans.md | 2 +- ...14604416-get-started-with-claude-design.md | 6 +- .../14604842-cyber-verification-program.md | 44 +- ...t-a-default-model-for-your-organization.md | 2 +- ...nage-model-access-for-your-organization.md | 8 +- ...1-get-started-with-1password-for-claude.md | 2 +- ...rstanding-your-pro-or-max-plan-invoices.md | 2 +- ...3-claude-cowork-and-chat-are-one-claude.md | 4 +- ...16893491-get-started-with-smart-reports.md | 14 +- ...claude-in-google-docs-sheets-and-slides.md | 4 +- ...min-guide-for-team-and-enterprise-plans.md | 8 +- ...ooled-group-budgets-on-enterprise-plans.md | 2 +- .../17203415-set-up-claude-for-intune.md | 22 +- ...rience-for-your-enterprise-organization.md | 16 +- .../8114491-get-started-with-claude.md | 2 +- ...8230524-delete-or-rename-a-conversation.md | 16 +- .../support/8325618-paid-plan-billing-faqs.md | 2 +- ...27-customizing-your-appearance-settings.md | 6 +- ...nt-to-a-team-or-enterprise-organization.md | 2 +- ...77-how-can-i-create-and-manage-projects.md | 6 +- discovery.json | 2 +- tombstones.json | 10 +- 368 files changed, 14024 insertions(+), 7669 deletions(-) create mode 100644 content/claude/third-party/claude-desktop/configuration-format.md create mode 100644 content/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions.md create mode 100644 content/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed.md create mode 100644 content/en/build-with-claude/claude-models-on-google-cloud/google-managed.md create mode 100644 content/en/build-with-claude/claude-models-on-google-cloud/overview.md diff --git a/content/.metadata.json b/content/.metadata.json index 0a7a6052dc..28518efa52 100644 --- a/content/.metadata.json +++ b/content/.metadata.json @@ -1,7 +1,7 @@ { "metadata": { "version": "2.0", - "fetch_date": "2026-10-22T19:39:28.337597Z", + "fetch_date": "2026-10-23T05:31:16.679559Z", "section": "all" }, "items": [ @@ -9,8 +9,8 @@ "url": "https://platform.claude.com/docs/en/home", "status": "success", "path": "en/home.md", - "sha256": "c808832f76ace8ff354a54b54d0dee1ab551eb6d8e86bc62816bc3b404bcedcb", - "size": 15676 + "sha256": "57ef5c3d0f5777a6338ee982cb6e0e704fb9286dc11bc5de871132f17307b791", + "size": 15698 }, { "url": "https://platform.claude.com/docs/en/intro", @@ -30,120 +30,120 @@ "url": "https://platform.claude.com/docs/en/get-started", "status": "success", "path": "en/get-started.md", - "sha256": "9dbbde38a07f6c7ebf53b3d755f749e0c3c3e2e16fce9e1a6fde2dee101e70f8", - "size": 19379 + "sha256": "b9a2f4d7be92cfe4f7ea097ba494788f002ed42dd8200ab496f557b30625d27b", + "size": 19385 }, { "url": "https://platform.claude.com/docs/en/manage-claude/authentication", "status": "success", "path": "en/manage-claude/authentication.md", - "sha256": "d00adcaa9c9c63ab8c624976bc1de8e9b6d949d3e5eb0f9ecb485793ad7e8c1d", - "size": 25722 + "sha256": "02d92937e4ae5e7408818b1907f3ee28d4bd33aaea36b136ccd66839a3159760", + "size": 25942 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/overview", "status": "success", "path": "en/build-with-claude/overview.md", - "sha256": "eb0c1e4d34616bb72b718bb5178fc67c80e708781eadf13dede024e8631d9b21", - "size": 29474 + "sha256": "4003c9dedb7b67f66db60189dcdca4f2e37e9e70979cc92236b70d06828d203c", + "size": 29540 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/working-with-messages", "status": "success", "path": "en/build-with-claude/working-with-messages.md", - "sha256": "7caf5d7aa1de75f3a8e485e8bc94c2ede69c3ca10bace57960c9d73b36feb7ae", - "size": 33189 + "sha256": "3188eab5ed69cce1a81291def99e054102e953d50e41eb9ef1090a27db1705da", + "size": 33213 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons", "status": "success", "path": "en/build-with-claude/handling-stop-reasons.md", - "sha256": "32583481a2caae6b50763ac1155a7746e6698672f9c077c6e5b91dada7f8609e", - "size": 120232 + "sha256": "7471523ae850366cd15c0ab1b16846583358dda88a113ead73eb4f2513755a8b", + "size": 120346 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback", "status": "success", "path": "en/build-with-claude/refusals-and-fallback.md", - "sha256": "e89d7a2bdf717ba17c31ead9a42ef3b83986abaf34b8f276e4a463de8231b366", - "size": 65375 + "sha256": "88beb2ebb992de6d4c2cbfaa9d57f8a0e29618d2ee2e849da4328e434c2fcd16", + "size": 66018 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/fallback-credit", "status": "success", "path": "en/build-with-claude/fallback-credit.md", - "sha256": "5ebf07594bb7b6ff5f754d8319f70dd9f026d0f037fa8a22757f311188bc1c21", - "size": 31396 + "sha256": "0a937bdeb216aa2f4d49c3859a2b855ec277363f23bd7960d76122132a147cb0", + "size": 31634 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/effort", "status": "success", "path": "en/build-with-claude/effort.md", - "sha256": "78392970b6a58393428501a3e48bf895e109c2c2b7ec10380c40e6fa968ef45f", - "size": 42865 + "sha256": "725fe89abb7e466aa4b60edb72ff4fc951f5d6be3a0d1b2f70b0ca7e0e3aecdc", + "size": 43003 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/task-budgets", "status": "success", "path": "en/build-with-claude/task-budgets.md", - "sha256": "13bc50b2cf0b70e912aa11344455c20eaf0b1cf6d2f82e0750ea94a87f30dc4c", - "size": 28879 + "sha256": "cfe8d0ead86a8134c1498c9ec5b584f051924ca161b4f4b214d323ab5146db61", + "size": 28853 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/fast-mode", "status": "success", "path": "en/build-with-claude/fast-mode.md", - "sha256": "6a1ebc3d85aeac4ed1b3d1d3e4770639c1d30f570371b2d71d07be9445dafaa1", - "size": 24906 + "sha256": "06306b4f7647b2496a372dffe25f3832b517a7b01dcbb8a104223ea55145ba14", + "size": 25225 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/structured-outputs", "status": "success", "path": "en/build-with-claude/structured-outputs.md", - "sha256": "74e5f01e92be0d7b5b6a95459d5fabecbd9a2a2fc6cb85751cbea1c4bfbdedac", - "size": 102376 + "sha256": "dc8f0f237a616cd18245d4dda0c9c1486231b66b8cccdf991bb4eda914a616f5", + "size": 102659 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/citations", "status": "success", "path": "en/build-with-claude/citations.md", - "sha256": "7a055df68dc2601ff806260b214e56c2fd02e5722dcc3acc2f09298d7220b0fc", - "size": 74796 + "sha256": "1e295a802ead582e5c38180e2a4e829601bc1f9c29c3e35f1d11e3fb61800861", + "size": 75337 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/streaming", "status": "success", "path": "en/build-with-claude/streaming.md", - "sha256": "fb6a18b7536849c886da487d73cb7e391b5929a67c62766aa8786d8a34a3634e", - "size": 51158 + "sha256": "2cc55ee7663fb9d4818f619c14701ebb3cbc7b566ccfb2ec25137a77f2dcc320", + "size": 51270 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/batch-processing", "status": "success", "path": "en/build-with-claude/batch-processing.md", - "sha256": "7549add31e32e7c2b3c7f3501b98fcd501630dc5fad6ae17c42496ca5561ba8d", - "size": 75641 + "sha256": "05fb0d6183f1596dd472f462f91b9854f56ac1682a71cf6c90173df6c396b233", + "size": 77860 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/search-results", "status": "success", "path": "en/build-with-claude/search-results.md", - "sha256": "50941a86d7e2c0629ad62f12108fbd990512d8e2a7cbcf679bb84920f6a24b40", - "size": 83872 + "sha256": "40de9f54deb768e8ad21cfff2c2e1a3009d66116301f9e72f6931c8e337c522e", + "size": 84185 }, { "url": "https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals", "status": "success", "path": "en/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals.md", - "sha256": "e812a84e2a3d400bfe0fb9ad293ca8414f731f48afe60b44fe3451c2c183a657", - "size": 13905 + "sha256": "da14525b94093daa17d0738a4035e27ccf0754a05c116c5dbee4278676f9e413", + "size": 13907 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/multilingual-support", "status": "success", "path": "en/build-with-claude/multilingual-support.md", - "sha256": "6fdb01a16f9bfac1db0fd3744bd3439c9947cd7a82e7bb3d1630dc12cbd6ab5a", - "size": 9435 + "sha256": "c3ceb27bc705813dbacad9e40d9c1dab0a245029ed92385c226a0c455c269428", + "size": 9440 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/embeddings", @@ -156,29 +156,29 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/thinking", "status": "success", "path": "en/build-with-claude/thinking.md", - "sha256": "e55b939d6b042f9c72b80cbe58f52dbcafbfad37ddfce2a8f4f1ca02b0cb80e9", - "size": 84890 + "sha256": "4a4ba546b763bafcb2441024da046d0a63f2ca373af54bbfd60f6a4336cd0852", + "size": 85160 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost", "status": "success", "path": "en/build-with-claude/thinking-steering-and-cost.md", - "sha256": "e97fe16d01ee2a8d221ad9f0e93c9177746b2e9b603ce06371b47855efecc98d", - "size": 42764 + "sha256": "4365a0ef40131cea8394567d10f804a84d26f1fcb1f513eda90ff3b005209b93", + "size": 41396 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/thinking-tool-workflows", "status": "success", "path": "en/build-with-claude/thinking-tool-workflows.md", - "sha256": "0f277a0d73d08095d37fc8ce99995ab8f9658b767b6cfb162df3d086cf598edb", - "size": 31358 + "sha256": "d34e47b365450d70bf28544e7339a9232ed8e6fd0586f9116f696032f300dd7e", + "size": 31434 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/preserved-thinking", "status": "success", "path": "en/build-with-claude/preserved-thinking.md", - "sha256": "57a408d40935d727ab1e400d98448050d5f08d7ec31e67e0f145a4ed8e25c5b5", - "size": 115667 + "sha256": "5e8eea7d2ea012f36a6c9c264ccf0de20c13f8c45797e3f13560e5460c6e4afd", + "size": 116220 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting", @@ -191,15 +191,15 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/extended-thinking", "status": "success", "path": "en/build-with-claude/extended-thinking.md", - "sha256": "e90628b1050066826eed1d861bef2f361c2c9a27ea47df9b3ed8e9920e2cd6b8", - "size": 22441 + "sha256": "020d6658b87bb084b74d580763e0b3521c1e39af480cde64a01571b4898676ab", + "size": 22500 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview", "status": "success", "path": "en/agents-and-tools/tool-use/overview.md", - "sha256": "7c45cf69e78c4ee3c69523fbb122e6b15825969b93fce7c06d1605220fb80d06", - "size": 35965 + "sha256": "5d669525449035e393f900f8d62add301e8a0b0137e770a968633361067505d2", + "size": 36605 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/how-tool-use-works", @@ -212,15 +212,15 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/build-a-tool-using-agent", "status": "success", "path": "en/agents-and-tools/tool-use/build-a-tool-using-agent.md", - "sha256": "27c6be9c6fa18400ddd05913d9aee83459636cccdcc4b69bcacbf61ea6f9c17c", - "size": 138641 + "sha256": "7a3cb2051ae68bf156bb0b19ea9b30beafc11205a38520044caf63635a3062bc", + "size": 138615 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools", "status": "success", "path": "en/agents-and-tools/tool-use/define-tools.md", - "sha256": "a8f8fe06aaad3d324e1b9caa0bb6d2a890d7af37b5cac85e555b067f81f3ec46", - "size": 38554 + "sha256": "667fab5d70bdf0240239a2a8a465197d91295f37215440c14f9504898635360e", + "size": 38564 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls", @@ -233,15 +233,15 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use", "status": "success", "path": "en/agents-and-tools/tool-use/parallel-tool-use.md", - "sha256": "7c8da97d2bf57d5824186fb4f474546b3d06d0db3b2ec007299fe2592f972077", - "size": 55254 + "sha256": "54ef3a679fd43de2c0d065cdf1679d672ee62089f344edb221eccc4b1116990d", + "size": 55316 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-runner", "status": "success", "path": "en/agents-and-tools/tool-use/tool-runner.md", - "sha256": "afdf0478bc28fa6b9b63c3c779f79ff07f863bfcf6b88af59867a8c0055c8a23", - "size": 66701 + "sha256": "981f00b098db46c9357f90622d3f716ab944a5929ac663dae2619e73e6ecbc02", + "size": 66456 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use", @@ -254,22 +254,22 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools", "status": "success", "path": "en/agents-and-tools/tool-use/server-tools.md", - "sha256": "bccba9db4a386df0b817465ad33c818f946c8a759b6f6c964073c4f0a0b5a247", - "size": 44827 + "sha256": "304d13fab7b839878a8ee8a7ed31b5a6b351f11777f33d956a5752b1aeda74a6", + "size": 43856 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool", "status": "success", "path": "en/agents-and-tools/tool-use/web-search-tool.md", - "sha256": "fbf41c23f517d7bd6d0a35bba97e63149fae3d2180c3837819a695a54d07c633", - "size": 29084 + "sha256": "073c50dfa1953c8021ae389c7aa1f934ff02e306ed5b2f83bbe5713a7cd42644", + "size": 28183 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool", "status": "success", "path": "en/agents-and-tools/tool-use/web-fetch-tool.md", - "sha256": "83f628328651cc92985a85a60fa83213b297a83478ea46e30ecf995a52ef9b70", - "size": 39691 + "sha256": "6acfc25b544c09d7eb380051029ba3dda97a1ac8248a002e013c9976bb1383c7", + "size": 39509 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool", @@ -282,57 +282,57 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool", "status": "success", "path": "en/agents-and-tools/tool-use/advisor-tool.md", - "sha256": "531d2621d91af1630ffb2d433a880c50335b61051b2034ceb4a81537705b3c0c", - "size": 101293 + "sha256": "8187bfe5b13edc25ad70276eeae3ab2990badd93fc4509425e7690ceb60c1b66", + "size": 101809 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool", "status": "success", "path": "en/agents-and-tools/tool-use/tool-search-tool.md", - "sha256": "fa3df97d52586d0880108de1d9aaa1f5ede42dd94c4c6f2bbf3c33dde55d27a2", - "size": 37369 + "sha256": "2d37a5a68e7604d9e650ac8ff76c5329caab9404f07a84eb5aace107b1d150a4", + "size": 37374 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool", "status": "success", "path": "en/agents-and-tools/tool-use/memory-tool.md", - "sha256": "b694f225fe09edf85c71bdba0d0f9936b574f1e61735d758072a2647c008914c", - "size": 39608 + "sha256": "ba88b3399fd18bcfead4cebc5da0794829903cd4d2242a712816eee100f4f15a", + "size": 39699 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool", "status": "success", "path": "en/agents-and-tools/tool-use/bash-tool.md", - "sha256": "9efce521edc86b776031548d0fa3203925e842d8d4adb5a5e6699c2db3a8cd8b", - "size": 71131 + "sha256": "e22f67cea8c733f34a3b78c858f089bbeabf5ddcc7f06c1069f93adea7e5e388", + "size": 71284 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool", "status": "success", "path": "en/agents-and-tools/tool-use/text-editor-tool.md", - "sha256": "dcc30277d154e851b094d21664d065e8b1bc53c66b8943f7aa7b816d1fa382fa", - "size": 81315 + "sha256": "c159b5c07ebb45bf14c5620b74f65de78d952f16cf6578e6c94237897805a469", + "size": 82227 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-sdk", "status": "success", "path": "en/agents-and-tools/tool-use/browser-use-sdk.md", - "sha256": "535ea614e8bb93128fdc279d41cbbbe94472f0a5dcca4480fe67d6ee4608d2f8", - "size": 79692 + "sha256": "7520c37b3488e97fc7ec1982e92afa5c572fa467a536d153823d5e50cfe09542", + "size": 79716 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool", "status": "success", "path": "en/agents-and-tools/tool-use/computer-use-tool.md", - "sha256": "86d10c147ba7d91c4771bfd898112e67881c8a52ecf5bfc1e44fba99ca25bdba", - "size": 118468 + "sha256": "8e097fa15535b284b7682a3271b4931a97d3099c083d9f52a0a287045c1be448", + "size": 119228 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool", "status": "success", "path": "en/agents-and-tools/tool-use/browser-use-tool.md", - "sha256": "890b973ef97e1cf3a48e7dc7e10fd98266b942882910160e7930fa7fed15c2a3", - "size": 108189 + "sha256": "2a648cdaae261477610659e73637e493b5a604285758db57363d56eae3a9f791", + "size": 108473 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/troubleshooting-tool-use", @@ -345,7 +345,7 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference", "status": "success", "path": "en/agents-and-tools/tool-use/tool-reference.md", - "sha256": "e43d45a543bb6b139a9e6a3d92d5c124aa326e449be0a12d66d824334e2ae4a2", + "sha256": "993e6eb141073a25829721ef8007339f58b8ad9fcad2075519a1b0d7bed115e6", "size": 19390 }, { @@ -366,22 +366,22 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching", "status": "success", "path": "en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md", - "sha256": "b99507270f0365a7846c4d69ed792138b2e0a8b33db8f8cf1bc24fe03dced886", - "size": 11888 + "sha256": "831b7012d1da5fd6ef5fda659db6b776ab58c59239326df9bddfc470e6c75fc9", + "size": 11894 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling", "status": "success", "path": "en/agents-and-tools/tool-use/programmatic-tool-calling.md", - "sha256": "0b2ccba6fd6cd35bc966b075a8a2f4cf4159277f6a3fb11009361f63e68c8107", - "size": 62189 + "sha256": "131fbbba69f20b267c1d7f079a1a61ebef233b06c0680b36050a27aa19b6f8bc", + "size": 61161 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/fine-grained-tool-streaming", "status": "success", "path": "en/agents-and-tools/tool-use/fine-grained-tool-streaming.md", - "sha256": "1e457627355706bee23832df4921aca75cffc489f4cd96d72233a1145ce600db", - "size": 36436 + "sha256": "6831a59907c164efaf2961c95bbb4c8ed5c8dada0ffdc1c14cb32121d02e06eb", + "size": 36408 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/context-windows", @@ -394,43 +394,43 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/context-editing", "status": "success", "path": "en/build-with-claude/context-editing.md", - "sha256": "9c8ae15b0bde5eaeb8d682ddf439970a3b5879464fbe72821edb80e6ffee8fec", - "size": 103384 + "sha256": "41223e95f5dac130e629f0391283feabb1229cb4ba943680bcd6c251e43940d2", + "size": 103404 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-caching", "status": "success", "path": "en/build-with-claude/prompt-caching.md", - "sha256": "871b4fce112af343c937985b8b811efd6d9cf0681df26f4f52b24ad7e07239c3", - "size": 159938 + "sha256": "d575f8360eac718b4e12eeb370f249ac8c60818bc36a1eecbcb61518bc78433c", + "size": 162342 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages", "status": "success", "path": "en/build-with-claude/mid-conversation-system-messages.md", - "sha256": "057e2ea2084a3b8b636a8b59a6030e94580dc4042f9d9a725a46669acc902615", - "size": 104670 + "sha256": "c2a5a44c43eccc6e08577654e664c0c4717c17e00a22ec186d6464108a53072a", + "size": 105284 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/mid-conversation-effort-example", "status": "success", "path": "en/build-with-claude/mid-conversation-effort-example.md", - "sha256": "3b6f46e9cb8a3890135c491cc4d0f8ca18936fe7d587a0a1a6525ab7cc9be48a", - "size": 162228 + "sha256": "6ae0491e6d20a4d37264d7047ef073de9736caf1446f4378913c625e4b212e7a", + "size": 161169 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics", "status": "success", "path": "en/build-with-claude/cache-diagnostics.md", - "sha256": "14b4e5156c8dbb7ca49c92f7e83f770a0f3fb2151ab1273c2f5bdb3f7ecab0db", - "size": 46455 + "sha256": "6a6dee9af50dfc058ea308c6cc1a9359efd90daa4d4fae5797e063d4e93decfd", + "size": 46489 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/token-counting", "status": "success", "path": "en/build-with-claude/token-counting.md", - "sha256": "24382b898436c5f2e1523b9e703b4d7ffc6bac91867d8a19a3bd93557ac9a60f", - "size": 43339 + "sha256": "35902be9b7816b32e95d896064db02aa6852047b06b3195d15fdb626cc27614a", + "size": 44283 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/compaction", @@ -443,78 +443,78 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/compaction-on-demand", "status": "success", "path": "en/build-with-claude/compaction-on-demand.md", - "sha256": "3dac05805276933f8af90d48ca11d03695e4a760cd8afffd3bc94fcf784a95cb", - "size": 46833 + "sha256": "33f696a50f2aac78ec03e119167dad3b1659a418e6de5790ffe6cdd9f0893bd8", + "size": 46869 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/compaction-keep-recent-turns", "status": "success", "path": "en/build-with-claude/compaction-keep-recent-turns.md", - "sha256": "729d870ee420cd5e5fe67cfdba4551d4740ed427b0d2f8e04eeefa25886d73a3", - "size": 21874 + "sha256": "0950cef1e916d1e815eeeb5b33f94938fed3f88c4898f098efc2e395898dbd8f", + "size": 21908 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/compaction-background", "status": "success", "path": "en/build-with-claude/compaction-background.md", - "sha256": "b92ed8c0e44b4e035493a4125f23759da96f3877703c11e3fab43d24ee59c369", - "size": 23075 + "sha256": "3284c7f63d7220ea3777047a727a54e3e9beb763eb184149c6c868043051b272", + "size": 23112 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/compaction-thinking-blocks", "status": "success", "path": "en/build-with-claude/compaction-thinking-blocks.md", - "sha256": "2fbcd521e0174962969788d1001208c8419dd4de000738ecadfeb4742fefd2f0", - "size": 31437 + "sha256": "cf8841576a306059380c3feb14d9b78fc964b1adc31cac77cdfdef28c163123c", + "size": 31471 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/compaction-threshold", "status": "success", "path": "en/build-with-claude/compaction-threshold.md", - "sha256": "42d684954273d210352286d9efff58b41e53d415414c7f52458d8d2dd9d904f0", - "size": 114209 + "sha256": "87463e2386b17d214e7e24da452ff22d0ff72255048d05e333ee272fc46be998", + "size": 114612 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/files", "status": "success", "path": "en/build-with-claude/files.md", - "sha256": "9009923af60c15f4418f5a5d134ce6768d4edc3ff9ca6a36284aaa85d76af58c", - "size": 38342 + "sha256": "a97fa89c496fdf7eaaca7dc1b42e336e4706c1da33036e8acf2f426fac5d985a", + "size": 38354 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/pdf-support", "status": "success", "path": "en/build-with-claude/pdf-support.md", - "sha256": "fd80613047643a48fbd803a328405dc4333aeafe041df6029abb748d2a750ee4", - "size": 61592 + "sha256": "655afb4c4b4c7db3ec25c9c3ad4669175065e37c681ba812ba3a58c3571c2967", + "size": 62660 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/vision", "status": "success", "path": "en/build-with-claude/vision.md", - "sha256": "19fa9da1ffecb5fdf3e09d54f085c2ae3ccbaa384b35f25103e23e98bc8255fa", - "size": 47708 + "sha256": "b9349cf448dee20a0a901131fb8e995de3bdd08328ace51fdfd591e7802a23f0", + "size": 48488 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/vision-coordinates", "status": "success", "path": "en/build-with-claude/vision-coordinates.md", - "sha256": "4c8bc8996f55d5ca84c8443f692845ec9ee68646782f46fb419e7276cc00f414", - "size": 35198 + "sha256": "d930de3e91a266fe251a83f0c55304b7ab04f693efa8b093bd41566e7c59c225", + "size": 35225 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview", "status": "success", "path": "en/agents-and-tools/agent-skills/overview.md", - "sha256": "7913d4556c014c6bf7f23e186efded1b36da63d7b29d73898267ebe8d2f6258f", - "size": 21840 + "sha256": "3bfadf3faa9855e57a39b355200bb3c837df6c7a0048a1d3dbbef810c2c542ae", + "size": 21852 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/agent-skills/quickstart", "status": "success", "path": "en/agents-and-tools/agent-skills/quickstart.md", - "sha256": "27f907732940f1299415b305021a9c2767043c356d8f1fc4e20f39f8f9f9f9b3", - "size": 36835 + "sha256": "b4c03611ab35b357ee0482466119e6691040c2746c4b4b3ba8ec679e4f0b41e2", + "size": 36857 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices", @@ -534,8 +534,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/skills-guide", "status": "success", "path": "en/build-with-claude/skills-guide.md", - "sha256": "15b7cf010a1ec5ac532c27e7d0ab14f14e500992c4d5346ed4de25db87260400", - "size": 145336 + "sha256": "2ca5b6515423695d709f982b343bdd53b02f7a035183a45c4e42621b999caf39", + "size": 145344 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/remote-mcp-servers", @@ -548,8 +548,8 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/mcp-connector", "status": "success", "path": "en/agents-and-tools/mcp-connector.md", - "sha256": "c655e2ecc1a703aea6a6e476af05142fed2bfbc1d13e6f54666980d98f44ba9f", - "size": 73280 + "sha256": "58cc0c0a8e88cfd4d1b84a78aa11e5439251358ad9891be035ddaddff68564c5", + "size": 73226 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/overview", @@ -569,8 +569,8 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/quickstart", "status": "success", "path": "en/agents-and-tools/mcp-tunnels/quickstart.md", - "sha256": "f57bc1f5969c8e8ece82919c45133922378c7eaa476593865a9fbe208924e769", - "size": 11783 + "sha256": "b07a7fe4ce426094e1c04f5c9a6e8f47334dce384816f43ba00049f92f8bbdb9", + "size": 11777 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/console", @@ -618,50 +618,64 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock", "status": "success", "path": "en/build-with-claude/claude-in-amazon-bedrock.md", - "sha256": "90a73fa9d2ba529492b3c698d8c122870604c61926870fc08c69e68abd55e268", - "size": 23202 + "sha256": "d9bb82b5312be9c02700b20a03c47fc1b2529bdc60e46cabd6b6e072264a7deb", + "size": 23191 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy", "status": "success", "path": "en/build-with-claude/claude-on-amazon-bedrock-legacy.md", - "sha256": "7a8c1ad9abc0af35a24f55846f63d84c037fd33128a0e369faa2d9b73923f217", - "size": 42430 + "sha256": "aa17bedf44cd802099ffab9a1a323c66a3cbc68a8ca23b69af0582de21bd7832", + "size": 42710 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws", "status": "success", "path": "en/build-with-claude/claude-platform-on-aws.md", - "sha256": "56d2cfcf95d33d5bfabd2fad5e7239b6886e9f3a30df2a97596191e9c71f6cab", - "size": 103253 + "sha256": "9a21854658e3873e24077b73ad7bc9b050bbdc389b233f6842cc7dfbfe088b35", + "size": 103474 }, { - "url": "https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai", + "url": "https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry", "status": "success", - "path": "en/build-with-claude/claude-on-vertex-ai.md", - "sha256": "4d49a554423c298663fad36d051acb5489eed5f903c8c695aaebea6bbc2cc5ea", - "size": 35332 + "path": "en/build-with-claude/claude-in-microsoft-foundry.md", + "sha256": "da9b9d21e1169f94472307b7c0c9524125ed23a4d3495420652a217f8239736f", + "size": 39389 }, { - "url": "https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry", + "url": "https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview", "status": "success", - "path": "en/build-with-claude/claude-in-microsoft-foundry.md", - "sha256": "54af78dde40257aee5128d89f4ed2741daacd450327cf99d83896d6210bd398e", - "size": 39327 + "path": "en/build-with-claude/claude-models-on-google-cloud/overview.md", + "sha256": "8bed1c6290261fe7de3c6bcdb0d1597a466fb77802fd9747ab670f9344501b59", + "size": 14656 + }, + { + "url": "https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed", + "status": "success", + "path": "en/build-with-claude/claude-models-on-google-cloud/anthropic-managed.md", + "sha256": "de44b6f8d794eeb44ebc52e5caf1f433aa8317725e7d829a6454314d1f017a6c", + "size": 50625 + }, + { + "url": "https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed", + "status": "success", + "path": "en/build-with-claude/claude-models-on-google-cloud/google-managed.md", + "sha256": "87197f8c17d1cf10ee5e29c29463fd03e86d2f60de218708cea9a4f01fcae20f", + "size": 32806 }, { "url": "https://platform.claude.com/docs/en/managed-agents/overview", "status": "success", "path": "en/managed-agents/overview.md", - "sha256": "d40f99245ebcecea400d48ddf30a4ccf5c16fa76135073411d63943b61b2e779", - "size": 7758 + "sha256": "02dff1a8489d8b0eff6455b801a8a2f5ce08fdbb48071b404eddb6dc224a1254", + "size": 8002 }, { "url": "https://platform.claude.com/docs/en/managed-agents/quickstart", "status": "success", "path": "en/managed-agents/quickstart.md", - "sha256": "df0342f786b3f1252d387039f1efa9ab45d73b37d4a9fd577d03872f3c3c3460", - "size": 34287 + "sha256": "d25b30819a6409b42c0dcfc100286b28cae24f48f00dbd8ae3a8bcee94e8f1a7", + "size": 34154 }, { "url": "https://platform.claude.com/docs/en/managed-agents/onboarding", @@ -674,64 +688,64 @@ "url": "https://platform.claude.com/docs/en/managed-agents/migration", "status": "success", "path": "en/managed-agents/migration.md", - "sha256": "3a3946d4590dfbf7a6c9682f19ccb32b4d54d5fa04117da3ba5b65582f8b5b6e", - "size": 52946 + "sha256": "cce503d048a2cbbf3062e23e2848ef206bde84cddc105b534a37ae419f6f3f6b", + "size": 52206 }, { "url": "https://platform.claude.com/docs/en/managed-agents/agent-setup", "status": "success", "path": "en/managed-agents/agent-setup.md", - "sha256": "0e172256f97442bc6f61adf94a5d0ba7ce80d89cc61a704fe3b923b04877be2e", - "size": 41760 + "sha256": "c25342a609d90305b3074a2709757156fccbb9bf00918f330cbcd3639297304c", + "size": 41665 }, { "url": "https://platform.claude.com/docs/en/managed-agents/tools", "status": "success", "path": "en/managed-agents/tools.md", - "sha256": "5f484b1b01a612dcac1c3db111bfd3e962b2df08049b5e1299dd1dd567acff13", - "size": 20049 + "sha256": "d3a94792b766fb99c5811f4c56c50313bebdc790ef0f1310b0b94aa2179b7bec", + "size": 19791 }, { "url": "https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions", "status": "success", "path": "en/managed-agents/tools-web-restrictions.md", - "sha256": "6151d8e2187b3c682246829b0d35f052cedc79bd3ca26e20d7b24f0949057260", - "size": 30900 + "sha256": "a235fc17594b1d34854628e48588185f24b90c5d32b1e5fece747f5a9e3853f2", + "size": 30826 }, { "url": "https://platform.claude.com/docs/en/managed-agents/mcp-connector", "status": "success", "path": "en/managed-agents/mcp-connector.md", - "sha256": "9f041be6b8d33c6f73f913b35f2e582cef03ce225c2c6e1997336e50595b68db", - "size": 18610 + "sha256": "236996f5a0dea2ccfa5a6c7a4766e22c2707ea7278799c9ac2356233070789dd", + "size": 18391 }, { "url": "https://platform.claude.com/docs/en/managed-agents/permission-policies", "status": "success", "path": "en/managed-agents/permission-policies.md", - "sha256": "67ce6c0f635bb6ef69c779b3ea5c620dee7df30b3487423f5bcb9cf4c34710ce", - "size": 48792 + "sha256": "e67245d60fd8e6d83e6996481167591da583b8b8f90346470191544a68bb6fe8", + "size": 47495 }, { "url": "https://platform.claude.com/docs/en/managed-agents/skills", "status": "success", "path": "en/managed-agents/skills.md", - "sha256": "2a48c3034ee1172994b446f3eb7a6086bb939c8e8fc6e633ef25a865f12d9e37", - "size": 23338 + "sha256": "b200748fa455cae6d6a83dcc7cccce70640d4f754afa5c5568d7da23280526be", + "size": 23090 }, { "url": "https://platform.claude.com/docs/en/managed-agents/choosing-an-environment", "status": "success", "path": "en/managed-agents/choosing-an-environment.md", - "sha256": "a1af17540c4d777bab525db10597cfaee935509947a3211869bef4c3d321fae9", - "size": 11191 + "sha256": "a6f24253459d9728b1aab59599c1425a57334a12a1569d5e0d3fe9c86a1ecfd8", + "size": 12318 }, { "url": "https://platform.claude.com/docs/en/managed-agents/environments", "status": "success", "path": "en/managed-agents/environments.md", - "sha256": "9529ca3add6b0f3be8dccc2601845bbc61ec40e63d3d61b5b23941cc26ab9c8b", - "size": 36008 + "sha256": "f51a82d0e011926435d11d4108c196bb7b6951ec0317d5c882dd4ed7d50fefee", + "size": 36018 }, { "url": "https://platform.claude.com/docs/en/managed-agents/cloud-sandboxes-reference", @@ -744,36 +758,36 @@ "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes", "status": "success", "path": "en/managed-agents/self-hosted-sandboxes.md", - "sha256": "7b2de3be3dfb279fe6ee1b2c0bc1cb2666370f124a0cc34f0f67bd379256d6d8", - "size": 22633 + "sha256": "ac8fc1815df3dbdfb6864b14bcff9af1bdb7860c9c317b0d37084e886e5bbe02", + "size": 23830 }, { "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-workers", "status": "success", "path": "en/managed-agents/self-hosted-sandboxes-workers.md", - "sha256": "c7c020c7ee8130a50f95579a8a90d4679ad3e6bfea5522ce0c24dbbbd6df45b0", - "size": 38517 + "sha256": "08db26d384b23221266c6405c1764f575de876fe798509c13c6ee796c8f77ec1", + "size": 38559 }, { "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory", "status": "success", "path": "en/managed-agents/self-hosted-sandboxes-memory.md", - "sha256": "f297a5adcbee17ec12a6be94a445bf44e5694823b91b8a007eba3e52c3c9c057", - "size": 11215 + "sha256": "1e47205214947c85452bf151884d29122ca273da30a5ce1b1d1927a0cb151fed", + "size": 11450 }, { "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-custom-tools", "status": "success", "path": "en/managed-agents/self-hosted-sandboxes-custom-tools.md", - "sha256": "9c1d5f330f90b3ef46557aac43a395a3ea5fd95d5f8fce3bbdcb991b42ddd78c", - "size": 35858 + "sha256": "bbde5714304c9bbc2262ebc10ce5eb09b527ce06cc4ed63796c67194a8287109", + "size": 35727 }, { "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-operations", "status": "success", "path": "en/managed-agents/self-hosted-sandboxes-operations.md", - "sha256": "34d412632cdee0717a159759bbc7b361c6b5bb108db21f4249cd6bec7245bd80", - "size": 18709 + "sha256": "c88b1739e976b9eb1a0f6821ff2aa44151aa9947f719a355964c8d4c597c8d73", + "size": 18715 }, { "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference", @@ -786,36 +800,36 @@ "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-security", "status": "success", "path": "en/managed-agents/self-hosted-sandboxes-security.md", - "sha256": "6853b679f05335198dbc47afc11d3952c9ec987b3901a68d71a836fc34dcbb6f", - "size": 5305 + "sha256": "826ec59804fd0c50b2c20e354766809b93d65bb18f7219a0d557361148062d16", + "size": 5316 }, { "url": "https://platform.claude.com/docs/en/managed-agents/sessions", "status": "success", "path": "en/managed-agents/sessions.md", - "sha256": "774122f9d7284b1fc22ff674ad0734b49ef6bb8a79a93ffe95530c0dd20afc83", - "size": 43256 + "sha256": "559dc5016d13d2d4df20ea8f8f0a019675cd7dee4e84ceeff81307ebf8e00dac", + "size": 42682 }, { "url": "https://platform.claude.com/docs/en/managed-agents/session-operations", "status": "success", "path": "en/managed-agents/session-operations.md", - "sha256": "3be1da34cbad0237a72538931d67e3fde680337f1453c94ce8a6b69972e265c7", - "size": 28300 + "sha256": "7644fc9ebfc8ca05112016312ed8e15dcdec3a285ee2bcd59c81237ce33de89a", + "size": 28082 }, { "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming", "status": "success", "path": "en/managed-agents/events-and-streaming.md", - "sha256": "9514b42af72a786d3acab676bcd6de74a81eaa24d7e36839786b33735f0e42b6", - "size": 66644 + "sha256": "bf686a0233c8da3608952debc83591000b564a4621bc821e5379d762023f10ba", + "size": 65559 }, { "url": "https://platform.claude.com/docs/en/managed-agents/event-deltas", "status": "success", "path": "en/managed-agents/event-deltas.md", - "sha256": "fe5d30752010a936d5218d706a99092e24c1e42841a3e4af9bbca4bd0ee700f7", - "size": 41486 + "sha256": "9ec44c6d9e2a34e978eb1b2b3c20cefcb1fa1f4c15885a00e568880b5ce73873", + "size": 41370 }, { "url": "https://platform.claude.com/docs/en/managed-agents/session-observability", @@ -828,92 +842,92 @@ "url": "https://platform.claude.com/docs/en/managed-agents/budgets", "status": "success", "path": "en/managed-agents/budgets.md", - "sha256": "f6d885541190d4fb911959c9d996cb8c8609cca25280492cf1d740fe7a0aa462", - "size": 25758 + "sha256": "95b160607eb189fc725741f7d0ee6f951c20a8479eff5bdc6f76d81315968ed9", + "size": 25643 }, { "url": "https://platform.claude.com/docs/en/managed-agents/webhooks", "status": "success", "path": "en/managed-agents/webhooks.md", - "sha256": "c05952920e1da73bb2cb76952e09b2b79d269ed38a5fde64ae48af9614641ba2", - "size": 33746 + "sha256": "552cafb322e345204b0b28a4cb6c2b79543ea199dea6c00113e442d68eb7a63d", + "size": 33749 }, { "url": "https://platform.claude.com/docs/en/managed-agents/define-outcomes", "status": "success", "path": "en/managed-agents/define-outcomes.md", - "sha256": "8fe78470884301e5f0da061971b715875d2c7d089e5ccb617d473876ac202f8c", - "size": 31722 + "sha256": "d65da4b33d667a40ad2216e4ccc3eaddaf4f9db5750c6dde81ccbd7bfa46c50c", + "size": 31496 }, { "url": "https://platform.claude.com/docs/en/managed-agents/vaults", "status": "success", "path": "en/managed-agents/vaults.md", - "sha256": "2fd515fff674c27daa3435a521a0285ed538ee2e1ce9f2e2e309a8013ba0be71", - "size": 48121 + "sha256": "9888145f0967f31757205211543e2ca36841ff775e047f5727daffed2d660dc2", + "size": 47562 }, { "url": "https://platform.claude.com/docs/en/managed-agents/github", "status": "success", "path": "en/managed-agents/github.md", - "sha256": "2e8a128ae96d3a4f53e0327bb921061ed6028afa7a509883bac4091f699fce63", - "size": 29791 + "sha256": "a98ed34cb31a80910fafdf40601dd87fa9c5d30051e9b00bcb6cb014c0979798", + "size": 29097 }, { "url": "https://platform.claude.com/docs/en/managed-agents/files", "status": "success", "path": "en/managed-agents/files.md", - "sha256": "370cce7a37f120f80afdb3b5634edba24f010b32d08fe73e47eb854da3e7d64a", - "size": 22443 + "sha256": "a282d38e35ec03e90da051228704199f3c97d52d7965a24e17e714127373b52e", + "size": 22415 }, { "url": "https://platform.claude.com/docs/en/managed-agents/memory", "status": "success", "path": "en/managed-agents/memory.md", - "sha256": "4b3b62bcd9dfef1b9af57764f1b1f53d53661e07d03ba7c342eaad9cc25b355e", - "size": 49249 + "sha256": "b5dd543b2c24d3820ee8ad7fb7af759454205657315b70e505e91d43fefa73a9", + "size": 49689 }, { "url": "https://platform.claude.com/docs/en/managed-agents/dreams", "status": "success", "path": "en/managed-agents/dreams.md", - "sha256": "821f1f9775c5236cb995c5134af79ea7d60f8f6b409361207ac46fcd1b4eba42", - "size": 25357 + "sha256": "fc74b206ff8c33cf26b89bcfbfdf80f24260ff570754e90cc271b92c3c7dd254", + "size": 25290 }, { "url": "https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration", "status": "success", "path": "en/managed-agents/multiagent-orchestration.md", - "sha256": "a516995d917a7414a167f564b5477612e167c5449aab4568e671e4a4e9325e34", - "size": 71089 + "sha256": "61280503cd07f4f55f3ad2ff1ce84f549e2d9276158b72bba8ba8fcb310eda13", + "size": 70639 }, { "url": "https://platform.claude.com/docs/en/managed-agents/session-threads", "status": "success", "path": "en/managed-agents/session-threads.md", - "sha256": "a86ae94ff6dc6f6c94f47a5f3030dd1bbef18d045b4339b2732ca64e76ba0f2d", - "size": 36824 + "sha256": "3b373934c4da94fe97bdf6a48fdbc6368f338042662ab822a16289f191424a32", + "size": 36605 }, { "url": "https://platform.claude.com/docs/en/managed-agents/workflow-runs", "status": "success", "path": "en/managed-agents/workflow-runs.md", - "sha256": "676947a7c0605e48a8333c54a52e1c0321b619255933f938f7dbc6fb5da3f826", - "size": 76483 + "sha256": "ff3b5d7f3763e1511fc885b6fce419c1600dc8e25d5fba624dbc001785f61fcf", + "size": 76174 }, { "url": "https://platform.claude.com/docs/en/managed-agents/scheduled-deployments", "status": "success", "path": "en/managed-agents/scheduled-deployments.md", - "sha256": "fa1d20d1cd49e0d6f50fbcdbcde504e2bbf120e5f1b92b534d5c89285a508192", - "size": 29273 + "sha256": "45e18293da1288407acc54571ad4aa00ac0a0a3435698a4052ce38155c6cec64", + "size": 29011 }, { "url": "https://platform.claude.com/docs/en/managed-agents/secure-deployment", "status": "success", "path": "en/managed-agents/secure-deployment.md", - "sha256": "f095b47cbbf9efa793acefcdb4e118c9fbde6fea4505b167ca636033c6c8b6ab", - "size": 73208 + "sha256": "44cd7444fd1fe86894997a24019eaae84c3794d72822d6ce0190e816ce557523", + "size": 73480 }, { "url": "https://platform.claude.com/docs/en/managed-agents/secure-deployment-monitoring", @@ -926,8 +940,8 @@ "url": "https://platform.claude.com/docs/en/managed-agents/secure-deployment-risks", "status": "success", "path": "en/managed-agents/secure-deployment-risks.md", - "sha256": "a102df9e6514094928c78cd4dc8dd236fc3a96b4de97a682935cc8d0fc8ef437", - "size": 8754 + "sha256": "dc4c8c210cfaad7f078377b34e5f5f687d2ee59c84f4ee97cbbd364d758c5030", + "size": 9282 }, { "url": "https://platform.claude.com/docs/en/managed-agents/reference", @@ -940,8 +954,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/admin-api", "status": "success", "path": "en/manage-claude/admin-api.md", - "sha256": "09e50af46b02ce95d9e7c45adbf4c8d2e3668cea8ce5ecb885e9db2c9d6382d3", - "size": 54315 + "sha256": "60d53c5ed69d1c159dfb6cd5aa4f31e2b3a637f5feb538774cfcccd8a761e277", + "size": 54367 }, { "url": "https://platform.claude.com/docs/en/manage-claude/user-management", @@ -954,15 +968,15 @@ "url": "https://platform.claude.com/docs/en/manage-claude/plugins-api", "status": "success", "path": "en/manage-claude/plugins-api.md", - "sha256": "1c8dcd33ce959f4aad6ea8e56c5659490be55c51b432da707f865d810830e75c", - "size": 184307 + "sha256": "83ba7acf496beaee31849c364f340198128491484ec552082903a9000a2c147a", + "size": 184365 }, { "url": "https://platform.claude.com/docs/en/manage-claude/workspaces", "status": "success", "path": "en/manage-claude/workspaces.md", - "sha256": "0cccacb23665185b511b79d10c4516569d7fb1d77b512067abb6b85e0314750a", - "size": 45517 + "sha256": "6f9da0b980885490f62bec6aebcc802ebcdeaf2fdf38499bf2181125b750745b", + "size": 45549 }, { "url": "https://platform.claude.com/docs/en/manage-claude/organization-webhooks", @@ -975,15 +989,15 @@ "url": "https://platform.claude.com/docs/en/manage-claude/user-profiles", "status": "success", "path": "en/manage-claude/user-profiles.md", - "sha256": "9c16b3de17bae11334502c80dd3bb07c5ca56c9cb7a04b3dd9333c95a027e5dd", - "size": 34209 + "sha256": "116ffd6517f1f774610128cd3682f76f332a148560c3f3b218cf986dc801e664", + "size": 34538 }, { "url": "https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal", "status": "success", "path": "en/manage-claude/user-profiles-verification-portal.md", - "sha256": "46bf27c897e31c6d397c9da5514eb00862904ee696bc05624d6dab75554a0fb3", - "size": 11015 + "sha256": "f5a47d8d1ec45c1bc041fca4767607da715388c803d6aba901a1542d8e19b279", + "size": 11083 }, { "url": "https://platform.claude.com/docs/en/manage-claude/admin-api-keys", @@ -1003,8 +1017,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/workload-identity-federation", "status": "success", "path": "en/manage-claude/workload-identity-federation.md", - "sha256": "d6c36977b9ed8da84e2fc76d4b20d18f96d016b5805ba93ba9bb8d67b4faf1d0", - "size": 26380 + "sha256": "036e0180e11e08797167aa053486451ae05c30c6a3eb28fae1804f1af89ef6ea", + "size": 26212 }, { "url": "https://platform.claude.com/docs/en/manage-claude/wif-admin-api", @@ -1017,64 +1031,64 @@ "url": "https://platform.claude.com/docs/en/manage-claude/wif-reference", "status": "success", "path": "en/manage-claude/wif-reference.md", - "sha256": "cb08d80ff7849f70e1f6a09de2a865428b7ff7c253601fd31738afc11ee6886b", - "size": 47279 + "sha256": "342093ba54d7e522f8b05e4236a4814cb565ad103140f303c41dc62b7e826902", + "size": 47862 }, { "url": "https://platform.claude.com/docs/en/manage-claude/wif-providers/aws", "status": "success", "path": "en/manage-claude/wif-providers/aws.md", - "sha256": "8828b57924878212d41881f8d9a2c73b267a4259cd5d1d69049f26d4f2c4fb79", - "size": 34919 + "sha256": "338c0226a30b4cba192c0ad782e9e2d695a3ec045eac1e9fc3eb90d252c83fd4", + "size": 34701 }, { "url": "https://platform.claude.com/docs/en/manage-claude/wif-providers/gcp", "status": "success", "path": "en/manage-claude/wif-providers/gcp.md", - "sha256": "08f450a184dedc311ed392860fb5ebb9580e176730fe75d2757630b0b22c2165", - "size": 22600 + "sha256": "c608f919b5922be7f2e71914e5d190d92c218b023f466225332e9fd1b0991223", + "size": 22425 }, { "url": "https://platform.claude.com/docs/en/manage-claude/wif-providers/azure", "status": "success", "path": "en/manage-claude/wif-providers/azure.md", - "sha256": "75cdeb06142eb4f6c70d2c1b4293e06c03b388f62dd847498647cb98ef88bfe8", - "size": 70068 + "sha256": "b7dc2375ab150d92280e0ba642d4eb32005f51a317bf34f35959f9fdbc284c48", + "size": 69646 }, { "url": "https://platform.claude.com/docs/en/manage-claude/wif-providers/github-actions", "status": "success", "path": "en/manage-claude/wif-providers/github-actions.md", - "sha256": "ad2400e8ca0019092c77581c6e99bd555c9e24a99857822b0981e44f8ce7d1d6", - "size": 14833 + "sha256": "3023bf132a9391de3c9ca68f6e8cb3d363c1e957f8b050f0e734e851730ec142", + "size": 14816 }, { "url": "https://platform.claude.com/docs/en/manage-claude/wif-providers/kubernetes", "status": "success", "path": "en/manage-claude/wif-providers/kubernetes.md", - "sha256": "97f0c28ffddd0c90849c9c55b9d9e3e81bb45c8f5ae0495dbf339971ee318c4e", - "size": 14501 + "sha256": "e24b34849f24d6ea811f7d53800f29df82d164dfcc33b4a8c0297979dadf4419", + "size": 14484 }, { "url": "https://platform.claude.com/docs/en/manage-claude/wif-providers/spiffe", "status": "success", "path": "en/manage-claude/wif-providers/spiffe.md", - "sha256": "89d858fff457c6de08c45f40f6784df689697e1d2aff6b36e885dba9a9c9b2b9", - "size": 30603 + "sha256": "8bb474a1bff0eb8e7c925111ab681c69500ff7196c3aaa1311e7468ce732d66b", + "size": 30592 }, { "url": "https://platform.claude.com/docs/en/manage-claude/wif-providers/okta", "status": "success", "path": "en/manage-claude/wif-providers/okta.md", - "sha256": "1fc38e27973dfcd80f061e276aa44e18541069708e659229f2b15c19bec6e603", - "size": 24246 + "sha256": "31bcb88bd8402ca6e8c0b98caabf6df45b251c08219af836b6e8ac6fc1300e09", + "size": 24025 }, { "url": "https://platform.claude.com/docs/en/manage-claude/usage-cost-api", "status": "success", "path": "en/manage-claude/usage-cost-api.md", - "sha256": "d3eda87c0ad7ae0e0f747ec0c15797d9e93faf260d722bf331326b02bd689028", - "size": 16904 + "sha256": "27014107774660750a3320ef06bb2070e8c5d7a0169d3bada3bd180007473ceb", + "size": 17738 }, { "url": "https://platform.claude.com/docs/en/manage-claude/rate-limits-api", @@ -1094,8 +1108,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/claude-code-analytics-api", "status": "success", "path": "en/manage-claude/claude-code-analytics-api.md", - "sha256": "4bd6632170bc635365fac0dca2371877b6e7ef2b23ab827ec9f4afb82933c1f3", - "size": 14092 + "sha256": "41452f13e1221c7430e93561ed2c9d7188733d0071f059d8fedf572043a81883", + "size": 14118 }, { "url": "https://platform.claude.com/docs/en/manage-claude/spend-limits-api", @@ -1108,43 +1122,43 @@ "url": "https://platform.claude.com/docs/en/manage-claude/opentelemetry", "status": "success", "path": "en/manage-claude/opentelemetry.md", - "sha256": "476265481cfe814f4ae0dd296b03907f0089835a072e01ba5249976019cbdbff", - "size": 26515 + "sha256": "ceb4c8b7d331e58990d8c1f0e1107233e15817b1f7e0a56848544006d79264ec", + "size": 27831 }, { "url": "https://platform.claude.com/docs/en/manage-claude/opentelemetry/sdk", "status": "success", "path": "en/manage-claude/opentelemetry/sdk.md", - "sha256": "ae1607fa72359ecf1f5216c5e881e3656c420abcd933c148c5849c94991f915c", - "size": 31922 + "sha256": "3a2b5afea795a792a14cf7e247c0af92468ec088a85d90f6d4ef555806f46cf5", + "size": 32027 }, { "url": "https://platform.claude.com/docs/en/manage-claude/opentelemetry/api", "status": "success", "path": "en/manage-claude/opentelemetry/api.md", - "sha256": "40bb48a55d1258b1138923dc04fa72ef4d4b3dbdb134d5e137407bb9832461c8", + "sha256": "1ded81da840f29852457c0eb36dac4b378a5288c7b656c71e94e105c6c63d285", "size": 42284 }, { "url": "https://platform.claude.com/docs/en/manage-claude/data-residency", "status": "success", "path": "en/manage-claude/data-residency.md", - "sha256": "b1b7a94e0c53b8c7d6293d7643e2813e794e2b7f4e5ea87e8abaa87ba5464f91", - "size": 15380 + "sha256": "601a64d7aefb772a146f6e10d7d00575ebc29ae236835a188ef4894aa60f5841", + "size": 16117 }, { "url": "https://platform.claude.com/docs/en/manage-claude/api-and-data-retention", "status": "success", "path": "en/manage-claude/api-and-data-retention.md", - "sha256": "89dccc6ade90ac10ac593fa9cb8f8d53c252396662d1e5874ef66d367049e05e", - "size": 61461 + "sha256": "de7e763f231d88eee02c01a91daf9d0c16661df028f7f650ff7b7ad2a6ebfb3a", + "size": 62221 }, { "url": "https://platform.claude.com/docs/en/manage-claude/access-transparency", "status": "success", "path": "en/manage-claude/access-transparency.md", - "sha256": "d530f65f6b259ba08b3870c65a785b256e78da7c5e179fcbd018468e81b0ff13", - "size": 25155 + "sha256": "8a247c50edd90985dbb3c86abd33560d79debeacd354e863f724535fdfc9008f", + "size": 25377 }, { "url": "https://platform.claude.com/docs/en/manage-claude/access-transparency-log", @@ -1157,8 +1171,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/cmek", "status": "success", "path": "en/manage-claude/cmek.md", - "sha256": "5e9d1818867c0433daa429c1dd39110754384e9be01066c43d8caa1f2ad5ecd1", - "size": 17832 + "sha256": "9a0ccf684229f5ea0831357a1f8d8e463323dbfd566005e2ccc649b2be117871", + "size": 18272 }, { "url": "https://platform.claude.com/docs/en/manage-claude/cmek-google-cloud-kms", @@ -1206,8 +1220,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/inference-hooks-endpoint", "status": "success", "path": "en/manage-claude/inference-hooks-endpoint.md", - "sha256": "c22fac1c99104e46efaf8ca3da8bc3a4a3d568a89723f4eca0c6a537295f3b7d", - "size": 53895 + "sha256": "839fc0872b3f8d714e8c9db65a7c2ad484f89fa0dc9fc8e66767adcfad8e30a5", + "size": 53887 }, { "url": "https://platform.claude.com/docs/en/manage-claude/compliance-api", @@ -1241,8 +1255,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/compliance-sessions", "status": "success", "path": "en/manage-claude/compliance-sessions.md", - "sha256": "5c85c00d8d08e5b0a71410325e93602ef733f8bc1d373b663b90a20b6511d1b9", - "size": 54553 + "sha256": "e5ce156febd46fa621de761d8ef5231f1b9e18dd18f1bbb617ecbdd4c087e0d7", + "size": 54557 }, { "url": "https://platform.claude.com/docs/en/manage-claude/compliance-org-data", @@ -1283,36 +1297,36 @@ "url": "https://platform.claude.com/docs/en/about-claude/use-case-guides/ticket-routing", "status": "success", "path": "en/about-claude/use-case-guides/ticket-routing.md", - "sha256": "e98ac13ccc7e2d0a4d4335d56cb7226f07c93fc825ab60e29293130e680f617b", - "size": 75104 + "sha256": "846b07c435e5f32d39d3217425b18026998b3ef3ecb92a3c978664f63836ea98", + "size": 75176 }, { "url": "https://platform.claude.com/docs/en/about-claude/use-case-guides/customer-support-chat", "status": "success", "path": "en/about-claude/use-case-guides/customer-support-chat.md", - "sha256": "8ed13e5ebc9a93f748dde5a48709e3f0e0ee3d7b1596261ebf3eccf481246802", - "size": 54985 + "sha256": "742d866453deef9e9441b3fd012ba6f0e40d7bf074877a6de81036db91de128c", + "size": 54891 }, { "url": "https://platform.claude.com/docs/en/about-claude/use-case-guides/content-moderation", "status": "success", "path": "en/about-claude/use-case-guides/content-moderation.md", - "sha256": "0b7444bdc1b2678ddaffecf267f503f571d710fd8052567a570789bb27038cb7", - "size": 115263 + "sha256": "1590af6607c4026941decdb0072ac08e673bcd2653887bf9d4fb7c5d7aa4fea3", + "size": 114600 }, { "url": "https://platform.claude.com/docs/en/about-claude/use-case-guides/legal-summarization", "status": "success", "path": "en/about-claude/use-case-guides/legal-summarization.md", - "sha256": "14bb53eb34b2899c6226fbcde61a1777d260e7bf10c99a01b33f65789da02c70", - "size": 57932 + "sha256": "21f57d5b0c47b4d93201665dece8fc6b11cfe73eedb7aa23b6dc92e18306d3e9", + "size": 57828 }, { "url": "https://platform.claude.com/docs/en/about-claude/use-case-guides/commerce-agents", "status": "success", "path": "en/about-claude/use-case-guides/commerce-agents.md", - "sha256": "d5d5b0712542aba34d4cc59eaa8875d1c2898b157e09ba60b31094a1f362bb88", - "size": 9309 + "sha256": "cfb63cb0db823c9a24e010e3ef204c3d5bbbec859bfc2482b1c5bbc9df1500c8", + "size": 9351 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview", @@ -1325,15 +1339,15 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices", "status": "success", "path": "en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md", - "sha256": "741fd447f6e3b9dcd00c3b95cdf572085a86fde7666f97dc55285663b36b7aee", - "size": 74539 + "sha256": "68fa2aeb65250f259c1acd2c1d00fcb0024368e867f26f1614b1b09f4e69355f", + "size": 74566 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1", "status": "success", "path": "en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1.md", - "sha256": "1209e6f1f08388108855450c70c04d08b01aea587e3eb92c61646091343c40eb", - "size": 54924 + "sha256": "2683e696addd5707c125d89242637eae2ee0cf7d35562aa26639602057331426", + "size": 54955 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5", @@ -1353,15 +1367,15 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5", "status": "success", "path": "en/build-with-claude/prompt-engineering/prompting-claude-opus-5.md", - "sha256": "43cd9ce21193be4595a8debe8a89063b871c270d6ebbff5a5b3c63cf207e6a3c", - "size": 12953 + "sha256": "33363d43003e73e7b928939e6421c4eb521544e60a4ef5ddcfecfd3976b38c6e", + "size": 12954 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8", "status": "success", "path": "en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8.md", - "sha256": "0a24ebb01c8a24370363f6862cc8c2f347a27ef193cd65b5be95043736826c2c", - "size": 16546 + "sha256": "d6a78e5a7b0f811b7ad7fe15500e6d5b1f8934d1e1a2c8e5c869e96ca7a0bab0", + "size": 16579 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5", @@ -1374,22 +1388,22 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5", "status": "success", "path": "en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md", - "sha256": "750e603dbacf2e1d508027960bcf8f9b448440e6f3e1d8fc8019b9cd7818fb15", - "size": 15995 + "sha256": "b61885c698f4a7a189b2ff1fd3c09f9fbf9bced43dec07fbb9fe72aa9daa3c23", + "size": 16017 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5", "status": "success", "path": "en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5.md", - "sha256": "feae12ab2bd28ae3c200ac438e2b3652d632898550b23545099154fa08596e36", - "size": 15010 + "sha256": "fd49d70526cc90348cde41d4d6eed8f28658fb54e1605b2d5e213557700259d4", + "size": 15078 }, { "url": "https://platform.claude.com/docs/en/test-and-evaluate/develop-tests", "status": "success", "path": "en/test-and-evaluate/develop-tests.md", - "sha256": "28068b61e61a32b194c32bd4db1b437087bdd884345168c04b8e8cbf526fe1a5", - "size": 153054 + "sha256": "6ce47a8ebe23aa6f01824e215bbe8dbd2f8d484f9e29054c93764143f3afdaea", + "size": 152982 }, { "url": "https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-latency", @@ -1444,176 +1458,176 @@ "url": "https://platform.claude.com/docs/en/models/overview", "status": "success", "path": "en/models/overview.md", - "sha256": "968e6bc022276fe6d4cefa24f19ebfffcd8f25e5adf358d32612da16f694bd8e", - "size": 20456 + "sha256": "0bee72dee7cbb689a714c14458091412889a24d64364843f1db2ecd1f7b93483", + "size": 22012 }, { "url": "https://platform.claude.com/docs/en/models/fable-5-1/overview", "status": "success", "path": "en/models/fable-5-1/overview.md", - "sha256": "2601c11e1eedf8972055ae26e2612d08944e1e43bfdf79eefc606a51e2b1af9c", - "size": 15149 + "sha256": "2429aba21158890ee7c5d62719439da0ffe36e4f45fbcf47d03e739efb4704bd", + "size": 16993 }, { "url": "https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1", "status": "success", "path": "en/models/fable-5-1/whats-new-fable-5-1.md", - "sha256": "a86a3cfc80284406ecec90ac1d7bc81dc7ff84c423fcc2bf4d0496d5c2f73565", - "size": 40215 + "sha256": "4f0be79f76b26670d5d2b72c241192847eea72eee3d6e71b15d365ac0ec4c56a", + "size": 40482 }, { "url": "https://platform.claude.com/docs/en/models/fable-5-1/migration-guide", "status": "success", "path": "en/models/fable-5-1/migration-guide.md", - "sha256": "096b244d7f31538dc109a5c2840330ca0650d9274b1eabb862e073efe27f5d04", - "size": 95750 + "sha256": "0fd2ff8261e58295c181c964f95ce537933f314096e7aa4aa0ba62a4048eec1b", + "size": 96017 }, { "url": "https://platform.claude.com/docs/en/models/opus-5-5/overview", "status": "success", "path": "en/models/opus-5-5/overview.md", - "sha256": "7140a428547674e82699a993fdc59d0df52bc5ff77e45f0877adf2a40dfc5105", - "size": 14338 + "sha256": "4873b679684d23389e8ce7aa2d01e16b6148d02ba2e9593067ac5e07375a1fe0", + "size": 16215 }, { "url": "https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5", "status": "success", "path": "en/models/opus-5-5/whats-new-opus-5-5.md", - "sha256": "865db3f46b5a79fe7b3e4ec78af86d647857d3d9484add6c66bdf24ade6b1b84", - "size": 22219 + "sha256": "62b7646d5388a15d4fddb20902635538db660df95e0695b0eb4ba38d31022d56", + "size": 22789 }, { "url": "https://platform.claude.com/docs/en/models/opus-5-5/migration-guide", "status": "success", "path": "en/models/opus-5-5/migration-guide.md", - "sha256": "40ace2e1fb288b83425649d390c5e5ca2b649effce678e8b3384aa029b68dfda", - "size": 90752 + "sha256": "8532ae45dc19a7071274f38ea452c4a86b4be49ec6fd6004ab2ea00eb7bb33f0", + "size": 91317 }, { "url": "https://platform.claude.com/docs/en/models/sonnet-5-5/overview", "status": "success", "path": "en/models/sonnet-5-5/overview.md", - "sha256": "bdcdf0eb05643ce9f63694842ed99ed083e19c5b2b729fbf39a142c9d7204e5c", - "size": 14553 + "sha256": "9cd453d151f1a6d557806996291b4b9bc670c66070bb13097bc7c4bb458d87aa", + "size": 16445 }, { "url": "https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5", "status": "success", "path": "en/models/sonnet-5-5/whats-new-sonnet-5-5.md", - "sha256": "b6bc69ef3d1b9fa347be346ed65685f4b93444fad1ed1d53f3282800e5a79e12", - "size": 22896 + "sha256": "3a2e9531cbb9e4e1d69f37dc8a08e9e2e0d974feeba592ea830abff5d8c65c53", + "size": 23770 }, { "url": "https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide", "status": "success", "path": "en/models/sonnet-5-5/migration-guide.md", - "sha256": "95654553a0350062506967dcb2222c305ff252b96754794441564ed2b684cfde", - "size": 55331 + "sha256": "f0fea79ac3f0b34ef023f5a9b9f45c777c80ea79bb729f08568ef6380faeb576", + "size": 55886 }, { "url": "https://platform.claude.com/docs/en/models/haiku-5-5/overview", "status": "success", "path": "en/models/haiku-5-5/overview.md", - "sha256": "2200403561aacae84bb37299c0d311793b588b1f6aca9008cb14b71ed094be9f", - "size": 14524 + "sha256": "6df3648758680851b002f1135d3889c808a24141a4c92e03a25ed5d902d54581", + "size": 16368 }, { "url": "https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5", "status": "success", "path": "en/models/haiku-5-5/whats-new-haiku-5-5.md", - "sha256": "a83e0111c0c74a5742afb0efe945d3369c8625c7e1911efddeed4e83462c38d9", - "size": 12413 + "sha256": "173d4a162140e5361212e45618f2c592d3f4f0edcfeab799dc49eefe062a1ac6", + "size": 13025 }, { "url": "https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide", "status": "success", "path": "en/models/haiku-5-5/migration-guide.md", - "sha256": "316d3265a809b0abc72a0b57ff3e70da18babe3fb040124472033a1a3ce457b8", - "size": 18887 + "sha256": "4cba0114a87e00ee24bcfdcb4c7c825e5a0216dcbab07cfd4f88b8eb39e0a8ae", + "size": 19293 }, { "url": "https://platform.claude.com/docs/en/models/mythos-5-1/overview", "status": "success", "path": "en/models/mythos-5-1/overview.md", - "sha256": "e8fb5c4634d56dad130d3fd50e5330bd3ebb2a12802989cc4030e6f98bb77bd3", - "size": 10892 + "sha256": "4fe5f18d015c928bbf1576d416bec42364aec90aa0416ad6a4418fc2e3d6815d", + "size": 11522 }, { "url": "https://platform.claude.com/docs/en/models/mythos-5/overview", "status": "success", "path": "en/models/mythos-5/overview.md", - "sha256": "1d8b6d9aaf721f163b6742f39e3abb72d1b13592ee9020610aba9f20849405a9", - "size": 10745 + "sha256": "ee4940071bc7584ba9dafbffa98dd91501ac748aaec42e5e1d19b52beb1f5eae", + "size": 11375 }, { "url": "https://platform.claude.com/docs/en/models/fable-5/overview", "status": "success", "path": "en/models/fable-5/overview.md", - "sha256": "f385aa2690b4d59667a8a445de75e70266af0897ead417eec90531ac9e09410f", - "size": 12169 + "sha256": "d89ef4578e1232fc567e0da5a7609c9b37bc9f3304df069ad77c644145aa68c8", + "size": 14011 }, { "url": "https://platform.claude.com/docs/en/models/opus-5/overview", "status": "success", "path": "en/models/opus-5/overview.md", - "sha256": "0f40dbeada2f7d315de1fb460e3e38ff1282e0aa0c48b507cf910dc0b1c0f066", - "size": 12374 + "sha256": "50f1680eb95585d596e101ee9528e7e5c8ea5feea14efe097f9e9c6dcfb8b4b0", + "size": 14215 }, { "url": "https://platform.claude.com/docs/en/models/sonnet-5/overview", "status": "success", "path": "en/models/sonnet-5/overview.md", - "sha256": "d2d7688384ef572601f2f047537dd461cabd75988a948ebf03cc8d752933e4c3", - "size": 12958 + "sha256": "08962bb246b785d9ab18bb86071c65f8ab1eacaca7346313da2b16c38350ebe5", + "size": 14801 }, { "url": "https://platform.claude.com/docs/en/models/opus-4-8/overview", "status": "success", "path": "en/models/opus-4-8/overview.md", - "sha256": "98460998b3f13e36e3b92297449981386fa68b7a35c5d443dcad7aea63b7376a", - "size": 11829 + "sha256": "4ca1a177c0f9d64fb12c3f4ea9722e696b0d2a3f658da7547bf52c9fa0a50d3d", + "size": 13672 }, { "url": "https://platform.claude.com/docs/en/models/opus-4-7/overview", "status": "success", "path": "en/models/opus-4-7/overview.md", - "sha256": "c9c46645dde9dda623bcbf978fc335d20427490bba5b536f26076b1adb067cee", - "size": 11677 + "sha256": "fac0c55b2537d0288981dcc22e204341a5ced41de139aab69d93318230ffd4cd", + "size": 13520 }, { "url": "https://platform.claude.com/docs/en/models/opus-4-6/overview", "status": "success", "path": "en/models/opus-4-6/overview.md", - "sha256": "5fde2113acf9ba0844f868d944a49b526cfedb813e999bae9a4d5e3cb1b61bb1", - "size": 12343 + "sha256": "847251eb78400eeb0375c636367989fb890145acd7dfc8de08dad4bcdced12e4", + "size": 14084 }, { "url": "https://platform.claude.com/docs/en/models/sonnet-4-6/overview", "status": "success", "path": "en/models/sonnet-4-6/overview.md", - "sha256": "6289990a037450f8f9675682d3b115b5d82e4adce3711995f39ba041f9cf4730", - "size": 12395 + "sha256": "9f6905f76eb8534dfbc6de4bd133d9d1ce32496ad865e19d947116d56d69f027", + "size": 14135 }, { "url": "https://platform.claude.com/docs/en/models/opus-4-5/overview", "status": "success", "path": "en/models/opus-4-5/overview.md", - "sha256": "64137c23b60416a9a5f4780df9206e4c71e36f5b8458fbf90bd253050bb8c19b", - "size": 11970 + "sha256": "8c443c9c992f9b78920d7d8feec7534fd5a24d83d0960ca630149f0cf5829a2e", + "size": 13759 }, { "url": "https://platform.claude.com/docs/en/models/sonnet-4-5/overview", "status": "success", "path": "en/models/sonnet-4-5/overview.md", - "sha256": "16b10373e5fedc385c2382cfa8fa951e51f36084fcbb8dcf8582240b1f242374", - "size": 12648 + "sha256": "69e8460d9f7c5717a037db86b5cdab785aa716d237a21810eb1b400cadf2ec1c", + "size": 14654 }, { "url": "https://platform.claude.com/docs/en/models/haiku-4-5/overview", "status": "success", "path": "en/models/haiku-4-5/overview.md", - "sha256": "bec0ed34119af773736e4ee5897e25cf43b1261a5e63b77b0639fb36814f32e7", - "size": 13402 + "sha256": "340157b9fb67fc3290e60ebea6a999fa933ecc662695a6d3e5307266196f2f03", + "size": 15229 }, { "url": "https://platform.claude.com/docs/en/about-claude/models/choosing-a-model", @@ -1626,8 +1640,8 @@ "url": "https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence", "status": "success", "path": "en/about-claude/models/optimizing-for-cost-and-intelligence.md", - "sha256": "7ee7b3f5549a6a41c6b3d80600204e167e0dfc5494e66e518f589f501b70f3e2", - "size": 182718 + "sha256": "9a2f98334be7bbbe61149ed4a59ec47f40fdf55ae29cf3dbfad03bd62d2cf7b0", + "size": 186531 }, { "url": "https://platform.claude.com/docs/en/about-claude/models/migration-guide", @@ -1640,15 +1654,15 @@ "url": "https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions", "status": "success", "path": "en/about-claude/models/model-ids-and-versions.md", - "sha256": "2a2353199b7d09aa111b8287ecab1c6c9649ecadd04835017e8b3a03ea177f03", - "size": 4032 + "sha256": "64c259d585020922012bab28c9b519a8593f55abc5d6ca78814ac95f72387d07", + "size": 4134 }, { "url": "https://platform.claude.com/docs/en/about-claude/model-deprecations", "status": "success", "path": "en/about-claude/model-deprecations.md", - "sha256": "ce0d97cc92ff8004f0a0ec16016520f48d1042dea39c4ee51511deb86158ecab", - "size": 14367 + "sha256": "d2fd9f71fed176557d5ed32e2bd212e72dce5dab836bf62b5a2b40dba2fda0d4", + "size": 14616 }, { "url": "https://platform.claude.com/docs/en/resources/overview", @@ -1661,8 +1675,8 @@ "url": "https://platform.claude.com/docs/en/about-claude/pricing", "status": "success", "path": "en/about-claude/pricing.md", - "sha256": "88ae8282a9d5e48bc3aa7cde98c80b468454abaaa348de5baf09ef27f1a05c6f", - "size": 50718 + "sha256": "7290220dcde922ef0cfc83fe37213bc709c47723c0ae38bfed38374e40cce998", + "size": 53412 }, { "url": "https://platform.claude.com/docs/en/about-claude/api-credits-for-subscribers", @@ -1836,8 +1850,8 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/overview", "status": "success", "path": "en/cli-sdks-libraries/overview.md", - "sha256": "02f28e5da6f9501b90e3fcbde32fb79e83f2ae07c52a3c785e66f7bfe32736c0", - "size": 5429 + "sha256": "b8879a558aed8bf6e2ea09218a7e11c55e8162600dfaace5b869c8fac7d78ab0", + "size": 5488 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart", @@ -1850,8 +1864,8 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/cli/authentication", "status": "success", "path": "en/cli-sdks-libraries/cli/authentication.md", - "sha256": "407283da7075395c43f114611a67e7e0ef72401f296f82dda1bbd90a3bb399e7", - "size": 8852 + "sha256": "a2a72b40a716ef2ae5300ca9d4ef6f4dd8e9609067a27ad77c071e4f515dc431", + "size": 8866 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/cli/using", @@ -1892,50 +1906,50 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/python", "status": "success", "path": "en/cli-sdks-libraries/sdks/python.md", - "sha256": "f2f692822a42f33839f8198d99d2832db669b9b1b820dabb8e0382ce7cbaa3be", - "size": 27384 + "sha256": "f2ba382b050673a33ae9f770cfd2263b79769d6fa22ea18bc891e03395ef0bf7", + "size": 28534 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/typescript", "status": "success", "path": "en/cli-sdks-libraries/sdks/typescript.md", - "sha256": "3573f1c9c76453c0f696b326f0224ad39ee7efc05e443544baf426bddc52c204", - "size": 30244 + "sha256": "89cc0ef16fbdc75d8e2d1359896531546d891a94944a481af1a5813ce2d2e68f", + "size": 31069 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/csharp", "status": "success", "path": "en/cli-sdks-libraries/sdks/csharp.md", - "sha256": "35326ac804621dc3365cf33d1e853dcf00337da287bc3ac8333c19e4d0ee1752", - "size": 16182 + "sha256": "8537bb6178cf31b808422b4d9e46a17a271f7f275bfe96727917b06ead15971a", + "size": 17006 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/go", "status": "success", "path": "en/cli-sdks-libraries/sdks/go.md", - "sha256": "c13ddb0c89a09f1fd739f6c18fa1f0acae656238e2ec513ffaf99929f901bf18", - "size": 27167 + "sha256": "93631d5364f386e23596cf9056143f834cc7714516d23e81c4b6dd0313891d95", + "size": 27662 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/java", "status": "success", "path": "en/cli-sdks-libraries/sdks/java.md", - "sha256": "6315978f04627c389b5fe0dbff37e8f95c7681a72cb7d36b190e75f0e8d1d685", - "size": 48275 + "sha256": "c6ea46a368a906c992b8604fcb64f292c5db07810f1ca8afd91e02908b32a7fd", + "size": 49397 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/php", "status": "success", "path": "en/cli-sdks-libraries/sdks/php.md", - "sha256": "5d7612372a3a8c6a73024acbbd47a21086d56fa3cd529d658d7bf18a2b997c2c", - "size": 9694 + "sha256": "7273f944724729e54076d221b41b2830d72f486cb9dfcff995e3016b002c66c0", + "size": 10635 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/ruby", "status": "success", "path": "en/cli-sdks-libraries/sdks/ruby.md", - "sha256": "93f13c6fb84c1f00ef6d3b26dc98a08ec15095629be7a3c75de856638179614a", - "size": 15484 + "sha256": "277dbcda40e128e667443f4267c62b25637b02a4d68a28a6c06ed16eadb3ddf0", + "size": 16308 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/apple-foundation-models", @@ -1948,29 +1962,29 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/openai-sdk", "status": "success", "path": "en/cli-sdks-libraries/libraries/openai-sdk.md", - "sha256": "f0932a50764a858caa3120c5400f9fe281a1b2ff1e5bb62491bdb83854ddbf2f", - "size": 35569 + "sha256": "0584a6d341f1be2e583958176f48c2116783d374f12a513b194ab55d60a91153", + "size": 35514 }, { "url": "https://platform.claude.com/docs/en/api/overview", "status": "success", "path": "en/api/overview.md", - "sha256": "b0ddf5ca6fcafe1734cfe15927734ea0947fdcdeab74b5a0448c1a3ca93e037a", - "size": 22690 + "sha256": "d7c5f5b436ac205100f126456f6b0f95a14016d7f3900685f9a5e5f7b6f67b4f", + "size": 23735 }, { "url": "https://platform.claude.com/docs/en/api/beta-headers", "status": "success", "path": "en/api/beta-headers.md", - "sha256": "39a6050cebc69f773c7a99bf8d1d15b18734ea898f7d0b1de4d7dcbddadc22ab", - "size": 9709 + "sha256": "2fcac246e1e805d3babfe37e9d158b0be45b134e8e9ca53b685666ae5fc41f82", + "size": 9973 }, { "url": "https://platform.claude.com/docs/en/api/errors", "status": "success", "path": "en/api/errors.md", - "sha256": "b43f0d872016245606c1a0dcad14c25c3f4edbfcba9c21931d887d02793bdc46", - "size": 33567 + "sha256": "f585ff299488436f560617e398ddf4f00c7bfa100ae03e1a3796a6a72f818874", + "size": 33606 }, { "url": "https://platform.claude.com/docs/en/api/opentelemetry/spans", @@ -1983,15 +1997,15 @@ "url": "https://platform.claude.com/docs/en/api/rate-limits", "status": "success", "path": "en/api/rate-limits.md", - "sha256": "2b1e99b3d4cad6bfc3ef9203fd2d42fe12a817eb2451874f4cecf8eb6fbfbee2", - "size": 36142 + "sha256": "08eb77143716077b2ce21284b8344e274c1cf65f2441ebd711cefc51b54f0cc9", + "size": 37366 }, { "url": "https://platform.claude.com/docs/en/api/service-tiers", "status": "success", "path": "en/api/service-tiers.md", - "sha256": "0b49b55cdc6d8617a75fafa7816a5a010fbe54b7c02cd2e9478b545bb903a1dd", - "size": 8843 + "sha256": "51cdd4d4e828cbad93654af0155599cc3ab52719ad8443bcb31628d973b04c65", + "size": 8856 }, { "url": "https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions", @@ -2000,12 +2014,19 @@ "sha256": "e29881c03362174091787f54ca46375197161e7ed3e0a6c98a68a71bfe66b710", "size": 58443 }, + { + "url": "https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions", + "status": "success", + "path": "en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions.md", + "sha256": "2a59d84898eda73f0cd038c5f36ef642b20637e92b5627afe1ed55eb45e64518", + "size": 28770 + }, { "url": "https://platform.claude.com/docs/en/api/versioning", "status": "success", "path": "en/api/versioning.md", - "sha256": "88841e8478b8fc8c73736e594731cfc4809ceb83b579ec660054354d712445d1", - "size": 4442 + "sha256": "f4a2cdd317587feac501351aca906c5b7375aac18e2cca969d7b31aa3ba2d0b2", + "size": 4684 }, { "url": "https://platform.claude.com/docs/en/api/ip-addresses", @@ -2032,15 +2053,15 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/agent-skills/claude-api-skill", "status": "success", "path": "en/agents-and-tools/agent-skills/claude-api-skill.md", - "sha256": "5c301b9749c2b138ee6beacae40fbf7b29ea8d3feb3c2980438182aee57d4664", - "size": 17351 + "sha256": "a5c238abe25be126a8ddb7d111724b8e26bdb752d6084adfa09cbcc30f4646d9", + "size": 17174 }, { "url": "https://platform.claude.com/docs/en/release-notes/overview", "status": "success", "path": "en/release-notes/overview.md", - "sha256": "632020f4b3f31e65f9e9aa4b3a0a32d19a9bed30be6104247f0251f8753aafde", - "size": 131957 + "sha256": "5fafb53d43f0ba1ca015378b0d192fa3639738a4f1944dba78f78fdade148e83", + "size": 132705 }, { "url": "https://platform.claude.com/docs/en/api/completions", @@ -2319,8 +2340,8 @@ "url": "https://platform.claude.com/docs/en/api/organization", "status": "success", "path": "en/api/organization.md", - "sha256": "6c50a296d902638a5189f088dd7705985adb76caae9102a3b89b7ba56b04f5e6", - "size": 238315 + "sha256": "05d2e81e2f1d3242ddfcbdf8d3ea5881570172e5b6a987f1c8d7903c28dc9277", + "size": 238603 }, { "url": "https://platform.claude.com/docs/en/api/organization/retrieve", @@ -2669,8 +2690,8 @@ "url": "https://platform.claude.com/docs/en/api/organization/workspaces", "status": "success", "path": "en/api/organization/workspaces.md", - "sha256": "fa675fd5c5eafcd3c1ea6cc5a3dfb21bce1bc1bef675bf334de9d16eba65b013", - "size": 70861 + "sha256": "bb62d2771dd18f99abeb9a2dcb4ee842f101b8c2ad6316f890f92c2bf7eaa8e6", + "size": 71049 }, { "url": "https://platform.claude.com/docs/en/api/organization/workspaces/list", @@ -2711,22 +2732,22 @@ "url": "https://platform.claude.com/docs/en/api/organization/workspaces/rate_limits", "status": "success", "path": "en/api/organization/workspaces/rate_limits.md", - "sha256": "c3db6c3489913b5486e0f7b73d3d70d936d08ce49e13052152ad75add18da476", - "size": 22240 + "sha256": "fa8547700b10376a345bfadd756592172a4a9098480812cb6f2beeb366f8219a", + "size": 22522 }, { "url": "https://platform.claude.com/docs/en/api/organization/workspaces/rate_limits/list", "status": "success", "path": "en/api/organization/workspaces/rate_limits/list.md", - "sha256": "84117e15aa3eed213c436113db8ac8b3ec76423226919fab4a362c7e5b5f6502", - "size": 7583 + "sha256": "67d685331dd5c5175139aef780de2cc04e2801c0bd3b28707ddd3aaaab4e0d3b", + "size": 7677 }, { "url": "https://platform.claude.com/docs/en/api/organization/workspaces/rate_limits/update", "status": "success", "path": "en/api/organization/workspaces/rate_limits/update.md", - "sha256": "bd34c42c6a5efce8a91c9281daf7da6ed0057e65fe15dc3554c1255437c4802b", - "size": 7417 + "sha256": "610dc83aa13d41d9bcf8e0a86a8e3630e984be3966b43b389d815041cfb4bb10", + "size": 7511 }, { "url": "https://platform.claude.com/docs/en/api/organization/workspaces/members", @@ -2816,15 +2837,15 @@ "url": "https://platform.claude.com/docs/en/api/organization/rate_limits", "status": "success", "path": "en/api/organization/rate_limits.md", - "sha256": "c6a554cbd6330bd67d315878b156de3106f4f79212407c0adf2ae25cd36af7d8", - "size": 12476 + "sha256": "b578d255240df95daf7693f0ae65701466c086b37961d423390fe54bb7396be0", + "size": 12676 }, { "url": "https://platform.claude.com/docs/en/api/organization/rate_limits/list", "status": "success", "path": "en/api/organization/rate_limits/list.md", - "sha256": "77e41ed9db4cc11790db94c91dfbfaee0653c0e5ceb280605ccd885ab6eb07be", - "size": 5956 + "sha256": "319ba4dc43dcd59f1dca002178ed7b6137abe48a98ff9b094c9338be22816c3e", + "size": 6056 }, { "url": "https://platform.claude.com/docs/en/api/organization/compliance_settings", @@ -2851,8 +2872,8 @@ "url": "https://platform.claude.com/docs/en/api/beta", "status": "success", "path": "en/api/beta.md", - "sha256": "6880b82695d1e02f57e45f270030017846747f35cc3d5d86d0a90037090d0f38", - "size": 3556615 + "sha256": "3cd1603ffc1811083b1bf23fc016b86347ee51e495e12a9ae30177c00e645d85", + "size": 3558713 }, { "url": "https://platform.claude.com/docs/en/api/beta/models", @@ -3901,8 +3922,8 @@ "url": "https://platform.claude.com/docs/en/api/beta/organization", "status": "success", "path": "en/api/beta/organization.md", - "sha256": "3da339c7c2deddeeb277899323f180722d9797849e53d557078d37cb7c362db4", - "size": 873882 + "sha256": "ed3472e84444a2d97f975bcd4d317e3654b918b86124d924577191a2ba53b0d1", + "size": 875980 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/retrieve", @@ -4251,8 +4272,8 @@ "url": "https://platform.claude.com/docs/en/api/beta/organization/workspaces", "status": "success", "path": "en/api/beta/organization/workspaces.md", - "sha256": "e60582706b782eec08365b9e72c89473e78ae3bc4ac205c0d1d6f636437676c6", - "size": 83326 + "sha256": "851e2c9de73155efd4dc87f3161ded34f696c44a418bb5ac254139fbc66f5248", + "size": 83514 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/workspaces/list", @@ -4293,22 +4314,22 @@ "url": "https://platform.claude.com/docs/en/api/beta/organization/workspaces/rate_limits", "status": "success", "path": "en/api/beta/organization/workspaces/rate_limits.md", - "sha256": "236d4ec27aa7eba6612e59ec1c5b581b12fd5fb11ade63b72a87623dab85fc4f", - "size": 22503 + "sha256": "e0555d5f21d99782293ca59d2f76772c349eb0227ab608b0ec5d1bd40dc578e5", + "size": 22785 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/workspaces/rate_limits/list", "status": "success", "path": "en/api/beta/organization/workspaces/rate_limits/list.md", - "sha256": "c5dfc4416de296d6b21c07570dd1ba5a327039ae7617a4e8e63a7a0880817525", - "size": 7648 + "sha256": "273bdf4973fe5cdd3250868474f1240e5b1262e52c02ae5f7bdc8000ce96a91a", + "size": 7742 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/workspaces/rate_limits/update", "status": "success", "path": "en/api/beta/organization/workspaces/rate_limits/update.md", - "sha256": "20908d93c954a24e4b278e09c6be771fcaf4723939f07d33c176a803f8ae68d3", - "size": 7490 + "sha256": "bb9325cd0f9637b05002f549ed4a7855f6175a0bbcf34d98409eadb492996aa0", + "size": 7584 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/workspaces/members", @@ -4398,15 +4419,15 @@ "url": "https://platform.claude.com/docs/en/api/beta/organization/rate_limits", "status": "success", "path": "en/api/beta/organization/rate_limits.md", - "sha256": "b80ad4f1e235fad2730485df6df4ce5fecd6631d1d113f5f0ad0640e9efd76d0", - "size": 12637 + "sha256": "1df2a0bb86b2576a66d2e20d80ef8483a416eee25f0599f494ac72c9479d2496", + "size": 12837 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/rate_limits/list", "status": "success", "path": "en/api/beta/organization/rate_limits/list.md", - "sha256": "fb597ae188ce8aa02d126cacbf911c3d78c6ccbec4b009fde007b5afef725899", - "size": 6005 + "sha256": "1ff49aac2582d4c9961b81c8668352f7cc1a675df0dca5cb4bf98455f09a613b", + "size": 6105 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/compliance_settings", @@ -4744,6 +4765,13 @@ "sha256": "2eae10e872be6a2a4fc559cef9d2d2d00f05e2424329cd7012bc6df32a69fbfe", "size": 1352 }, + { + "url": "https://platform.claude.com/docs/en/api/beta/organization/spend_limits/list", + "status": "success", + "path": "en/api/beta/organization/spend_limits/list.md", + "sha256": "d00d521d5146dc6345e026b7813b572f627df9cc8e0d50968d2527cc916c30ea", + "size": 7520 + }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/spend_limits/effective", "status": "success", @@ -4902,36 +4930,36 @@ "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins", "status": "success", "path": "en/api/beta/organization/plugins.md", - "sha256": "566420ed5925831fdc76c41f68723b7eacef516a61d6f81926706d7042d336f4", - "size": 119912 + "sha256": "cd96b6d0c51e88bf400ceca4fc59a9f331ba8b5d61a939a71042f8624680c70d", + "size": 122104 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins/create", "status": "success", "path": "en/api/beta/organization/plugins/create.md", - "sha256": "9bbc388a39b4214968d1bf70b25fd847f40fb30746128a8e8d2d2c5ab8a5bdc0", - "size": 13274 + "sha256": "131a39fc85ff61ad7979465f5efdb3a5b83627c05a9e7469fd4e7f54820a6a9f", + "size": 13496 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins/retrieve", "status": "success", "path": "en/api/beta/organization/plugins/retrieve.md", - "sha256": "ba9ce93598bbb466a7915c2ba47d1bb92218eb432d968e4ccd7c66e734260bc9", - "size": 11375 + "sha256": "17fc366999a763aeb7bb60bb707dae1e1e79032e36fbc8074c08a399e2cc99df", + "size": 11597 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins/update", "status": "success", "path": "en/api/beta/organization/plugins/update.md", - "sha256": "244482ab8467648a588ff40d0ef761b6423b39e850a9d52293c37f6015b1a479", - "size": 12329 + "sha256": "02128c0c9d44d33ba12b29b02839e6433fcb4968c74090bc35363a37fdbc79f0", + "size": 12745 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins/list", "status": "success", "path": "en/api/beta/organization/plugins/list.md", - "sha256": "38bab94eec85e75c663e1fb39dc02d99e202f13eb7a621c06d034930fb4b7c4d", - "size": 13362 + "sha256": "0dd938364941ccc0e954a82edb6ed378d2df393515475ab72e8b8a4e4d513add", + "size": 13584 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins/delete", @@ -4944,29 +4972,29 @@ "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins/versions", "status": "success", "path": "en/api/beta/organization/plugins/versions.md", - "sha256": "ff92179ec359957031dbe0353d9ad65f22763a37b993bb5b521e94e80387393f", - "size": 34889 + "sha256": "3b1edb0f8fd9844663eb95e6e3110a1b9cc9eb71f242cdf524f3af05da50f900", + "size": 35777 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins/versions/create", "status": "success", "path": "en/api/beta/organization/plugins/versions/create.md", - "sha256": "8f8d58e7a5262e63a4f59199a2f0b4b9d8c6cda2b56e9df066b9a4c83e6ce692", - "size": 9441 + "sha256": "11451fb5ee314d5a0f9c634a3ac867cdfc74d559fb8459bfed33b6fd6800c004", + "size": 9663 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins/versions/list", "status": "success", "path": "en/api/beta/organization/plugins/versions/list.md", - "sha256": "c721d4cd7c4f0d72130daca9b8de6f2bdaf6d17ba49bba79df4fa1bcb756a583", - "size": 8868 + "sha256": "36dc669e77c67be964075c65fefb2eff8ca475b28fcb0763a548c099c8cb7271", + "size": 9090 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins/versions/retrieve", "status": "success", "path": "en/api/beta/organization/plugins/versions/retrieve.md", - "sha256": "f7d2452015e14e404f4cb8290f5c37fcd4991fdfa00f9c086fe652ec7789be32", - "size": 8346 + "sha256": "61e296598f48df3e6f70328d0cb11afc4dcbd6caaea6571293f47ae5008b278f", + "size": 8568 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugins/versions/download", @@ -5021,8 +5049,8 @@ "url": "https://platform.claude.com/docs/en/api/beta/organization/plugin_marketplaces", "status": "success", "path": "en/api/beta/organization/plugin_marketplaces.md", - "sha256": "38c8df60f334d63a83f725682138fd461c56ad95e887463d6032b27caa770d6a", - "size": 46704 + "sha256": "e21a9fd2d66218c80aa8e631af009398a56157308ce230267347748e68db26c8", + "size": 46766 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugin_marketplaces/list", @@ -5049,15 +5077,15 @@ "url": "https://platform.claude.com/docs/en/api/beta/organization/plugin_marketplaces/validate_repository", "status": "success", "path": "en/api/beta/organization/plugin_marketplaces/validate_repository.md", - "sha256": "aa72cd3cf83e28f950d223cb5195c951e87956a358060f3257e49cf871181927", - "size": 8648 + "sha256": "f5b9bfa1a85e916f51480b0a9b5dcf436232a9d8a3b1db9d32c36513f0d16c0a", + "size": 8679 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/plugin_marketplaces/validate_archive", "status": "success", "path": "en/api/beta/organization/plugin_marketplaces/validate_archive.md", - "sha256": "6bade5e1ace2dfe6f8f40cc42e72cfdb3aa9d3cee8e0f34da825d58735cfdfc3", - "size": 7828 + "sha256": "8b996c9fe0efcd361009c73e9c2e9a04d2ebd844b6be590df5c2c0c7a624d40c", + "size": 7859 }, { "url": "https://platform.claude.com/docs/en/api/beta/organization/telemetry_destinations", @@ -5196,22 +5224,22 @@ "url": "https://platform.claude.com/docs/en/api/compliance", "status": "success", "path": "en/api/compliance.md", - "sha256": "eed1cad1acff3d06b86cadb9ccfe4a594cda09f1436f88b9d86b0058f9cd06fc", - "size": 3781485 + "sha256": "90f0da71b305f8fff8fe744f70f99d544ec484352a8abac2523849a404d30f85", + "size": 3781883 }, { "url": "https://platform.claude.com/docs/en/api/compliance/activities", "status": "success", "path": "en/api/compliance/activities.md", - "sha256": "b8bf20a2dbd91b80bfe33665361747cc55fda05fe0b5c3a73031120eee84a54e", - "size": 7110871 + "sha256": "b01c494dce9547862fa54ff1ceddba04da9101afd98b57fb71ee641c3f4533e0", + "size": 7111667 }, { "url": "https://platform.claude.com/docs/en/api/compliance/activities/list", "status": "success", "path": "en/api/compliance/activities/list.md", - "sha256": "103134c2eb92329b0a278d11178c7dc5d0f9a972df3821dcf720d5f3a1439a1a", - "size": 3631766 + "sha256": "be55385226d3549bfcf0f5590d1b8ab52328a36e2d06d0b082ede12a2aa60085", + "size": 3632164 }, { "url": "https://platform.claude.com/docs/en/api/compliance/organizations", @@ -5651,15 +5679,15 @@ "url": "https://platform.claude.com/docs/en/claude_api_primer", "status": "success", "path": "en/claude_api_primer.md", - "sha256": "9fcc06bce96da5f0315fe52168939f5bbaf81ddd0864ba50dfb7410f08a4ecf4", - "size": 27076 + "sha256": "062dbd71e081cb217c51d57afeebb97a4cf113d66cf5daab7fb5d1ead2e6d93b", + "size": 27074 }, { "url": "https://platform.claude.com/docs/en/api/migration-2026-10-21", "status": "success", "path": "en/api/migration-2026-10-21.md", - "sha256": "bdcbaa693bec55353ff7b80646947a7b0ad01c35b12d66000923ea3a429d3b17", - "size": 85680 + "sha256": "d62c034a78e4d90e8403ab74cb26357adb9504f1403a0ab917842b48931cabf9", + "size": 80896 }, { "url": "https://code.claude.com/docs/en/overview", @@ -5679,8 +5707,8 @@ "url": "https://code.claude.com/docs/en/changelog", "status": "success", "path": "en/docs/claude-code/changelog.md", - "sha256": "c719b69d151d30d7db0f80b3a45a53e978e2b380118e1392e9170caa77f1e7d6", - "size": 1090388 + "sha256": "e71efa657850cefa48a11275c2cae76c2bb8dfd6599a7e3c5eac15db4a44eee0", + "size": 1102138 }, { "url": "https://code.claude.com/docs/en/how-claude-code-works", @@ -5693,8 +5721,8 @@ "url": "https://code.claude.com/docs/en/features-overview", "status": "success", "path": "en/docs/claude-code/features-overview.md", - "sha256": "cd6b4ea80824df1a2d7d07329331e5914087e4f47fc872e41719cb78b78b5767", - "size": 27106 + "sha256": "e1f0ae3d6465f43cc18b3fc1cdab43b4ca10455ddbe5917ef11d79d86b64ab82", + "size": 27348 }, { "url": "https://code.claude.com/docs/en/claude-directory", @@ -5714,22 +5742,22 @@ "url": "https://code.claude.com/docs/en/prompt-caching", "status": "success", "path": "en/docs/claude-code/prompt-caching.md", - "sha256": "7f3e82735e6db245e9646eef8868087929fc6b688b0acd82e7a23e23b5bb5f0d", - "size": 42283 + "sha256": "8797c8fd3ef463baaccb441ce1b33f3321b9301508b314a38d7c2860e2026f10", + "size": 42401 }, { "url": "https://code.claude.com/docs/en/memory", "status": "success", "path": "en/docs/claude-code/memory.md", - "sha256": "971d75bfce7a04c2e0d41e8752d01afe29ed500f2a7159f66d5f7156bea0c3ff", - "size": 51971 + "sha256": "82d60341354924ee8658de0fcde297c2ac37b237dcc931aa4a83329b2c7bb6e7", + "size": 54043 }, { "url": "https://code.claude.com/docs/en/sessions", "status": "success", "path": "en/docs/claude-code/sessions.md", - "sha256": "71a48474e7e0fc9529eda4f8159497311920d9de8d352744a9832a6d0956605e", - "size": 31546 + "sha256": "836bf25afc19ecc86ce68f8a9e87e38a692baa876cb5fdd281bf131cadce4999", + "size": 32576 }, { "url": "https://code.claude.com/docs/en/common-workflows", @@ -5763,15 +5791,15 @@ "url": "https://code.claude.com/docs/en/remote-control", "status": "success", "path": "en/docs/claude-code/remote-control.md", - "sha256": "0bc913a7487c2573c7b9d1195e1ffdf84173c758c5a136284a93ba5a2141adcd", - "size": 60497 + "sha256": "6b4a6dd7b8d0f8ec41fafe97b97b8fc4151cea4ff208611052f39ba26706bd41", + "size": 60461 }, { "url": "https://code.claude.com/docs/en/claude-projects", "status": "success", "path": "en/docs/claude-code/claude-projects.md", - "sha256": "d199706b0e7ec6ba41ceb4ee8cbae47783fbb5185770bfa6121a3c4a7b73211c", - "size": 60207 + "sha256": "8edeaad0cd905d7e8152188a0efb30f5e284d1f7010a2c613362092c1aa90d67", + "size": 60435 }, { "url": "https://code.claude.com/docs/en/mobile", @@ -5798,8 +5826,8 @@ "url": "https://code.claude.com/docs/en/vs-code", "status": "success", "path": "en/docs/claude-code/vs-code.md", - "sha256": "efa22fb1eb88f8806de7f990da6910dd6c39e934593ac2b88943f9831e61e061", - "size": 91558 + "sha256": "064775372561ddb7e81eb463841b46cf55e58c92e805ad4ebf7c286578c77726", + "size": 94127 }, { "url": "https://code.claude.com/docs/en/jetbrains", @@ -5826,8 +5854,8 @@ "url": "https://code.claude.com/docs/en/claude-code-on-the-web", "status": "success", "path": "en/docs/claude-code/claude-code-on-the-web.md", - "sha256": "65a112f2c786c43ca31f88b14d93847072dccec63ba64d891d101f33587064b0", - "size": 42912 + "sha256": "d56e0396e3a7f7423c24131f2744223bcdc3c4100d6998898ac4950eae043b3b", + "size": 42987 }, { "url": "https://code.claude.com/docs/en/routines", @@ -5847,8 +5875,8 @@ "url": "https://code.claude.com/docs/en/desktop", "status": "success", "path": "en/docs/claude-code/desktop.md", - "sha256": "b9f258ac5e9aafc58f0c1b06b52bd35fa2cb3e6ee1f26e69b075f053d34681b7", - "size": 167246 + "sha256": "2f57a4c9de0e2348175f9bce7910f1d9cdb0e81b41c6daf87fbe50251f5f47c8", + "size": 169702 }, { "url": "https://code.claude.com/docs/en/desktop-linux", @@ -5889,8 +5917,8 @@ "url": "https://code.claude.com/docs/en/ultrareview", "status": "success", "path": "en/docs/claude-code/ultrareview.md", - "sha256": "1eda67278aff5954a7969f0aa721e7938f78787eb9cd319cb36ebb38a55cf3cd", - "size": 18282 + "sha256": "09fe6be4e47a58ccbc9adf8720f945b577cbd4009e0dbde23f3925637372af8c", + "size": 19820 }, { "url": "https://code.claude.com/docs/en/github-enterprise-server", @@ -5987,8 +6015,8 @@ "url": "https://code.claude.com/docs/en/sub-agents", "status": "success", "path": "en/docs/claude-code/sub-agents.md", - "sha256": "7951f018c7e91ca904ca0554966e75b8d7a97018fd13ae2d6be2ac418f3a7c7c", - "size": 111243 + "sha256": "84b2646c513754ef5f33c6f5a0d7f59960021a65b5a09c35b9158fa116a73d5a", + "size": 111624 }, { "url": "https://code.claude.com/docs/en/agent-view", @@ -6001,8 +6029,8 @@ "url": "https://code.claude.com/docs/en/agent-teams", "status": "success", "path": "en/docs/claude-code/agent-teams.md", - "sha256": "cc14466fed524f0da1b1299602b4b751b1911ec947317d313b1b0d1202bae6ed", - "size": 40082 + "sha256": "bb95174411522f7e79dc1f178e67ad6a3054c3d4ce4eaa5bce9ee2ff8abae50e", + "size": 40987 }, { "url": "https://code.claude.com/docs/en/cross-session-messaging", @@ -6022,8 +6050,8 @@ "url": "https://code.claude.com/docs/en/worktrees", "status": "success", "path": "en/docs/claude-code/worktrees.md", - "sha256": "75ef8dceb124e1ffcfd1e1584f248bba03f2d5f98507ecff9271f846fe638aa8", - "size": 40970 + "sha256": "9cd5ba09cbb21237674c59bf16095924cf9f8f0e0efd5a1adff0585a2bb36936", + "size": 41336 }, { "url": "https://code.claude.com/docs/en/mcp-quickstart", @@ -6036,15 +6064,15 @@ "url": "https://code.claude.com/docs/en/mcp", "status": "success", "path": "en/docs/claude-code/mcp.md", - "sha256": "4333de9d8b9e337bbc5594445a42f82336ca06ddbba271c8cc841fe828aa136c", - "size": 128697 + "sha256": "f8df5bcff278cb6bb995a1316156deef019577047fcb559131279fade1c3804d", + "size": 130411 }, { "url": "https://code.claude.com/docs/en/skills", "status": "success", "path": "en/docs/claude-code/skills.md", - "sha256": "d1359f0c64371b3f2e267069d9f752418466abadb2765eca2929ecbee4ce0b2b", - "size": 111928 + "sha256": "6b070e872dea28905a7ea7f45c4d5960f5bdf28cc73ac808799af6d50435ffbd", + "size": 114542 }, { "url": "https://code.claude.com/docs/en/artifacts", @@ -6113,8 +6141,8 @@ "url": "https://code.claude.com/docs/en/troubleshooting", "status": "success", "path": "en/docs/claude-code/troubleshooting.md", - "sha256": "c587722b4e3e67e8fdd4b0520a844e63556a3d0990e0ecfa50fda72d9e0172ba", - "size": 15747 + "sha256": "5b50db0218d34c080e1b0647e518200fe347535312a8eb0caffbbee8ab9fe19f", + "size": 15841 }, { "url": "https://code.claude.com/docs/en/debug-your-config", @@ -6127,8 +6155,8 @@ "url": "https://code.claude.com/docs/en/errors", "status": "success", "path": "en/docs/claude-code/errors.md", - "sha256": "99b041134be25cef79acbb97c04c034dbf0818c96dd23e393d0c2e8db1000dd1", - "size": 549839 + "sha256": "de4fd374f7bee1036bf21129a063bf939416b6ec912202b2de10c1fe8d2716fd", + "size": 559142 }, { "url": "https://code.claude.com/docs/en/plugins/overview", @@ -6232,15 +6260,15 @@ "url": "https://code.claude.com/docs/en/plugins/mods/reference", "status": "success", "path": "en/docs/claude-code/plugins/mods/reference.md", - "sha256": "845013f4d44e010792f0e32745273187870bde494cbd74714f865046be877ded", - "size": 40638 + "sha256": "646f0e9a6dbc8f596c176254976e2fc366620ddaeb68cbb9d3a72451d4efa260", + "size": 41299 }, { "url": "https://code.claude.com/docs/en/plugins/mods/interface", "status": "success", "path": "en/docs/claude-code/plugins/mods/interface.md", - "sha256": "0db41b17787f8c436ab670ce36e8241054bda9a618797d2fbcdfbcc02904cb78", - "size": 48853 + "sha256": "f32361edb5895b89a416db4e397834eaa6960abdf84b1f1ad79124e7f89a5f12", + "size": 50712 }, { "url": "https://code.claude.com/docs/en/plugins/mods/gallery", @@ -6274,8 +6302,8 @@ "url": "https://code.claude.com/docs/en/plugins/mods/troubleshoot", "status": "success", "path": "en/docs/claude-code/plugins/mods/troubleshoot.md", - "sha256": "5eb157ed189645510b21fcd71ec0846b3724dcdf29eac892e72520b6d7ad3a91", - "size": 27127 + "sha256": "d254f1d2ef947135a1cda6f90305f63b81e3fcefe9a2368ab094a4174bccfcad", + "size": 28538 }, { "url": "https://code.claude.com/docs/en/plugins/create-marketplace", @@ -6316,8 +6344,8 @@ "url": "https://code.claude.com/docs/en/plugins/troubleshooting", "status": "success", "path": "en/docs/claude-code/plugins/troubleshooting.md", - "sha256": "7f007511042beb0e0de54c5567be2390fc1c6def3947dabbeadebc11d784191d", - "size": 94552 + "sha256": "0e633b34789b941f5b9c6444f43a5d3218d95d8cadbd1ebf6eb8ebc813a204c8", + "size": 94928 }, { "url": "https://code.claude.com/docs/en/plugins/loading", @@ -6442,8 +6470,8 @@ "url": "https://code.claude.com/docs/en/network-config", "status": "success", "path": "en/docs/claude-code/network-config.md", - "sha256": "1d1c38d2b1bb894bee0401310daf485f82933f53d20033a2a7b77f9e8017910e", - "size": 32320 + "sha256": "44d0ade0ee3adeca536745126498f6189179f70d2d8d47b7b6b76558586a8e8c", + "size": 32856 }, { "url": "https://code.claude.com/docs/en/corporate-launcher", @@ -6470,8 +6498,8 @@ "url": "https://code.claude.com/docs/en/claude-apps-gateway", "status": "success", "path": "en/docs/claude-code/claude-apps-gateway.md", - "sha256": "d7ac3bd22245714c638c70f708b82d1ede05fce600c0775719e59dd321f88e1e", - "size": 58606 + "sha256": "19e2f2495da82a69a88f9136c03018b88fb72c4c1c16d41cf04cf6daa8530b9d", + "size": 60298 }, { "url": "https://code.claude.com/docs/en/claude-apps-gateway-config", @@ -6491,8 +6519,8 @@ "url": "https://code.claude.com/docs/en/claude-apps-gateway-deploy", "status": "success", "path": "en/docs/claude-code/claude-apps-gateway-deploy.md", - "sha256": "cec9c0651141873e4662f7ed5bb4a90006a5229a5acf3adcd7a958af0632d796", - "size": 72583 + "sha256": "68831d8214f9356914f600fa713a103566db39653e1f14b5349714ef7c85b9b7", + "size": 74259 }, { "url": "https://code.claude.com/docs/en/claude-apps-gateway-on-aws", @@ -6540,15 +6568,15 @@ "url": "https://code.claude.com/docs/en/monitoring-usage", "status": "success", "path": "en/docs/claude-code/monitoring-usage.md", - "sha256": "942224904dc9064024d912f29c93c5cb05f605dc416967eee587cfc424e02903", - "size": 157251 + "sha256": "0e42ac27160f846a34ab3af5356692a9f20eb2ece99d02db48681065f7373164", + "size": 166596 }, { "url": "https://code.claude.com/docs/en/costs", "status": "success", "path": "en/docs/claude-code/costs.md", - "sha256": "d59c05ff700d907ebacd15e0ea73e27774122c0b6eeac3d8e770aa00f8c0bc58", - "size": 44593 + "sha256": "bafec70dcb34f9c71e718a188d3a83311d760190b4ed0d14d2f435b23d06f418", + "size": 44813 }, { "url": "https://code.claude.com/docs/en/analytics", @@ -6610,8 +6638,8 @@ "url": "https://code.claude.com/docs/en/settings-reference", "status": "success", "path": "en/docs/claude-code/settings-reference.md", - "sha256": "bcaeb1ce0b7e505a1a81d58ed65d43c2935d6702412990fb5194396f1e23c30d", - "size": 412900 + "sha256": "111f95f7d1b75102fe61f73eb824a5955bf0bfa458e12f4d00e601a041e34a32", + "size": 414094 }, { "url": "https://code.claude.com/docs/en/settings-example", @@ -6624,8 +6652,8 @@ "url": "https://code.claude.com/docs/en/permissions", "status": "success", "path": "en/docs/claude-code/permissions.md", - "sha256": "5f617b51aa2f152563b2548aea4cfd21eecb99c4401cc34b4389a397a89be851", - "size": 87022 + "sha256": "7356bcda68adb0c6cfa974945740f10a8ffb2fbd0b24c453457c9a03c852c1d3", + "size": 87039 }, { "url": "https://code.claude.com/docs/en/permission-modes", @@ -6645,8 +6673,8 @@ "url": "https://code.claude.com/docs/en/sandboxing", "status": "success", "path": "en/docs/claude-code/sandboxing.md", - "sha256": "8795f7220d400da24a565137d62cd263f34815614202961c7048e784ec141627", - "size": 99341 + "sha256": "e3856ae876a4ede9d79e75c0d0a151b7b1a867e1e1df7f794f20ffa13891da0a", + "size": 99342 }, { "url": "https://code.claude.com/docs/en/sandbox-environments", @@ -6778,8 +6806,8 @@ "url": "https://code.claude.com/docs/en/keybindings", "status": "success", "path": "en/docs/claude-code/keybindings.md", - "sha256": "153f040ee9ca18c5156cdb1325867bbdfbfd648bb985ee14a1da929e58a9d73e", - "size": 39131 + "sha256": "25c83c92203b2d2a9b4540c4cdc5ed3dcffc27da8455603f611bc144aeca5056", + "size": 39308 }, { "url": "https://code.claude.com/docs/en/cli-reference", @@ -6799,15 +6827,15 @@ "url": "https://code.claude.com/docs/en/env-vars", "status": "success", "path": "en/docs/claude-code/env-vars.md", - "sha256": "1c8a1535f22038ec09e2b9356ef2627c898c24f8ad79b970bb7630f110204ff6", - "size": 171806 + "sha256": "de0105bc8071105b482c92cf8712e79d7a2df61d72eeee484421afafd43e17e3", + "size": 172302 }, { "url": "https://code.claude.com/docs/en/tools-reference", "status": "success", "path": "en/docs/claude-code/tools-reference.md", - "sha256": "ffb4604532f4c8308e8e707472a2f2e925c40044a7fcf75106f0fe47a5eb7c22", - "size": 81715 + "sha256": "e975af6ddb1a7ef7818ff719221ab01ba6db4e24f5c7510db5b3726f07cc789f", + "size": 82639 }, { "url": "https://code.claude.com/docs/en/interactive-mode", @@ -6820,15 +6848,15 @@ "url": "https://code.claude.com/docs/en/checkpointing", "status": "success", "path": "en/docs/claude-code/checkpointing.md", - "sha256": "6fa29a6e0a9964891edaaf80fefdb1db27003aa9f7c1849779e709781dc5ac64", - "size": 9243 + "sha256": "c94d922b3b2aaa63ddcfa89212fb3bbd733e30fdffc63dd914f427272d6274a4", + "size": 9413 }, { "url": "https://code.claude.com/docs/en/hooks", "status": "success", "path": "en/docs/claude-code/hooks.md", - "sha256": "12e9a19d76b8489a52a8beae37cf6a65500f7abd041c475287f4bd43ca3af87f", - "size": 273466 + "sha256": "c6ef9d211e8c4dc870add6302c47971f5fec316888993143011716f78b9862d8", + "size": 274129 }, { "url": "https://code.claude.com/docs/en/channels-reference", @@ -6841,8 +6869,8 @@ "url": "https://code.claude.com/docs/en/glossary", "status": "success", "path": "en/docs/claude-code/glossary.md", - "sha256": "32b8accd1f40b356fe6ec9debd44a4ee94a6c8a5a1bb3ce2d5ec18e29135a72b", - "size": 28353 + "sha256": "8ff46b8da555b33eb7a82c9962d2c95853c6c57ae1059e72dd59eeae4c66a166", + "size": 28423 }, { "url": "https://code.claude.com/docs/en/agent-sdk/overview", @@ -6981,8 +7009,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/skills", "status": "success", "path": "en/docs/claude-code/agent-sdk/skills.md", - "sha256": "5e32c98a0ef3d56d3d1826f595a3999f98954aa87af47103c57ea7829544e0fb", - "size": 27006 + "sha256": "7ead81d04287103db41535be053bc0b328e32199cc0797e71c920c458a169108", + "size": 27452 }, { "url": "https://code.claude.com/docs/en/agent-sdk/plugins", @@ -6995,8 +7023,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/permissions", "status": "success", "path": "en/docs/claude-code/agent-sdk/permissions.md", - "sha256": "06a6522f5f6c6755175f5a529090510d96f94e19d15a07d9ae7b1bde2685d44c", - "size": 25920 + "sha256": "7d2474a2bdd38bf73475348dd44a0b772eda2a8c04f461f843ad1a79be7dd799", + "size": 26271 }, { "url": "https://code.claude.com/docs/en/agent-sdk/hooks", @@ -7009,8 +7037,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/file-checkpointing", "status": "success", "path": "en/docs/claude-code/agent-sdk/file-checkpointing.md", - "sha256": "6db7111ef51d3d8ff14745ff8263355551753c93c237a2c0b422b4608a29eb3a", - "size": 27081 + "sha256": "420925c24eb015ff5f25311d03ccbc8628d8ea88ee086e7b6f58f40b08983734", + "size": 27133 }, { "url": "https://code.claude.com/docs/en/agent-sdk/cost-tracking", @@ -7023,8 +7051,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/observability", "status": "success", "path": "en/docs/claude-code/agent-sdk/observability.md", - "sha256": "ee3ab558d0f6ba308273bc47b20f43a539000df524868db29e17e39ae8abd593", - "size": 17465 + "sha256": "145e45ad87e94734e2912aa5af2d07cdafd40adac4b9fcdce3d40d0be0726235", + "size": 18151 }, { "url": "https://code.claude.com/docs/en/agent-sdk/todo-tracking", @@ -7051,8 +7079,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/typescript", "status": "success", "path": "en/docs/claude-code/agent-sdk/typescript.md", - "sha256": "e948a7449428e313ec71bee5043a78fda22c5677625828073710da5943d7cdfb", - "size": 297002 + "sha256": "2314c1c9ad7661e9c3b2906faefed540897c97c7c867a4236e0c61013288d59a", + "size": 297413 }, { "url": "https://code.claude.com/docs/en/agent-sdk/typescript-v2-preview", @@ -9830,7 +9858,7 @@ "url": "https://support.claude.com/en/articles/8114491-get-started-with-claude", "status": "success", "path": "support/8114491-get-started-with-claude.md", - "sha256": "02c0bb46df796f6eeff94c12e557c2801b3d32b300563e2d7f4f347069e7be9c", + "sha256": "db42b88c6ed1a36f61c2e9c6692d1df0639397f476eb2f84abfd2ef80392ca21", "size": 5203 }, { @@ -9907,8 +9935,8 @@ "url": "https://support.claude.com/en/articles/8230524-delete-or-rename-a-conversation", "status": "success", "path": "support/8230524-delete-or-rename-a-conversation.md", - "sha256": "0fc3de9f7a3120753a2a6bf55efe60a828aa26a8a88a510dac25e56a547bdabb", - "size": 5887 + "sha256": "511ae0cb2411420f19c99d4e9823aa133f8b1827589865ddba72ce9aa6e61b1b", + "size": 5885 }, { "url": "https://support.claude.com/en/articles/8241126-upload-files-to-claude", @@ -9977,7 +10005,7 @@ "url": "https://support.claude.com/en/articles/8325618-paid-plan-billing-faqs", "status": "success", "path": "support/8325618-paid-plan-billing-faqs.md", - "sha256": "39a28342c17aea88e76ee27f27a153238f2ea89c691bc915d4df0b80e0115224", + "sha256": "be7cb6061f39dabcd4c97a82bcb1e8c11dbce7edb97d232d649fcf70760905a9", "size": 4951 }, { @@ -10040,8 +10068,8 @@ "url": "https://support.claude.com/en/articles/8887527-customizing-your-appearance-settings", "status": "success", "path": "support/8887527-customizing-your-appearance-settings.md", - "sha256": "88254d7fb92e6aa62c41de7cbebf6121ac98ae6b31f059e25890204514a32dd1", - "size": 1868 + "sha256": "036f71f45f25f83932bd233692dda13dd77fddb813ebebfef6a9fb545ded0a0d", + "size": 1876 }, { "url": "https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler", @@ -10215,7 +10243,7 @@ "url": "https://support.claude.com/en/articles/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization", "status": "success", "path": "support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md", - "sha256": "91911a3cef5a5033189dae1e307621915e0c20d388a5cda3ba613911f0a530e8", + "sha256": "5a2bbea9f8c282c1ad59d0e11bb23d24ab812bd932f596fc2ec8afb74cebf193", "size": 10266 }, { @@ -10257,8 +10285,8 @@ "url": "https://support.claude.com/en/articles/9519177-how-can-i-create-and-manage-projects", "status": "success", "path": "support/9519177-how-can-i-create-and-manage-projects.md", - "sha256": "cccd84a198058822ea1631039559360f21564a9147ba01e37c5a546ecd0daf57", - "size": 9199 + "sha256": "cfee0627c4c0b9743b853897d539e7814fe3e1484a946fc2fb25c3dcf0c53c2c", + "size": 9201 }, { "url": "https://support.claude.com/en/articles/9519189-manage-project-visibility-and-sharing", @@ -10509,8 +10537,8 @@ "url": "https://support.claude.com/en/articles/10310342-how-do-i-log-out-of-all-active-sessions", "status": "success", "path": "support/10310342-how-do-i-log-out-of-all-active-sessions.md", - "sha256": "d8a4dac2b06d92d9f6e756cc024187032fae581523b4ab4253c610cdb5d662c6", - "size": 2492 + "sha256": "8a21236879d9f9200f214949e0a94dedf7ea5c3412fd814ace4d8d7ba6d63b24", + "size": 2494 }, { "url": "https://support.claude.com/en/articles/10366376-how-can-i-delete-my-claude-console-account", @@ -10551,14 +10579,14 @@ "url": "https://support.claude.com/en/articles/10440198-configure-custom-data-retention-controls-for-enterprise-plans", "status": "success", "path": "support/10440198-configure-custom-data-retention-controls-for-enterprise-plans.md", - "sha256": "86097422ed4c22627d5d35ae459de038d26dd7b4fcb7847fe1b3fa55520e66dd", - "size": 4868 + "sha256": "09ba783c09ec28de241d62ee2e5c13f6f7269a0444e8dcee4c175af6e08eaad9", + "size": 5974 }, { "url": "https://support.claude.com/en/articles/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans", "status": "success", "path": "support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md", - "sha256": "6b3762bdc8a1e60d66317d439b0ca857af9ef1e031d1dc2e29e97465eaecc7ff", + "sha256": "de1d9177fa9be456723da64b147ad07219e645b3963549c0a04c52f72220c1f3", "size": 1038 }, { @@ -10579,8 +10607,8 @@ "url": "https://support.claude.com/en/articles/10593882-share-and-unshare-chats", "status": "success", "path": "support/10593882-share-and-unshare-chats.md", - "sha256": "893f57e45b7429204b9ed6687147997f43ab9afd91e0ded2aba4ab6d63cf1650", - "size": 4010 + "sha256": "153e6629eda7f0c462ef5a35ca704929c829716b54c62739a1ad16133613ee2d", + "size": 4012 }, { "url": "https://support.claude.com/en/articles/10684626-enable-and-use-web-search", @@ -10607,7 +10635,7 @@ "url": "https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop", "status": "success", "path": "support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md", - "sha256": "6ade0e543e5ba9f6322a61d36b8e6524a6bae6351165da0cb42b35c04cd045c0", + "sha256": "d40a01b35faeb588a47281a87870b93db1089bdf9197552e253409784475034d", "size": 8392 }, { @@ -10642,8 +10670,8 @@ "url": "https://support.claude.com/en/articles/11101966-use-voice-mode", "status": "success", "path": "support/11101966-use-voice-mode.md", - "sha256": "d89bd60de537f0bbb99aaf2e765ea0ad9e79712b142392863705f784515ab425", - "size": 10561 + "sha256": "ed9129559bdac21f14771cffa89565681d9d62ff8b2839700805ad5fbc2e699e", + "size": 10551 }, { "url": "https://support.claude.com/en/articles/11107691-why-is-a-coupon-or-promotion-not-available-for-my-account", @@ -10775,8 +10803,8 @@ "url": "https://support.claude.com/en/articles/11725453-set-up-the-claude-lti-in-canvas-by-instructure", "status": "success", "path": "support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md", - "sha256": "4f8baa87688c8e45115139285e96333cdecdfc3dcec44ec054e359be11fa9801", - "size": 2752 + "sha256": "5b7a7f0c2107dbba246cc6ea461bd10e6fe600c591b0dd2862db81ef0128ef1a", + "size": 2748 }, { "url": "https://support.claude.com/en/articles/11732894-who-owns-and-manages-the-data-of-my-claude-for-education-account", @@ -10796,8 +10824,8 @@ "url": "https://support.claude.com/en/articles/11818288-why-am-i-being-asked-to-verify-my-payment-method", "status": "success", "path": "support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md", - "sha256": "3c4c47601737ab04a943ae92a16dc4ef01c727b1de12ce3efd204d64c8068790", - "size": 814 + "sha256": "5462ef8329516b756617efe98011dd77c74456ebb6c7c6eb368a022d571ab2ad", + "size": 816 }, { "url": "https://support.claude.com/en/articles/11825384-how-to-update-claude-for-ios", @@ -10831,8 +10859,8 @@ "url": "https://support.claude.com/en/articles/11869629-use-claude-with-android-apps", "status": "success", "path": "support/11869629-use-claude-with-android-apps.md", - "sha256": "a2d9829a00395a942d30c2e50b6d782f6fe0daabc61cd32687c499104d0a23a9", - "size": 13993 + "sha256": "8ae50048c6a7cc81d463a0fb8571328f2323fd4a5ab94cc0d6d51e985573069c", + "size": 13995 }, { "url": "https://support.claude.com/en/articles/11932705-automated-security-reviews-in-claude-code", @@ -10866,15 +10894,15 @@ "url": "https://support.claude.com/en/articles/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans", "status": "success", "path": "support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md", - "sha256": "9d5ae8ddb6bef7af087f7b2236cd1fbd33bdc2cb2fb1d4a1d82eb176a122c536", - "size": 9703 + "sha256": "b2240bac1711e19e6fc80cba84176d5bbc50f53976fdf5863592891faab833ea", + "size": 9709 }, { "url": "https://support.claude.com/en/articles/12012173-get-started-with-claude-in-chrome", "status": "success", "path": "support/12012173-get-started-with-claude-in-chrome.md", - "sha256": "3b38382ba2717f2db3ecb9f08ff4d09d0c7bc893d53cbb54cb7e7bb8478f2f67", - "size": 14857 + "sha256": "dd3b602d47003a3123f75550d3c1ae832913064b349d35da4ba9c3e6075fbb7e", + "size": 14855 }, { "url": "https://support.claude.com/en/articles/12053672-what-happens-to-a-user-s-data-when-they-are-removed-from-a-team-or-enterprise-organization", @@ -10887,8 +10915,8 @@ "url": "https://support.claude.com/en/articles/12083917-change-your-team-plan-from-monthly-to-annual-billing", "status": "success", "path": "support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md", - "sha256": "f66a3dd19a1f9cdf65def0f4df7d82a261bc3fca09391b790d30caaaf0dcf102", - "size": 1398 + "sha256": "af21d34f3c94dd9e965f744c3f0866a85b3d9d4e8525b53ff8ccb053d800bbe1", + "size": 1394 }, { "url": "https://support.claude.com/en/articles/12109679-creating-a-new-account-after-deletion", @@ -10901,8 +10929,8 @@ "url": "https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude", "status": "success", "path": "support/12111783-create-and-edit-files-with-claude.md", - "sha256": "4f490713912c5bc1ee6de26d2c9823b2b2f3ada512d55c01107da40748f4d618", - "size": 17966 + "sha256": "35308e84580dde5dc719ecd3750a3c94e24ef940cf69ab414592cf207a7957a9", + "size": 17964 }, { "url": "https://support.claude.com/en/articles/12119250-model-safety-bug-bounty-program", @@ -10929,22 +10957,22 @@ "url": "https://support.claude.com/en/articles/12157520-claude-code-usage-analytics", "status": "success", "path": "support/12157520-claude-code-usage-analytics.md", - "sha256": "d5c090fcd70c015a346b8816d671b883a1f4716c48af8d2cf79e113990a2c9dd", - "size": 6368 + "sha256": "f66e9bf3b7418614c7f01b6df6f66cc17896741c7ec22434709042d724caf090", + "size": 6366 }, { "url": "https://support.claude.com/en/articles/12260368-use-incognito-chats", "status": "success", "path": "support/12260368-use-incognito-chats.md", - "sha256": "47f8399b10f5eb1aa9e24bbff2be104bd56be1244bd3b2a13fb4ffbdcceafee8", + "sha256": "7986d6e2f4e320d60204491263a7bdfb34699be1e98bbdf2ea397993659a53ed", "size": 4374 }, { "url": "https://support.claude.com/en/articles/12293051-use-claude-in-xcode", "status": "success", "path": "support/12293051-use-claude-in-xcode.md", - "sha256": "d5872895493a968c7fbcc99f59963bed247738acdfcfdb85eab3e8056d57b003", - "size": 1907 + "sha256": "f6ee5e63778ef58bf560213fa7f4e4facaf85859f615365504c0793c7074e433", + "size": 1905 }, { "url": "https://support.claude.com/en/articles/12304248-manage-api-key-environment-variables-in-claude-code", @@ -10985,14 +11013,14 @@ "url": "https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans", "status": "success", "path": "support/12429409-manage-usage-credits-for-paid-claude-plans.md", - "sha256": "e64be6edf579be2aa5512cdfef93504ed1ddad73ad574d68a2ceafb2a7fec7ea", - "size": 7970 + "sha256": "cc3695636a060acdb1558481f2fcfbc8fcf104aca6cb524db80af0b7d2b5e80c", + "size": 7972 }, { "url": "https://support.claude.com/en/articles/12466728-troubleshoot-claude-error-messages", "status": "success", "path": "support/12466728-troubleshoot-claude-error-messages.md", - "sha256": "095258f5eaa6dd8e9f5cda47046e706c50d7647adc3ad99a86ee31b093497e12", + "sha256": "377494a7759692bbfccde1ac1baad492919da62b4cd7637ce3ee014cb01c5df7", "size": 5143 }, { @@ -11013,8 +11041,8 @@ "url": "https://support.claude.com/en/articles/12512180-use-skills-in-claude", "status": "success", "path": "support/12512180-use-skills-in-claude.md", - "sha256": "a338f5cf174cf51f90a84ccdc20db45a9169324f824a228732eccce7d2f9ad83", - "size": 19150 + "sha256": "9862a372dadc4d953e7a124d777eb0297172838c60eb634314064729e04e2d49", + "size": 19148 }, { "url": "https://support.claude.com/en/articles/12512198-how-to-create-custom-skills", @@ -11034,8 +11062,8 @@ "url": "https://support.claude.com/en/articles/12592343-enabling-and-using-the-desktop-extension-allowlist", "status": "success", "path": "support/12592343-enabling-and-using-the-desktop-extension-allowlist.md", - "sha256": "7f4d5c1afed152a3522086a53a1d03eac244b9a94b4ee7eda2b0d6f3863de647", - "size": 5706 + "sha256": "70e0927527271fd490e2b75733805cba6721b2d0fe6412fa7703199ba166b76e", + "size": 5712 }, { "url": "https://support.claude.com/en/articles/12611117-deploy-claude-desktop-for-macos", @@ -11048,8 +11076,8 @@ "url": "https://support.claude.com/en/articles/12618689-use-claude-code-in-the-cloud", "status": "success", "path": "support/12618689-use-claude-code-in-the-cloud.md", - "sha256": "10e45622184394d155cfb9e4bb9fe02bec2685008bdc89e6a463ec2da05e0847", - "size": 11062 + "sha256": "c3e46c90db03d2e6ee222290ff8389be002bd5c2fa5594e18174056c5f90aa62", + "size": 11056 }, { "url": "https://support.claude.com/en/articles/12622667-enterprise-configuration-for-claude-desktop", @@ -11069,7 +11097,7 @@ "url": "https://support.claude.com/en/articles/12626668-use-quick-entry-with-claude-desktop-on-mac", "status": "success", "path": "support/12626668-use-quick-entry-with-claude-desktop-on-mac.md", - "sha256": "d898dea50c75b29fdbe68d4abe6015eca01231ca340c5f7cf3f8071e09215e90", + "sha256": "5f4dae72a3212afc5ada5f1fa80da49dd6e8dfdaaf7c8ede7d84ff09d62001b5", "size": 5974 }, { @@ -11104,15 +11132,15 @@ "url": "https://support.claude.com/en/articles/12883420-view-usage-analytics-for-team-and-enterprise-plans", "status": "success", "path": "support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md", - "sha256": "2927d44f5a0726362e7a075ace8067f4c4f369f276bbf7da26f2a19a463951f0", - "size": 15083 + "sha256": "edb48e3170e81e49d2bc1028782a276c44caaa8c3b98abee9b4e3cf4cedb50d1", + "size": 15111 }, { "url": "https://support.claude.com/en/articles/12902405-claude-in-chrome-troubleshooting", "status": "success", "path": "support/12902405-claude-in-chrome-troubleshooting.md", - "sha256": "8e8e81dd3034335f752465b6b7f823687c34472d9d1d1a2e12839c90af63723e", - "size": 5342 + "sha256": "4060ed6aaa2d807abcd910aa3b298a808981fd00884270688829796ef751791d", + "size": 5176 }, { "url": "https://support.claude.com/en/articles/12902428-use-claude-in-chrome-safely", @@ -11125,8 +11153,8 @@ "url": "https://support.claude.com/en/articles/12902446-claude-in-chrome-permissions-guide", "status": "success", "path": "support/12902446-claude-in-chrome-permissions-guide.md", - "sha256": "893f8ef8769282dfb1891fe208e1166e6cd6f5f6f56b0a32b31a895ae0281109", - "size": 9561 + "sha256": "ff53cd76d410567bf462965c7a6ab1f261a8d3f8eb622af64b404b845677d4cf", + "size": 9222 }, { "url": "https://support.claude.com/en/articles/12938627-how-to-gift-a-claude-subscription", @@ -11153,8 +11181,8 @@ "url": "https://support.claude.com/en/articles/12997503-team-plan-billing-faqs", "status": "success", "path": "support/12997503-team-plan-billing-faqs.md", - "sha256": "696c02098e91660c53e3ae49cb4374f67e360aa170f5b5115fe48c020bb3315b", - "size": 5415 + "sha256": "84ddcb94a0bce9e7b21c4c9144275e47f7eb9337db1cc7fd5e8c945880e7f816", + "size": 5413 }, { "url": "https://support.claude.com/en/articles/13015708-access-the-compliance-api", @@ -11202,15 +11230,15 @@ "url": "https://support.claude.com/en/articles/13132885-set-up-single-sign-on-sso", "status": "success", "path": "support/13132885-set-up-single-sign-on-sso.md", - "sha256": "056de58f68b99316bbd50b808a96d4ca0d84f195f0be62892ad3807cb03b016d", - "size": 13645 + "sha256": "61bf0ed7a6b2bc4f74e1b36404283b1b7bb215ea132f8bd2398dbbe06f563ece", + "size": 13647 }, { "url": "https://support.claude.com/en/articles/13133195-set-up-jit-or-scim-provisioning", "status": "success", "path": "support/13133195-set-up-jit-or-scim-provisioning.md", - "sha256": "8374167472be1bbfdcfa76bdfd17e4ad0db94bb772a48747efd56dbd473899dd", - "size": 22521 + "sha256": "d012c9ed98aa74a6356efdbbf2f8a4b6325f7544fc629ca8f0ac88aa0a53227c", + "size": 22523 }, { "url": "https://support.claude.com/en/articles/13133750-manage-members-on-team-and-enterprise-plans", @@ -11237,8 +11265,8 @@ "url": "https://support.claude.com/en/articles/13163631-configuring-session-security-settings", "status": "success", "path": "support/13163631-configuring-session-security-settings.md", - "sha256": "f1640b2ef5b3a7c5ca6302eba564da5df443c570152d6b586c4ada362e158e1a", - "size": 3705 + "sha256": "853159b4d1c9a804f40350b368bc5c5334e32cc48aa87acdca5ce857d92413d2", + "size": 3697 }, { "url": "https://support.claude.com/en/articles/13171706-crisis-helpline-support-in-claude", @@ -11251,8 +11279,8 @@ "url": "https://support.claude.com/en/articles/13189465-log-in-to-your-claude-account", "status": "success", "path": "support/13189465-log-in-to-your-claude-account.md", - "sha256": "aefb7823ccd1ab586ab45bdc26e308f4ec64bf02ce44e67e74a13054cdeb8211", - "size": 7039 + "sha256": "b381763c686a68cdb65ba8b6247d06b0dc6f7a294b18a40b8f6345fc437b48f9", + "size": 7043 }, { "url": "https://support.claude.com/en/articles/13198485-enforce-network-level-access-control-with-tenant-restrictions", @@ -11279,15 +11307,15 @@ "url": "https://support.claude.com/en/articles/13325567-account-management-faqs", "status": "success", "path": "support/13325567-account-management-faqs.md", - "sha256": "f85b700e1badb73e59849340e745073d83214e209efbca2f57fa477b13d713cd", - "size": 2634 + "sha256": "139cf8206356884fb057e003b51c225957ea85022a4cf3463648455f5c689b1e", + "size": 2638 }, { "url": "https://support.claude.com/en/articles/13345190-get-started-with-claude-cowork", "status": "success", "path": "support/13345190-get-started-with-claude-cowork.md", - "sha256": "b3cad78107b1dd0ea989e6ed830858c217bfc62cb679ebbc3a895f6c1043b86a", - "size": 23056 + "sha256": "d72c6293ce8bd696a6335b38528cef975b8a00bde9f635f6b411c36400555bb6", + "size": 23049 }, { "url": "https://support.claude.com/en/articles/13346458-customize-your-console-appearance-settings", @@ -11314,8 +11342,8 @@ "url": "https://support.claude.com/en/articles/13371040-log-in-to-your-console-account", "status": "success", "path": "support/13371040-log-in-to-your-console-account.md", - "sha256": "6f7ff10bab3344c56526a288a5e3e4f2d126131009fef87623cd1974e985971d", - "size": 4613 + "sha256": "03045e712092a57f5b463863fe440b8aaa3deaea4cc3cc197b847b1265b77e7d", + "size": 4611 }, { "url": "https://support.claude.com/en/articles/13393991-purchase-and-manage-seats-on-enterprise-plans", @@ -11356,8 +11384,8 @@ "url": "https://support.claude.com/en/articles/13455879-use-claude-cowork-on-team-and-enterprise-plans", "status": "success", "path": "support/13455879-use-claude-cowork-on-team-and-enterprise-plans.md", - "sha256": "30a1fa61ccf7a35aa5fa44e7c3975430ee99d106c0b501bd6bb8610d078a5d7b", - "size": 14469 + "sha256": "0ef4b033cd9fae8812747cefc791dbccbf3c8911623b80d1a48043cca789873d", + "size": 14768 }, { "url": "https://support.claude.com/en/articles/13566435-find-and-join-a-team-or-enterprise-organization", @@ -11370,8 +11398,8 @@ "url": "https://support.claude.com/en/articles/13641943-visual-and-interactive-content", "status": "success", "path": "support/13641943-visual-and-interactive-content.md", - "sha256": "39447c16b0027c6db635fd9e218b7bc7d1617912f92d3c757bbbc179b02f4962", - "size": 6511 + "sha256": "d27b2ee301e3c2216318054847c3afda083789eace8bac810b0fe77788b19425", + "size": 6509 }, { "url": "https://support.claude.com/en/articles/13663666-use-visual-and-interactive-content-on-team-and-enterprise-plans", @@ -11426,8 +11454,8 @@ "url": "https://support.claude.com/en/articles/13837440-use-plugins-in-claude", "status": "success", "path": "support/13837440-use-plugins-in-claude.md", - "sha256": "283cc892564a52a1d25e9099a218ee2775eec4c34d083115b5ecc79e868bddd7", - "size": 15185 + "sha256": "49783de42465cacd0c5d07b9bb65606114eb2063f1fd71cb34fe1756154a46c9", + "size": 15193 }, { "url": "https://support.claude.com/en/articles/13854387-schedule-recurring-tasks-in-claude-cowork", @@ -11524,8 +11552,8 @@ "url": "https://support.claude.com/en/articles/13947068-assign-tasks-from-anywhere-in-claude-cowork", "status": "success", "path": "support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md", - "sha256": "ca223eb0b9dd5d44bf56953eceab11b537dbe53bf37942d3531363ef0913df7e", - "size": 9456 + "sha256": "ddcce2d46e99133cf570f0ba154ba13e175a81eb6efbb0928f7a446ce831f702", + "size": 9458 }, { "url": "https://support.claude.com/en/articles/13979539-custom-visuals-in-chat-and-cowork", @@ -11545,8 +11573,8 @@ "url": "https://support.claude.com/en/articles/14116274-organize-your-tasks-with-projects-in-claude-cowork", "status": "success", "path": "support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md", - "sha256": "9a13dfb5024e5bcbc3d3ae13343a8b9582caad43ac6c02a5c12ea48dbe6a5f36", - "size": 8385 + "sha256": "f8b8083ab523bef378e6d5489ec5db660f4624ad2eb5406444efa6bc20b79992", + "size": 8383 }, { "url": "https://support.claude.com/en/articles/14128542-let-claude-use-your-computer-in-cowork", @@ -11615,8 +11643,8 @@ "url": "https://support.claude.com/en/articles/14499648-how-scim-sync-works-for-enterprise-organizations", "status": "success", "path": "support/14499648-how-scim-sync-works-for-enterprise-organizations.md", - "sha256": "6b4d21deb4427c21bd01a3add3e4cf1f47f6fd126aeca76a7e9eb05f265890cc", - "size": 7670 + "sha256": "16a586be304024512e793cd0764b9cec618a9929166b3c19001d56c39b1b94c3", + "size": 7674 }, { "url": "https://support.claude.com/en/articles/14503520-available-beta-and-research-preview-features", @@ -11706,29 +11734,29 @@ "url": "https://support.claude.com/en/articles/14604397-set-up-your-design-system-in-claude-design", "status": "success", "path": "support/14604397-set-up-your-design-system-in-claude-design.md", - "sha256": "328a989d45ad65f6fe4330edbca37c87d79441bfba830bf5928adf0b4760a633", - "size": 6171 + "sha256": "792ab5a02ef60a2ae544b2ff5f2438bb607fdaa61b2b3d30c9fa5570993e3034", + "size": 6417 }, { "url": "https://support.claude.com/en/articles/14604406-claude-design-admin-guide-for-team-and-enterprise-plans", "status": "success", "path": "support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md", - "sha256": "c5430e09a9839b90fed1e89a0f5f6a3db0357b39afb8d5cb0bafe2e4df0700f3", - "size": 8190 + "sha256": "50d99206f560f9c5d06308eca841f02717cd41cddc1628035a0e86c1cc5d5d7d", + "size": 8518 }, { "url": "https://support.claude.com/en/articles/14604416-get-started-with-claude-design", "status": "success", "path": "support/14604416-get-started-with-claude-design.md", - "sha256": "70e492cad7163fbb9d3ca43f728898ccc02109507a63918e76478d9f8dc23449", - "size": 20599 + "sha256": "4759da716db41f9a8d5dc1625d6b017f16b5b356eb283869b975b2421a085eac", + "size": 20646 }, { "url": "https://support.claude.com/en/articles/14604842-cyber-verification-program", "status": "success", "path": "support/14604842-cyber-verification-program.md", - "sha256": "883c84d04692255c9313dfcd9891ac6901f670b0203f1164d31762804d5e084d", - "size": 25126 + "sha256": "7dfe7cbccd1e3fb7fd79f6aa7116e63d0bf919130bd2e473425ba89e37380fbb", + "size": 27828 }, { "url": "https://support.claude.com/en/articles/14625619-claim-and-migrate-accounts-on-your-domain", @@ -11839,8 +11867,8 @@ "url": "https://support.claude.com/en/articles/15330088-set-a-default-model-for-your-organization", "status": "success", "path": "support/15330088-set-a-default-model-for-your-organization.md", - "sha256": "ff9d9f18c1ee00f99b33b1bfa583f5e980fc6ec590a6df2cbe8d00e2b2e80af6", - "size": 11313 + "sha256": "7fee3008080e6d6b67be039f9ba421c646263b901502f9ff8e34e35f7a81a86a", + "size": 11309 }, { "url": "https://support.claude.com/en/articles/15330651-claude-enterprise-admin-api-reference-guide", @@ -11951,7 +11979,7 @@ "url": "https://support.claude.com/en/articles/15694740-manage-model-access-for-your-organization", "status": "success", "path": "support/15694740-manage-model-access-for-your-organization.md", - "sha256": "b58940b920f5dfcd85c54da0806a8ec9139c992f984b41a611546da0591dc5fe", + "sha256": "b40e5ff21c93854c4d232e27f1fc71881c5c274486e114dd57e78dad61b0e9b2", "size": 10340 }, { @@ -11986,7 +12014,7 @@ "url": "https://support.claude.com/en/articles/15936181-get-started-with-1password-for-claude", "status": "success", "path": "support/15936181-get-started-with-1password-for-claude.md", - "sha256": "05840f920618c60674d0cfe53695301118a55ddde385b9ef33efc2614ed62b9e", + "sha256": "fa717f13cbdc415513838b716e6fc575c91264ebfd6826c0ffc7246835a45821", "size": 5058 }, { @@ -12035,7 +12063,7 @@ "url": "https://support.claude.com/en/articles/16607638-understanding-your-pro-or-max-plan-invoices", "status": "success", "path": "support/16607638-understanding-your-pro-or-max-plan-invoices.md", - "sha256": "a5b446cf8d98deb83e5729ee74f52279ac9d5ee4d8fc4983fd340a5c7c33b084", + "sha256": "876162d5950448ad4c7272955aedd4fba2d5143615db6ded89d3d79215dba8cf", "size": 5832 }, { @@ -12077,8 +12105,8 @@ "url": "https://support.claude.com/en/articles/16761823-claude-cowork-and-chat-are-one-claude", "status": "success", "path": "support/16761823-claude-cowork-and-chat-are-one-claude.md", - "sha256": "d852c4c602c855495476521eeafd96cab7b0df9e7c2d98c327c854a981ba0e1e", - "size": 10222 + "sha256": "907ff1aa249a8c8a9183041bc852b574104a2d6a5fefbc4bf6c4ac424f6336f7", + "size": 10280 }, { "url": "https://support.claude.com/en/articles/16762437-public-links-for-shared-chats", @@ -12119,8 +12147,8 @@ "url": "https://support.claude.com/en/articles/16893491-get-started-with-smart-reports", "status": "success", "path": "support/16893491-get-started-with-smart-reports.md", - "sha256": "cfe3c8c21382b69b5275a15aee650119b4473ce6fd99c749c3951821a3758dd8", - "size": 15959 + "sha256": "0a25b1df61a52e3814a5c4bb46b27e715178eeb54decc7afe09def866b67cb03", + "size": 15957 }, { "url": "https://support.claude.com/en/articles/16923645-get-started-with-claude-docs", @@ -12140,7 +12168,7 @@ "url": "https://support.claude.com/en/articles/16951679-use-claude-in-google-docs-sheets-and-slides", "status": "success", "path": "support/16951679-use-claude-in-google-docs-sheets-and-slides.md", - "sha256": "73533d0190ddc94ad7cbfba4e6104e72eaddcae50d1e1060e8dcf953725c8c3e", + "sha256": "08fb2be4c46384c45907e7b926e9dd420a6f9f16ef0df526a95c14cb78423656", "size": 21894 }, { @@ -12161,14 +12189,14 @@ "url": "https://support.claude.com/en/articles/16994751-artifacts-admin-guide-for-team-and-enterprise-plans", "status": "success", "path": "support/16994751-artifacts-admin-guide-for-team-and-enterprise-plans.md", - "sha256": "8b8bf3b9186efd49d928ee6e96f213ed33c456691594a61957390ee83d760b36", - "size": 17901 + "sha256": "0449b5d8bf079578907ee944548e84d6da2abfcf5c0488fe242c6a546f7b7805", + "size": 18639 }, { "url": "https://support.claude.com/en/articles/17005973-manage-pooled-group-budgets-on-enterprise-plans", "status": "success", "path": "support/17005973-manage-pooled-group-budgets-on-enterprise-plans.md", - "sha256": "c91b62a1d797b15a9b6ce260402e779fe1344cab173c25d81a322723ff47318d", + "sha256": "eb1e08f044d9dea06266169d70556e89c2416e09b3cfd007b6fed199ffcc1715", "size": 6980 }, { @@ -12217,7 +12245,7 @@ "url": "https://support.claude.com/en/articles/17203415-set-up-claude-for-intune", "status": "success", "path": "support/17203415-set-up-claude-for-intune.md", - "sha256": "802c72402f52260716e65b41f304ba441f6ac7264648ab8f4a1bf47e22a0853b", + "sha256": "6cc12509a3207defc645043fed118f6031ff718a7c8e0c8b7f54209d325cb04f", "size": 11379 }, { @@ -12227,13 +12255,6 @@ "sha256": "05d3a6eb825889a59162a23c3b0d47f2925b8737fe61929ea3219eeddf43d148", "size": 20149 }, - { - "url": "https://support.claude.com/en/articles/17440474-migrate-from-standalone-claude-design-to-claude", - "status": "success", - "path": "support/17440474-migrate-from-standalone-claude-design-to-claude.md", - "sha256": "308afa6d4abab8b4b97bf62d8f528975930c575b4024bf0fc786170f7fd33eb3", - "size": 15277 - }, { "url": "https://support.claude.com/en/articles/17444146-claude-haiku-4-5-is-leaving-the-model-selector", "status": "success", @@ -12245,8 +12266,8 @@ "url": "https://support.claude.com/en/articles/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization", "status": "success", "path": "support/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization.md", - "sha256": "d908aae2e79e72e88ec3a194b9ef0d869b6915c2dd6356ee58766b8286c51ca3", - "size": 22643 + "sha256": "2aa0798b515082fa278a5e8633c2a942524d39e3c748e56863c4aacd5cdcad6a", + "size": 23039 }, { "url": "https://support.claude.com/en/articles/17454700-get-started-with-claude-dashboards", @@ -13162,15 +13183,15 @@ "url": "https://claude.com/docs/connectors/building/authentication", "status": "success", "path": "claude/connectors/building/authentication.md", - "sha256": "febdf9368e40782b540e774233f711389a61ead04e420ee2e7538f4d49461e09", - "size": 26061 + "sha256": "780679ac24c14905bab12b5ca5e217e26ff97d126e658f697fb79c5ec0cd02fc", + "size": 29712 }, { "url": "https://claude.com/docs/connectors/building/directory-vs-custom", "status": "success", "path": "claude/connectors/building/directory-vs-custom.md", - "sha256": "1aed9ca4759a4703834ef9d12b7decb45a2b23d268524131ffbba9a5cc935b5a", - "size": 6462 + "sha256": "3d583d09290862aaee2132137b2a6b78374eba671fb754febf7a073ba3c3d0cb", + "size": 6549 }, { "url": "https://claude.com/docs/connectors/building/enterprise-managed-auth", @@ -13197,8 +13218,8 @@ "url": "https://claude.com/docs/connectors/building/managing-your-listing", "status": "success", "path": "claude/connectors/building/managing-your-listing.md", - "sha256": "6642293c203cacb0a40faf18b916689aa17068d0c8605d5d025eab9b119f4f2e", - "size": 8025 + "sha256": "a6e9cd39fe935e531cefff92931ed81c73faa72a393a77e7e68a01135b348252", + "size": 8458 }, { "url": "https://claude.com/docs/connectors/building/mcp", @@ -13281,8 +13302,8 @@ "url": "https://claude.com/docs/connectors/building/submission", "status": "success", "path": "claude/connectors/building/submission.md", - "sha256": "bb17c349562e99de1441402d13ea4253906da9f1a7732d212f08b7682ecfc794", - "size": 14011 + "sha256": "171e184153145c6a6aeed2254b0361671e445fd973b1370e05e0b56dd073d14c", + "size": 14462 }, { "url": "https://claude.com/docs/connectors/building/testing", @@ -13407,8 +13428,8 @@ "url": "https://claude.com/docs/cowork/changelog", "status": "success", "path": "claude/cowork/changelog.md", - "sha256": "2723deb2b4cccb0b92fbf09962104f1134e87ee8f54419ed946b3cc0aa459a60", - "size": 230281 + "sha256": "8c7a170eec2d72c0d7e5fc9819868b50a31d3f66e674131cbc9f54e6357d6e27", + "size": 230498 }, { "url": "https://claude.com/docs/cowork/guide/dispatch", @@ -13435,15 +13456,15 @@ "url": "https://claude.com/docs/cowork/hipaa-setup", "status": "success", "path": "claude/cowork/hipaa-setup.md", - "sha256": "dc7469e21997f20859dbc6330443a06b05d50b442451072bae884335db214d82", - "size": 24721 + "sha256": "7972dbfa1735633a95c52865609a4f108e60193c33ba639774d390a39faa32b7", + "size": 24871 }, { "url": "https://claude.com/docs/cowork/monitoring", "status": "success", "path": "claude/cowork/monitoring.md", - "sha256": "d7bd01b46d6404d651b16ee0f954e3dcc4a9a6600c414eab7355032dc3609dd5", - "size": 14468 + "sha256": "d41ff81dbb39990ea7cc7fa436318c876b9edd554f4a806a36a6720f8c6035de", + "size": 14475 }, { "url": "https://claude.com/docs/cowork/overview", @@ -13974,29 +13995,29 @@ "url": "https://claude.com/docs/third-party/claude-desktop/admin-console", "status": "success", "path": "claude/third-party/claude-desktop/admin-console.md", - "sha256": "063e1d0e5c706ab9bc002d7c5dc061ba393150c15e4ea2816500504e6b86ea7d", - "size": 72201 + "sha256": "2c57dcaa00468f6d4eadfc779a67f0f2c0eec472948bdb224053d67a90617c75", + "size": 72195 }, { "url": "https://claude.com/docs/third-party/claude-desktop/bedrock", "status": "success", "path": "claude/third-party/claude-desktop/bedrock.md", - "sha256": "bfc5e7f9dcdc222581d46cdc35e8666a44b337d32402d55255ef7c6761e3a5bb", - "size": 22466 + "sha256": "59a9f5080f7ed32202031d5e214a62e2017587237281045c38e6f183361601cb", + "size": 25665 }, { "url": "https://claude.com/docs/third-party/claude-desktop/bootstrap", "status": "success", "path": "claude/third-party/claude-desktop/bootstrap.md", - "sha256": "f48d9fdf0d03b0223d489e6e6cfefc41d2f968a844b3731a9b4ec2e569e5983d", - "size": 41796 + "sha256": "d66773969ac8a8ab962730a0a19178f2fe3b3ca4efbceb436820898ec93b6090", + "size": 42723 }, { "url": "https://claude.com/docs/third-party/claude-desktop/browser", "status": "success", "path": "claude/third-party/claude-desktop/browser.md", - "sha256": "3b07ddda131b4f31ba5e0d7751d1e5b1bf91ef52c007116b98f8be612091efb5", - "size": 10721 + "sha256": "ea02c4363f712ea6c982b4dd21bcf401e5a0117d6f349422454820aaff4edeee", + "size": 10728 }, { "url": "https://claude.com/docs/third-party/claude-desktop/built-in-connectors", @@ -14016,8 +14037,8 @@ "url": "https://claude.com/docs/third-party/claude-desktop/claude-api", "status": "success", "path": "claude/third-party/claude-desktop/claude-api.md", - "sha256": "585ca3099bea70b1396569adbd416196cdd3724763e383093b1a5d4cb8c43247", - "size": 3263 + "sha256": "285d8c63bae345122e90c965004061ed31045aa249cb84b762aa4c8c7c3118ce", + "size": 3270 }, { "url": "https://claude.com/docs/third-party/claude-desktop/code", @@ -14030,15 +14051,22 @@ "url": "https://claude.com/docs/third-party/claude-desktop/configuration", "status": "success", "path": "claude/third-party/claude-desktop/configuration.md", - "sha256": "c7ed2c4ccdcd01e9efe54a420ee2c0750cb8cf0ea2a0e8c4e9696719781b96a3", - "size": 225312 + "sha256": "6611eabc35dbcd9dbb5a6952e3b421501227daf8525f45c49effabe1a0802a09", + "size": 298552 }, { "url": "https://claude.com/docs/third-party/claude-desktop/configuration-changelog", "status": "success", "path": "claude/third-party/claude-desktop/configuration-changelog.md", - "sha256": "f4c0f6b500dd113e6f31d60db293c38aaca9236c45cc0773342e9a6421d68b95", - "size": 63468 + "sha256": "789f64f9e8a2578bc8aa08906e8c4c2e6a3d7832e062ab62a00dc635639afd19", + "size": 63538 + }, + { + "url": "https://claude.com/docs/third-party/claude-desktop/configuration-format", + "status": "success", + "path": "claude/third-party/claude-desktop/configuration-format.md", + "sha256": "1691f16628f1473831850ffd477827fd234d70be94d91b062354c7cd8a91d59a", + "size": 21217 }, { "url": "https://claude.com/docs/third-party/claude-desktop/connectors-box", @@ -14079,8 +14107,8 @@ "url": "https://claude.com/docs/third-party/claude-desktop/credential-helper", "status": "success", "path": "claude/third-party/claude-desktop/credential-helper.md", - "sha256": "66bf11fa63f35ced3d86d6d892b195fdf1255563b1a4c263dfcb0d34aaa42cde", - "size": 8232 + "sha256": "a7dc2e49bf0f061937a8f63763434f89b293c07983bb5db0029b2056f59da2e5", + "size": 8239 }, { "url": "https://claude.com/docs/third-party/claude-desktop/data-storage", @@ -14100,8 +14128,8 @@ "url": "https://claude.com/docs/third-party/claude-desktop/extensions", "status": "success", "path": "claude/third-party/claude-desktop/extensions.md", - "sha256": "6acbfa0b62428aa65652de665ca1e0208bf666214a6571f79ab9184995d13ffd", - "size": 47879 + "sha256": "e7c5d88500162c550b1b1a21e5bb71faaaaa22ea7b0e4157dabb7c497b22befd", + "size": 47886 }, { "url": "https://claude.com/docs/third-party/claude-desktop/feature-matrix", @@ -14114,15 +14142,15 @@ "url": "https://claude.com/docs/third-party/claude-desktop/foundry", "status": "success", "path": "claude/third-party/claude-desktop/foundry.md", - "sha256": "36bda886758ffd2ac7fab0afcbcbaba5e379687c89901bf8df07aa651c4ca388", - "size": 21065 + "sha256": "0559e06b55bd66c4814d06678e01f62b8ef02d54efa406412dd91e5ae7419b8b", + "size": 22783 }, { "url": "https://claude.com/docs/third-party/claude-desktop/gateway", "status": "success", "path": "claude/third-party/claude-desktop/gateway.md", - "sha256": "4c78667339dade913678d7fd78add503e76412f479b13c3a10fe350f73b308da", - "size": 51641 + "sha256": "e58ddebad4b489b14c0f3b9f32bf775e6b8057d28d4fd5679a9580b9b571b0b8", + "size": 58226 }, { "url": "https://claude.com/docs/third-party/claude-desktop/import", @@ -14142,8 +14170,8 @@ "url": "https://claude.com/docs/third-party/claude-desktop/installation", "status": "success", "path": "claude/third-party/claude-desktop/installation.md", - "sha256": "4ee16cdae3fa1033d542f6a7455b7e66bb2fce0e5cbc5db0c2c9db566d8bc91b", - "size": 28905 + "sha256": "3380e3bbc42fe713975a079c205c21f9dc32c3ca0fbeea3f95c41c82ebb374b5", + "size": 32719 }, { "url": "https://claude.com/docs/third-party/claude-desktop/legal", @@ -14163,8 +14191,8 @@ "url": "https://claude.com/docs/third-party/claude-desktop/mantle", "status": "success", "path": "claude/third-party/claude-desktop/mantle.md", - "sha256": "7aa52946735f9949bedf921d218bf2ca5983e1f52c328fbf81ba31b6af17cce7", - "size": 7089 + "sha256": "4080189c98b27e9e129f65c70b343e3c506148d0df061c1117f0f2826ff4a631", + "size": 10288 }, { "url": "https://claude.com/docs/third-party/claude-desktop/mcp-sign-in", @@ -14177,15 +14205,15 @@ "url": "https://claude.com/docs/third-party/claude-desktop/mdm", "status": "success", "path": "claude/third-party/claude-desktop/mdm.md", - "sha256": "79bda7338bdf27e45d5f54392bc56b88a31cc5ed6e302255703c27f77f9ebb85", - "size": 15340 + "sha256": "529a7961b2bdef08ca636ff6e32425613a9b577a650d16f73029eee0a5ba523d", + "size": 15473 }, { "url": "https://claude.com/docs/third-party/claude-desktop/models", "status": "success", "path": "claude/third-party/claude-desktop/models.md", - "sha256": "09de81eb741219863b1aed1d6cd10954d382a4d60ce05badba34d0d6a6a338dd", - "size": 8532 + "sha256": "dc99b9dd013414c76b20a05f99822d2c2c096b3c9f9e7f4f6294cdcbe0c08d48", + "size": 8539 }, { "url": "https://claude.com/docs/third-party/claude-desktop/move-to-claude-enterprise", @@ -14198,8 +14226,8 @@ "url": "https://claude.com/docs/third-party/claude-desktop/network-proxy", "status": "success", "path": "claude/third-party/claude-desktop/network-proxy.md", - "sha256": "63b9ed476f6bc4295fe7464c0866cf8cf070d508f152b7d33fbbf427653e7265", - "size": 25891 + "sha256": "e7fd00cf676949e0ed38459cb99365273eb798aebe21012a368d104d10366811", + "size": 25898 }, { "url": "https://claude.com/docs/third-party/claude-desktop/overview", @@ -14212,15 +14240,15 @@ "url": "https://claude.com/docs/third-party/claude-desktop/ssh-remote-sessions", "status": "success", "path": "claude/third-party/claude-desktop/ssh-remote-sessions.md", - "sha256": "ff31df31c9cd18f4eb5286ddddbd17bf26e53bd6acecd6b299c8059ae36d9096", - "size": 59969 + "sha256": "541f8790eb7b1bf69df803e4e2c10ff6fcfc1ddf4943136c625ebe20eee41c0b", + "size": 69300 }, { "url": "https://claude.com/docs/third-party/claude-desktop/telemetry", "status": "success", "path": "claude/third-party/claude-desktop/telemetry.md", - "sha256": "1587592c81699d9f976d6903358db1272936c0d46e52e8faecf627161ad7716d", - "size": 35534 + "sha256": "792c8c59b4b94ab027742572fd94eaa2259b8afc50a99540c2010c797d96a37d", + "size": 35541 }, { "url": "https://claude.com/docs/third-party/claude-desktop/unified-claude", @@ -14233,8 +14261,8 @@ "url": "https://claude.com/docs/third-party/claude-desktop/vertex", "status": "success", "path": "claude/third-party/claude-desktop/vertex.md", - "sha256": "3dcbc5b494116e5f40bec21162a8f339f512c9b60e7e63def4e9443764213914", - "size": 30690 + "sha256": "c5d6c8a76eee8470abbd7a449e79ed7ca08b4f65f11dabc1a0442836c81219f4", + "size": 33598 }, { "url": "https://claude.com/docs/third-party/claude-desktop/web-tools", @@ -14247,8 +14275,8 @@ "url": "https://code.claude.com/docs/en/slash-commands", "status": "success", "path": "en/docs/claude-code/slash-commands.md", - "sha256": "d1359f0c64371b3f2e267069d9f752418466abadb2765eca2929ecbee4ce0b2b", - "size": 111928 + "sha256": "6b070e872dea28905a7ea7f45c4d5960f5bdf28cc73ac808799af6d50435ffbd", + "size": 114542 }, { "url": "https://code.claude.com/docs/en/ultraplan", @@ -14282,8 +14310,8 @@ "url": "https://code.claude.com/docs/en/desktop-changelog", "status": "success", "path": "en/docs/claude-code/desktop-changelog.md", - "sha256": "b9f258ac5e9aafc58f0c1b06b52bd35fa2cb3e6ee1f26e69b075f053d34681b7", - "size": 167246 + "sha256": "2f57a4c9de0e2348175f9bce7910f1d9cdb0e81b41c6daf87fbe50251f5f47c8", + "size": 169702 }, { "url": "https://code.claude.com/docs/en/plugin-relevance", @@ -14331,15 +14359,15 @@ "url": "https://code.claude.com/docs/en/agent-sdk/slash-commands", "status": "success", "path": "en/docs/claude-code/agent-sdk/slash-commands.md", - "sha256": "5e32c98a0ef3d56d3d1826f595a3999f98954aa87af47103c57ea7829544e0fb", - "size": 27006 + "sha256": "7ead81d04287103db41535be053bc0b328e32199cc0797e71c920c458a169108", + "size": 27452 }, { "url": "https://platform.claude.com/docs/en/api/cli/beta", "status": "success", "path": "en/api/cli/beta.md", - "sha256": "0641f2c70d27f1d89c9679b9857984820923e6eb94b75ebb497eec5313eed285", - "size": 2561638 + "sha256": "7c986d2bfd08a87844e429d2ccc4ebde0758ea907c07aa263847ece47336a9ef", + "size": 2563736 }, { "url": "https://platform.claude.com/docs/en/api/cli/models", @@ -14366,8 +14394,8 @@ "url": "https://platform.claude.com/docs/en/api/csharp/beta", "status": "success", "path": "en/api/csharp/beta.md", - "sha256": "9f3558c65b21297f38a1e3c858505340dfe6f449e60d7e230a80133ae3ca6496", - "size": 3662075 + "sha256": "66d78a5e0d503bb16adfbb61c0f1c918a8187118b3d84135448ada34d90b672a", + "size": 3664173 }, { "url": "https://platform.claude.com/docs/en/api/csharp/models", @@ -14394,8 +14422,8 @@ "url": "https://platform.claude.com/docs/en/api/java/beta", "status": "success", "path": "en/api/java/beta.md", - "sha256": "c3e3d2dad3674b8daf17a06a0651f40ecf667fbe147a745e89716d54c99a95d6", - "size": 3733228 + "sha256": "2011b3357b0a4599f36b7f74b4be92e74dcd0155c9a44b01d3af6649708317aa", + "size": 3735326 }, { "url": "https://platform.claude.com/docs/en/api/java/models", @@ -14422,8 +14450,8 @@ "url": "https://platform.claude.com/docs/en/api/php/beta", "status": "success", "path": "en/api/php/beta.md", - "sha256": "41e3a59470d26eaca3efdd6aebf7342affc3c8aa2b1d0e7faec1aed3737024ae", - "size": 1090607 + "sha256": "b4896363aa31f22e4adc49f7a6db2a5dc012efbd383fa4b9be42bb5f376b4b99", + "size": 1091151 }, { "url": "https://platform.claude.com/docs/en/api/php/models", @@ -14450,8 +14478,8 @@ "url": "https://platform.claude.com/docs/en/api/go/beta", "status": "success", "path": "en/api/go/beta.md", - "sha256": "068f35e4866e606be56de36ae5fdad38e98984496aa6939c0e1b54d68ac1727e", - "size": 4164933 + "sha256": "ca20872ab8962b9a4dc8e3be055cbd5850b2ccd4869c4570b8e7fb1bad812fc9", + "size": 4167031 }, { "url": "https://platform.claude.com/docs/en/api/go/models", @@ -14478,8 +14506,8 @@ "url": "https://platform.claude.com/docs/en/api/ruby/beta", "status": "success", "path": "en/api/ruby/beta.md", - "sha256": "5a9aa528f551f592fe11a73d5dd5c169ae9fba7f9a6520b3cbdc152e183f64d1", - "size": 3513502 + "sha256": "149088bd8a37a1fe82e24f923e6528a43dbb83f0d3619a273f97e9d65c38476d", + "size": 3515600 }, { "url": "https://platform.claude.com/docs/en/api/ruby/models", @@ -14506,8 +14534,8 @@ "url": "https://platform.claude.com/docs/en/api/python/beta", "status": "success", "path": "en/api/python/beta.md", - "sha256": "0d0e06f835aebeef1faa9e5561e06213c5d61341276a8c7f576607eb88bfbd57", - "size": 3405591 + "sha256": "31eb553c9a95c9983563f0d7a1a573563e6e774ca7fb8a9cdc5f85b1ed1c0866", + "size": 3407689 }, { "url": "https://platform.claude.com/docs/en/api/python/models", @@ -14534,8 +14562,8 @@ "url": "https://platform.claude.com/docs/en/api/typescript/beta", "status": "success", "path": "en/api/typescript/beta.md", - "sha256": "9ffcef6e79beadfcfb27edcb55bc32c6f558fa0eebf9b80120e6778cfb12a0ec", - "size": 3511571 + "sha256": "fd0868c6b5cc8578c153cbee2d27c37ab26905635f403dab1cdb173ee31ff0ee", + "size": 3513669 }, { "url": "https://platform.claude.com/docs/en/api/typescript/models", @@ -25384,7 +25412,7 @@ "url": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/main/.claude-plugin/marketplace.json", "status": "success", "path": "github/claude-plugins-official/.claude-plugin/marketplace.json", - "sha256": "6c16184811024ac4ed0f4e871767d077d397ee33d30bf5887b51a18ec8dbee17", + "sha256": "26006b8c9591c8d82c3111eb31c100ecc98d6ade10ce0d08a53a7396a5cc9cb9", "size": 190732 }, { @@ -29674,8 +29702,12 @@ ], "failures": [ { - "url": "https://platform.claude.com/docs/en/api/beta/organization/spend_limits/list", - "error": "HTTP 503" + "url": "https://support.claude.com/en/articles/17440474-migrate-from-standalone-claude-design-to-claude", + "error": "moved to https://support.claude.com/en/articles/17440474-move-from-standalone-claude-design-to-claude.md" + }, + { + "url": "https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai", + "error": "moved to https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed.md" } ], "dead": [ @@ -30873,11 +30905,11 @@ } ], "summary": { - "total": 4537, - "downloaded": 4238, + "total": 4542, + "downloaded": 4242, "skipped": 0, - "failed": 1, - "dead": 298, + "failed": 0, + "dead": 300, "success_rate": 100.0 } } \ No newline at end of file diff --git a/content/CHANGELOG.md b/content/CHANGELOG.md index 859e1c98d2..02730b4b64 100644 --- a/content/CHANGELOG.md +++ b/content/CHANGELOG.md @@ -1,5 +1,87 @@ # Changelog +## 2.1.309 + +- Fixed sandboxed Bash commands on macOS and Linux running the shell's startup files outside the sandbox before each command +- Fixed macOS sandbox `denyWrite` glob patterns not applying at a path's real location when the pattern's folder is reached through a symlink +- Fixed sandboxed commands and auto-accepted edits being able to modify the MCP config file passed with `--mcp-config` +- Fixed a disabled MCP server being reconnected by a later permission prompt in print and SDK sessions +- Fixed the Bash permission check trusting a variable set by a command whose redirect can fail to open +- Fixed Bash permission checks not prompting for some compound commands that change directory before running git when the `cd` is wrapped or prefixed, as they do for a plain `cd` +- Fixed an `Edit(path)` deny rule not blocking a Bash redirect to that path in some commands that also held a subshell +- Fixed worktree-isolated sessions accepting some locale-prefixed commands the isolation guard should refuse +- Fixed worktree-isolated sessions on zsh accepting some arithmetic commands that the isolation guard should refuse +- Fixed worktrees and branch checkouts that Claude Code creates so they ignore git replace refs, as its other git operations already do +- Fixed profile store write protection not applying when the config directory is reached through a symlink +- Fixed sessions compacting repeatedly after reading files under a very large nested CLAUDE.md; a nested CLAUDE.md over the size limit now loads only its start +- Fixed ctrl+enter (send now) only queuing a message when pressed before the response had started, and restarting a prompt's hooks while leaving the message queued when pressed while those hooks were running +- Fixed key-bound slash commands running in the shell from `!` mode +- Fixed ctrl+o not showing messages from other agents and sessions that are still waiting to be delivered; they now appear in full under the transcript, marked as waiting +- Fixed long tool output previews being cut through an emoji, leaving session transcripts that `jq` could not parse +- Fixed Read reporting "File does not exist" for PDF page ranges in Linux sandboxes that share the parent's `/proc` +- Fixed messages from a Claude Desktop-hosted session sometimes being lost when its connection refreshed +- Fixed features missing from Claude Code sessions in the Claude desktop app when the terminal on the same computer was signed in to a different account or organization +- Fixed the `claude remote-control` status line showing `HEAD` as the branch for a folder that is not in a git repository +- Fixed split-pane agent teammates not inheriting the tool deny and `--tools` rules given on the leader's command line +- Fixed sessions renamed with `/rename` appearing to other sessions under a generated name after a VS Code window reload or a non-interactive `--resume` +- Fixed the `/rewind` list showing "No code changes" for a turn that changed checkpointed files through `/code-review --fix`, a subagent or a shell command +- Fixed `/privacy-settings` showing an out-of-date "Help improve our AI models" value; it now also says when the setting can't be fetched +- Fixed feedback saying "try again later" when your organization does not accept feedback; it now shows the server's reason and where to report a bug +- Fixed oversized /feedback reports failing instead of being resent without the transcript +- Fixed a skill in an `--add-dir` folder being unreachable when another skill already held its name; it is now offered as `:` +- Fixed `/verify` and `/code-review` not finding a nested package's own skill when its files were changed from the shell +- Fixed the /claude-api skill saying that `ant beta:worker poll --on-work` passes trace context to the command +- Fixed the /claude-api skill's C# tracing setup missing spans from the cloud platform clients +- Fixed the /claude-api skill saying that API spans for requests to Claude Platform on AWS can't join the caller's trace +- Fixed hooks that run in PowerShell not blocking when the hook's program exits with code 2, and on Windows `PreToolUse` and `PermissionRequest` hooks with `"shell": "powershell"` failing open when Git for Windows isn't installed +- Fixed a mod's `turn.step` hook that names a model by alias, such as `haiku`, failing every request with a model error: the alias now resolves to its model +- Fixed plugins and skills synced from claude.ai being removed, sometimes mid-session, after a disk read error +- Fixed artifact publishes and updates being refused for some ordinary pages, such as pages with certain minified scripts or artifacts Claude could not read first +- Fixed Claude asking for permission on each artifact update for the rest of a turn after the conversation was compacted in that turn +- Fixed fine-grained tool streaming staying off on Amazon Bedrock when `ANTHROPIC_BEDROCK_BASE_URL` is set to the default `bedrock-runtime..amazonaws.com` endpoint +- Fixed the "Waiting for API response" hint flickering behind gateways that send only keepalive pings: routes off Anthropic's backend now wait 45 seconds +- Fixed Claude notifying unrelated GitHub users by writing role names and placeholders as mentions in PRs, issues and comments +- Linux: Fixed sandbox write denies lifting when a background command outlived the session +- Windows: Fixed PowerShell permission checks auto-approving some `Set-Location` or `cd` commands that target the current directory and carry extra arguments; these now prompt for approval +- macOS: Fixed the "Install Command Line Developer Tools" dialog opening each time Claude Code starts on a Mac without Xcode or the Command Line Tools +- Self-hosted runner: Fixed `--startup-timeout-min` stopping a session whose first prompt, such as `/code-review`, was still working in a subagent; a frozen process is still stopped +- Improved the speed of many git commands Claude Code runs for itself on Windows; on every platform, errors from those commands now show in English even when git is set to another language +- Improved the error when a hooks module is nested too deep to load: it now names the file instead of showing a bare stack-overflow message +- Improved disk-full handling: a Bash command cut off by a full disk now says so and names the folder to free up, and starting on a full temp volume prints a clear message, not a raw ENOSPC error +- Improved the /claude-api skill to offer API tracing alongside SDK tracing when asked to add OpenTelemetry +- Improved the /claude-api skill to check the live docs before saying a feature is unsupported +- Self-hosted runner: Improved sessions that move to a new runner: Claude now sees the tool call that was interrupted, marked as outcome unknown +- Updated the bundled dataviz skill to accept APCA as a text-contrast measure (keeping WCAG 2 ratios where AA conformance is required), add an `apca(text, background)` function to its palette validator scripts, and say whether a label inside a colored chart fill should be white or near-black +- Updated the /claude-api skill: service account keys and Workload Identity Federation tokens can now manage OpenTelemetry destinations +- Changed `sed -i` to get the standard Bash prompt and run as written, not a simulated file-edit preview; like other Bash edits, it is no longer restored by `/rewind` +- Changed `claude ultrareview` to require workspace trust: it asks on a terminal, else refuses; scripts pass `--trust-workspace`, which takes no value (put a PR number or base branch before it), or set `CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECK=1` +- Changed the dangerous `rm` and `rmdir` prompt in bypass permissions mode in the Desktop app and VS Code to deny the command at once with a rewrite hint, so unattended sessions keep going +- Changed commands the settings exclude from the sandbox to ask before writing to its write-list paths while the sandbox is enabled but cannot run; the unsandboxed fallback is refused there +- Changed worktree creation and reuse so git no longer fetches objects on demand, in ordinary clones and in partial clones with a Bash sandbox configured; such a partial clone fetches them first +- Changed the `/claude-api` skill to build Managed Agents subagent teams on `multiagent_20261001` with dynamic workflows on by default, instead of `coordinator` +- [VSCode] Added a log warning that says what to do when dictation or the extension's own requests fail certificate verification, such as behind a TLS-inspecting proxy +- [VSCode] Fixed the Claude panel staying blank after the editor cached an incomplete copy of its files; it now recovers by itself, or says what went wrong and how to fix it +- [VSCode] Fixed Session history filling up with empty "Untitled" sessions each time you start a new session without sending a message +- [VSCode] Fixed long slash-command messages such as `/goal` filling the chat panel; they now fold behind Show more like other prompts (anthropics/claude-code#97469) +- [VSCode] Fixed long messages not folding behind Show more after the chat panel is made narrower +- [VSCode] Fixed Ctrl+J in the chat input always inserting a newline: it is now left to VS Code and the OS when "ctrl+j" is set to null in the Chat context of ~/.claude/keybindings.json +- [VSCode] Fixed a mod's "From the … plugin" label above the prompt being drawn over the slash command and @-mention menus (anthropics/claude-code#102981) +- [VSCode] Fixed an empty list item, paragraph or code block, and list items renumbered from 1, when pasting copied LaTeX math +- [VSCode] Fixed the feedback error showing only an HTTP status when your organization does not accept feedback +- [VSCode] Improved Edit and Write speed in the chat panel: the wait for new problems after each edit is now 0.75 seconds in most cases, down from 1 to 1.5 seconds +- [Cloud sessions] Fixed the Add connector list in routine forms saying no connectors were available while they were still loading +- [Cloud sessions] Fixed the cloud environment editor shuffling environment variables and adding backslashes to values that contain both kinds of quote +- [Cloud sessions] Fixed the self-hosted environment details dialog in admin settings so its title, tabs and buttons stay in view while only the content scrolls +- [Cloud sessions] Fixed the "read documentation" tool row in cloud sessions, which showed escaped JSON instead of a readable page +- [Cloud sessions] Improved a cloud session's Changes pane, which now says when it lists only pushed commits or only Claude's edits +- [Claude Tag] Fixed Claude in Slack posting a draft you approved for a channel into your DM by mistake; a post with no channel is now refused so it can go to the approved channel +- [Claude Tag] Fixed Allow and Deny on Claude's approval cards in Slack doing nothing when the session had stopped; your answer now restarts the session +- [Claude Tag] Fixed Claude ignoring untagged messages in a Slack channel after its workspace moved to a different Claude organization, including unshared channels on Enterprise Grid +- [Claude Tag] Fixed Claude in a Slack channel posting a threaded reply before reading a newer message someone had just added to that thread +- [Claude Tag] Fixed the Slack page in Claude Tag admin settings saying no workspaces were connected when the list failed to load; it now shows an error with a Retry button +- [Code Review] Fixed a finished review showing no check on the pull request when earlier tries to create it failed; a final try now adds a completed check +- [Code Review] Fixed a push queued behind a running review still starting a review after `@claude review stop`; its check now closes and says why + ## 2.1.308 - Bug fixes and reliability improvements diff --git a/content/claude-code-manifest.json b/content/claude-code-manifest.json index 2de3a78e2f..fcb171a13f 100644 --- a/content/claude-code-manifest.json +++ b/content/claude-code-manifest.json @@ -6,17 +6,17 @@ "url": "https://github.com/anthropics/claude-code/issues" }, "dist": { - "shasum": "afb8f4d592108295e45492e6fbd52c184a1e1fd1", - "tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.308.tgz", + "shasum": "f9e48d703c778c2814136cf492918f49f2c4bbfb", + "tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.309.tgz", "fileCount": 7, - "integrity": "sha512-b2HnszgyN73wRTFP+IYPDJNn9ADXnG6jr26ibL+w03HSKqfb6GqE8Jnfr4mz37Zv4AT/NP+B5/3c1F89WTdWSA==", + "integrity": "sha512-+lBYZRuXOJpiKJcRv/CK7gF+5UFNWyJE7hSxkgGUKDZOWgANl9MAabfTkrJk183Tp3B0Nv4xF/DU1t0BaKXOPw==", "signatures": [ { - "sig": "MEUCIHwDAAaWUGI7dfWkW/PNX76cLCWleQTsY+a8vGLAy4VeAiEA2cGttZBQvUP0MrmJOTni45cE0+svnX63HNGV82zkrho=", + "sig": "MEQCIA9wG+9pBE3bRRep/aS4hZtRrmLmWkwD2bAtA7ItFsTSAiA68FU1S0fxubHAI2k73DL4cts1+1y6w83ljfz+0haS5w==", "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U" }, { - "sig": "MEUCIHynYqhMVoO3kWvRhpHM+dflRJHBqeh8C2Hoe7108W9dAiEAn67qCJyFQdhCE62F9R8BQC/3eK+hWK0uh8J8og3ejx8=", + "sig": "MEYCIQDD6ykXd+VNDiAvUAPBaIqTjKCdXODxrhN0INiExSEJngIhAN4p5uFgnWLz3aY+TGt7rJEMDI82BbQ0nIbk6bAqTDRD", "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U" } ], @@ -24,7 +24,7 @@ }, "name": "@anthropic-ai/claude-code", "type": "module", - "_from": "file:staged-npm/anthropic-ai-claude-code-2.1.308.tgz", + "_from": "file:staged-npm/anthropic-ai-claude-code-2.1.309.tgz", "author": { "name": "Anthropic", "email": "support@anthropic.com" @@ -46,8 +46,8 @@ } }, "homepage": "https://github.com/anthropics/claude-code", - "_resolved": "/home/runner/work/claude-cli-internal/claude-cli-internal/staged-npm/anthropic-ai-claude-code-2.1.308.tgz", - "_integrity": "sha512-b2HnszgyN73wRTFP+IYPDJNn9ADXnG6jr26ibL+w03HSKqfb6GqE8Jnfr4mz37Zv4AT/NP+B5/3c1F89WTdWSA==", + "_resolved": "/home/runner/work/claude-cli-internal/claude-cli-internal/staged-npm/anthropic-ai-claude-code-2.1.309.tgz", + "_integrity": "sha512-+lBYZRuXOJpiKJcRv/CK7gF+5UFNWyJE7hSxkgGUKDZOWgANl9MAabfTkrJk183Tp3B0Nv4xF/DU1t0BaKXOPw==", "_npmVersion": "11.19.1", "description": "Use Claude, Anthropic's AI assistant, right from your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.", "directories": {}, @@ -113,24 +113,24 @@ "email": "joan@anthropic.com" } ], - "_nodeVersion": "24.22.0", + "_nodeVersion": "24.22.1", "dependencies": {}, "_hasShrinkwrap": false, "readmeFilename": "README.md", "optionalDependencies": { - "@anthropic-ai/claude-code-linux-x64": "2.1.308", - "@anthropic-ai/claude-code-win32-x64": "2.1.308", - "@anthropic-ai/claude-code-darwin-x64": "2.1.308", - "@anthropic-ai/claude-code-linux-arm64": "2.1.308", - "@anthropic-ai/claude-code-win32-arm64": "2.1.308", - "@anthropic-ai/claude-code-darwin-arm64": "2.1.308", - "@anthropic-ai/claude-code-linux-x64-musl": "2.1.308", - "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.308" + "@anthropic-ai/claude-code-linux-x64": "2.1.309", + "@anthropic-ai/claude-code-win32-x64": "2.1.309", + "@anthropic-ai/claude-code-darwin-x64": "2.1.309", + "@anthropic-ai/claude-code-linux-arm64": "2.1.309", + "@anthropic-ai/claude-code-win32-arm64": "2.1.309", + "@anthropic-ai/claude-code-darwin-arm64": "2.1.309", + "@anthropic-ai/claude-code-linux-x64-musl": "2.1.309", + "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.309" }, "_npmOperationalInternal": { - "tmp": "tmp/claude-code_2.1.308_1792642788819_0.41760888090613246", + "tmp": "tmp/claude-code_2.1.309_1792701253628_0.164768826083858", "host": "s3://npm-registry-packages-npm-production" }, - "_id": "@anthropic-ai/claude-code@2.1.308", - "version": "2.1.308" + "_id": "@anthropic-ai/claude-code@2.1.309", + "version": "2.1.309" } \ No newline at end of file diff --git a/content/claude/connectors/building/authentication.md b/content/claude/connectors/building/authentication.md index 98946b8c0a..2ee2963585 100644 --- a/content/claude/connectors/building/authentication.md +++ b/content/claude/connectors/building/authentication.md @@ -38,7 +38,7 @@ Claude supports the following authentication types for remote MCP servers. | - | - | - | | `oauth_dcr` | OAuth 2.0 with Dynamic Client Registration ([RFC 7591](https://www.rfc-editor.org/rfc/rfc7591)) | Supported by default | | `oauth_cimd` | OAuth 2.0 with [Client ID Metadata Document](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#client-id-metadata-documents) | Supported by default | -| `oauth_anthropic_creds` | OAuth 2.0 with [Anthropic-held client credentials](#anthropic-held-client-credentials) | Contact `mcp-review@anthropic.com` | +| `oauth_anthropic_creds` | OAuth 2.0 with [Anthropic-held client credentials](#anthropic-held-client-credentials) | Supported. [Enter the client in the developer portal](#enter-your-oauth-client-in-the-developer-portal) | | `custom_connection` | Custom URL or OAuth client credentials [entered at connection time](#credentials-entered-at-connection-time) | Contact `mcp-review@anthropic.com` | | `static_headers` | Fixed credential (API key or bearer token) entered by an organization Owner as a request header when adding the connector | Beta, for a limited set of organizations | | `none` | No authentication (authless server) | Supported by default. To leave some tools open and require sign-in for others, see [Lazy authentication](/docs/connectors/building/lazy-authentication.md) | @@ -62,7 +62,7 @@ The submission portal's **Connection** step asks how users reach your server, an * **Multiple URLs**: you list a fixed set of labeled URLs, such as one per region, and users pick one when they connect * **URL pattern**: you give an anchored regular expression that every customer's URL must match, such as `^https://[a-z0-9-]+\.mcp\.example\.com/mcp$`. Each user enters their own URL when they connect, and Claude accepts it only if it matches. Keep the host part of the pattern lowercase, because Claude lowercases the host of the URL the user enters before checking it -Listings with **Multiple URLs** or a **URL pattern** take longer to review. +You can choose any option under **Users connect to different URLs**, such as **Multiple URLs** or a **URL pattern**, in a new submission. A listing that uses one can be published only once it has the **Verified** label, and its review takes longer. You choose the URL option and the authentication type separately, but the URL option limits which authentication types work. The table shows which combinations work. Request headers (`static_headers`) are set up by the organization Owner who adds the connector and aren't covered here. @@ -98,15 +98,48 @@ For servers expecting high traffic from the directory, prefer CIMD or `oauth_ant ### Anthropic-held client credentials -With `oauth_anthropic_creds`, you create an OAuth client for Claude in your own authorization server and Anthropic holds its credentials, so Claude has a stable, registered client without DCR or CIMD on your end. Users still go through your standard OAuth consent screen when they connect. A pure machine-to-machine `client_credentials` grant, where a token is issued with no user in the loop, isn't supported. +With `oauth_anthropic_creds`, you create an OAuth client for Claude in your authorization server and enter its client ID and secret in the developer portal. Anthropic uses the credentials only for token exchange on behalf of consenting users. Users still go through your standard OAuth consent screen when they connect. A machine-to-machine `client_credentials` grant, where a token is issued with no user, isn't supported. -To use this type: +A listing can use Anthropic-held client credentials whether it's labeled **Community** or **Verified**. The credentials are tied to exact server URLs, so they can't be used with a [URL pattern](#servers-with-per-customer-urls), where each customer enters their own URL. -* **Create a confidential client**: create a `client_id` and `client_secret` for Claude in your authorization server -* **Send the credentials to Anthropic**: email `mcp-review@anthropic.com` with the `client_id` to set up Anthropic-held credentials. Anthropic replies with how to transfer the client secret securely, so don't put the secret in the email. Anthropic uses the credentials only for token exchange on behalf of consenting users -* **Plan for Claude Code separately**: the hosted Claude apps, which are claude.ai on the web, Desktop, mobile, and Cowork, share this client. Claude Code doesn't use it: it runs its own OAuth flow on the user's machine, identifies itself with its own [Client ID Metadata Document](#callback-urls), and redirects to a loopback callback URL -* **Tell Anthropic before you migrate authorization servers**: the credentials are bound to the authorization server that issued them. Email `mcp-review@anthropic.com` with the new `client_id` before cutting over, and transfer the new secret the same way as the first -* **Don't combine it with a URL pattern**: the credentials are tied to exact server URLs, so they can't be used where each customer enters their own server URL. See [Servers with per-customer URLs](#servers-with-per-customer-urls) for the alternatives +Before you enter the client in the portal: + +* **Create a confidential client**: create a client ID and secret for Claude in your authorization server, and register the redirect URI `https://claude.ai/api/mcp/auth_callback` +* **Plan for Claude Code separately**: claude.ai on the web, Desktop, mobile, and Cowork share this client. Claude Code doesn't use it, and instead uses its own Client ID Metadata Document and a loopback redirect, as [Callback URLs](#callback-urls) describes + +### Enter your OAuth client in the developer portal + +If your listing uses Anthropic-held client credentials, enter your OAuth client in the **How users authenticate** section when you [submit your connector](/docs/connectors/building/submission.md): + +1. Under **Authentication requirement**, select **Always required** or **Required when the server asks**. +2. Under **Authentication methods**, find the **OAuth sign-in** card. If there's none, click **Add OAuth sign-in**. +3. Under **OAuth client**, select **Anthropic-held client credentials** and enter your client ID in the **Client ID** field. +4. Under **Client secret**, select **Anthropic holds a client secret** and enter the secret. + +When you submit, the portal stores the secret and doesn't show it again. If you reload the page before you submit, enter the secret again. Once your listing is published, Claude uses the client for new connections, except in the cases that [Which credentials Claude uses when several are set](#which-credentials-claude-uses-when-several-are-set) describes. + +To change the client later, open your listing's submission detail page in the [developer portal](https://claude.ai/directory/manage), go to **Connection & authentication**, and click **Edit authentication** or **Author authentication**, whichever the section shows. On a published listing: + +* **A new client ID waits for a reviewer**: keep your old client working on your authorization server, because people who connected earlier signed in with it +* **Switching from another sign-in method needs Anthropic**: email `directory@anthropic.com` with your listing's name and its exact server URLs, then save the change once Anthropic confirms. Don't put the secret in the email + +### Which credentials Claude uses when several are set + +For a directory listing where Anthropic holds your client secret, the client Claude signs users in with can come from three places: + +* **The user's organization**: a client that an admin in the user's organization entered for your server's URL, such as when adding your server as a custom connector +* **You**: the client you entered in the developer portal +* **Anthropic**: a client that Anthropic set up for your server's URL + +For new connections, Claude checks them in that order and uses the first one it finds. If the organization's or Anthropic's client has a different client ID from your listing's, sign-in fails instead of moving on to the next one. + +These cases change which client is used, or whether you can save yours: + +* **Some connections, such as older ones**: these don't use the client you entered. They use the organization's or Anthropic's client if either exists, and otherwise your server's own [DCR or CIMD](#dcr-and-cimd-details) registration. If there's no such client and your server supports neither, sign-in fails for those connections +* **A client Anthropic already holds**: if Anthropic holds a client for any of your listing's URLs, you can't save your client secret or request header values on a published listing. You can save them once Anthropic removes its client or checks your listing again. On a listing that isn't published yet, you can save them, but the listing can't go live until Anthropic checks it. In either case, email `directory@anthropic.com` with your listing's name and its exact server URLs, and don't put the secret in the email +* **Custom connectors**: a custom connector that someone adds with your server's URL never uses the client secret you entered in the portal + +For each request header on your listing, select the **Anthropic holds one shared value** checkbox in the developer portal to enter one value yourself that every organization uses. Leave it unchecked so each person who adds your connector enters their own value. You can't select the checkbox on a listing with a [URL pattern](#servers-with-per-customer-urls). Header values come only from you or from the people who add your connector, never from Anthropic. ### Credentials entered at connection time diff --git a/content/claude/connectors/building/directory-vs-custom.md b/content/claude/connectors/building/directory-vs-custom.md index 0eeaa23418..d4e68268e3 100644 --- a/content/claude/connectors/building/directory-vs-custom.md +++ b/content/claude/connectors/building/directory-vs-custom.md @@ -98,7 +98,7 @@ A supported pattern is to list a connector in the directory with safe, broadly a ### Per-tenant URLs -If your server URL varies per tenant, such as `{tenant}.mcp.example.com`, submit one directory listing with a URL pattern. Each user enters their own URL when they connect. See [Servers with per-customer URLs](/docs/connectors/building/authentication.md#servers-with-per-customer-urls) for how this choice limits your authentication options. +If your server URL varies per tenant, such as `{tenant}.mcp.example.com`, submit one directory listing with a URL pattern. Each user enters their own URL when they connect. A listing with a URL pattern can be published only once it has the **Verified** label. See [Servers with per-customer URLs](/docs/connectors/building/authentication.md#servers-with-per-customer-urls) for how this choice limits your authentication options. ## Next steps diff --git a/content/claude/connectors/building/managing-your-listing.md b/content/claude/connectors/building/managing-your-listing.md index 53a514fdd7..218a57de1e 100644 --- a/content/claude/connectors/building/managing-your-listing.md +++ b/content/claude/connectors/building/managing-your-listing.md @@ -87,6 +87,8 @@ Save your edits as you go, then submit them for review. Submitted changes show a The URL slug is locked. It's permanent after publication because it determines your listing URL. +To change how users sign in, including the OAuth client ID and secret that Anthropic holds, go to **Connection & authentication** on the listing's submission detail page and click **Edit authentication** or **Author authentication**, whichever the section shows. [Enter your OAuth client in the developer portal](/docs/connectors/building/authentication.md#enter-your-oauth-client-in-the-developer-portal) covers the client fields. + For other edits or escalations, email `mcp-review@anthropic.com`. ## Next steps diff --git a/content/claude/connectors/building/submission.md b/content/claude/connectors/building/submission.md index 48e7d2513d..4574038538 100644 --- a/content/claude/connectors/building/submission.md +++ b/content/claude/connectors/building/submission.md @@ -135,7 +135,7 @@ Your progress saves automatically in your browser as you move between steps, so **1. Connection** -Connect the server you're submitting, by pasting its `https://` URL or choosing a custom connector you've already added to Claude. If your users connect to different URLs, select **Users connect to different URLs** and choose **Multiple URLs** or **URL pattern**. +Connect the server you're submitting, by pasting its `https://` URL or choosing a custom connector you've already added to Claude. If your users connect to different URLs, select **Users connect to different URLs** and choose **Multiple URLs** or **URL pattern**. A listing that uses one of these options can be published only once it has the **Verified** label, as [Servers with per-customer URLs](/docs/connectors/building/authentication.md#servers-with-per-customer-urls) explains. **2. Tools** @@ -155,7 +155,7 @@ Company name and website, plus a primary contact for review updates. **6. Authentication** -How users authenticate: OAuth with dynamic client registration, client ID metadata documents, or Anthropic-held client credentials; a custom connection where users supply their own URL or credentials at connection time; or no authentication. [Authentication](/docs/connectors/building/authentication.md) covers which modes are supported directly and which need coordination with the review team. If your server starts without authentication and individual tools prompt for it on demand, you can flag that here. +In the **How users authenticate** section, choose whether users must sign in under **Authentication requirement**, and how they sign in under **Authentication methods**. Choose **Required when the server asks** if your server starts without sign-in and only some tools need it. To have Anthropic hold your OAuth client, enter its client ID and secret here, as [Enter your OAuth client in the developer portal](/docs/connectors/building/authentication.md#enter-your-oauth-client-in-the-developer-portal) describes. [Authentication for connectors](/docs/connectors/building/authentication.md) covers each option. If you chose **URL pattern** in the Connection step, Anthropic-held client credentials can't be used. If you chose **Multiple URLs**, a custom connection can't be used. @@ -177,7 +177,7 @@ Everything you've entered, for a final check before you submit. Any quality warn ## After you submit -Anthropic scans your submission automatically for policy compliance and, by default, lists it as a Community connector with no action from you. Some submissions also get a review from a person, and those review times vary with queue volume. The portal is always open for new submissions. Your submission's status and any reviewer feedback appear in the portal at [claude.ai/directory/manage](https://claude.ai/directory/manage), and [Track your directory submission](/docs/directory/submission-status.md#mcp-connector-statuses) explains what each status in the portal means. [Manage your directory listing](/docs/connectors/building/managing-your-listing.md) covers reviewer feedback, listing edits, and the server health and usage metrics you get after publication. +Anthropic scans your submission automatically for policy compliance and, by default, lists it as a Community connector with no action from you. A listing that uses an option under **Users connect to different URLs** can be published only once it has the **Verified** label. Some submissions also get a review from a person, and those review times vary with queue volume. The portal is always open for new submissions. Your submission's status and any reviewer feedback appear in the portal at [claude.ai/directory/manage](https://claude.ai/directory/manage), and [Track your directory submission](/docs/directory/submission-status.md#mcp-connector-statuses) explains what each status in the portal means. [Manage your directory listing](/docs/connectors/building/managing-your-listing.md) covers reviewer feedback, listing edits, and the server health and usage metrics you get after publication. For escalations, email `mcp-review@anthropic.com`. diff --git a/content/claude/cowork/changelog.md b/content/claude/cowork/changelog.md index 5feaa446ea..8ecaa42d0a 100644 --- a/content/claude/cowork/changelog.md +++ b/content/claude/cowork/changelog.md @@ -6,6 +6,28 @@ > Release notes for Claude Desktop +**v3.6556.2** + +2026-10-22 + +Bundled Claude Code version: 2.1.308. + +**General** + +* No user-facing changes. + +**Code** + +* No user-facing changes. + +**Cowork** + +* No user-facing changes. + +**3P** + +* No user-facing changes. + **v3.6556.1** 2026-10-22 diff --git a/content/claude/cowork/hipaa-setup.md b/content/claude/cowork/hipaa-setup.md index cfe76d4ea3..b3102dc17e 100644 --- a/content/claude/cowork/hipaa-setup.md +++ b/content/claude/cowork/hipaa-setup.md @@ -52,7 +52,7 @@ For organizations with the HIPAA configuration, Anthropic's servers reject reque On an older version, members see an **Update required** dialog that tells them to update Claude Desktop. The dialog's text names Code, but members see it in Cowork too. What the dialog offers depends on whether automatic updates are on: * **Automatic updates are on**: the dialog has an **Update now** button -* **You turned off automatic updates** with the [`disableAutoUpdates`](/docs/third-party/claude-desktop/configuration#disableautoupdates) key: the dialog has no **Update now** button and tells the member to ask their administrator. Deploy each new version with your device management tool +* **You turned off automatic updates** with the [`disableAutoUpdates`](/docs/third-party/claude-desktop/configuration#disableautoupdates) key: the dialog tells the member to ask their administrator. Deploy each new version with your device management tool. On macOS, and on Windows where Claude Desktop was installed from the `.msix` package, once the newer version is on the device the dialog has an **Update now** button instead. ### Allow network access for Claude Desktop @@ -101,7 +101,7 @@ Windows Registry Editor Version 5.00 "otlpContentCapture"="[]" ``` -The sample writes every value as a string, including `false` and `[]`. [Value types](/docs/third-party/claude-desktop/configuration.md#value-types) lists the other encodings Claude Desktop accepts. +The sample writes every value as a string, including `false` and `[]`. [Value types](/docs/third-party/claude-desktop/configuration-format.md#value-types) lists the other encodings Claude Desktop accepts. > [!NOTE] > diff --git a/content/claude/cowork/monitoring.md b/content/claude/cowork/monitoring.md index 7c0f18bc35..4a772b0620 100644 --- a/content/claude/cowork/monitoring.md +++ b/content/claude/cowork/monitoring.md @@ -44,7 +44,7 @@ Cowork exports the following events to your OTel collector. The collector settin Events can carry user prompt text, model response text, and tool inputs in addition to metadata. You set which of these the events carry with the `otlpContentCapture` managed configuration key on each user's device. -To set the key, deploy it with your device management tool to the [managed configuration location for each operating system](/docs/third-party/claude-desktop/configuration.md#how-keys-are-read). To export metadata only, set `otlpContentCapture` to an empty list, written as the two characters `[]`. Claude Desktop reads an empty string as if the key weren't set. The key takes effect when Claude Desktop restarts. +To set the key, deploy it with your device management tool to the [managed configuration location for each operating system](/docs/third-party/claude-desktop/configuration-format.md#how-keys-are-read). To export metadata only, set `otlpContentCapture` to an empty list, written as the two characters `[]`. Claude Desktop reads an empty string as if the key weren't set. The key takes effect when Claude Desktop restarts. The table shows what events carry on current versions of Claude Desktop, for a Cowork session that runs on the user's computer. diff --git a/content/claude/third-party/claude-desktop/admin-console.md b/content/claude/third-party/claude-desktop/admin-console.md index 9afc74af35..2ec9d9033c 100644 --- a/content/claude/third-party/claude-desktop/admin-console.md +++ b/content/claude/third-party/claude-desktop/admin-console.md @@ -529,4 +529,4 @@ A write goes through the same server checks as a save in the admin console, but * The [Claude API](/docs/third-party/claude-desktop/claude-api.md) is not available as the inference provider with the admin console. * If a device can't reach `api.anthropic.com` at launch, the app opens with a **Configuration sync issue** warning and can't connect to your inference provider until it downloads the configuration. It keeps retrying in the background and loads the configuration when a retry succeeds, without a relaunch. Quitting and reopening the app retries immediately. An app that is already running keeps working if the connection to Anthropic drops. * Bootstrap keys and settings that only make sense on the device, such as disabling claude.ai sign-in, are not available in the console. -* The console has no field for [`modelCatalogEnabled`](/docs/third-party/claude-desktop/configuration#modelcatalogenabled), [`modelCatalogUrl`](/docs/third-party/claude-desktop/configuration#modelcatalogurl), or [`deploymentDisplaySubtitle`](/docs/third-party/claude-desktop/configuration#deploymentdisplaysubtitle). An app managed from the console never fetches the model catalog, so it doesn't need the two catalog keys. +* The console can't hold [`modelCatalogEnabled`](/docs/third-party/claude-desktop/configuration#modelcatalogenabled), [`modelCatalogUrl`](/docs/third-party/claude-desktop/configuration#modelcatalogurl), or [`deploymentDisplaySubtitle`](/docs/third-party/claude-desktop/configuration#deploymentdisplaysubtitle). An app managed from the console never fetches the model catalog, so it doesn't need the two catalog keys. diff --git a/content/claude/third-party/claude-desktop/bedrock.md b/content/claude/third-party/claude-desktop/bedrock.md index 9f5ce8fc40..74fbfb9209 100644 --- a/content/claude/third-party/claude-desktop/bedrock.md +++ b/content/claude/third-party/claude-desktop/bedrock.md @@ -190,24 +190,136 @@ Then click **Export** to produce a `.mobileconfig` (macOS) or `.reg` (Windows) f The full set of `inferenceBedrock*` keys is below. Set `inferenceProvider` to `bedrock`, supply a region, and provide exactly one credential source. -| Setting | Type | Availability | Default | Description | -| - | - | - | - | - | -| AWS region `inferenceBedrockRegion` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | AWS region for the Bedrock runtime endpoint. | -| Bedrock base URL `inferenceBedrockBaseUrl` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | For VPC endpoints or gateway proxies. Host origin only. | -| Bedrock service tier `inferenceBedrockServiceTier` | `enum` | MDM + Bootstrap Added in 1.5186.0 | — | Sent as the X-Amzn-Bedrock-Service-Tier header. Leave unset for on-demand. One of: `flex`, `priority`. | -| AWS bearer token `inferenceBedrockBearerToken` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Static bearer token for inference. For providers that support profile or helper-script credentials, prefer those. | -| AWS SSO start URL `inferenceBedrockSsoStartUrl` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | Enables in-app AWS sign-in (no AWS CLI needed). Set with the three SSO fields below. | -| AWS SSO region `inferenceBedrockSsoRegion` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | IAM Identity Center home region. | -| AWS SSO account ID `inferenceBedrockSsoAccountId` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | 12-digit AWS account ID assigned to users in IAM Identity Center. | -| AWS SSO role name `inferenceBedrockSsoRoleName` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | IAM Identity Center permission-set name granting bedrock:InvokeModel\* on the account above. | -| AWS profile name `inferenceBedrockProfile` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | AWS named profile to use for Bedrock inference credentials. | -| AWS config directory `inferenceBedrockAwsDir` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Folder with AWS config/credentials. Defaults to \~/.aws when no bearer token is set. | -| AWS CLI path `inferenceBedrockAwsCliPath` | `string` | MDM + Bootstrap Added in 1.13576.0 | — | Absolute path to the aws executable. Leave unset to find it on PATH. | - -> **inferenceBedrockServiceTier details** +[Entry labels](/docs/third-party/claude-desktop/configuration.md#entry-labels) says what each label means. + +#### `inferenceBedrockRegion` + +stringSince 1.2581.0 + +**AWS region.** AWS region for the Bedrock runtime endpoint. + +*** + +#### `inferenceBedrockBaseUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Origin-pinned (A URL that a bootstrap server delivers must share the origin of bootstrapUrl, or Claude Desktop drops it. The limit is lifted when bootstrapOidc is set, and it does not apply to a value set in an MDM profile, the local configuration file or the Enterprise Admin Console.) + +Since 1.2581.0 + +**Bedrock base URL.** For VPC endpoints or gateway proxies. Host origin only. + +*** + +#### `inferenceBedrockServiceTier` + +enumSince 1.5186.0 + +**Bedrock service tier.** Sent as the X-Amzn-Bedrock-Service-Tier header. Leave unset for on-demand. + +One of: `flex`, `priority` + +> **More detail** > > Tier availability varies by model and region. Reserved capacity uses a provisioned-throughput ARN as the model ID instead of this setting. Older bundled Claude Code CLI versions ignore this key. +*** + +#### `inferenceBedrockBearerToken` + +stringSince 1.2581.0 + +**AWS bearer token.** Static bearer token for inference. For providers that support profile or helper-script credentials, prefer those. + +*** + +#### `inferenceBedrockSsoStartUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO start URL.** Enables in-app AWS sign-in (no AWS CLI needed). Set with the three SSO fields below. + +*** + +#### `inferenceBedrockSsoRegion` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO region.** IAM Identity Center home region. + +*** + +#### `inferenceBedrockSsoAccountId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO account ID.** 12-digit AWS account ID assigned to users in IAM Identity Center. + +*** + +#### `inferenceBedrockSsoRoleName` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO role name.** IAM Identity Center permission-set name granting bedrock:InvokeModel\* on the account above. + +*** + +#### `inferenceBedrockProfile` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**AWS profile name.** AWS named profile to use for Bedrock inference credentials. + +*** + +#### `inferenceBedrockAwsDir` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**AWS config directory.** Folder with AWS config/credentials. Defaults to \~/.aws when no bearer token is set. + +*** + +#### `inferenceBedrockAwsCliPath` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.13576.0 + +**AWS CLI path.** Absolute path to the aws executable. Leave unset to find it on PATH. + +*** + Set `inferenceModels` to a list of Amazon Bedrock inference-profile IDs, for example `us.anthropic.claude-sonnet-5`. When using a bearer token or credential helper, Claude Desktop auto-discovers available Claude models from your account if this is unset; otherwise the list is required. Application-inference-profile ARNs and provisioned-throughput ARNs are also accepted; pair them with a [`labelOverride`](/docs/third-party/claude-desktop/configuration#inferencemodels) so the picker shows a readable name instead of the raw ARN. See the [Configuration reference](/docs/third-party/claude-desktop/configuration.md#inferencemodels). ## What users experience diff --git a/content/claude/third-party/claude-desktop/bootstrap.md b/content/claude/third-party/claude-desktop/bootstrap.md index 1ccf7ae2b0..a7da32a578 100644 --- a/content/claude/third-party/claude-desktop/bootstrap.md +++ b/content/claude/third-party/claude-desktop/bootstrap.md @@ -27,8 +27,6 @@ Either way, the bootstrap server supplies everything else after the user signs i On a device whose MDM profile carries the bootstrap keys, a user who signs in to any organization that uses the [Enterprise Admin Console](/docs/third-party/claude-desktop/admin-console.md) can move the device to that organization's configuration. The app then stops contacting your server. To prevent that, set [`disableDeploymentModeChooser`](/docs/third-party/claude-desktop/configuration#disabledeploymentmodechooser) to `true` in the profile itself, not only in your server's response, as described under [Keep a device on its managed profile](/docs/third-party/claude-desktop/admin-console.md#keep-a-device-on-its-managed-profile). -If you set `deploymentOrganizationUuid`, include it in the MDM profile or imported configuration file, and return the same value in your bootstrap response, as a plain UUID without braces in both places. Claude Desktop uses the device-side value at startup to locate sessions, skills, and plugins stored on the device. - ## How it works 1. Your managed configuration (MDM or imported) sets `bootstrapUrl` (and `bootstrapOidc` if you use a separate identity provider). @@ -41,7 +39,7 @@ If the user has not yet signed in, or the fetch fails with no cached response fr ### Availability -The full response is held **in memory only**. If your bootstrap server is unreachable when Claude Desktop launches, the user stays in the degraded sign-in state until the server recovers. A failed refetch *during* a running session keeps the in-memory response and retries, so an outage that starts mid-session does not disrupt active users until they relaunch. +The full response is held **in memory only**. If your bootstrap server is unreachable when Claude Desktop launches, the user stays in the degraded sign-in state until the server recovers. On Claude Desktop 3.6556.1 or later, the Cowork tasks, Code sessions, projects, and scheduled tasks already on the device stay listed during that time. On those versions, scheduled tasks don't run until the app gets its configuration from your server, and then each task that missed a run runs once. A failed refetch *during* a running session keeps the in-memory response and retries, so an outage that starts mid-session does not disrupt active users until they relaunch. Each device also keeps a small record from the last response it applied, and applies the settings in that record at the next launch until your server answers. Signing out of Claude Desktop deletes the record. It holds only these values, when the response sets them: @@ -330,7 +328,7 @@ The response can supply any key in that schema, including inference credentials, A small set of keys are **structurally excluded** and ignored if returned: * `bootstrapUrl`, `bootstrapOidc`, `bootstrapHeaders`, `bootstrapHeadersHelper`, `bootstrapEnabled`, and `trustBootstrapDelivery`: the trust anchor cannot redirect itself, authenticate itself, or grant trust in itself. -* `egressProxyUrl` and `egressProxyPacUrl`: the app may need the [network proxy](/docs/third-party/claude-desktop/network-proxy.md#pin-a-proxy-from-managed-configuration) to reach your endpoint in the first place, so these keys are read from device management or the local configuration file only. These two and the six keys above are the keys whose Availability column reads **MDM only** in the [configuration reference](/docs/third-party/claude-desktop/configuration.md). +* `egressProxyUrl` and `egressProxyPacUrl`: the app may need the [network proxy](/docs/third-party/claude-desktop/network-proxy.md#pin-a-proxy-from-managed-configuration) to reach your endpoint in the first place, so these keys are read from device management or the local configuration file only. These two and the six keys above are the keys labeled **MDM only** in the [configuration reference](/docs/third-party/claude-desktop/configuration.md). * Loopback hosts (`127.0.0.1`, `localhost`, `[::1]`) in any URL-valued key, regardless of scheme. `managedMcpServers` entries are not restricted by transport in version 1.19367.0 and later: remote (`http`/`sse`) servers, local `stdio` commands, and the built-in `microsoft365` and `websearch` connectors can all be delivered in the bootstrap response. Earlier versions accept only remote entries and drop the rest. Because a `stdio` entry names a command that runs on the device, a bootstrap response can start local processes — part of why the warning at the top of this page says to treat this endpoint as fully trusted. Entries whose server URL or OAuth authorization-server URL is loopback or non-HTTPS are still dropped, and the desktop log (see [Troubleshooting](#troubleshooting)) records which keys were dropped and why. @@ -379,40 +377,134 @@ When you supply `bootstrapOidc`, your configuration server and gateway are indep ## MDM configuration keys -| Setting | Type | Availability | Default | Description | -| - | - | - | - | - | -| Use bootstrap config `bootstrapEnabled` | `boolean` | MDM only Added in 1.10628.0 | `true` | Fetch and apply the URL above at launch. Turn off to keep the URL saved but skip the fetch. Defaults to `true`. | -| Bootstrap config URL `bootstrapUrl` | `string` | MDM only Added in 1.10628.0 | — | HTTPS endpoint that returns a per-user JSON config overlay. Values from the response override local settings and become read-only. | -| Bootstrap OIDC parameters `bootstrapOidc` | `object` | MDM only Added in 1.10628.0 | — | When set, the bootstrap request sends a Bearer token from a browser sign-in (authorization-code-with-PKCE). | -| Bootstrap request headers `bootstrapHeaders` | `object` | MDM only Added in 1.32885.1 | — | HTTP headers sent on every bootstrap config fetch. Use this instead of embedding user:pass@ in the URL. | -| Bootstrap headers helper script `bootstrapHeadersHelper` | `string` | MDM only Added in 1.32885.1 | — | Absolute path to an executable that prints a JSON object of bootstrap request headers. Merged over the static headers; the helper wins. | -| Trust bootstrap-delivered settings `trustBootstrapDelivery` | `boolean` | MDM only Added in 1.26832.0 | `false` | Skip the per-user consent prompt for sign-in targets, inference endpoints, helper scripts, and connectors the bootstrap server delivers. Defaults to `false`. | +[Entry labels](/docs/third-party/claude-desktop/configuration.md#entry-labels) says what each label means. + +### `bootstrapEnabled` + +booleanDefault: true + +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.10628.0 + +**Use bootstrap config.** Fetch and apply the URL above at launch. Turn off to keep the URL saved but skip the fetch. + +*** + +### `bootstrapUrl` + +string + +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.10628.0 + +**Bootstrap config URL.** HTTPS endpoint that returns a per-user JSON config overlay. Values from the response override local settings and become read-only. + +*** + +### `bootstrapOidc` -> **bootstrapOidc details** +object + +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.10628.0 + +**Bootstrap OIDC parameters.** When set, the bootstrap request sends a Bearer token from a browser sign-in (authorization-code-with-PKCE). + +> **More detail** > > Set this to use a separate identity provider (Microsoft Entra ID, Okta, Ping, or any compliant OIDC provider) for the bootstrap sign-in. The app runs an authorization-code-with-PKCE flow in the system browser. Omit to use device-code mode against the bootstrap server's own origin. > > This is an **object-typed key** — in an MDM profile it is a single JSON-string value, not separate keys with dotted names like `bootstrapOidc.clientId`. Writing the sub-fields as separate registry values causes the app to silently fall through to device-code mode. + +> **Child attributes (8)** +> +> **clientId** `string` *required* +> +> OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). +> +> **issuer** `string` +> +> HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. +> +> **authorizationUrl** `string` +> +> HTTPS authorization endpoint. Used with the token URL when no issuer is set. +> +> **tokenUrl** `string` +> +> HTTPS token endpoint. Used with the authorization URL when no issuer is set. +> +> **scopes** `string` > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `clientId` | `string` | — | OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). | -> | `issuer` | `string` | — | HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. | -> | `authorizationUrl` | `string` | — | HTTPS authorization endpoint. Used with the token URL when no issuer is set. | -> | `tokenUrl` | `string` | — | HTTPS token endpoint. Used with the authorization URL when no issuer is set. | -> | `scopes` | `string` | — | Space-separated; the token’s audience must match what your bootstrap server validates. | -> | `redirectPort` | `integer` | — | Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. | -> | `redirectHost` | `enum` | — | Use localhost only if your IdP’s registered redirect URI specifies it. One of: `127.0.0.1`, `localhost`. | -> | `additionalRedirectReferrerHosts` | `string` | — | Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. | - -> **bootstrapHeaders details** +> Space-separated; the token’s audience must match what your bootstrap server validates. +> +> **redirectPort** `integer` +> +> Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. +> +> **redirectHost** `enum` +> +> Use localhost only if your IdP’s registered redirect URI specifies it. +> +> One of: `127.0.0.1`, `localhost` +> +> **additionalRedirectReferrerHosts** `string` +> +> Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. +> +> > **More detail** +> > +> > Only needed when the IdP completes sign-in from a host other than the authorization URL’s. When a callback is rejected for a referrer mismatch, the rejected host is named in the app log — add that hostname here. + +*** + +### `bootstrapHeaders` + +object: name → value + +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.32885.1 + +**Bootstrap request headers.** HTTP headers sent on every bootstrap config fetch. Use this instead of embedding user:pass@ in the URL. + +> **More detail** > > Static headers sent on every request to the bootstrap config URL — for a service-account credential (`Authorization: Basic …`, an API key header) or a routing/tenant header. When either this or the headers helper script is set and no separate `bootstrapOidc` provider is configured, the app treats the headers as sufficient auth and does not require a per-user sign-in for the bootstrap fetch. These headers (and the helper script's below) also accompany requests to a plugin marketplace this server hosts on its own origin (`allowedPluginMarketplaces` with `credentialKind: "inferenceCredential"`). Header values are masked in diagnostics and telemetry. For a rotating token, use the headers helper script instead. -> **bootstrapHeadersHelper details** +*** + +### `bootstrapHeadersHelper` + +string + +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.32885.1 + +**Bootstrap headers helper script.** Absolute path to an executable that prints a JSON object of bootstrap request headers. Merged over the static headers; the helper wins. + +> **More detail** > > Absolute path to an executable that prints a single JSON object of HTTP headers on stdout, e.g. `{"Authorization": "Bearer …"}`. The app runs it (no arguments; output cached for a few minutes) before each bootstrap config fetch and merges the result over **Bootstrap request headers** (the helper wins on conflict). Use this instead of embedding `user:pass@` in the bootstrap URL, or when the bootstrap server needs a rotating token from a secrets manager. When either this or the static headers are set and no separate `bootstrapOidc` provider is configured, the app treats them as sufficient auth and does not require a per-user sign-in for the bootstrap fetch. If a per-user sign-in also runs (`bootstrapOidc` or the server’s own device-code flow), that Bearer token wins on `Authorization`. +*** + +### `trustBootstrapDelivery` + +booleanDefault: false + +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.26832.0 + +**Trust bootstrap-delivered settings.** Skip the per-user consent prompt for sign-in targets, inference endpoints, helper scripts, and connectors the bootstrap server delivers. + +*** + No `inferenceProvider` is needed in the MDM profile when using bootstrap; the response supplies it. ## Troubleshooting diff --git a/content/claude/third-party/claude-desktop/browser.md b/content/claude/third-party/claude-desktop/browser.md index a66b17faa8..ae3f2116ad 100644 --- a/content/claude/third-party/claude-desktop/browser.md +++ b/content/claude/third-party/claude-desktop/browser.md @@ -67,7 +67,7 @@ The site policy restricts Claude, not the user. A user can still type a blocked If [`coworkEgressAllowedHosts`](/docs/third-party/claude-desktop/configuration#coworkegressallowedhosts) lists specific hosts, Claude can open only sites on that list in the built-in browser, even when the browser's own site lists allow more. -The example is plain JSON, which is the form a [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md) response and the Linux managed file use. For a macOS profile or the Windows registry, encode the same values as the [Value types](/docs/third-party/claude-desktop/configuration.md#value-types) section describes. +The example is plain JSON, which is the form a [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md) response and the Linux managed file use. For a macOS profile or the Windows registry, encode the same values as the [Value types](/docs/third-party/claude-desktop/configuration-format.md#value-types) section describes. ### Manage the built-in browser from the Enterprise Admin Console diff --git a/content/claude/third-party/claude-desktop/claude-api.md b/content/claude/third-party/claude-desktop/claude-api.md index 4b7efb0d70..45a988ab5f 100644 --- a/content/claude/third-party/claude-desktop/claude-api.md +++ b/content/claude/third-party/claude-desktop/claude-api.md @@ -24,6 +24,12 @@ Claude Desktop versions before 3.1623.0 created a personal API key in the Consol ### Configuration keys -| Setting | Type | Availability | Default | Description | -| - | - | - | - | - | -| Claude API key `inferenceAnthropicApiKey` | `string` | MDM + Bootstrap Added in 1.8089.0 | — | Leave blank to sign in with your browser, or to supply the key via a credential helper. | +[Entry labels](/docs/third-party/claude-desktop/configuration.md#entry-labels) says what each label means. + +#### `inferenceAnthropicApiKey` + +stringSince 1.8089.0 + +**Claude API key.** Leave blank to sign in with your browser, or to supply the key via a credential helper. + +*** diff --git a/content/claude/third-party/claude-desktop/configuration-changelog.md b/content/claude/third-party/claude-desktop/configuration-changelog.md index 45c52671f6..c310d408b1 100644 --- a/content/claude/third-party/claude-desktop/configuration-changelog.md +++ b/content/claude/third-party/claude-desktop/configuration-changelog.md @@ -8,6 +8,12 @@ Configuration keys by Claude Desktop release. Each section lists keys added in that release, with the MDM key name (for plist/registry deployment) and the equivalent JSON shape (for local-file or bootstrap remote configuration). +**v3.6556.2** + +2026-10-22 + +No configuration changes in this release. + **v3.6556.1** 2026-10-22 diff --git a/content/claude/third-party/claude-desktop/configuration-format.md b/content/claude/third-party/claude-desktop/configuration-format.md new file mode 100644 index 0000000000..740c46693c --- /dev/null +++ b/content/claude/third-party/claude-desktop/configuration-format.md @@ -0,0 +1,161 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://claude.com/docs/llms.txt +> Use this file to discover all available pages before exploring further. + +# Configuration implementation + +> Compare where Claude Desktop on 3P reads configuration in each kind of deployment, and write values for a profile, the registry, or the Linux file + +You configure Claude Desktop on third-party (3P) with the keys in the [configuration reference](/docs/third-party/claude-desktop/configuration.md) in every kind of deployment, but where you set them, how they reach the app, and how you write their values differ between a device's own configuration, the Enterprise Admin Console, and a self-hosted install. + +> [!NOTE] +> +> To choose how configuration reaches your devices, see [Choose a configuration delivery model](/docs/third-party/claude-desktop/installation.md#choose-a-configuration-delivery-model). + +## How configuration differs by deployment + +Each kind of deployment stores and delivers the configuration differently. + +| | [Configuration on the device](#configuration-on-the-device) | [Enterprise Admin Console](#configuration-from-the-enterprise-admin-console) | [Self-hosted install](#configuration-on-a-self-hosted-install) | +| - | - | - | - | +| Where the configuration lives | In an MDM profile or registry policy, in the local configuration file, or on a bootstrap server that the device points to | In your organization's settings on claude.ai, which Anthropic hosts | Keys labeled **Server side** live in the document your session host reads. Keys labeled **MDM profile** live in Claude Desktop's own configuration on the device | +| How it reaches the app | The app reads it at launch, or fetches it from your bootstrap server. Users don't sign in to a Claude account | Each user signs in with their work account, and the app downloads the settings that apply to them | Sessions run on a session host your organization operates, which applies a **Server side** key itself or passes it on to Claude Desktop. Claude Desktop reads keys labeled **MDM profile** from the device, as on any device | +| What an MDM profile does | Carries the full configuration, or the bootstrap keys | You don't need one. A profile on the device can still decide some settings, or keep the device off the console. See [What an MDM profile does alongside the Enterprise Admin Console](#what-an-mdm-profile-does-alongside-the-enterprise-admin-console) | Usually names the session host, and carries the keys labeled **MDM profile**. See [What an MDM profile does on a self-hosted install](#what-an-mdm-profile-does-on-a-self-hosted-install) | +| How you write values | Strings in a macOS profile or the Windows registry. JSON in the Linux file or a bootstrap response | Fields on the console's pages, or JSON in an imported file or an Admin API request | As on any device, for keys labeled **MDM profile**. See [Value types in a profile or registry policy](#value-types-in-a-profile-or-registry-policy) | +| Where to go next | [Deploy with MDM](/docs/third-party/claude-desktop/mdm.md), [Deploy with a bootstrap server](/docs/third-party/claude-desktop/bootstrap.md) | [Deploy with Enterprise Admin Console](/docs/third-party/claude-desktop/admin-console.md) | [Keys that work on a self-hosted install](/docs/third-party/claude-desktop/configuration.md?works-with=self-hosted) | + +## Configuration on the device + +> [!TIP] +> +> Most settings are easier to configure in the [in-app configuration window](/docs/third-party/claude-desktop/in-app-configuration.md) (**Developer → Configure Third-Party Inference…**), which validates values, shows per-provider requirements, and exports directly to `.mobileconfig` or `.reg`. To write an MDM profile, registry policy, or bootstrap response yourself, start with [Where Claude Desktop reads configuration on a device](#where-claude-desktop-reads-configuration-on-a-device). + +On the device, Claude Desktop reads its configuration from OS-native managed preferences (a `.mobileconfig` profile on macOS, registry policy on Windows, or a root-owned JSON file on Linux) or from the local configuration file that the in-app configuration window writes. Either one can instead carry the bootstrap keys that point at a bootstrap server you host. + +### Where Claude Desktop reads configuration on a device + +Claude Desktop reads a managed location and a local location on each platform. + +| Platform | Managed (MDM) location | Local (user) location | +| - | - | - | +| macOS | `/Library/Managed Preferences//com.anthropic.claudefordesktop.plist` (per user), `/Library/Managed Preferences/com.anthropic.claudefordesktop.plist` (machine) | `~/Library/Application Support/Claude-3p/configLibrary/` | +| Windows | `HKLM\SOFTWARE\Policies\Claude` (machine), `HKCU\SOFTWARE\Policies\Claude` (user) | `%LOCALAPPDATA%\Claude-3p\configLibrary\` | +| Linux | `/etc/claude-desktop/managed-settings.json` | `~/.config/Claude-3p/configLibrary/` | + +The local location is a directory: `_meta.json` records which saved configuration is applied, and each configuration is a `.json` file alongside it. The in-app configuration window writes here. + +### Which configuration source applies on a device + +* **A managed source and a local file**: when a managed source sets any key other than the [app-behavior keys](/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence), the managed configuration takes effect and locally written values are ignored. +* **A managed source that sets only app-behavior keys**: those keys (the update keys `disableAutoUpdates`, `autoUpdaterEnforcementHours`, `installedUpdateEnforcementEnabled`, `installedUpdateEnforcementHours`, `updateViaUpdatesHost`, and [`releaseChannel`](/docs/third-party/claude-desktop/configuration#releasechannel), the lifecycle keys `relaunchEnforcementHours` and `configRecheckIntervalMinutes`, and the [network proxy keys](/docs/third-party/claude-desktop/network-proxy.md#pin-a-proxy-from-managed-configuration) `egressProxyUrl` and `egressProxyPacUrl`) are enforced from the managed source, but the rest of the configuration stays local and user-editable. Any of those keys that the profile leaves out runs its default. +* **A bootstrap response**: when a response is available, it is the effective configuration, apart from the app-behavior keys where a profile sets only those. A key that the server can set and your response omits is treated as unset, not inherited from the profile. The app ignores the keys labeled **MDM only** in the [configuration reference](/docs/third-party/claude-desktop/configuration.md) in a response, so set them in the profile or the local file. +* **Two macOS managed paths**: both are read, and where a key appears in both, the app uses the per-user value. +* **Two Windows policy hives**: the hives aren't merged. When machine policy is present under `HKLM\SOFTWARE\Policies\Claude`, the app ignores `HKCU\SOFTWARE\Policies\Claude` entirely. + +[Deploy the configuration](/docs/third-party/claude-desktop/mdm.md#4-deploy-the-configuration) has the exact rules for managed sources. For a bootstrap response, see also [Keys that require user consent](/docs/third-party/claude-desktop/bootstrap.md#keys-that-require-user-consent) and [Origin pinning](/docs/third-party/claude-desktop/bootstrap.md#origin-pinning). + +> [!NOTE] +> +> Claude Desktop on 3P reads the same managed-configuration sources as standard Claude Desktop but ignores keys scoped to standard deployments, except [`forceLoginOrgUUID`](/docs/cowork/hipaa-setup#what-each-claude-desktop-key-does), as described under [Keep a device on its managed profile](/docs/third-party/claude-desktop/admin-console.md#keep-a-device-on-its-managed-profile). + +### When a configuration change on a device takes effect + +Configuration takes effect **at launch**, so fully quit and reopen the app after any change. A running app also notices a changed managed configuration at its next re-check ([`configRecheckIntervalMinutes`](/docs/third-party/claude-desktop/configuration#configrecheckintervalminutes), 10 minutes by default) and, for most settings, prompts the user to restart and requires the restart after [`relaunchEnforcementHours`](/docs/third-party/claude-desktop/configuration#relaunchenforcementhours) (24 hours by default). The re-check of a managed configuration requires Claude Desktop 1.46388.1 or later. On those releases a changed bootstrap response follows the same re-check and restart window. Earlier releases re-check a response every 30 minutes. See [How it works](/docs/third-party/claude-desktop/bootstrap.md#how-it-works) and [Availability](/docs/third-party/claude-desktop/bootstrap.md#availability). + +### Value types in a profile or registry policy + +Write every value as a **string** in the OS preference store, even booleans and arrays. This rule applies to plist and registry sources. [The Linux file](#the-linux-configuration-file) and a [bootstrap response](/docs/third-party/claude-desktop/bootstrap.md#response-schema) take JSON values. Each key's entry in the [configuration reference](/docs/third-party/claude-desktop/configuration.md) gives the key's type and the values or fields it accepts. + +| Documented type | What to write | Example | +| - | - | - | +| string | Plain string | `vertex` | +| boolean | `"true"` or `"false"` (or `1` / `0`) | `"true"` | +| enum | One of the values the key's entry lists, as a plain string | `gateway` | +| integer | Decimal string | `"3600"` | +| number | Decimal string | `"0.85"` | +| string\[] (JSON) | JSON array **encoded as a string** | `["claude-sonnet-5","claude-opus-5"]` | +| enum\[] (JSON) | JSON array of values the key's entry lists, **encoded as a string** | `["userPrompts","toolDetails"]` | +| object: name → value (JSON) | JSON object mapping name to value, as a string | `{"X-Org-Id":"team1"}` | +| object (JSON) | JSON object with the fields the key's entry lists, as a string | see [`inferenceIdpOidc`](/docs/third-party/claude-desktop/configuration#inferenceidpoidc) | +| object\[] (JSON) | JSON array of objects, as a string | see [`managedMcpServers`](/docs/third-party/claude-desktop/configuration#managedmcpservers) | + +> [!NOTE] +> +> Array- and object-typed keys such as `inferenceModels`, `inferenceGatewayOidc`, `managedMcpServers`, `coworkEgressAllowedHosts`, and `otlpHeaders` are single keys whose value is a whole JSON document. The portable encoding is a JSON string, which works on every platform. In a `.mobileconfig` that is a single `` element containing `[...]` or `{...}`, and on Windows a `REG_SZ` value. A macOS profile may instead carry the value as a native `` or ``, which the app reads as the equivalent JSON. Separate keys with dotted names, such as `inferenceGatewayOidc.clientId`, are never read. + +On Windows, write registry values as `REG_SZ`, directly under the policy key rather than nested in a subkey (the app never reads subkeys). `REG_DWORD` is also accepted for boolean and integer keys and is read as its decimal value. Avoid `REG_EXPAND_SZ`: the app counts it toward machine policy being present but can't read its contents. The app can't see `REG_QWORD`, `REG_MULTI_SZ`, or `REG_BINARY` values at all. + +### The Linux configuration file + +The managed source on Linux is a single JSON file, `/etc/claude-desktop/managed-settings.json`, with keys at the top level exactly as named in the [reference](/docs/third-party/claude-desktop/configuration.md), with no wrapper object and no nesting: + +```json theme={null} +{ + "inferenceProvider": "gateway", + "inferenceGatewayBaseUrl": "https://gateway.example.com/v1", + "inferenceGatewayApiKey": "sk-example", + "inferenceCustomHeaders": { "X-Tenant-Id": "acme" } +} +``` + +Because the file is real JSON, array- and object-typed keys use native JSON values. String-encoded values are also accepted, so a profile generated for another platform can be reused. + +The file is only honored when it can't be edited by the user it configures: + +* `managed-settings.json` must be a regular file (not a symlink), owned by root, and not group- or world-writable. +* `/etc/claude-desktop` itself must be a directory (not a symlink), owned by root, and not group- or world-writable. + +A file that fails these checks is rejected: none of its settings are applied, the app treats the device as managed but unreadable, and local settings are also disabled until the file is fixed and the app is relaunched. The reason is logged to `main.log` in the app's logs directory, `~/.config/Claude/logs/` (or `~/.config/Claude-3p/logs/` once the app is running in 3P mode). Search the log for `managed-settings.json`. The same log names any key that fails schema validation. + +There is no per-user managed location on Linux. Per-user configuration goes through the in-app configuration window, which writes to the local `configLibrary` directory listed under [Where Claude Desktop reads configuration on a device](#where-claude-desktop-reads-configuration-on-a-device). + +## Configuration from the Enterprise Admin Console + +From the [Enterprise Admin Console](/docs/third-party/claude-desktop/admin-console.md), administrators edit the configuration in a browser, and no MDM profile or bootstrap server is needed. + +* **Where you edit it**: each field in the **Desktop 3P** section of **Organization settings** on [claude.ai](https://claude.ai) sets one of the documented configuration keys. A [permission policy](/docs/third-party/claude-desktop/admin-console.md#per-group-permission-policies) sets the settings that differ for one group of users. +* **How the app gets it**: the app contacts `api.anthropic.com` at every launch to check the user's sign-in and download the configuration. Until that download succeeds, the app can't connect to your inference provider. [Configuration kept on devices](/docs/third-party/claude-desktop/admin-console.md#configuration-kept-on-devices) covers what each device keeps of the last download and applies meanwhile. +* **What the console can't set**: among others, API keys, tokens, and secrets (apart from the client secret of a Google Desktop-app OAuth client), bootstrap keys and settings that only make sense on the device, keys that Anthropic fills in from your organization's settings, such as its name, and the Claude API as the inference provider. See [Limitations](/docs/third-party/claude-desktop/admin-console.md#limitations). +* **How you write values**: enter each value in its field, [import a JSON configuration](/docs/third-party/claude-desktop/admin-console.md#start-from-an-existing-configuration-file), or replace the whole configuration as one nested JSON document with the [Admin API](/docs/third-party/claude-desktop/admin-console.md#manage-the-configuration-with-the-admin-api). A value set in the console needs no approval from the user. +* **When a change takes effect**: at launch. A running app also re-checks every 10 minutes by default and, for most settings, asks the user to relaunch. The 10-minute default requires Claude Desktop 1.46388.1 or later. Earlier releases re-check about every 30 minutes. See [Configuration updates](/docs/third-party/claude-desktop/admin-console.md#configuration-updates). + +### What an MDM profile does alongside the Enterprise Admin Console + +* **`disableDeploymentModeChooser` set to `true`**: the device stays on the profile's configuration and ignores the console. A device that already moved returns to the profile at its next launch. +* **Only [app-behavior keys](/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence)**: the profile's values apply instead of the console's for all of those keys. Any of those keys that the profile leaves out runs its default. +* **Any other key**: the device uses the profile's configuration until its user moves the device to the console's configuration by signing in, which requires Claude Desktop 2.37337.0 or later. With `forceLoginOrgUUID` set to your organization's ID, the user can move the device only to your organization's configuration. After the move, the app still takes a few keys from the profile, for example the network proxy keys. Other settings come from the console, and the profile's values don't apply even where the console leaves a setting unset. + +[Which settings apply on a device with a managed profile](/docs/third-party/claude-desktop/admin-console.md#which-settings-apply-on-a-device-with-a-managed-profile) lists the keys that the app takes from the profile, and [Keep a device on its managed profile](/docs/third-party/claude-desktop/admin-console.md#keep-a-device-on-its-managed-profile) covers the keys that prevent or limit the move. + +## Configuration on a self-hosted install + +On a self-hosted install, sessions run on a session host that your organization operates and not on the person's device. Each key's label in the reference says which place in the following table counts for it. + +| Place | Label of its keys in the reference | Who acts on the key | +| - | - | - | +| The document your session host reads | **Server side** | The session host. It applies the key itself, or passes it on to Claude Desktop, which applies it in its own windows or on the person's device. | +| Claude Desktop's own configuration on the device: an MDM profile, the local file, or a bootstrap server that configuration names | **MDM profile** | Claude Desktop, by the same rules as [configuration on the device](#which-configuration-source-applies-on-a-device). The session host ignores the key. | +| The session host's own configuration | **Not supported**, for the matching keys | Whoever runs the host sets the host's route to the model, and names your telemetry collector's address, protocol, and headers in the host's own configuration. | + +An MDM profile that sets only [app-behavior keys](/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence) decides all of those keys itself, whatever their label. Outside that case, nothing acts on a key labeled **Not supported**, wherever you set it. + +The label is what the current Claude Desktop release declares. On that release, a session host acts on a **Server side** key only from the host version that reads it. Until then, unless an MDM profile sets only app-behavior keys, nothing applies the key, and Claude Desktop doesn't fall back to a value set on the device. An earlier Claude Desktop release can still apply a value set on the device, so keep a restriction in the MDM profile as well until every device runs the current release. + +Each key's entry in the reference gives its label and a one-line reason. The [published schemas](/docs/third-party/claude-desktop/bootstrap.md#response-schema) carry the self-hosted word (`server`, `reported`, `client`, or `none`) and its reason in `x-selfHosted` for each key they list. The [legend for the self-hosted labels](/docs/third-party/claude-desktop/configuration.md#self-hosted-column) defines the labels and maps each word to its label. + +### What an MDM profile does on a self-hosted install + +The MDM profile usually names the session host, and carries the keys labeled **MDM profile**. Each of those keys is about the person's device, as its reason in the reference says. For example: + +* **Sign-in to the session host**: on a self-hosted install [`inferenceCredentialKind`](/docs/third-party/claude-desktop/configuration#inferencecredentialkind) names the device's sign-in to the host, never the host's model credential, and [`inferenceIdpOidc`](/docs/third-party/claude-desktop/configuration#inferenceidpoidc) configures the sign-in that the device reuses for the host. +* **The device's network proxy**: [`egressProxyUrl`](/docs/third-party/claude-desktop/configuration#egressproxyurl) and [`egressProxyPacUrl`](/docs/third-party/claude-desktop/configuration#egressproxypacurl). +* **Telemetry and updates**: [`disableEssentialTelemetry`](/docs/third-party/claude-desktop/configuration#disableessentialtelemetry) and [`disableAutoUpdates`](/docs/third-party/claude-desktop/configuration#disableautoupdates). + +Write each value in the profile as [Value types in a profile or registry policy](#value-types-in-a-profile-or-registry-policy) describes. + +### When a change takes effect on a self-hosted install + +* **A key in the session host's document**: the host refreshes its own copy at least every [`configRecheckIntervalMinutes`](/docs/third-party/claude-desktop/configuration#configrecheckintervalminutes) (10 minutes by default) and tells Claude Desktop how often to ask it again. +* **A key on the device**: as on any device. The re-check interval and the restart window are themselves **Server side** keys, so the session host's document sets them, unless an MDM profile sets only app-behavior keys. See [When a configuration change on a device takes effect](#when-a-configuration-change-on-a-device-takes-effect). + +A value that the session host delivers for a field labeled **Consent required** applies after the user approves it. Where machine-scoped device management set the host's address, the value applies without a prompt. [`trustBootstrapDelivery`](/docs/third-party/claude-desktop/configuration#trustbootstrapdelivery) covers what a bootstrap server delivers, not what a session host delivers. diff --git a/content/claude/third-party/claude-desktop/configuration.md b/content/claude/third-party/claude-desktop/configuration.md index 44b21f2807..ccfed709e3 100644 --- a/content/claude/third-party/claude-desktop/configuration.md +++ b/content/claude/third-party/claude-desktop/configuration.md @@ -6,120 +6,246 @@ > Every managed-configuration key Claude Desktop on 3P supports, what it controls, and recommended security profiles -> [!TIP] -> -> Most settings on this page are easier to configure in the [in-app configuration window](/docs/third-party/claude-desktop/in-app-configuration.md). Use this reference when you're scripting an MDM policy or bootstrap response by hand. +| Key | Name in the app | Category | Works with (Unless a label in its entry says otherwise, a key can be set in an MDM profile or the local configuration file, or returned from a bootstrap server. A badge marks another kind of deployment that the key also works with.) | +| - | - | - | - | +| [`inferenceProvider`](#inferenceprovider) | Inference provider | Connection | Admin Console | +| [`inferenceCredentialKind`](#inferencecredentialkind) | Credential kind | Connection | Self-hosted Admin Console | +| [`inferenceSessionLifetimeSec`](#inferencesessionlifetimesec) | Sign-in session lifetime | Connection | Admin Console | +| [`userContentRendererUrl`](#usercontentrendererurl) | Artifact preview iframe origin | Connection | Admin Console | +| [`inferenceCustomHeaders`](#inferencecustomheaders) | Custom inference headers | Connection | Self-hosted Admin Console | +| [`inferenceCredentialHelper`](#inferencecredentialhelper) | Helper script | Connection | Self-hosted Admin Console | +| [`inferenceCredentialHelperWindows`](#inferencecredentialhelperwindows) | Helper script (Windows) | Connection | Self-hosted Admin Console | +| [`inferenceCredentialHelperArgs`](#inferencecredentialhelperargs) | Helper script arguments | Connection | Self-hosted Admin Console | +| [`inferenceCredentialHelperTtlSec`](#inferencecredentialhelperttlsec) | Helper script TTL | Connection | Self-hosted Admin Console | +| [`inferenceCredentialHelperTimeoutSec`](#inferencecredentialhelpertimeoutsec) | Credential helper timeout | Connection | Self-hosted Admin Console | +| [`inferenceCredentialHelperSilentRefreshEnabled`](#inferencecredentialhelpersilentrefreshenabled) | Re-run helper for silent refresh | Connection | Self-hosted Admin Console | +| [`egressProxyUrl`](#egressproxyurl) | Proxy server URL | Connection | Self-hosted | +| [`egressProxyPacUrl`](#egressproxypacurl) | Proxy auto-config (PAC) URL | Connection | Self-hosted | +| [`coworkVmIpv6Enabled`](#coworkvmipv6enabled) | Enable IPv6 in the workspace VM | Connection | Admin Console | +| [`inferenceGatewayBaseUrl`](#inferencegatewaybaseurl) | Gateway base URL | Connection | Admin Console | +| [`inferenceGatewayApiKey`](#inferencegatewayapikey) | Gateway API key | Connection | | +| [`inferenceGatewayAuthScheme`](#inferencegatewayauthscheme) | Gateway auth scheme | Connection | Admin Console | +| [`inferenceGatewayOidcAuthFlow`](#inferencegatewayoidcauthflow) | Gateway sign-in flow | Connection | Admin Console | +| [`inferenceGatewayOidc`](#inferencegatewayoidc) | Gateway SSO IdP (OIDC) | Connection | Admin Console | +| [`inferenceIdpAuthFlow`](#inferenceidpauthflow) | Identity provider sign-in flow | Connection | Self-hosted Admin Console | +| [`inferenceIdpOidc`](#inferenceidpoidc) | Identity provider (OIDC) | Connection | Self-hosted Admin Console | +| [`inferenceStreamIdleTimeoutSec`](#inferencestreamidletimeoutsec) | Stream idle timeout | Connection | Self-hosted Admin Console | +| [`inferenceAnthropicApiKey`](#inferenceanthropicapikey) | Claude API key | Connection | | +| [`inferenceBedrockRegion`](#inferencebedrockregion) | AWS region | Connection | Admin Console | +| [`inferenceBedrockBaseUrl`](#inferencebedrockbaseurl) | Bedrock base URL | Connection | Admin Console | +| [`inferenceBedrockServiceTier`](#inferencebedrockservicetier) | Bedrock service tier | Connection | Admin Console | +| [`inferenceBedrockBearerToken`](#inferencebedrockbearertoken) | AWS bearer token | Connection | | +| [`inferenceBedrockSsoStartUrl`](#inferencebedrockssostarturl) | AWS SSO start URL | Connection | Admin Console | +| [`inferenceBedrockSsoRegion`](#inferencebedrockssoregion) | AWS SSO region | Connection | Admin Console | +| [`inferenceBedrockSsoAccountId`](#inferencebedrockssoaccountid) | AWS SSO account ID | Connection | Admin Console | +| [`inferenceBedrockSsoRoleName`](#inferencebedrockssorolename) | AWS SSO role name | Connection | Admin Console | +| [`inferenceBedrockProfile`](#inferencebedrockprofile) | AWS profile name | Connection | Admin Console | +| [`inferenceBedrockAwsDir`](#inferencebedrockawsdir) | AWS config directory | Connection | Admin Console | +| [`inferenceBedrockAwsCliPath`](#inferencebedrockawsclipath) | AWS CLI path | Connection | Admin Console | +| [`inferenceVertexProjectId`](#inferencevertexprojectid) | GCP project ID | Connection | Admin Console | +| [`inferenceVertexRegion`](#inferencevertexregion) | GCP region | Connection | Admin Console | +| [`inferenceVertexBaseUrl`](#inferencevertexbaseurl) | Vertex AI base URL | Connection | Admin Console | +| [`inferenceVertexOAuthClientId`](#inferencevertexoauthclientid) | Vertex OAuth client ID | Connection | Admin Console | +| [`inferenceVertexOAuthClientSecret`](#inferencevertexoauthclientsecret) | Vertex OAuth client secret | Connection | Admin Console | +| [`inferenceVertexOAuthScopes`](#inferencevertexoauthscopes) | Vertex OAuth scopes | Connection | Admin Console | +| [`inferenceVertexOAuthLoginHint`](#inferencevertexoauthloginhint) | Vertex OAuth login hint | Connection | Admin Console | +| [`inferenceVertexWorkforceAudience`](#inferencevertexworkforceaudience) | Workforce Identity audience | Connection | Admin Console | +| [`inferenceVertexWorkforceUserProject`](#inferencevertexworkforceuserproject) | Workforce Identity billing project | Connection | Admin Console | +| [`inferenceVertexWorkforceAuthFlow`](#inferencevertexworkforceauthflow) | Workforce Identity sign-in flow | Connection | Admin Console | +| [`inferenceVertexWorkforceOidc`](#inferencevertexworkforceoidc) | Workforce Identity IdP (OIDC) | Connection | Admin Console | +| [`inferenceVertexCredentialsFile`](#inferencevertexcredentialsfile) | GCP credentials file path | Connection | Admin Console | +| [`inferenceFoundryResource`](#inferencefoundryresource) | Azure AI Foundry resource name | Connection | Admin Console | +| [`inferenceFoundryBaseUrl`](#inferencefoundrybaseurl) | Azure AI Foundry base URL | Connection | Admin Console | +| [`inferenceFoundryApiKey`](#inferencefoundryapikey) | Azure AI Foundry API key | Connection | | +| [`inferenceFoundryTenantId`](#inferencefoundrytenantid) | Entra ID tenant ID | Connection | Admin Console | +| [`inferenceFoundryClientId`](#inferencefoundryclientid) | Entra ID client ID | Connection | Admin Console | +| [`inferenceFoundryAuthFlow`](#inferencefoundryauthflow) | Entra ID sign-in flow | Connection | Admin Console | +| [`modelDiscoveryEnabled`](#modeldiscoveryenabled) | Model discovery | Connection | Admin Console | +| [`modelPrefer1mContext`](#modelprefer1mcontext) | Use 1M wherever it’s available | Connection | Self-hosted Admin Console | +| [`inferenceModels`](#inferencemodels) | Model list | Connection | Self-hosted Admin Console | +| [`defaultModelEffort`](#defaultmodeleffort) | Default model effort | Connection | Self-hosted Admin Console | +| [`alwaysStartWithDefaultModel`](#alwaysstartwithdefaultmodel) | Always start with the default model | Connection | Self-hosted Admin Console | +| [`inferenceModelPricingEnabled`](#inferencemodelpricingenabled) | Show estimated cost | Connection | Self-hosted Admin Console | +| [`inferenceModelPricingMultiplier`](#inferencemodelpricingmultiplier) | Price multiplier | Connection | Self-hosted Admin Console | +| [`inferenceModelPricing`](#inferencemodelpricing) | Model pricing | Connection | Self-hosted Admin Console | +| [`modelCatalogEnabled`](#modelcatalogenabled) | Model catalog metadata | Connection | Self-hosted | +| [`modelCatalogUrl`](#modelcatalogurl) | Model catalog URL | Connection | Self-hosted | +| [`coworkTabEnabled`](#coworktabenabled) | Allow Cowork | Capabilities | Admin Console | +| [`isClaudeCodeForDesktopEnabled`](#isclaudecodefordesktopenabled) | Allow Code | Capabilities | Self-hosted Admin Console | +| [`sshHostAllowlist`](#sshhostallowlist) | SSH host allowlist | Capabilities | Admin Console | +| [`sshClientPath`](#sshclientpath) | SSH client program | Capabilities | Admin Console | +| [`sshTransport`](#sshtransport) | SSH connection engine | Capabilities | Admin Console | +| [`chatTabEnabled`](#chattabenabled) | Allow Chat | Capabilities | Admin Console | +| [`desktopHome`](#desktophome) | Desktop home | Capabilities | Self-hosted Admin Console | +| [`chatAdvancedFileAnalysisEnabled`](#chatadvancedfileanalysisenabled) | Advanced file analysis | Capabilities | Admin Console | +| [`coworkEgressAllowedHosts`](#coworkegressallowedhosts) | Allowed egress hosts | Capabilities | Self-hosted Admin Console | +| [`allowedWorkspaceFolders`](#allowedworkspacefolders) | Allowed workspace folders | Capabilities | Self-hosted Admin Console | +| [`blockReadsOutsideWorkingDirectories`](#blockreadsoutsideworkingdirectories) | Block reads outside working directories | Capabilities | Self-hosted Admin Console | +| [`autoModeEnabled`](#automodeenabled) | Allow Auto mode | Capabilities | Self-hosted Admin Console | +| [`disableBypassPermissionsMode`](#disablebypasspermissionsmode) | Disable bypass permissions mode | Capabilities | Admin Console | +| [`disableBundledSkills`](#disablebundledskills) | Disable bundled skills and workflows | Capabilities | Self-hosted Admin Console | +| [`skillCreationEnabled`](#skillcreationenabled) | Allow user-created skills | Capabilities | Self-hosted Admin Console | +| [`userPluginMarketplacesEnabled`](#userpluginmarketplacesenabled) | Allow user-added plugin marketplaces | Capabilities | Self-hosted Admin Console | +| [`userPluginUploadsEnabled`](#userpluginuploadsenabled) | Allow user-added plugins | Capabilities | Self-hosted Admin Console | +| [`scheduledTasksEnabled`](#scheduledtasksenabled) | Allow scheduled tasks | Capabilities | Self-hosted Admin Console | +| [`keepAwakeEnabled`](#keepawakeenabled) | Allow keep awake | Capabilities | Self-hosted Admin Console | +| [`developerModeEnabled`](#developermodeenabled) | Allow Developer Mode | Capabilities | Self-hosted Admin Console | +| [`quickEntryDefaultShortcut`](#quickentrydefaultshortcut) | Default Quick Entry shortcut | Capabilities | Self-hosted Admin Console | +| [`quickEntryScreenshotsEnabled`](#quickentryscreenshotsenabled) | Allow screenshots of the screen and other apps | Capabilities | Self-hosted Admin Console | +| [`quickEntryFileSharingEnabled`](#quickentryfilesharingenabled) | Allow sharing files open in other apps | Capabilities | Self-hosted Admin Console | +| [`skipWebFetchPreflight`](#skipwebfetchpreflight) | Skip WebFetch domain check | Capabilities | Admin Console | +| [`builtinToolPolicy`](#builtintoolpolicy) | Built-in tool policy | Capabilities | Self-hosted Admin Console | +| [`disabledBuiltinTools`](#disabledbuiltintools) | Disabled built-in tools | Capabilities | Self-hosted Admin Console | +| [`toolSearchEnabled`](#toolsearchenabled) | Enable tool search | Capabilities | Self-hosted Admin Console | +| [`organizationInstructions`](#organizationinstructions) | Organization instructions | Capabilities | Self-hosted Admin Console | +| [`requireCoworkFullVmSandbox`](#requirecoworkfullvmsandbox) | Require full VM sandbox | Capabilities | | +| [`disableDeploymentModeChooser`](#disabledeploymentmodechooser) | Disable Claude.ai sign-in | Capabilities | Self-hosted | +| [`disableDeepLinkRegistration`](#disabledeeplinkregistration) | Disable claude:// deep-link handling | Capabilities | Self-hosted Admin Console | +| [`builtinBrowserEnabled`](#builtinbrowserenabled) | Allow the built-in browser | Capabilities | Admin Console | +| [`builtinBrowserDefaultDomainPolicy`](#builtinbrowserdefaultdomainpolicy) | Default site policy in the built-in browser | Capabilities | Admin Console | +| [`builtinBrowserAllowedDomains`](#builtinbrowseralloweddomains) | Allowed sites in the built-in browser | Capabilities | Admin Console | +| [`builtinBrowserBlockedDomains`](#builtinbrowserblockeddomains) | Blocked sites in the built-in browser | Capabilities | Admin Console | +| [`claudeAiImport`](#claudeaiimport) | Claude.ai data import | Capabilities | Self-hosted Admin Console | +| [`managedMcpServers`](#managedmcpservers) | Managed MCP servers | Connectors | Self-hosted Admin Console | +| [`mcpPersistentAlwaysAllowEnabled`](#mcppersistentalwaysallowenabled) | Allow persistent tool approvals | Connectors | Self-hosted Admin Console | +| [`mcpScheduledTaskApprovalLifetimeDays`](#mcpscheduledtaskapprovallifetimedays) | Scheduled-task tool approval lifetime | Connectors | Self-hosted Admin Console | +| [`isLocalDevMcpEnabled`](#islocaldevmcpenabled) | Allow local MCP servers | Connectors | Self-hosted Admin Console | +| [`allowedPluginMcpServers`](#allowedpluginmcpservers) | Allowed plugin MCP servers | Connectors | Self-hosted Admin Console | +| [`deniedPluginMcpServers`](#deniedpluginmcpservers) | Blocked plugin MCP servers | Connectors | Self-hosted Admin Console | +| [`mcpToolTimeoutSec`](#mcptooltimeoutsec) | MCP tool call timeout | Connectors | Self-hosted Admin Console | +| [`microsoftAuthBroker`](#microsoftauthbroker) | Microsoft 365 native sign-in broker | Connectors | Admin Console | +| [`microsoftAuthDefaultAccount`](#microsoftauthdefaultaccount) | Microsoft 365 sign-in with the Windows account | Connectors | Admin Console | +| [`isDesktopExtensionEnabled`](#isdesktopextensionenabled) | Allow desktop extensions | Connectors | Admin Console | +| [`isDesktopExtensionSignatureRequired`](#isdesktopextensionsignaturerequired) | Require signed extensions | Connectors | Admin Console | +| [`deploymentOrganizationUuid`](#deploymentorganizationuuid) | Organization UUID | Telemetry & updates | Self-hosted Admin Console | +| [`disableEssentialTelemetry`](#disableessentialtelemetry) | Block essential telemetry | Telemetry & updates | Self-hosted Admin Console | +| [`disableNonessentialTelemetry`](#disablenonessentialtelemetry) | Block nonessential telemetry | Telemetry & updates | Self-hosted Admin Console | +| [`disableNonessentialServices`](#disablenonessentialservices) | Block nonessential services | Telemetry & updates | Self-hosted Admin Console | +| [`otlpEndpoint`](#otlpendpoint) | OTLP endpoint | Telemetry & updates | Admin Console | +| [`otlpProtocol`](#otlpprotocol) | OTLP protocol | Telemetry & updates | Admin Console | +| [`otlpHeaders`](#otlpheaders) | OTLP headers | Telemetry & updates | Admin Console | +| [`otlpAuthMode`](#otlpauthmode) | Collector authentication | Telemetry & updates | Admin Console | +| [`otlpHeadersHelper`](#otlpheadershelper) | OTLP headers helper script | Telemetry & updates | Admin Console | +| [`otlpResourceAttributes`](#otlpresourceattributes) | Resource attributes | Telemetry & updates | Self-hosted Admin Console | +| [`otlpDesktopLogLevel`](#otlpdesktoploglevel) | Desktop telemetry export level | Telemetry & updates | Self-hosted Admin Console | +| [`otlpContentCapture`](#otlpcontentcapture) | Content capture | Telemetry & updates | Self-hosted Admin Console | +| [`otlpTracesEnabled`](#otlptracesenabled) | Export traces | Telemetry & updates | Self-hosted Admin Console | +| [`otlpAttrMaxChars`](#otlpattrmaxchars) | Telemetry attribute length limit | Telemetry & updates | Self-hosted Admin Console | +| [`disableAutoUpdates`](#disableautoupdates) | Block auto-updates | Telemetry & updates | Self-hosted Admin Console | +| [`installedUpdateEnforcementEnabled`](#installedupdateenforcementenabled) | Restart to apply installed updates | Telemetry & updates | Admin Console | +| [`installedUpdateEnforcementHours`](#installedupdateenforcementhours) | Installed-update enforcement window | Telemetry & updates | Admin Console | +| [`autoUpdaterEnforcementHours`](#autoupdaterenforcementhours) | Auto-update enforcement window | Telemetry & updates | Self-hosted Admin Console | +| [`updateViaUpdatesHost`](#updateviaupdateshost) | Check for updates on releases.claude.com | Telemetry & updates | Admin Console | +| [`releaseChannel`](#releasechannel) | Release channel | Telemetry & updates | Self-hosted Admin Console | +| [`relaunchEnforcementHours`](#relaunchenforcementhours) | Configuration relaunch window | Telemetry & updates | Self-hosted Admin Console | +| [`configRecheckIntervalMinutes`](#configrecheckintervalminutes) | Configuration re-check interval | Telemetry & updates | Self-hosted Admin Console | +| [`disableLocalConfigCache`](#disablelocalconfigcache) | Keep only your organization ID and restrictions on disk | Telemetry & updates | Admin Console | +| [`chatSessionRetentionDays`](#chatsessionretentiondays) | Chat retention period | Limits | Admin Console | +| [`coworkSessionRetentionDays`](#coworksessionretentiondays) | Cowork retention period | Limits | Self-hosted Admin Console | +| [`codeSessionRetentionDays`](#codesessionretentiondays) | Code retention period | Limits | Self-hosted Admin Console | +| [`sessionRetentionHold`](#sessionretentionhold) | Suspend session deletion | Limits | Self-hosted Admin Console | +| [`inferenceMaxTokensPerWindow`](#inferencemaxtokensperwindow) | Max tokens per window | Limits | Self-hosted Admin Console | +| [`inferenceTokenWindowHours`](#inferencetokenwindowhours) | Token cap window | Limits | Self-hosted Admin Console | +| [`endUserAttribution`](#enduserattribution) | End-user attribution | Appearance | Self-hosted Admin Console | +| [`deploymentDisplayName`](#deploymentdisplayname) | Deployment display name | Appearance | Self-hosted Admin Console | +| [`deploymentDisplaySubtitle`](#deploymentdisplaysubtitle) | Deployment display subtitle | Appearance | Self-hosted | +| [`disableConfigDeprecationWarnings`](#disableconfigdeprecationwarnings) | Hide configuration deprecation warnings | Appearance | Self-hosted Admin Console | +| [`banner`](#banner) | Organization banner | Appearance | Self-hosted Admin Console | +| [`disableFeatureDiscovery`](#disablefeaturediscovery) | Hide feature announcements | Appearance | Self-hosted Admin Console | +| [`allowedPluginMarketplaces`](#allowedpluginmarketplaces) | Plugin marketplaces | Plugins | Self-hosted Admin Console | +| [`orgPluginSettings`](#orgpluginsettings) | Organization plugin settings | Plugins | Self-hosted Admin Console | +| [`bootstrapEnabled`](#bootstrapenabled) | Use bootstrap config | Source | Self-hosted | +| [`bootstrapUrl`](#bootstrapurl) | Bootstrap config URL | Source | Self-hosted | +| [`bootstrapOidc`](#bootstrapoidc) | Bootstrap OIDC parameters | Source | Self-hosted | +| [`bootstrapHeaders`](#bootstrapheaders) | Bootstrap request headers | Source | Self-hosted | +| [`bootstrapHeadersHelper`](#bootstrapheadershelper) | Bootstrap headers helper script | Source | Self-hosted | +| [`trustBootstrapDelivery`](#trustbootstrapdelivery) | Trust bootstrap-delivered settings | Source | Self-hosted | -Claude Desktop on third-party (3P) is configured through OS-native managed preferences: a `.mobileconfig` profile on macOS, registry policy on Windows, or a root-owned JSON file on Linux (organizations managed from the [Enterprise Admin Console](/docs/third-party/claude-desktop/admin-console.md) can instead deliver these settings from **Organization settings** on claude.ai). This page documents every supported key. For the desktop release each key first appeared in, see the [configuration changelog](/docs/third-party/claude-desktop/configuration-changelog.md). +## Connection -The easiest way to author a configuration is the in-app configuration window (**Developer → Configure Third-Party Inference…**), which validates values, shows per-provider requirements, and exports directly to `.mobileconfig` or `.reg`. Use this reference when you need to author policy by hand, audit an existing profile, or understand exactly what a key does. +### `inferenceProvider` -## How keys are read +enumSince 1.2581.0 -| Platform | Managed (MDM) location | Local (user) location | -| - | - | - | -| macOS | `/Library/Managed Preferences//com.anthropic.claudefordesktop.plist` | `~/Library/Application Support/Claude-3p/configLibrary/` | -| Windows | `HKLM\SOFTWARE\Policies\Claude` (machine), `HKCU\SOFTWARE\Policies\Claude` (user) | `%LOCALAPPDATA%\Claude-3p\configLibrary\` | -| Linux | `/etc/claude-desktop/managed-settings.json` | `~/.config/Claude-3p/configLibrary/` | +**Inference provider.** Selects the inference backend. Setting this key activates third-party mode. -The local location is a directory: `_meta.json` records which saved configuration is applied, and each configuration is a `.json` file alongside it. The in-app configuration window writes here. +One of: `gateway`, `anthropic`, `bedrock`, `mantle`, `vertex`, `foundry` -When a managed source is present, locally written values are ignored. The exception is a managed source that sets only [app-behavior keys](/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence) (the update keys `disableAutoUpdates`, `autoUpdaterEnforcementHours`, `updateViaUpdatesHost`, and [`releaseChannel`](#releasechannel), the lifecycle keys `relaunchEnforcementHours` and `configRecheckIntervalMinutes`, or the [network proxy keys](/docs/third-party/claude-desktop/network-proxy.md#pin-a-proxy-from-managed-configuration)): those keys are enforced from the managed source, but the rest of the configuration stays local and user-editable. Configuration takes effect **at launch**, so fully quit and reopen the app after any change. From version 1.46388.1 a running app also notices a changed managed configuration at its next re-check ([`configRecheckIntervalMinutes`](#configrecheckintervalminutes), 10 minutes by default) and, for most settings, prompts the user to restart and requires the restart after [`relaunchEnforcementHours`](#relaunchenforcementhours) (24 hours by default). On Windows, the two policy hives are not merged: when machine policy is present under `HKLM\SOFTWARE\Policies\Claude`, the app ignores `HKCU\SOFTWARE\Policies\Claude` entirely; [Deploy the configuration](/docs/third-party/claude-desktop/mdm.md#4-deploy-the-configuration) has the exact rule. See [Deploy with MDM](/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence) for the full precedence rules. +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. -> [!NOTE] +> **More detail** > -> Claude Desktop on 3P reads the same managed-configuration sources as standard Claude Desktop but ignores keys scoped to standard deployments, except [`forceLoginOrgUUID`](/docs/cowork/hipaa-setup#what-each-claude-desktop-key-does), as described under [Keep a device on its managed profile](/docs/third-party/claude-desktop/admin-console.md#keep-a-device-on-its-managed-profile). +> Setting this key asks for 3P mode. The app opens in 3P mode unless the user chose to sign in to Claude.ai at the login screen, a choice `disableDeploymentModeChooser` removes. In 3P mode, if the selected provider's required credential keys are missing or invalid, the app shows a configuration error. A value the app cannot read (a misspelt, wrongly cased or unknown provider, or a value of the wrong type) still counts as set when machine-wide device management sent it: a macOS configuration profile, Windows policy under `HKLM`, or the root-owned policy file on Linux. The app then asks for 3P mode and, in 3P mode, shows a configuration error whose details name this key. An unreadable `bootstrapUrl` from the same sources counts the same way unless `bootstrapEnabled` is `false`. An unreadable value does not count where the user can write it: the local configuration file, or Windows policy under `HKCU`. Neither does an empty value (a value of only spaces is unreadable, not empty), or a Windows value of type `REG_BINARY`, `REG_MULTI_SZ` or `REG_QWORD`. Each of those reads as not set. When this key is not set, the app launches in standard mode unless another setting asks for 3P mode, such as a `bootstrapUrl` that `bootstrapEnabled` has not turned off. Keys for providers other than the selected one are ignored. Each provider's required keys are documented on its dedicated page under Inference providers. -### Value types +*** -Write every value as a **string** in the OS preference store, even booleans and arrays. +### `inferenceCredentialKind` -| Documented type | What to write | Example | -| - | - | - | -| string | Plain string | `vertex` | -| boolean | `"true"` or `"false"` (or `1` / `0`) | `"true"` | -| integer | Decimal string | `"3600"` | -| string\[] (JSON) | JSON array **encoded as a string** | `["claude-sonnet-5","claude-opus-5"]` | -| object (JSON) | JSON object mapping name to value, as a string | `{"X-Org-Id":"team1"}` | -| object\[] (JSON) | JSON array of objects, as a string | see [`managedMcpServers`](#managedmcpservers) | +enumSince 1.8555.0 -> [!NOTE] -> -> Array- and object-typed keys such as `inferenceModels`, `inferenceGatewayOidc`, `managedMcpServers`, `coworkEgressAllowedHosts`, and `otlpHeaders` are single keys whose value is a whole JSON document. The portable encoding is a JSON string, which works on every platform. In a `.mobileconfig` that is a single `` element containing `[...]` or `{...}`, and on Windows a `REG_SZ` value. A macOS profile may instead carry the value as a native `` or ``, which the app reads as the equivalent JSON. Separate keys with dotted names, such as `inferenceGatewayOidc.clientId`, are never read. +**Credential kind.** Selects the credential source. When set, only that source is used (no fallback). -On Windows, write registry values as `REG_SZ`, directly under the policy key rather than nested in a subkey (the app never reads subkeys). `REG_DWORD` is also accepted for boolean and integer keys and is read as its decimal value. Avoid `REG_EXPAND_SZ`: the app counts it toward machine policy being present but cannot read its contents. The app cannot see `REG_QWORD`, `REG_MULTI_SZ`, or `REG_BINARY` values at all. +One of: `static`, `helper-script`, `interactive`, `vendor-profile`, `workforce`, `external-idp` -### Linux +> [!WARNING] +> +> **Deprecated** +> +> * `inferenceCredentialKind: "interactive" together with inferenceGatewayOidc (gateway)`; use "external-idp" once every desktop in the fleet is on a release that reads it. The original spelling will keep working ("interactive" with inferenceGatewayOidc is read as "external-idp"); no end date has been set. -The managed source on Linux is a single JSON file, `/etc/claude-desktop/managed-settings.json`, with keys at the top level exactly as named in the [reference](#reference) — no wrapper object, no nesting: +[Self-hosted install](#self-hosted-column): MDM profile. In self-hosted mode it names the device's sign-in to the host, never the host's model credential. -```json theme={null} -{ - "inferenceProvider": "gateway", - "inferenceGatewayBaseUrl": "https://gateway.example.com/v1", - "inferenceGatewayApiKey": "sk-example", - "inferenceCustomHeaders": { "X-Tenant-Id": "acme" } -} -``` +*** -Because the file is real JSON, array- and object-typed keys use native JSON values — the string-encoding rule above applies to plist and registry sources only. (String-encoded values are also accepted, so a profile generated for another platform can be reused.) +### `inferenceSessionLifetimeSec` -The file is only honored when it can't be edited by the user it configures: +integerRange: 1 or moreSince 1.14271.0 -* `managed-settings.json` must be a regular file (not a symlink), owned by root, and not group- or world-writable. -* `/etc/claude-desktop` itself must be a directory (not a symlink), owned by root, and not group- or world-writable. +**Sign-in session lifetime.** How long a sign-in stays valid under your IdP’s session policy. Shows a re-authenticate banner before it expires. -A file that fails these checks is rejected: none of its settings are applied, the app treats the device as managed but unreadable, and local settings are also disabled until the file is fixed and the app is relaunched. The reason is logged to `main.log` in the app's logs directory — `~/.config/Claude/logs/` (or `~/.config/Claude-3p/logs/` once the app is running in 3P mode); search for `managed-settings.json`. The same log names any key that fails schema validation. +[Self-hosted install](#self-hosted-column): Not supported. The session host is the one source for how long a sign-in to it lasts, and it reads no figure from this key. -There is no per-user managed location on Linux; per-user configuration goes through the in-app configuration window, which writes to the local `configLibrary` directory above. +*** -## Reference +### `userContentRendererUrl` -The reference below is generated from the configuration schema and grouped to match the sidebar of the in-app configuration window. The **Availability** column shows whether a key can be set in an MDM profile, returned from a [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md), or both. Its second line is the Claude Desktop version that added the key. For how the keys under **Models** work together, see [Models and effort levels](/docs/third-party/claude-desktop/models.md). For how `desktopHome` overrides the other keys under **Chat surface** and **Cowork surface**, see [Unified Claude](/docs/third-party/claude-desktop/unified-claude.md#how-unified-claude-interacts-with-chat-and-cowork-settings). For which key under **Session retention** covers a conversation started from the home screen, see [Automatic deletion of idle sessions](/docs/third-party/claude-desktop/data-storage.md#automatic-deletion-of-idle-sessions). +stringSince 1.24012.0 -### The Self-hosted install column +**Artifact preview iframe origin.** HTTPS origin of the user-content-renderer deployment used for artifact and file previews. Defaults to the commercial host when unset. -The self-hosted word matters only on a self-hosted install, where sessions run on a session host that your organization operates and not on the person's computer. The word says who acts on the key on such an install, and so where to set it; the text beside it gives the reason. On any other install, ignore it. +[Self-hosted install](#self-hosted-column): Not supported. Names where Desktop loads its previews from, and no session host passes the setting on to Desktop yet. -* `server`: in the document your session host reads; the host applies it itself. -* `reported`: in the same document; the host passes it on to Claude Desktop, which applies it in its own windows or on the person's computer. -* `client`: in Claude Desktop's own configuration on the computer (device management, the local file, or a bootstrap server that configuration names); the session host ignores it. -* `none`: nothing acts on it on a self-hosted install, whichever of those places sets it. +*** -One exception to the four words: where a device-management profile sets only app-behavior keys, that profile alone decides all of them (of the keys here: `disableAutoUpdates`, `installedUpdateEnforcementEnabled`, `installedUpdateEnforcementHours`, `autoUpdaterEnforcementHours`, `updateViaUpdatesHost`, `releaseChannel`, `relaunchEnforcementHours`, `configRecheckIntervalMinutes`, `egressProxyUrl`, `egressProxyPacUrl`). +### `inferenceCustomHeaders` -The word is what this Claude Desktop release declares. A session host acts on a `server` or `reported` key only from the host version that reads it; until then nothing applies the key on a self-hosted install, and Claude Desktop does not fall back to a value set on the computer. +object: name → valueSince 1.8089.0 -## Connection +**Custom inference headers.** Extra headers on every inference request — routing and tenant headers only (org IDs, Bedrock Guardrails). No credentials; use the credential helper for tokens. -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Inference provider `inferenceProvider` | `enum` | MDM + Bootstrap Added in 1.2581.0 | — | Selects the inference backend. Setting this key activates third-party mode. One of: `gateway`, `anthropic`, `bedrock`, `mantle`, `vertex`, `foundry`. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Credential kind `inferenceCredentialKind` | `enum` | MDM + Bootstrap Added in 1.8555.0 | — | Selects the credential source. When set, only that source is used (no fallback). One of: `static`, `helper-script`, `interactive`, `vendor-profile`, `workforce`, `external-idp`. Deprecated: `inferenceCredentialKind: "oauth" (Vertex AI)` (accepted until October 7, 2026); use "interactive" — the same Google sign-in under its new name (in hosted or nested documents, switch once every desktop is on a release that knows the Vertex "interactive" kind). If it is still present after that, "oauth" will no longer be a Vertex AI credential kind: the value will be reported as invalid and ignored — the device will then derive the kind from the credential fields present (Google sign-in when an OAuth client id is set), and the hosted editor will refuse to save the configuration until the kind is changed. Deprecated: `inferenceCredentialKind: "interactive" together with inferenceVertexWorkforceAudience (Vertex AI)` (accepted until October 7, 2026); use "workforce" — or remove inferenceVertexWorkforceAudience if Google sign-in ("interactive") is what is meant. If it is still present after that, the audience will no longer imply Workforce Identity: the kind will stay "interactive" (Google sign-in), which needs inferenceVertexOAuthClientId — without it the configuration will be reported as incomplete and inference will not start. Deprecated: `inferenceCredentialKind: "interactive" together with inferenceGatewayOidc (gateway)`; use "external-idp" once every desktop in the fleet is on a release that reads it. The original spelling will keep working ("interactive" with inferenceGatewayOidc is read as "external-idp"); no end date has been set. | [`client`](#self-hosted-column) In self-hosted mode it names the device's sign-in to the host, never the host's model credential | -| Sign-in session lifetime `inferenceSessionLifetimeSec` | `integer` | MDM + Bootstrap Added in 1.14271.0 | — | How long a sign-in stays valid under your IdP’s session policy. Shows a re-authenticate banner before it expires. | [`none`](#self-hosted-column) The session host is the one source for how long a sign-in to it lasts, and it reads no figure from this key | -| Artifact preview iframe origin `userContentRendererUrl` | `string` | MDM + Bootstrap Added in 1.24012.0 | — | HTTPS origin of the user-content-renderer deployment used for artifact and file previews. Defaults to the commercial host when unset. | [`none`](#self-hosted-column) Names where Desktop loads its previews from, and no session host passes the setting on to Desktop yet | -| Custom inference headers `inferenceCustomHeaders` | `object` | MDM + Bootstrap Added in 1.8089.0 | — | Extra headers on every inference request — routing and tenant headers only (org IDs, Bedrock Guardrails). No credentials; use the credential helper for tokens. | [`server`](#self-hosted-column) The host makes the model calls, so it adds the admin's headers to them | -| Helper script `inferenceCredentialHelper` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Absolute path to an executable that prints the credential, optionally with per-request headers. | [`client`](#self-hosted-column) Names a program on the person's computer, reused for the device's sign-in to the host | -| Helper script (Windows) `inferenceCredentialHelperWindows` | `string` | MDM + Bootstrap Added in 2.2553.0 | — | Absolute path of the helper executable on Windows devices, used there instead of Helper script. Leave unset to use Helper script on every operating system. | [`client`](#self-hosted-column) Names a Windows program on the person's computer, reused for the device's sign-in to the host | -| Helper script arguments `inferenceCredentialHelperArgs` | `string[]` | MDM + Bootstrap Added in 2.110.0 | — | Arguments passed to the helper script, one per entry, in order. Leave unset to run it with none. | [`client`](#self-hosted-column) Gives arguments to a helper program on the person's computer, reused for the device's sign-in to the host | -| Helper script TTL `inferenceCredentialHelperTtlSec` | `integer` | MDM + Bootstrap Added in 1.2581.0 | `3600` | Helper output is cached for this many seconds; once it expires the helper re-runs without a relaunch (before the next turn when set above 120). Defaults to `3600`. | [`client`](#self-hosted-column) Sets how long the desktop app caches its helper's output, reused for the device's sign-in to the host | -| Credential helper timeout `inferenceCredentialHelperTimeoutSec` | `integer` | MDM + Bootstrap Added in 1.8089.0 | `60` | Maximum wait for the helper executable to finish. Raise this if the helper opens a browser for interactive sign-in. Defaults to `60`. Range: 1–600. | [`client`](#self-hosted-column) Bounds a helper program on the person's computer, reused for the device's sign-in to the host | -| Re-run helper for silent refresh `inferenceCredentialHelperSilentRefreshEnabled` | `boolean` | MDM + Bootstrap Added in 1.10628.0 | `true` | On credential expiry, re-run the helper (CLAUDE\_HELPER\_CONTEXT=mid-session-refresh) to recover silently. Turn off if the helper can’t run non-interactively. Defaults to `true`. | [`client`](#self-hosted-column) Decides how the desktop app re-runs its helper on the person's computer, reused for sign-in to the host | -| Proxy server URL `egressProxyUrl` | `string` | MDM only Added in 1.44121.1 | — | Send the app’s and the agent’s traffic through this HTTP proxy instead of the operating system’s proxy settings. | [`client`](#self-hosted-column) Names the proxy for the person's computer, and a host's network belongs to its operator | -| Proxy auto-config (PAC) URL `egressProxyPacUrl` | `string` | MDM only Added in 1.44121.1 | — | URL of a PAC file that decides the proxy per request. Wins over the proxy server URL when both are set. | [`client`](#self-hosted-column) Describes the network of the person's computer, which Desktop applies to its own traffic | -| Enable IPv6 in the workspace VM `coworkVmIpv6Enabled` | `boolean` | MDM + Bootstrap Added in 1.52386.0 | — | Give the Cowork workspace VM an IPv6 address and route so the agent’s tools can reach IPv6-only hosts through the device. macOS and Windows; off by default. | [`none`](#self-hosted-column) Configures Cowork's local virtual machine, which a host session does not have | - -> **inferenceProvider details** -> -> Setting this key asks for 3P mode. The app opens in 3P mode unless the user chose to sign in to Claude.ai at the login screen, a choice `disableDeploymentModeChooser` removes. In 3P mode, if the selected provider's required credential keys are missing or invalid, the app shows a configuration error. A value the app cannot read (a misspelt, wrongly cased or unknown provider, or a value of the wrong type) still counts as set when machine-wide device management sent it: a macOS configuration profile, Windows policy under `HKLM`, or the root-owned policy file on Linux. The app then asks for 3P mode and, in 3P mode, shows a configuration error whose details name this key. An unreadable `bootstrapUrl` from the same sources counts the same way unless `bootstrapEnabled` is `false`. An unreadable value does not count where the user can write it: the local configuration file, or Windows policy under `HKCU`. Neither does an empty value (a value of only spaces is unreadable, not empty), or a Windows value of type `REG_BINARY`, `REG_MULTI_SZ` or `REG_QWORD`. Each of those reads as not set. When this key is not set, the app launches in standard mode unless another setting asks for 3P mode, such as a `bootstrapUrl` that `bootstrapEnabled` has not turned off. Keys for providers other than the selected one are ignored. Each provider's required keys are documented on its dedicated page under Inference providers. +[Self-hosted install](#self-hosted-column): Server side. The host makes the model calls, so it adds the admin's headers to them. -> **inferenceCustomHeaders details** +> **More detail** > > Sent on every inference and model-discovery request (joined into the CLI's `ANTHROPIC_CUSTOM_HEADERS`). > > Use this for fleet-wide, non-secret constants. **Do not put API keys, bearer tokens or other credentials here** — this map is stored and distributed as plain configuration. For tokens, and for per-user or per-session values, have the **credential helper script** emit JSON with a `headers` field; those are merged over these static entries (helper wins on conflict). -> **inferenceCredentialHelper details** +*** + +### `inferenceCredentialHelper` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**Helper script.** Absolute path to an executable that prints the credential, optionally with per-request headers. + +[Self-hosted install](#self-hosted-column): MDM profile. Names a program on the person's computer, reused for the device's sign-in to the host. + +> **More detail** > > Claude runs the executable with the entries of **Helper script arguments** as its arguments (none by default) and reads **stdout** (trimmed). Exit code must be `0`; any output on **stderr** is logged but ignored. **Stdout must contain only one of the formats below** (no banners, prompts, or log lines). > @@ -140,11 +266,39 @@ The word is what this Claude Desktop release declares. A session host acts on a > > If this field is set, static credential fields (API key, bearer token) are ignored. The helper always wins. -> **inferenceCredentialHelperWindows details** +*** + +### `inferenceCredentialHelperWindows` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 2.2553.0 + +**Helper script (Windows).** Absolute path of the helper executable on Windows devices, used there instead of Helper script. Leave unset to use Helper script on every operating system. + +[Self-hosted install](#self-hosted-column): MDM profile. Names a Windows program on the person's computer, reused for the device's sign-in to the host. + +> **More detail** > > When one configuration serves both Windows and macOS or Linux devices, set **Helper script** to the macOS/Linux path and this to the Windows path (`C:\...` or `C:/...`). Windows devices run this executable with the same arguments, timeout, TTL and environment as **Helper script**; macOS and Linux devices ignore it. An invalid value here stops the connection on Windows devices only. Desktop releases that predate this setting ignore it and run **Helper script** on every operating system. -> **inferenceCredentialHelperArgs details** +*** + +### `inferenceCredentialHelperArgs` + +string\[] + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 2.110.0 + +**Helper script arguments.** Arguments passed to the helper script, one per entry, in order. Leave unset to run it with none. + +[Self-hosted install](#self-hosted-column): MDM profile. Gives arguments to a helper program on the person's computer, reused for the device's sign-in to the host. + +> **More detail** > > Each entry reaches the executable as one argument, exactly as written: `["--environment", "production"]` runs `helper --environment production`. Use it to keep one installed script and let the configuration each user receives decide what it does (which environment, tenant or vault to read), instead of packaging a script per case. > @@ -152,7 +306,67 @@ The word is what this Claude Desktop release declares. A session host acts on a > > A changed list takes effect the way a changed path does. -> **egressProxyUrl details** +*** + +### `inferenceCredentialHelperTtlSec` + +integerDefault: 3600 + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Range: 1 or moreSince 1.2581.0 + +**Helper script TTL.** Helper output is cached for this many seconds; once it expires the helper re-runs without a relaunch (before the next turn when set above 120). + +[Self-hosted install](#self-hosted-column): MDM profile. Sets how long the desktop app caches its helper's output, reused for the device's sign-in to the host. + +*** + +### `inferenceCredentialHelperTimeoutSec` + +integerDefault: 60 + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Range: 1–600Since 1.8089.0 + +**Credential helper timeout.** Maximum wait for the helper executable to finish. Raise this if the helper opens a browser for interactive sign-in. + +[Self-hosted install](#self-hosted-column): MDM profile. Bounds a helper program on the person's computer, reused for the device's sign-in to the host. + +*** + +### `inferenceCredentialHelperSilentRefreshEnabled` + +booleanDefault: true + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.10628.0 + +**Re-run helper for silent refresh.** On credential expiry, re-run the helper (CLAUDE\_HELPER\_CONTEXT=mid-session-refresh) to recover silently. Turn off if the helper can’t run non-interactively. + +[Self-hosted install](#self-hosted-column): MDM profile. Decides how the desktop app re-runs its helper on the person's computer, reused for sign-in to the host. + +*** + +### `egressProxyUrl` + +string + +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.44121.1 + +**Proxy server URL.** Send the app’s and the agent’s traffic through this HTTP proxy instead of the operating system’s proxy settings. + +[Guide for this setting](/docs/third-party/claude-desktop/network-proxy.md) + +[Self-hosted install](#self-hosted-column): MDM profile. Names the proxy for the person's computer, and a host's network belongs to its operator. + +[Admin Console](#the-works-with-column): Not available. + +> **More detail** > > Pins the app (sign-in, the connection test, model discovery, MCP servers, plugins), the Claude Code engine behind Chat, Cowork, and Code, and on macOS and Windows the Cowork workspace VM (the agent's shell, package-install, `git`, and plugin commands) to one HTTP proxy. Use it when your gateway or the internet is reachable only through a corporate proxy and you cannot rely on the system proxy. It is a reachability setting, not an egress control. > @@ -160,13 +374,41 @@ The word is what this Claude Desktop release declares. A session host acts on a > > Read once at launch from device management (MDM) or the local configuration file only; a configuration server cannot deliver it, because the app may need the proxy to reach that server. A profile that sets only this key (or only the other app-behavior keys, such as `disableAutoUpdates`) does not take over a connection users set up in the app, but those keys are read from one source as a group, so put the proxy in the same profile as your update settings. Changes apply at the next app start. When `egressProxyPacUrl` is also set, the PAC file wins and this key is ignored. -> **egressProxyPacUrl details** +*** + +### `egressProxyPacUrl` + +string + +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.44121.1 + +**Proxy auto-config (PAC) URL.** URL of a PAC file that decides the proxy per request. Wins over the proxy server URL when both are set. + +[Guide for this setting](/docs/third-party/claude-desktop/network-proxy.md) + +[Self-hosted install](#self-hosted-column): MDM profile. Describes the network of the person's computer, which Desktop applies to its own traffic. + +[Admin Console](#the-works-with-column): Not available. + +> **More detail** > > At launch the app downloads the PAC script and asks it which proxy to use for each request, as a browser would, instead of following the operating system's proxy settings. Same value rules, coverage, exclusions, and delivery as `egressProxyUrl`, except that bypassing is the script's decision: `localhost`, `127.0.0.1`, and `[::1]` still never use a proxy, but `*.local` names and everything else follow whatever it returns. If the PAC file cannot be downloaded, the app connects directly rather than failing. > > On macOS and Windows the Cowork workspace VM is handed a copy of the script when it starts and evaluates it for each request itself; there `myIpAddress()` returns the VM's internal address rather than the device's, so a script that chooses by client subnet gives the VM its off-network answer (if that download fails, the VM connects directly). The Claude Code engine behind Chat, Cowork, and Code cannot evaluate a PAC file, so the app hands it one proxy (whichever the script returns for your inference endpoint) plus a bypass for loopback and `*.local` names. If the script answers `DIRECT` or only `SOCKS` for that endpoint, the engine uses no proxy at all, so have it return an HTTP `PROXY host:port` entry there; if the engine needs different rules, set `HTTPS_PROXY` and `NO_PROXY` in Claude Code managed settings, which win for the engine on the host. -> **coworkVmIpv6Enabled details** +*** + +### `coworkVmIpv6Enabled` + +booleanSince 1.52386.0 + +**Enable IPv6 in the workspace VM.** Give the Cowork workspace VM an IPv6 address and route so the agent’s tools can reach IPv6-only hosts through the device. macOS and Windows; off by default. + +[Self-hosted install](#self-hosted-column): Not supported. Configures Cowork's local virtual machine, which a host session does not have. + +> **More detail** > > When set to `true`, the Cowork workspace VM on macOS and Windows gets a static IPv6 address (a unique local `fd…` address) and an IPv6 default route on its virtual network next to its IPv4 address, and the VM's gateway forwards that traffic over the device's own IPv6 connectivity, as it already does for IPv4. Use it when the tools the agent runs in the VM (shell commands, package installs, `git`, and plugin commands) must reach IPv6-only destinations. The VM's resolver then also returns IPv6 (AAAA) answers. A connection the VM makes over IPv6 succeeds only where the device's own IPv6 does; on a device without working IPv6, destinations that have both keep working over IPv4 and IPv6-only destinations stay unreachable. Because the VM's address is unique-local, most tools in it keep preferring IPv4 for destinations that have both, so IPv6 mostly carries traffic to IPv6-only destinations. > @@ -174,76 +416,102 @@ The word is what this Claude Desktop release declares. A session host acts on a > > Unset (default): the VM is IPv4-only and its resolver returns no IPv6 answers. A change takes effect the next time the workspace VM starts, typically at the next app launch. Does not apply to the Cowork workspace VM on Linux or to Code sessions, which use the device's own network stack. -### Anthropic +*** -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Claude API key `inferenceAnthropicApiKey` | `string` | MDM + Bootstrap Added in 1.8089.0 | — | Leave blank to sign in with your browser, or to supply the key via a credential helper. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | +### Gateway -### Bedrock +#### `inferenceGatewayBaseUrl` -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| AWS region `inferenceBedrockRegion` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | AWS region for the Bedrock runtime endpoint. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Bedrock base URL `inferenceBedrockBaseUrl` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | For VPC endpoints or gateway proxies. Host origin only. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Bedrock service tier `inferenceBedrockServiceTier` | `enum` | MDM + Bootstrap Added in 1.5186.0 | — | Sent as the X-Amzn-Bedrock-Service-Tier header. Leave unset for on-demand. One of: `flex`, `priority`. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| AWS bearer token `inferenceBedrockBearerToken` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Static bearer token for inference. For providers that support profile or helper-script credentials, prefer those. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| AWS SSO start URL `inferenceBedrockSsoStartUrl` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | Enables in-app AWS sign-in (no AWS CLI needed). Set with the three SSO fields below. | [`none`](#self-hosted-column) Drives a browser sign-in on the person's computer, and a host never calls Bedrock as the person | -| AWS SSO region `inferenceBedrockSsoRegion` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | IAM Identity Center home region. | [`none`](#self-hosted-column) Configures a browser sign-in on the person's computer, and a host-run session has no browser | -| AWS SSO account ID `inferenceBedrockSsoAccountId` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | 12-digit AWS account ID assigned to users in IAM Identity Center. | [`none`](#self-hosted-column) Names an AWS account for a browser sign-in on the person's computer, which a host never performs | -| AWS SSO role name `inferenceBedrockSsoRoleName` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | IAM Identity Center permission-set name granting bedrock:InvokeModel\* on the account above. | [`none`](#self-hosted-column) Names an AWS role for a browser sign-in that is only possible on the person's computer | -| AWS profile name `inferenceBedrockProfile` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | AWS named profile to use for Bedrock inference credentials. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| AWS config directory `inferenceBedrockAwsDir` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Folder with AWS config/credentials. Defaults to \~/.aws when no bearer token is set. | [`none`](#self-hosted-column) Names a folder on the person's computer that a host does not have | -| AWS CLI path `inferenceBedrockAwsCliPath` | `string` | MDM + Bootstrap Added in 1.13576.0 | — | Absolute path to the aws executable. Leave unset to find it on PATH. | [`none`](#self-hosted-column) Names a program on the person's computer, and a host has no such program, browser or person | - -> **inferenceBedrockServiceTier details** -> -> Tier availability varies by model and region. Reserved capacity uses a provisioned-throughput ARN as the model ID instead of this setting. Older bundled Claude Code CLI versions ignore this key. +string -### Foundry +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Azure AI Foundry resource name `inferenceFoundryResource` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Azure AI Foundry resource name used to construct the endpoint URL. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Azure AI Foundry base URL `inferenceFoundryBaseUrl` | `string` | MDM + Bootstrap Added in 2.110.0 | — | Full base URL for a gateway or proxy in front of Foundry, path included (replaces [https://RESOURCE.services.ai.azure.com/anthropic](https://RESOURCE.services.ai.azure.com/anthropic)). | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Azure AI Foundry API key `inferenceFoundryApiKey` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | API key for Azure AI Foundry inference. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Entra ID tenant ID `inferenceFoundryTenantId` | `string` | MDM + Bootstrap Added in 1.9255.0 | — | Directory (tenant) ID of the Entra ID app registration that has the Cognitive Services scope. | [`none`](#self-hosted-column) Names the tenant for an Entra sign-in on the person's computer | -| Entra ID client ID `inferenceFoundryClientId` | `string` | MDM + Bootstrap Added in 1.9255.0 | — | Application (client) ID of the Entra ID app registration. Device-code sign-in requires the app to allow public client flows. | [`none`](#self-hosted-column) Configures an Entra sign-in the person completes on their computer | -| Entra ID sign-in flow `inferenceFoundryAuthFlow` | `enum` | MDM + Bootstrap Added in 1.19367.0 | — | How Entra sign-in runs: device code (default), system browser, or the OS identity broker. One of: `device-code`, `browser`, `broker`. | [`none`](#self-hosted-column) Chooses how the person's Entra sign-in runs on their computer | +Origin-pinned (A URL that a bootstrap server delivers must share the origin of bootstrapUrl, or Claude Desktop drops it. The limit is lifted when bootstrapOidc is set, and it does not apply to a value set in an MDM profile, the local configuration file or the Enterprise Admin Console.) -> **inferenceFoundryBaseUrl details** -> -> Set this only when the app reaches Foundry through a gateway or proxy you run, such as Azure API Management. Requests go to `/v1/messages` instead of `https://.services.ai.azure.com/anthropic/v1/messages`, carrying the same credential and headers the app would send to Foundry: each user's Entra ID token for the Azure Cognitive Services audience as `Authorization: Bearer` with Entra sign-in, otherwise the API key or the credential helper's output. Claude Code sessions receive the value as `ANTHROPIC_FOUNDRY_BASE_URL`, so use the same value you would give Claude Code in a terminal. `inferenceFoundryResource` is still required and should name the resource behind the gateway; the app sends nothing to the resource directly while this is set. Must be https, or http to a proxy at a loopback address on the device itself (127.0.0.1, localhost or \[::1]). +Since 1.2581.0 + +**Gateway base URL.** Full URL of the inference gateway endpoint. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +*** + +#### `inferenceGatewayApiKey` + +stringSince 1.2581.0 + +**Gateway API key.** API key for the configured inference gateway. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +[Admin Console](#the-works-with-column): Not available. + +*** + +#### `inferenceGatewayAuthScheme` + +enumDefault: bearerSince 1.3036.0 -> **inferenceFoundryAuthFlow details** +**Gateway auth scheme.** How the gateway credential is sent on the wire (Authorization: Bearer vs x-api-key header). + +One of: `bearer` (default), `x-api-key` + +> [!WARNING] > -> * **`device-code`** (default) — shows a code to enter at microsoft.com/devicelogin. The app registration must have **Allow public client flows** enabled. -> * **`browser`** — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. The app registration must include `http://127.0.0.1/callback` under the **Mobile and desktop applications** platform (Entra ignores the loopback port, but not the path). Works with **Allow public client flows** disabled, and is unaffected by Conditional Access policies that block device-code authentication. -> * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, Company Portal on macOS), so it can satisfy Conditional Access policies that require a compliant/managed device or token protection. The app registration must include the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform. Not supported on Linux. +> **Deprecated** > -> App versions that predate this key always use device code; versions that predate the broker option treat `broker` as unset and use device code. +> * `inferenceGatewayAuthScheme: "sso"`; use inferenceCredentialKind: "interactive". The original spelling will keep working; no end date has been set. -### Gateway +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +*** -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Gateway base URL `inferenceGatewayBaseUrl` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Full URL of the inference gateway endpoint. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Gateway API key `inferenceGatewayApiKey` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | API key for the configured inference gateway. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Gateway auth scheme `inferenceGatewayAuthScheme` | `enum` | MDM + Bootstrap Added in 1.3036.0 | `bearer` | How the gateway credential is sent on the wire (Authorization: Bearer vs x-api-key header). One of: `bearer`, `x-api-key`. Defaults to `bearer`. Deprecated: `inferenceGatewayAuthScheme: "sso"`; use inferenceCredentialKind: "interactive". The original spelling will keep working; no end date has been set. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Gateway sign-in flow `inferenceGatewayOidcAuthFlow` | `enum` | MDM + Bootstrap Added in 1.25927.0 | — | How the IdP sign-in runs: system browser (default) or the OS Microsoft Entra broker. One of: `browser`, `broker`. Deprecated: `inferenceGatewayOidcAuthFlow`; use inferenceIdpAuthFlow together with inferenceIdpOidc once every desktop in the fleet is on a release that reads them. The original spelling will keep working; no end date has been set. | [`none`](#self-hosted-column) Deprecated name for the choice of sign-in window on the person's computer | -| Gateway SSO IdP (OIDC) `inferenceGatewayOidc` | `object` | MDM + Bootstrap Added in 1.6889.0 | — | External IdP for gateway sign-in. The user’s token from this issuer is sent to the gateway as the Bearer credential. Deprecated: `inferenceGatewayOidc`; use inferenceIdpOidc with inferenceCredentialKind: "external-idp" once every desktop in the fleet is on a release that reads them. The original spelling will keep working; no end date has been set. | [`none`](#self-hosted-column) Deprecated name for a sign-in that runs on the person's computer | -| Identity provider sign-in flow `inferenceIdpAuthFlow` | `enum` | MDM + Bootstrap Added in 2.7032.0 | — | How the identity-provider sign-in runs: system browser (default) or the OS Microsoft Entra broker. One of: `browser`, `broker`. | [`client`](#self-hosted-column) Chooses a sign-in window on the person's computer, also used for the device's sign-in to the host | -| Identity provider (OIDC) `inferenceIdpOidc` | `object` | MDM + Bootstrap Added in 2.7032.0 | — | Your organization’s OpenID Connect identity provider. The user’s token is sent as the Bearer credential to the gateway or the Bedrock proxy. | [`client`](#self-hosted-column) Configures an interactive sign-in on the person's computer, reused to sign the device in to the host | -| Stream idle timeout `inferenceStreamIdleTimeoutSec` | `integer` | MDM + Bootstrap Added in 1.44121.1 | — | Extra seconds to wait for model output on a streaming response that is sending only keep-alive pings. Gateway provider only. Default 300. Range: 300–1800. | [`server`](#self-hosted-column) The host makes the model calls, so it sets how long a stream sending only keep-alive pings may wait for output | +#### `inferenceGatewayOidcAuthFlow` -> **inferenceGatewayOidcAuthFlow details** +enumSince 1.25927.0 + +**Gateway sign-in flow.** How the IdP sign-in runs: system browser (default) or the OS Microsoft Entra broker. + +One of: `browser`, `broker` + +> [!WARNING] +> +> **Deprecated** +> +> * Use inferenceIdpAuthFlow together with inferenceIdpOidc once every desktop in the fleet is on a release that reads them. The original spelling will keep working; no end date has been set. + +[Self-hosted install](#self-hosted-column): Not supported. Deprecated name for the choice of sign-in window on the person's computer. + +> **More detail** > > * **`browser`** (default) — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. See the **IdP setup** notes on `inferenceGatewayOidc` for redirect-URI registration. > * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, Company Portal on macOS). Requires the IdP to be **Microsoft Entra ID** — the `issuer` on `inferenceGatewayOidc` must be `https://login.microsoftonline.com/{tenant-id}/v2.0`. The broker satisfies Conditional Access policies that require a compliant/managed device or token protection, and needs no loopback redirect. The Entra app registration must include the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform. Not supported on Linux. > > Broker mode mints a token in the customer's own Entra tenant with the customer-configured `scopes`, and forwards it to the customer's own gateway; both endpoints of that trust relationship are inside the customer's control. A desktop that has the `external-idp` kind reads this key, together with `inferenceGatewayOidc`, as that kind's sign-in flow; it stays readable. -> **inferenceGatewayOidc details** +*** + +#### `inferenceGatewayOidc` + +object + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6889.0 + +**Gateway SSO IdP (OIDC).** External IdP for gateway sign-in. The user’s token from this issuer is sent to the gateway as the Bearer credential. + +> [!WARNING] +> +> **Deprecated** +> +> * Use inferenceIdpOidc with inferenceCredentialKind: "external-idp" once every desktop in the fleet is on a release that reads them. The original spelling will keep working; no end date has been set. + +[Guide for this setting](/docs/third-party/claude-desktop/gateway.md#single-sign-on-with-your-identity-provider) + +[Self-hosted install](#self-hosted-column): Not supported. Deprecated name for a sign-in that runs on the person's computer. + +> **More detail** > > **External IdP mode.** The app discovers `/.well-known/openid-configuration`, runs an OIDC authorization-code-with-PKCE sign-in in the system browser with `clientId`, and sends the resulting token as `Authorization: Bearer` on every inference request. Leave this unset for a gateway that hosts its own RFC 8414 metadata at `/.well-known/oauth-authorization-server`. A desktop that has the `external-idp` kind reads this block as that kind's identity-provider key; it stays readable, so a fleet keeps this spelling until every desktop is on such a release. > @@ -252,1065 +520,3306 @@ The word is what this Claude Desktop release declares. A session host acts on a > **IdP setup.** The callback is `http://127.0.0.1:/callback` by default (`http://localhost:/callback` with `redirectHost: "localhost"`); register exactly the one you use and include `/callback`. **Entra:** a public-client app with a *Mobile and desktop applications* redirect URI of `http://127.0.0.1/callback` (any port; omitting the path fails with `AADSTS50011`); in `access_token` mode also grant the gateway API's delegated permission, or sign-in fails with `AADSTS65001`. **Okta:** a *Native* app with the exact URI `http://127.0.0.1:/callback` and that port in `redirectPort`. > > **Refresh.** With `offline_access` the app renews the token silently and prompts a browser sign-in only when refresh fails. Google never returns an `id_token` on refresh, so a Google Workspace-backed gateway in `id_token` mode re-prompts about hourly; `access_token` mode is unaffected. -> -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `clientId` | `string` | — | OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). | -> | `issuer` | `string` | — | HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. | -> | `authorizationUrl` | `string` | — | HTTPS authorization endpoint. Used with the token URL when no issuer is set. | -> | `tokenUrl` | `string` | — | HTTPS token endpoint. Used with the authorization URL when no issuer is set. | -> | `bearerTokenType` | `enum` | `id_token` | Which token to send as the bearer. Use access token for a gateway or proxy that validates as an OAuth resource server. One of: `id_token`, `access_token`. | -> | `scopes` | `string` | — | Space-separated scopes. Required in access-token mode: set the gateway or proxy API scope. offline\_access is appended automatically unless disabled below. | -> | `appendOfflineAccess` | `boolean` | `true` | Automatically append offline\_access to scopes so the IdP returns a refresh token for silent refresh. | -> | `resource` | `string` | — | Access-token audience of the gateway or proxy: an https URL or an AD FS relying-party identifier, sent as the RFC 8707 resource. Leave unset for Entra ID. | -> | `redirectPort` | `integer` | — | Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. | -> | `redirectHost` | `enum` | — | Use localhost only if your IdP’s registered redirect URI specifies it. One of: `127.0.0.1`, `localhost`. | -> | `additionalRedirectReferrerHosts` | `string` | — | Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. | - -> **inferenceIdpAuthFlow details** -> -> * **`browser`** (default) — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. See the **IdP setup** notes on `inferenceIdpOidc` for redirect-URI registration. -> * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, Company Portal on macOS). Requires the IdP to be **Microsoft Entra ID** — the `issuer` on `inferenceIdpOidc` must be `https://login.microsoftonline.com/{tenant-id}/v2.0`. The broker satisfies Conditional Access policies that require a compliant/managed device or token protection, and needs no loopback redirect. The Entra app registration must include the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform. Not supported on Linux. -> -> Broker mode mints a token in the customer's own Entra tenant with the customer-configured `scopes` and forwards it to the customer's own gateway or proxy; both endpoints of that trust relationship are inside the customer's control. -> **inferenceIdpOidc details** +> **Child attributes (11)** > -> Used with `inferenceCredentialKind: "external-idp"`. The app discovers `/.well-known/openid-configuration`, runs an OIDC authorization-code (PKCE) sign-in in the browser with `clientId` (or through the OS broker, see `inferenceIdpAuthFlow`) and sends the token as `Authorization: Bearer` on every inference request: to `inferenceGatewayBaseUrl` on the gateway provider, or on Bedrock to `inferenceBedrockBaseUrl`, which is then required: only a proxy that validates the token accepts it, never Amazon Bedrock itself (to sign in straight to Bedrock use `interactive`, AWS IAM Identity Center). On Bedrock this kind has no model discovery: list the models in `inferenceModels`. -> -> **Bearer token type.** `id_token` (the default) sends the OIDC ID token; the receiver validates signature, `iss` and `aud` (the `clientId` here). `access_token` sends the OAuth access token, for gateways and proxies that validate as an OAuth resource server; `scopes` must then name the registered API scope. Either way the receiver must check `aud`, or it accepts any token from your tenant. +> **clientId** `string` *required* > -> **IdP setup.** The callback is `http://127.0.0.1:/callback` (`localhost` with `redirectHost: "localhost"`); register exactly that. **Entra:** a public-client app with a *Mobile and desktop applications* redirect URI `http://127.0.0.1/callback` (omitting the path fails with `AADSTS50011`); in `access_token` mode also grant the API's delegated permission, or sign-in fails with `AADSTS65001`. **Okta:** a *Native* app with `http://127.0.0.1:/callback` and that port in `redirectPort`. +> OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). > -> **Refresh.** With `offline_access` the app renews the token silently and asks for a browser sign-in only when refresh fails (Google returns no `id_token` on refresh, so `id_token` mode there re-prompts about hourly). +> **issuer** `string` > -> **Older names.** Gateway configurations written before this key use `inferenceGatewayOidc` / `inferenceGatewayOidcAuthFlow` with the `interactive` kind; they stay readable and mean the same sign-in. +> HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `clientId` | `string` | — | OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). | -> | `issuer` | `string` | — | HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. | -> | `authorizationUrl` | `string` | — | HTTPS authorization endpoint. Used with the token URL when no issuer is set. | -> | `tokenUrl` | `string` | — | HTTPS token endpoint. Used with the authorization URL when no issuer is set. | -> | `bearerTokenType` | `enum` | `id_token` | Which token to send as the bearer. Use access token for a gateway or proxy that validates as an OAuth resource server. One of: `id_token`, `access_token`. | -> | `scopes` | `string` | — | Space-separated scopes. Required in access-token mode: set the gateway or proxy API scope. offline\_access is appended automatically unless disabled below. | -> | `appendOfflineAccess` | `boolean` | `true` | Automatically append offline\_access to scopes so the IdP returns a refresh token for silent refresh. | -> | `resource` | `string` | — | Access-token audience of the gateway or proxy: an https URL or an AD FS relying-party identifier, sent as the RFC 8707 resource. Leave unset for Entra ID. | -> | `redirectPort` | `integer` | — | Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. | -> | `redirectHost` | `enum` | — | Use localhost only if your IdP’s registered redirect URI specifies it. One of: `127.0.0.1`, `localhost`. | -> | `additionalRedirectReferrerHosts` | `string` | — | Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. | - -> **inferenceStreamIdleTimeoutSec details** +> **authorizationUrl** `string` > -> Raises how long Cowork, Chat and Code sessions wait for the next model event on an open streaming response (Claude Code's `CLAUDE_STREAM_IDLE_TIMEOUT_MS`). It only helps when the gateway writes SSE keep-alive `ping` events (or `:` comment lines) into the response while the upstream model is silent — for example a LiteLLM proxy with keep-alive pings enabled in front of Amazon Bedrock. With pings arriving, Claude Code accepts at least about five minutes of keep-alives and then waits this many seconds more for real model output before abandoning the request. Gateway provider only; the other providers keep Claude Code's defaults. +> HTTPS authorization endpoint. Used with the token URL when no issuer is set. > -> A response on which nothing at all arrives — no pings — still fails after about 5 minutes regardless of this key, because at the device a silent connection cannot be told apart from a dead one. If long generations fail behind a gateway that does not send pings, configure the gateway to send them rather than raising this value. A common case is automatic compaction, in which a session sends its whole conversation in one streaming request and waits for a long summary; when that request fails, the error reads `Prompt is too long · automatic compaction failed:` followed by the cause. While this key is set, the app's value takes precedence over `CLAUDE_STREAM_IDLE_TIMEOUT_MS` in Claude Code's own managed settings for sessions the app starts; when it is unset, that setting still applies. Values outside 300–1800 are rejected at parse time (the error is listed in the diagnostics report) and the default applies. - -### Models - -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Model discovery `modelDiscoveryEnabled` | `boolean` | MDM + Bootstrap Added in 1.8089.0 | — | Auto-populate the model picker from the provider at launch. | [`none`](#self-hosted-column) A session host states the models it offers, so Desktop discovers none itself, whatever this says | -| Use 1M wherever it’s available `modelPrefer1mContext` | `boolean` | MDM + Bootstrap Added in 1.28929.0 | — | Every model that offers 1M, in your list or from your gateway, shows one option and requests 1M. | [`server`](#self-hosted-column) When on, the host gives a session that names no model the 1M-token context, and tells Desktop | -| Model list `inferenceModels` | `object[]` | MDM + Bootstrap Added in 1.2581.0 | — | Override the auto-discovered model list. First entry is the default. | [`server`](#self-hosted-column) The host runs a session only on a model from this list, and tells Desktop what to show | -| Default model effort `defaultModelEffort` | `enum` | MDM + Bootstrap Added in 2.110.0 | — | Effort level the default model (the first listed model) starts at, instead of Anthropic’s recommended level: low, medium, high, xhigh or max. One of: `low`, `medium`, `high`, `xhigh`, `max`. | [`server`](#self-hosted-column) The host sets the effort of a session that names none, and tells Desktop what to preselect | -| Always start with the default model `alwaysStartWithDefaultModel` | `boolean` | MDM + Bootstrap Added in 2.110.0 | — | New conversations and tasks start on the default model and effort level, not each person’s last-used ones. People can still change both for the current one. | [`reported`](#self-hosted-column) Desktop's model picker acts on it, starting each new session on the default model | -| Show estimated cost `inferenceModelPricingEnabled` | `boolean` | MDM + Bootstrap Added in 1.37937.0 | — | Show an estimated cost on the Usage page at Anthropic list price; turn on to set a multiplier or per-model rates. | [`server`](#self-hosted-column) When on, the host gives its sessions the admin's rates and multiplier; Desktop shows cost once they report it per turn | -| Price multiplier `inferenceModelPricingMultiplier` | `number` | MDM + Bootstrap Added in 1.37937.0 | — | Scales every estimated cost (0.85 = 85% of the price); between 0 and 1. Range: 0–1. | [`server`](#self-hosted-column) While Show estimated cost is on, the host hands Claude Code this multiplier for the cost its sessions report | -| Model pricing `inferenceModelPricing` | `object[]` | MDM + Bootstrap Added in 1.37937.0 | — | Per-model rates replacing Anthropic list price in the Usage page’s estimate. | [`server`](#self-hosted-column) While Show estimated cost is on, the host hands Claude Code these rates for the cost its sessions report | -| Model catalog metadata `modelCatalogEnabled` | `boolean` | MDM + Bootstrap Added in 2.110.0 | — | Fetch the published Claude Code model catalog to get model picker names, descriptions, and effort options. When off, the app uses only its bundled copy. | [`server`](#self-hosted-column) The host serves the model catalog's rows to Desktop, and to nobody for whom this is off | -| Model catalog URL `modelCatalogUrl` | `string` | MDM + Bootstrap Added in 2.110.0 | — | Fetch the model catalog and its signature file from this URL (a mirror inside your network serving Anthropic’s published files) instead of downloads.claude.ai. | [`reported`](#self-hosted-column) Only Desktop versions too old to take the model catalog's rows from their session host fetch from here | - -> **modelDiscoveryEnabled details** +> **tokenUrl** `string` > -> Auto-populate the model picker from the provider's model-list endpoint at launch. For gateway and Anthropic providers, a config that doesn't set this key skips discovery automatically when the model list below already makes it unnecessary; the toggle here only sets it explicitly on or off. Turn off if the endpoint isn't reachable from your network, or to use a fixed list. When off, the model list below is required and must use full model IDs (aliases like sonnet/opus are resolved via discovery). - -> **modelPrefer1mContext details** +> HTTPS token endpoint. Used with the authorization URL when no issuer is set. > -> Every model that offers a 1M-token context window shows one option in the model picker, and sessions on it request 1M from your provider. A model offers 1M when its `inferenceModels` entry sets `supports1m` or, under discovery, when your gateway's model list marks it. Equivalent to setting `prefer1m` on each of those entries, but also applies under dynamic discovery. To leave one listed model out, remove its `supports1m`. Beside a model list in which no entry sets `supports1m`, this setting does nothing. Older Claude Desktop versions show both options and only start the default model on its 1M option. - -> **inferenceModels details** +> **bearerTokenType** `enum` (default: id\_token) > -> Use the **provider's exact model ID**: Vertex publisher IDs (`claude-sonnet-5`), Bedrock inference-profile IDs (`us.anthropic.claude-sonnet-5`), or Foundry deployment names. Entries may be plain ID strings or objects. +> Which token to send as the bearer. Use access token for a gateway or proxy that validates as an OAuth resource server. > -> **Gateway:** the `name` must be the exact ID your gateway's `/v1/models` endpoint returns. If you set `supports1m` on an alias (`sonnet`) but discovery returns the full ID, the variant won't appear. +> One of: `id_token` (default), `access_token` > -> **Extended context** (`supports1m`) is a capability assertion you make about your deployment; only set it for models you've confirmed support the 1M-token window: +> > **More detail** +> > +> > In **access-token** mode the token's audience must be your gateway or proxy. On IdPs where the requested scopes decide the audience (**Entra ID**), include its API resource scope in `scopes` — `api:///.default`, or a named delegated scope you exposed via *Expose an API*. With only the standard OIDC scopes (`openid profile email offline_access`) Entra returns a v1.0 Microsoft Graph token whose issuer (`https://sts.windows.net//`) doesn't match the v2.0 issuer configured here, so a gateway that validates `iss` rejects it. On IdPs that set the access-token audience out-of-band (Keycloak audience mapper, Auth0 default audience, Okta custom authorization server), a resource scope in `scopes` isn't required — the audience comes from the IdP-side configuration. > -> ```json theme={null} -> [{"name": "claude-sonnet-5", "supports1m": true}, "claude-opus-4-8"] -> ``` +> **scopes** `string` > -> `"claude-sonnet-5[1m]"` is shorthand for the same entry. When an ID is listed both bare and with `[1m]` (as a gateway lists it), the picker shows one model with a 1M variant; put `labelOverride` on the bare entry (a label on the `[1m]` spelling is ignored there); tier-tagged entries are not folded. `prefer1m: true` (no effect without `supports1m`) shows only the 1M variant of the model. Under dynamic discovery (no explicit list), set `modelPrefer1mContext` instead. +> Space-separated scopes. Required in access-token mode: set the gateway or proxy API scope. offline\_access is appended automatically unless disabled below. > -> **Display label** (`labelOverride`) is for IDs the picker can't derive a friendly name from (Bedrock ARNs, gateway routing aliases). Display-only; `name` is still what the app sends: +> **appendOfflineAccess** `boolean` (default: true) > -> ```json theme={null} -> [{"name": "arn:aws:bedrock:us-east-1:123:application-inference-profile/abc", "labelOverride": "Claude Opus (Prod)"}] -> ``` +> Automatically append offline\_access to scopes so the IdP returns a refresh token for silent refresh. > -> **Tier mapping** (`anthropicFamilyTier`) tells the app which Claude tier (`haiku`/`sonnet`/`opus`/`fable`/`mythos`) an entry stands in for, so bare tier aliases (e.g. in Code sessions) resolve to your model. `isFamilyDefault: true` picks the winner when several entries share a tier: +> > **More detail** +> > +> > Turn off only if your authorization server rejects `offline_access` as an unknown scope; include the server’s own refresh-token scope in **Scopes** instead. > -> ```json theme={null} -> [{"name": "us.anthropic.claude-opus-4-8", "anthropicFamilyTier": "opus"}] -> ``` +> **resource** `string` > -> **Auto mode on a gateway:** its safety classifier calls `claude-sonnet-5` by default, so include that exact ID in the list (see `autoModeEnabled`). +> Access-token audience of the gateway or proxy: an https URL or an AD FS relying-party identifier, sent as the RFC 8707 resource. Leave unset for Entra ID. > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `name` | `string` | — | Model ID exactly as the provider expects it. The first entry is the default model. | -> | `labelOverride` | `string` | — | Shown in the model picker. Leave blank to auto-format from the ID. | -> | `supports1m` | `boolean` | — | Adds a 1M-context variant of this model to the picker. Set only if the deployment accepts 1M-token context for it. | -> | `prefer1m` | `boolean` | — | Shows one option for this model and requests 1M from your provider. Does nothing unless the entry offers 1M. | -> | `anthropicFamilyTier` | `enum` | — | Which Claude tier this model stands in for. Pins the bare alias (e.g. ‘opus’) and, for opus/fable, the refusal fallback. One of: `sonnet`, `opus`, `haiku`, `fable`, `mythos`. | -> | `isFamilyDefault` | `boolean` | — | When several models share a tier alias, marks this one as the model the alias resolves to. Otherwise the first listed wins. | -> | `maxEffort` | `enum` | — | Highest effort level offered for this model; higher levels are hidden and never requested by Claude Desktop. An unrecognized value caps the model at low. One of: `low`, `medium`, `high`, `xhigh`, `max`. | - -> **defaultModelEffort details** +> > **More detail** +> > +> > Set this only for an IdP that implements RFC 8707 resource indicators. The app then sends `resource=` on the authorization, token and refresh requests, so the access token the IdP issues is audience-restricted to the gateway or proxy rather than to the IdP's own APIs. Use it with `bearerTokenType: access_token`; in `id_token` mode the ID token's audience is always `clientId`. Ignored with the OS-broker sign-in flow (the sign-in flow key set to `broker`), which is Entra-only. +> > +> > **Microsoft Entra ID:** leave unset — the v2.0 endpoint rejects `resource`; request the API scope in `scopes` instead (`api:///.default`). **AD FS:** enter one of the relying-party trust's identifiers, spelled as it is registered there. A value with no scheme (a host name with or without a port or path, a single name, or a GUID; `name:digits` also reads as a host name with a port) is sent as `https://`; an identifier with a scheme of its own (`urn:…`, or an organization-defined one such as `VENDOR:URI:…`) is sent exactly as written. A trust whose only identifier is a bare name or GUID will not match, because those are sent as `https://`: add an `https://…` or `urn:…` identifier to the trust and enter that one here. With any other identity provider, use an absolute URI without a fragment (RFC 8707 — the IdP rejects one as `invalid_target`). Changing it signs users in again. > -> The effort level the default model (the first `inferenceModels` entry, or the first model your endpoint returns under discovery) starts at in Chat, Cowork and Code, in place of Anthropic's recommended level for that model: one of `low`, `medium`, `high`, `xhigh`, `max`. It is a starting point, not a lock: a person's own effort choice for that model still applies unless `alwaysStartWithDefaultModel` is on, and other models keep their recommended level. A level the model doesn't offer falls to the nearest level it offers below it (its lowest level when none is lower), and it never exceeds that model's `maxEffort`. In Code sessions a `CLAUDE_CODE_EFFORT_LEVEL` environment variable or an `effortLevel` in Claude Code's own settings still takes precedence, as it does over any picker default. - -> **alwaysStartWithDefaultModel details** +> **redirectPort** `integer` > -> When `true`, each new conversation or task in Chat, Cowork and Code starts on the default model (the first `inferenceModels` entry), and the model and effort choices a person makes are no longer saved as their defaults. When unset or `false`, a person's last model and effort choice is remembered per tab, as before. Choices saved before the setting was turned on are kept and apply again if it is turned off. - -> **inferenceModelPricingEnabled details** +> Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. > -> Off unless set: the Usage page shows token counts only, since the app cannot know your negotiated provider rates. `true` turns on a USD estimate priced at Anthropic's published list price and is the only switch that does: `inferenceModelPricingMultiplier` and `inferenceModelPricing` refine the estimate while this is on and are ignored otherwise; turning this off hides them in the config editors without clearing them. Claude Code performs the calculation, so the same figures appear in its own cost reporting for Code sessions. Model IDs Claude Code cannot map to a Claude model (an opaque gateway alias, an inference-profile ARN it cannot resolve) are left out of the estimate until `inferenceModelPricing` gives them a rate. A machine-level Claude Code managed `modelPricing` (MDM / managed-settings.json / server-managed) takes precedence over all three keys. - -> **inferenceModelPricingMultiplier details** +> **redirectHost** `enum` > -> Mirrors Claude Code's managed `modelPricing.multiplier`: a number in (0, 1] applied to every computed cost, whether the model was priced at Anthropic list price or by an `inferenceModelPricing` row; use it for a flat contracted discount. Applies only while `inferenceModelPricingEnabled` is `true`; on its own it does not turn the estimate on. Ignored when a machine-level Claude Code managed `modelPricing` is present. - -> **inferenceModelPricing details** +> Use localhost only if your IdP’s registered redirect URI specifies it. > -> Each row replaces Anthropic list price for one model in the Usage page's estimate, in USD per million tokens (`inputPerMtok`, `outputPerMtok`, `cacheReadPerMtok`, `cacheWritePerMtok`, all four required; `cacheWritePerMtok` prices both 5-minute and 1-hour cache writes); rows apply only while `inferenceModelPricingEnabled` is `true` and do not turn the estimate on by themselves. Mirrors Claude Code's managed `modelPricing.overrides`, and `name` is matched the same way: a built-in Claude model ID (e.g. `claude-sonnet-4-6`, or its Bedrock, Vertex, or Foundry ID) covers every dated and provider spelling of that model; any other value (a gateway alias, an inference-profile ARN) matches that exact ID only (case-insensitive) and wins over a built-in row. An ID Claude Code cannot map to a Claude model at all gets no estimate until a row here prices it. `inferenceModelPricingMultiplier` still applies on top of a row. +> One of: `127.0.0.1`, `localhost` > -> ```json theme={null} -> {"inferenceModelPricingEnabled": true, "inferenceModelPricingMultiplier": 0.9, "inferenceModelPricing": [{"name": "claude-sonnet-4-6", "inputPerMtok": 2.4, "outputPerMtok": 12, "cacheReadPerMtok": 0.24, "cacheWritePerMtok": 3}]} -> ``` +> **additionalRedirectReferrerHosts** `string` > -> These are estimates for visibility, not an invoice; your provider bills at its own rates. A machine-level Claude Code managed `modelPricing` (MDM / managed-settings.json / server-managed) takes precedence over this table. +> Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `name` | `string` | — | A model ID from the list above, or any other ID or alias your provider serves. A built-in Claude ID also covers its dated and provider forms. | -> | `inputPerMtok` | `number` | — | USD per million input tokens. | -> | `outputPerMtok` | `number` | — | USD per million output tokens. | -> | `cacheReadPerMtok` | `number` | — | USD per million prompt-cache read tokens. | -> | `cacheWritePerMtok` | `number` | — | USD per million prompt-cache write tokens (5-minute and 1-hour writes alike). | +> > **More detail** +> > +> > Only needed when the IdP completes sign-in from a host other than the authorization URL’s. When a callback is rejected for a referrer mismatch, the rejected host is named in the app log — add that hostname here. -> **modelCatalogEnabled details** -> -> When on (the default), the app reads the model catalog Anthropic publishes for Claude Code (a signed document fetched from `downloads.claude.ai`, or from `modelCatalogUrl` when that is set, and verified against a key built into the app; a copy bundled with the app is used until one has been fetched, or when the host is unreachable) and uses it to fill in each picker entry's display name, description, and thinking/effort options in the Chat, Cowork, and Code tabs. It never changes which models are offered, their order, or the default model (the first `inferenceModels` entry): those, 1M-context variants, and `labelOverride` still come from `inferenceModels` / discovery, and a model the catalog does not list keeps the built-in label. With `modelCatalogEnabled: false`, the app makes no catalog request and ignores any copy it fetched earlier. Picker names, descriptions, effort options, and recommended effort levels then come from the copy bundled with the installed app version, so they change only with app updates; `labelOverride`, `defaultModelEffort`, and `maxEffort` still apply. A model that copy does not list, typically one released after that version, may show no effort options until the app is updated. Applies to deployments configured on the device or by a bootstrap server; an install managed from the Claude admin console takes its model names and options from the console's settings and never fetches the catalog. +*** -> **modelCatalogUrl details** -> -> When set, the app fetches the catalog document and its signature file (the same URL with `.raw-sig.json` appended to the path) from this URL instead of `https://downloads.claude.ai/model-catalog/v1/catalog.json`, for a gateway or mirror inside your network serving Anthropic's two published files byte-for-byte. The document is still verified against the key built into the app, so an edited or re-signed copy is refused and the app keeps its last verified copy (or the bundled one); there is no key to configure. `https://` is required (`http://` only to a loopback address, and only when set on the device itself; a bootstrap server may not deliver a loopback or non-`https://` value); the server must answer the GET directly (redirects are not followed) and may honor `If-None-Match` with `304`, and must serve a document at least as new as the one the install last accepted (or the bundled seed) — an older one is refused and re-fetched on the retry interval until the mirror catches up. Ignored when `modelCatalogEnabled` is `false`, and on an install managed from the Claude admin console (which never fetches the catalog). A value that is not a valid URL, names a link-local or cloud-metadata host (e.g. `169.254.169.254`, `metadata.google.internal`), or is a loopback / non-`https://` value a bootstrap server delivers, turns the catalog fetch off (no fallback to `downloads.claude.ai`); the last fetched or bundled copy keeps labelling the pickers. On an install configured for a bootstrap server, the default location is not fetched until the server's configuration applies after sign-in, so a device does not poll `downloads.claude.ai` while the server may yet name a mirror; a mirror URL set on the device, cached earlier, or served in a pre-sign-in subset still fetches. Diagnostics report the location only as `hosted`, `custom`, `invalid` or `pending`; the value itself is treated like `bootstrapUrl`: host name only in telemetry, printed in full in the diagnostics bundle. +#### `inferenceIdpAuthFlow` -### Vertex +enumSince 2.7032.0 + +**Identity provider sign-in flow.** How the identity-provider sign-in runs: system browser (default) or the OS Microsoft Entra broker. + +One of: `browser`, `broker` -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| GCP project ID `inferenceVertexProjectId` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Google Cloud project ID for Vertex AI inference. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| GCP region `inferenceVertexRegion` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | GCP region where your Vertex AI Claude models are deployed. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Vertex AI base URL `inferenceVertexBaseUrl` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | PSC endpoint, if using one. | [`none`](#self-hosted-column) Part of the device's own route to the model, and a session host's route is its operator's to set | -| Vertex OAuth client ID `inferenceVertexOAuthClientId` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Desktop-app OAuth client ID. Enables Sign in with Google instead of a credentials file. | [`none`](#self-hosted-column) Configures a Google browser sign-in on the person's computer, and a host calls Vertex as its own identity | -| Vertex OAuth client secret `inferenceVertexOAuthClientSecret` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Secret for the Desktop-app OAuth client above. Google classifies installed-app client secrets as non-confidential, so this may be set from hosted config. | [`none`](#self-hosted-column) Secret for the person's own Google sign-in, and a host calls Vertex as its own Google identity | -| Vertex OAuth scopes `inferenceVertexOAuthScopes` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Override the Google OAuth scopes (space-separated). Leave blank for the default. | [`none`](#self-hosted-column) Sets scopes for a browser sign-in on the person's computer, and a host calls Vertex as its own identity | -| Vertex OAuth login hint `inferenceVertexOAuthLoginHint` | `string` | MDM + Bootstrap Added in 1.12603.0 | — | Pre-fill Google's account chooser and forward to your federated IdP. \{username} expands to the OS login name. | [`none`](#self-hosted-column) Steers a browser sign-in on the person's computer, and a host calls Vertex as its own Google identity | -| Workforce Identity audience `inferenceVertexWorkforceAudience` | `string` | MDM + Bootstrap Added in 1.10628.0 | — | Workforce-pool provider audience. When set, sign-in uses your own IdP plus a GCP STS exchange instead of a Google identity. | [`none`](#self-hosted-column) Configures a sign-in the person completes on their computer, and a host calls Vertex as its own identity | -| Workforce Identity billing project `inferenceVertexWorkforceUserProject` | `string` | MDM + Bootstrap Added in 1.10628.0 | — | GCP project for STS billing and quota. Defaults to the Vertex project ID above. | [`none`](#self-hosted-column) Bills the exchange of the person's own sign-in token, and a host calls Vertex as its own identity | -| Workforce Identity sign-in flow `inferenceVertexWorkforceAuthFlow` | `enum` | MDM + Bootstrap Added in 1.25927.0 | — | How the IdP sign-in runs: system browser (default) or the OS Microsoft Entra broker. One of: `browser`, `broker`. | [`none`](#self-hosted-column) Chooses how the person signs in on their computer, and a host calls Vertex as its own identity | -| Workforce Identity IdP (OIDC) `inferenceVertexWorkforceOidc` | `object` | MDM + Bootstrap Added in 1.10628.0 | — | Your organization’s OIDC IdP. The app runs an authorization-code-with-PKCE flow against this issuer and exchanges the returned ID token at GCP STS. | [`none`](#self-hosted-column) Sets up the person's sign-in on their own computer, and a host calls Vertex as its own Google identity | -| GCP credentials file path `inferenceVertexCredentialsFile` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Absolute path to service-account JSON. Leave blank to fall back to ADC. | [`none`](#self-hosted-column) Names a file on the person's computer that no host has | - -> **inferenceVertexWorkforceAuthFlow details** +[Self-hosted install](#self-hosted-column): MDM profile. Chooses a sign-in window on the person's computer, also used for the device's sign-in to the host. + +> **More detail** > -> * **`browser`** (default) — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. See the **IdP setup** notes on `inferenceGatewayOidc` for redirect-URI registration; the same rules apply here. -> * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, Company Portal on macOS). Requires the workforce-pool IdP to be **Microsoft Entra ID** — the `issuer` on `inferenceVertexWorkforceOidc` must be `https://login.microsoftonline.com/{tenant-id}/v2.0`. The broker satisfies Conditional Access policies that require a compliant/managed device or token protection, and needs no loopback redirect. The Entra app registration must include the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform. Not supported on Linux. +> * **`browser`** (default) — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. See the **IdP setup** notes on `inferenceIdpOidc` for redirect-URI registration. +> * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, Company Portal on macOS). Requires the IdP to be **Microsoft Entra ID** — the `issuer` on `inferenceIdpOidc` must be `https://login.microsoftonline.com/{tenant-id}/v2.0`. The broker satisfies Conditional Access policies that require a compliant/managed device or token protection, and needs no loopback redirect. The Entra app registration must include the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform. Not supported on Linux. > -> The GCP STS token-exchange step is unchanged in either flow; only how the Entra id\_token is acquired differs. +> Broker mode mints a token in the customer's own Entra tenant with the customer-configured `scopes` and forwards it to the customer's own gateway or proxy; both endpoints of that trust relationship are inside the customer's control. -> **inferenceVertexWorkforceOidc details** -> -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `clientId` | `string` | — | OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). | -> | `issuer` | `string` | — | HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. | -> | `authorizationUrl` | `string` | — | HTTPS authorization endpoint. Used with the token URL when no issuer is set. | -> | `tokenUrl` | `string` | — | HTTPS token endpoint. Used with the authorization URL when no issuer is set. | -> | `scopes` | `string` | — | Space-separated scopes. Defaults to openid profile email offline\_access. | -> | `redirectPort` | `integer` | — | Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. | -> | `redirectHost` | `enum` | — | Use localhost only if your IdP’s registered redirect URI specifies it. One of: `127.0.0.1`, `localhost`. | -> | `omitOfflineAccess` | `boolean` | — | Only enable if your IdP rejects the offline\_access scope on this client. Without it the app prompts for sign-in each time the token expires. | -> | `additionalRedirectReferrerHosts` | `string` | — | Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. | +*** -## Capabilities +#### `inferenceIdpOidc` -### Authentication +object -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Disable Claude.ai sign-in `disableDeploymentModeChooser` | `boolean` | MDM + Bootstrap Added in 1.3834.0 | `false` | Users see only this provider at the login screen. The option to sign in to Claude.ai is hidden. Defaults to `false`. | [`client`](#self-hosted-column) Shapes Desktop's sign-in screen and configuration source, settled before Desktop reaches the host | -| Disable claude:// deep-link handling `disableDeepLinkRegistration` | `boolean` | MDM + Bootstrap Added in 1.6889.0 | `false` | Stop external apps and websites from opening Claude Desktop via claude:// links. Defaults to `false`. | [`client`](#self-hosted-column) Desktop registers claude:// links on the person's computer at launch, before it has signed in to the host | +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) -> **disableDeploymentModeChooser details** -> -> Set in a device-management profile, this key also keeps that profile in charge. Without it, a user who signs in to Claude.ai with an organization whose Claude Desktop deployment is configured in the admin console moves the device to that organization's configuration, at later launches too. The profile then still supplies what no configuration server can deliver, such as the network proxy, and a few device safeguards, such as `sessionRetentionHold`; every other key, update keys included, comes from the organization's configuration. A profile that sets only app-behavior keys (`disableAutoUpdates`, …) and no other key, not even `forceLoginOrgUUID`, is not affected: it keeps those keys over the organization's configuration without this key, and adding this key there would make the profile the device's whole configuration. The account menu offers the way back to a profile that sets a provider or a server. `forceLoginOrgUUID` in the profile limits the move to the organizations it lists. A value served only by the profile's own `bootstrapUrl` server does not keep the device. +Since 2.7032.0 -### Built-in browser +**Identity provider (OIDC).** Your organization’s OpenID Connect identity provider. The user’s token is sent as the Bearer credential to the gateway or the Bedrock proxy. -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Allow the built-in browser `builtinBrowserEnabled` | `boolean` | MDM + Bootstrap Added in 2.2553.0 | `false` | Offer the built-in browser in Cowork and Code sessions so users and Claude can open and work with web pages. Site sign-ins stay on the device until cleared. Defaults to `false`. | [`none`](#self-hosted-column) The browser pane lives in Desktop on the person's computer, and host sessions get no browser tools | -| Default site policy in the built-in browser `builtinBrowserDefaultDomainPolicy` | `enum` | MDM + Bootstrap Added in 2.2553.0 | `allow` | Whether Claude may open sites in the built-in browser by default; the allowed or blocked list is the exception. Mirrors the Claude in Chrome site policy. One of: `allow`, `block`. Defaults to `allow`. | [`none`](#self-hosted-column) Sets the default for Desktop's browser tools, and host sessions get no browser tools to allow or block | -| Allowed sites in the built-in browser `builtinBrowserAllowedDomains` | `string[]` | MDM + Bootstrap Added in 2.2553.0 | — | Sites Claude may open, read, and act on in the built-in browser when the default site policy is block. Users can still view other sites. | [`none`](#self-hosted-column) Lists sites allowed for Desktop's browser tools, and host sessions get no browser tools | -| Blocked sites in the built-in browser `builtinBrowserBlockedDomains` | `string[]` | MDM + Bootstrap Added in 2.2553.0 | — | Sites Claude may not open, read, or act on in the built-in browser when the default site policy is allow. Users can still view them. | [`none`](#self-hosted-column) Lists sites blocked for Desktop's browser tools, and host sessions get no browser tools | +[Self-hosted install](#self-hosted-column): MDM profile. Configures an interactive sign-in on the person's computer, reused to sign the device in to the host. -> **builtinBrowserEnabled details** -> -> When enabled, Cowork and Code sessions get a built-in browser pane. Users can open any site in it; Claude can open, read, and act on pages with its browser tools once the user approves each site (private-network hosts ask again per action unless the user always allows the host). Pages load directly from the user's machine, so your network controls apply; the pane's sign-ins and cookies stay in the app's browser profile on the device until cleared. -> -> Off (default): no browser pane; Code sessions keep the localhost-only dev-server preview. With `bootstrapUrl` set, put this key in the served configuration: a device-profile value alone leaves the browser off. On an install managed from the Claude admin console this follows the console's Built-in browser switch. +> **More detail** > -> When a public site opens or is framed in the pane, and before Claude works with it, the app checks its address (query removed) against Anthropic's site safety list on `releases.claude.com`, signed out, with no account, organization, or device identifier (admin console installs: signed in, on the host that serves their configuration). A site it blocks stays blocked to Claude under every key below. Private addresses, names resolving to them, and internal-suffix or single-label names are never sent (a name under a public domain is checked even if only your VPN resolves it). Allow `releases.claude.com` through your firewall: if a check fails, users can browse but Claude's page tools stay off for that site. +> Used with `inferenceCredentialKind: "external-idp"`. The app discovers `/.well-known/openid-configuration`, runs an OIDC authorization-code (PKCE) sign-in in the browser with `clientId` (or through the OS broker, see `inferenceIdpAuthFlow`) and sends the token as `Authorization: Bearer` on every inference request: to `inferenceGatewayBaseUrl` on the gateway provider, or on Bedrock to `inferenceBedrockBaseUrl`, which is then required: only a proxy that validates the token accepts it, never Amazon Bedrock itself (to sign in straight to Bedrock use `interactive`, AWS IAM Identity Center). On Bedrock this kind has no model discovery: list the models in `inferenceModels`. > -> `builtinBrowserDefaultDomainPolicy` and its two site lists restrict where Claude may browse. A separately deployed Claude Code [managed-settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) file still applies: `disableBrowserExternalNavigation: true` keeps the browser off even with this key on, and `browserExternalPageTools: "disabled"` keeps the pane but turns Claude's page tools off for external sites. Takes effect after the app restarts. - -> **builtinBrowserDefaultDomainPolicy details** +> **Bearer token type.** `id_token` (the default) sends the OIDC ID token; the receiver validates signature, `iss` and `aud` (the `clientId` here). `access_token` sends the OAuth access token, for gateways and proxies that validate as an OAuth resource server; `scopes` must then name the registered API scope. Either way the receiver must check `aud`, or it accepts any token from your tenant. > -> Applies when `builtinBrowserEnabled` is on, in both Cowork and Code sessions, and decides which sites Claude may open, read, or act on with its browser tools; users can still view any site themselves. `allow` (default): every site except entries in `builtinBrowserBlockedDomains`. `block`: no site except entries in `builtinBrowserAllowedDomains`. Under either policy `coworkEgressAllowedHosts`, when set to anything but `*`, is an outer bound: sites outside it are refused to Claude in the browser too. A site Anthropic's site safety list blocks stays blocked to Claude under either policy (see `builtinBrowserEnabled`); for a site the list only flags for confirmation, Claude asks the user before each of its actions under `allow`, and skips that confirmation only when the site matches a `builtinBrowserAllowedDomains` entry under `block`. A value that cannot be read is treated as `block` until it is fixed. +> **IdP setup.** The callback is `http://127.0.0.1:/callback` (`localhost` with `redirectHost: "localhost"`); register exactly that. **Entra:** a public-client app with a *Mobile and desktop applications* redirect URI `http://127.0.0.1/callback` (omitting the path fails with `AADSTS50011`); in `access_token` mode also grant the API's delegated permission, or sign-in fails with `AADSTS65001`. **Okta:** a *Native* app with `http://127.0.0.1:/callback` and that port in `redirectPort`. > -> The policy also limits what pages load: a page in the pane, including one a user opened, cannot load frames, scripts, images, or other content from a site the policy does not admit (a blocked page a user opens still loads content from its own site). Under `block`, or with a `coworkEgressAllowedHosts` list, include the CDN and API hosts your allowed sites depend on. +> **Refresh.** With `offline_access` the app renews the token silently and asks for a browser sign-in only when refresh fails (Google returns no `id_token` on refresh, so `id_token` mode there re-prompts about hourly). > -> This key and the two site lists work the same way as the Claude in Chrome site policy in the admin console. They are set separately here, except on an install managed from the Claude admin console, where they follow your organization's browser site permissions there. +> **Older names.** Gateway configurations written before this key use `inferenceGatewayOidc` / `inferenceGatewayOidcAuthFlow` with the `interactive` kind; they stay readable and mean the same sign-in. -> **builtinBrowserAllowedDomains details** +> **Child attributes (11)** > -> Used when `builtinBrowserDefaultDomainPolicy` is `block`; ignored under `allow`. A site matching an entry is one Claude may open and work with using its browser tools; every other external site is treated as blocked by your organization: Claude cannot open it, cannot read or act on it, and frames, popups, and redirects into it from a page Claude is working on are refused. A user can still type its address and view it themselves. Listing a site here never unblocks a site Anthropic's site safety list blocks (see `builtinBrowserEnabled`); for a site that list only flags for confirmation, an entry here is your organization vouching for it, so Claude works with it without asking before each action. -> -> Entries use the same grammar as `coworkEgressAllowedHosts`, except that bare `*` is dropped: as in Claude in Chrome, no allowed-sites entry opens every site. Set the policy to `allow` for that. A wildcard whose base is a public suffix (`*.co.uk`, `*.github.io`) is likewise ignored so an entry can never open a whole shared registry. Any other entry outside that grammar is kept but matches nothing (the app log and the editor name it); a value that cannot be read at all allows nothing until it is fixed. A plain hostname entry (`example.com`) also covers its `www.` form, and a `www.` entry covers the bare name, but no other subdomain. `localhost` dev servers are always reachable, so listing them changes nothing. +> **clientId** `string` *required* > -> Empty or unset (default): under `block`, Claude may open no external site. On an install managed from the Claude admin console this follows your organization's browser site permissions there. - -> **builtinBrowserBlockedDomains details** +> OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). > -> Used when `builtinBrowserDefaultDomainPolicy` is `allow` (the default); ignored under `block`. A site matching an entry is treated as blocked by your organization: Claude cannot open it, cannot read or act on it with its browser tools, and frames, popups, and redirects into it from a page Claude is working on are refused. A user can still type its address and view it themselves: the pane shows a "blocked by your organization's policy" banner and Claude's tools stay off there. To take the external browser away from users as well, deploy Claude Code's `disableBrowserExternalNavigation` managed setting instead. A blocked site is refused before the site safety check, so its address is never sent to Anthropic. +> **issuer** `string` > -> Entries use the same grammar as `coworkEgressAllowedHosts`; `*` blocks every external site. An entry outside that grammar is kept but matches nothing (the app log and the editor name it); a value that cannot be read at all blocks every external site until it is fixed. As in Claude in Chrome, a plain hostname entry (`example.com`) also covers its `www.` form, and a `www.` entry covers the bare name, but no other subdomain. `localhost` dev servers are never affected. +> HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. > -> Use this key for exceptions inside an allowed egress wildcard or when egress is open. Empty or unset (default): no sites beyond the egress list are blocked. On an install managed from the Claude admin console this follows your organization's browser site permissions there. - -### Chat surface - -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Allow Chat `chatTabEnabled` | `boolean` | MDM + Bootstrap Added in 1.13576.0 | — | Enable Chat. Quick questions and drafting. | [`none`](#self-hosted-column) No Chat session can start on a session host, so the switch has nothing to turn on or off there | -| Desktop home `desktopHome` | `enum` | MDM + Bootstrap Added in 1.52386.0 | — | Unifies Chat and Cowork into one home. When set, it replaces Allow Chat, Advanced file analysis, and Allow Cowork. Leave unset to keep those. One of: `standard`, `off`. | [`server`](#self-hosted-column) Alone decides Cowork, which is on only while this is unset or standard; else the host refuses it and Desktop hides it | -| Advanced file analysis `chatAdvancedFileAnalysisEnabled` | `boolean` | MDM + Bootstrap Added in 1.14271.0 | — | Allow Claude to run code in a local sandbox to analyze attached files it can’t read natively — like Excel and PowerPoint. Off by default. | [`none`](#self-hosted-column) Configures a Chat session's local sandbox, and no Chat session can start on a self-hosted install | - -> **desktopHome details** +> **authorizationUrl** `string` > -> `standard` turns on Unified Claude, which combines Chat and Cowork into one experience. `off` turns Chat and Cowork off entirely. `isClaudeCodeForDesktopEnabled` still decides Code. Remove the key to hand control back to `chatTabEnabled`, `chatAdvancedFileAnalysisEnabled`, and `coworkTabEnabled`. Values are case-sensitive, so `Standard` is not recognized. A value that the app does not recognize is read as `off`, so update the app on devices before you deploy a value added in a later version. - -> **chatAdvancedFileAnalysisEnabled details** +> HTTPS authorization endpoint. Used with the token URL when no issuer is set. > -> Also enables inline data analysis. Of the user's own files, the sandbox can read only those attached to the conversation, plus folders added to the chat's project through the app (read-only). +> **tokenUrl** `string` > -> Commands in the sandbox can reach the hosts in `coworkEgressAllowedHosts`, and no others. If that list is unset or empty, they have no network access. With `*` in the list they can reach any host, as in Cowork. Plugin CLIs are the exception: they can always reach the hosts their plugin declares, plus the listed hosts (with `*`, only the declared hosts). Older app versions give the sandbox no network access by default. +> HTTPS token endpoint. Used with the authorization URL when no issuer is set. > -> As in Cowork, commands run without an approval prompt. So they can upload anything the sandbox can read to a listed host, and run what they download from one. To have Claude ask before each command, set `Bash` to `ask` in `builtinToolPolicy`, which also applies to Cowork and Code. To let commands install packages, list the hosts of the package manager's default index (for pip, `pypi.org` and `files.pythonhosted.org`). For a private mirror, list its host instead. Nothing points package managers at a mirror, so each command must name it (for pip, `--index-url`). +> **bearerTokenType** `enum` (default: id\_token) > -> Project folders are not available in the sandbox of a chat started while a rule on `Read`, `Grep` or `Glob` is set: in `disabledBuiltinTools`, in `builtinToolPolicy` with a value other than `allow`, or as a deny or ask rule in Claude Code's own managed settings on the device, whether or not the rule covers the folder. They are not available either where those managed settings cannot be read, or where Claude Code takes its managed settings from a gateway. Claude's file tools still read what the rules allow. - -### Code surface - -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Allow Code `isClaudeCodeForDesktopEnabled` | `boolean` | MDM + Bootstrap Added in 1.2581.0 | `true` | Enable Code. Claude writes and runs code. Defaults to `true`. | [`server`](#self-hosted-column) The host refuses Code sessions and routines where the tab is off, and tells Desktop to hide it | -| SSH host allowlist `sshHostAllowlist` | `string[]` | MDM + Bootstrap · Beta Added in 1.40609.0 | — | SSH hosts for Code sessions. Unset: off unless the device’s Claude Code managed settings list hosts. An admin’s empty list: off even then. \* allows any host. | [`none`](#self-hosted-column) Governs SSH sessions started from the person's computer, which self-hosted installs never offer | -| SSH client program `sshClientPath` | `string` | MDM + Bootstrap · Beta Added in 1.46388.1 | — | Absolute path to the OpenSSH ssh program the app runs for SSH sessions. Unset: the first ssh on the user’s PATH. | [`none`](#self-hosted-column) Names the ssh program on the person's computer, and self-hosted installs offer no SSH sessions | -| SSH connection engine `sshTransport` | `enum` | MDM + Bootstrap · Beta Added in 1.52386.0 | — | Which SSH engine carries Code sessions: the OpenSSH ssh program on the device, or the app’s built-in SSH library. Unset or auto: the build’s default. One of: `auto`, `system-openssh`, `builtin`. | [`none`](#self-hosted-column) Chooses the SSH engine on the person's computer, and self-hosted installs offer no SSH sessions | - -> **sshHostAllowlist details** +> Which token to send as the bearer. Use access token for a gateway or proxy that validates as an OAuth resource server. > -> When off, the SSH option is hidden and any connection attempt is refused. +> One of: `id_token` (default), `access_token` > -> Entries are exact hostnames (`build01.corp.example.com`) or `*.` wildcards (`*.corp.example.com` matches the apex and subdomains at any depth); matching is case-insensitive and ignores a `user@` prefix. The list is compared with the `HostName` that the user's SSH configuration (`~/.ssh/config`) gives for the host they entered, or with the entered host itself when the configuration has no entry for it or cannot be evaluated. So an alias is allowed when the host it points to is listed, whatever the alias is called, and refused when it is not. A session's jump hosts (`ProxyJump`, or `ProxyCommand ssh -W %h:%p host`) must be listed too, by `HostName`. One the app fails to read, and any other `ProxyCommand` (`ssh -i`…), is permitted when the resolved host matches (this key governs which hosts the app offers, not network egress). The built-in SSH library refuses every `ProxyJump`. +> > **More detail** +> > +> > In **access-token** mode the token's audience must be your gateway or proxy. On IdPs where the requested scopes decide the audience (**Entra ID**), include its API resource scope in `scopes` — `api:///.default`, or a named delegated scope you exposed via *Expose an API*. With only the standard OIDC scopes (`openid profile email offline_access`) Entra returns a v1.0 Microsoft Graph token whose issuer (`https://sts.windows.net//`) doesn't match the v2.0 issuer configured here, so a gateway that validates `iss` rejects it. On IdPs that set the access-token audience out-of-band (Keycloak audience mapper, Auth0 default audience, Okta custom authorization server), a resource scope in `scopes` isn't required — the audience comes from the IdP-side configuration. > -> This is opt-in because a remote session runs Claude Code on the SSH host and the app forwards the session's inference credential to it, plus your OTLP collector endpoint and auth headers when `otlpEndpoint` is set. List only hosts you trust with those. Token-based credentials are forwarded. File-based credentials (Bedrock IAM Identity Center sign-in or AWS profile, Vertex Google sign-in or a credentials file) are never forwarded, and a session that needs one from the device is refused. +> **scopes** `string` > -> If this key is unset, an `sshHostAllowlist` in Claude Code's own managed-settings file on the device still applies; when both are set, this key wins where the app's configuration is admin-managed (MDM, the admin console, or a device-managed bootstrap URL) and otherwise applies only while that file sets none. `allowedWorkspaceFolders` still applies on the remote host. Claude Code's managed settings on a host replace the sandbox, network, permission, and MCP rules this app sends unless they set `parentSettingsBehavior` to `"merge"`. - -> **sshClientPath details** +> Space-separated scopes. Required in access-token mode: set the gateway or proxy API scope. offline\_access is appended automatically unless disabled below. > -> Pins which OpenSSH client the app runs wherever it starts `ssh`: evaluating the user's SSH configuration (`ssh -G`), making the SSH connection and its channels, and the Code tab's terminal. `ssh-keygen` and `ssh-add` are taken from the same directory when they exist there, otherwise from PATH. The program must be OpenSSH 7.6 or newer. To carry the connection on Windows it must be Win32-OpenSSH 9.4 or newer, or another OpenSSH 8.5 or newer under Program Files, such as Git for Windows' `usr\bin\ssh.exe`, only where device policy, or the configuration server it names, sets this key and sets the SSH connection engine setting to `system-openssh`; the app points such a client at the `.ssh` folder of the user's Windows profile, and asks for a password, code or key passphrase only on a direct connection (no jump host, `ProxyCommand`, `Match exec`, `KnownHostsCommand`, `PKCS11Provider` or `SecurityKeyProvider`); otherwise only a key that needs nothing typed signs in. Set such a client only on desktops with one user. On macOS and Linux a wrapper script that ends in one is accepted, on Windows it must be an `.exe` (no .cmd, .bat or .ps1). When this key is set and the program is missing, cannot be run, or is too old, SSH sessions fail with an error telling the user to ask their IT administrator — the app never falls back to another ssh. The connection itself runs through this program on the system-OpenSSH engine, which the SSH connection engine setting's `system-openssh` value selects on every platform; when the app's built-in SSH library makes the connection instead, this key still governs configuration evaluation (`ssh -G`), host-key lookups (`ssh-keygen`) and the terminal. On a device that a Claude.ai sign-in has moved to an admin-console organization (see `disableDeploymentModeChooser`), the device profile's value is ignored: set the key in admin settings (which cannot name such a client). There, until the organization's configuration has loaded, no client is pinned. - -> **sshTransport details** +> **appendOfflineAccess** `boolean` (default: true) > -> `system-openssh`: the app makes every SSH connection by running an OpenSSH `ssh` program — the one `sshClientPath` names, otherwise the first `ssh` on the user's PATH (on Windows, a Win32-OpenSSH `ssh.exe`: the PATH one, else the in-box or Microsoft-installed client) — so the organization's own OpenSSH build, with its Kerberos/GSSAPI, certificate and `ssh_config` support, is what authenticates. The program must be OpenSSH 7.6 or newer (Windows: Win32-OpenSSH 9.4 or newer, or another OpenSSH that `sshClientPath` names: see that key). When `sshClientPath` is set and that program cannot be used, sessions fail with an error telling the user to ask their IT administrator rather than falling back; when it is unset and Windows has no usable client, the built-in library is used. +> Automatically append offline\_access to scopes so the IdP returns a refresh token for silent refresh. > -> `builtin`: the app's built-in SSH library makes the connection, whatever the build's default. +> > **More detail** +> > +> > Turn off only if your authorization server rejects `offline_access` as an unknown scope; include the server’s own refresh-token scope in **Scopes** instead. > -> `auto` or unset: the build's default engine. +> **resource** `string` > -> An explicit value overrides the default at each host's next connect or reconnect. An open app takes a device profile's change at its next configuration check. From a configuration server it takes only `builtin`, once two checks in a row return it (about 12 minutes by default); other values wait until it is reopened or the user signs in again. A value that cannot be read, such as a misspelling, counts as `builtin` and waits likewise. Once a server's configuration has loaded it decides, even if it omits the key; until then the device profile's value applies. On a device that a Claude.ai sign-in has moved to an admin-console organization (see `disableDeploymentModeChooser`), the device profile's value is ignored: set the key in the admin console. There, until the organization's configuration has loaded, the build's default engine is used. - -### Cowork surface - -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Allow Cowork `coworkTabEnabled` | `boolean` | MDM + Bootstrap Added in 1.9659.0 | `true` | Enable Cowork. Claude works on longer tasks like research, analysis, and documents. Defaults to `true`. | [`none`](#self-hosted-column) On a session host desktopHome alone decides Cowork: to turn Cowork off, set desktopHome to off in its policy document | - -### Workspace - -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Allowed egress hosts `coworkEgressAllowedHosts` | `string[]` | MDM + Bootstrap Added in 1.2581.0 | — | Hosts agent tools may reach in Cowork and Chat (Code: in part). An empty list acts as unset for tools, but stops Claude opening sites in the built-in browser. | [`server`](#self-hosted-column) Tools in the host's sessions make the network calls, so the host limits which addresses they may reach | -| Allowed workspace folders `allowedWorkspaceFolders` | `object[]` | MDM + Bootstrap Added in 1.2581.0 | — | Folders where Claude may work. Applies to Cowork and Code sessions and to the project folders a chat reads. Leave unset for unrestricted access. | [`server`](#self-hosted-column) The host refuses file access outside folders listed as full paths, and Desktop checks those listed with \~ or a variable | -| Block reads outside working directories `blockReadsOutsideWorkingDirectories` | `boolean` | MDM + Bootstrap Added in 1.46388.1 | — | Keep Claude from reading files outside a Code session’s working directories. File tools refuse such reads; sandboxed shell commands lose the home directory. | [`server`](#self-hosted-column) The host starts Code sessions, so it hands Claude Code the block on reads outside their folders | -| Allow Auto mode `autoModeEnabled` | `boolean` | MDM + Bootstrap Added in 1.10628.0 | — | Offer Auto mode in Code (on unless set to false); set to true to also offer it in Cowork as “Automatically approve”. Claude decides which actions need approval. | [`server`](#self-hosted-column) The host allows or refuses Auto mode for the sessions it runs, and tells Desktop what to offer | -| Disable bypass permissions mode `disableBypassPermissionsMode` | `boolean` | MDM + Bootstrap Added in 1.46388.1 | — | Remove the bypass permissions mode from Code sessions and Cowork tasks, so Claude always follows the permission policy. Off by default. | [`none`](#self-hosted-column) A session host never offers bypass mode, so every session it runs already has it off | -| Disable bundled skills and workflows `disableBundledSkills` | `boolean` | MDM + Bootstrap Added in 1.15962.0 | — | Disables Claude Code’s bundled skills and workflows (deep-research and similar). Use where WebFetch/WebSearch aren’t available. | [`server`](#self-hosted-column) The host starts Claude Code, so it is the one that turns the bundled skills off | -| Allow user-created skills `skillCreationEnabled` | `boolean` | MDM + Bootstrap Added in 1.25927.0 | — | Allow users to create and upload their own skills. When off, the creation and upload surfaces are hidden and the agent’s skill-creation tools are disabled. | [`server`](#self-hosted-column) The host stores people's skills, so when this is off it refuses new ones and tells Desktop to hide creation | -| Allow user-added plugin marketplaces `userPluginMarketplacesEnabled` | `boolean` | MDM + Bootstrap Added in 1.37937.0 | — | Allow users to add plugin marketplaces. When off, marketplaces your organization did not provision are hidden and the app’s sessions do not load their plugins. | [`reported`](#self-hosted-column) Desktop hides and refuses adding a marketplace when off; no session host loads a person's own marketplaces yet | -| Allow user-added plugins `userPluginUploadsEnabled` | `boolean` | MDM + Bootstrap Added in 1.37937.0 | — | Allow users to add their own plugins. When off, every in-app option for adding one is hidden and uploads that still reach the app are refused. | [`server`](#self-hosted-column) The host keeps the plugins people upload and loads them in their sessions, and refuses new ones when this is off | -| Allow scheduled tasks `scheduledTasksEnabled` | `boolean` | MDM + Bootstrap Added in 2.110.0 | — | Allow scheduled tasks in Cowork and Code. When off, the Scheduled page is hidden, existing tasks stop running, and Claude cannot create new ones. | [`server`](#self-hosted-column) The host runs scheduled tasks, so when this is off it refuses to create or run them | -| Allow keep awake `keepAwakeEnabled` | `boolean` | MDM + Bootstrap Added in 2.7032.0 | — | Let Claude keep the computer awake. When off, Claude never prevents sleep and hides the keep-awake switches in Settings, the Scheduled page and the Code tab. | [`reported`](#self-hosted-column) Desktop itself asks the person's computer to stay awake, and shows the keep-awake switches | -| Allow Developer Mode `developerModeEnabled` | `boolean` | MDM + Bootstrap Added in 2.37337.1 | — | Let users turn on Developer Mode. When off, the app’s developer tools and the option to install an unpacked extension are unavailable. | [`reported`](#self-hosted-column) Desktop offers its own Developer menu, developer tools and debugger on the person's computer | -| Default Quick Entry shortcut `quickEntryDefaultShortcut` | `string` | MDM + Bootstrap Added in 3.1623.0 | — | Set the shortcut that opens Quick Entry, such as Ctrl+Alt+K, for users who haven’t set their own in Settings. Use “off” for no shortcut. | [`reported`](#self-hosted-column) Desktop registers its Quick Entry shortcut with the operating system of the person's computer | -| Allow screenshots of the screen and other apps `quickEntryScreenshotsEnabled` | `boolean` | MDM + Bootstrap Added in 3.6556.1 | — | Let users take screenshots of their screen or other apps’ windows in Quick Entry on macOS. When off, it offers none and never asks for Screen Recording access. | [`reported`](#self-hosted-column) Desktop takes the picture on the person's computer and offers it in its own Quick Entry window | -| Allow sharing files open in other apps `quickEntryFileSharingEnabled` | `boolean` | MDM + Bootstrap Added in 3.6556.1 | — | Let users attach the file open in another app’s window in Quick Entry on macOS. When off, it offers none and never asks for Accessibility access. | [`reported`](#self-hosted-column) Desktop finds the file on the person's computer and offers it in its own Quick Entry window | -| Skip WebFetch domain check `skipWebFetchPreflight` | `boolean` | MDM + Bootstrap Added in 1.37937.0 | — | Skip Claude Code’s WebFetch domain lookup against api.anthropic.com in Code sessions. Off by default; turn on when that host is blocked. | [`none`](#self-hosted-column) A session host always skips the web fetch preflight check, whatever is written | -| Built-in tool policy `builtinToolPolicy` | `object` | MDM + Bootstrap Added in 1.8089.0 | — | Approval per tool or rule such as Bash(curl \*). “ask” prompts the user before each matching call. “allow” is the default. To block, use Disabled built-in tools. | [`server`](#self-hosted-column) The host hands each session the admin's allow or ask rule for each built-in tool | -| Disabled built-in tools `disabledBuiltinTools` | `string[]` | MDM + Bootstrap Added in 1.2581.0 | — | Built-in tools, or argument-scoped permission rules such as Read(//\*\*/.env), denied in Cowork and Code. | [`server`](#self-hosted-column) The host starts each session with the built-in tools and tool uses the admin denies turned off | -| Enable tool search `toolSearchEnabled` | `boolean` | MDM + Bootstrap Added in 1.21459.0 | `false` | Load MCP tool schemas on demand (tool search) instead of inlining every schema into context. Defaults to `false`. | [`server`](#self-hosted-column) The host starts Claude Code, so it turns tool search on or off for its sessions | -| Organization instructions `organizationInstructions` | `string` | MDM + Bootstrap Added in 1.37937.0 | — | Appended to Claude’s system prompt in Chat, Cowork, and Code. Guidance the model follows, not an enforced control. Up to 3,000 characters. | [`server`](#self-hosted-column) The host adds the admin's instructions to every session it starts | -| Require full VM sandbox `requireCoworkFullVmSandbox` | `boolean` | MDM + Bootstrap · Deprecated Added in 1.2581.0 | `false` | Runs tools inside an isolated VM instead of the host. Stronger isolation; slower file access and no host-process tools. Defaults to `false`. | [`none`](#self-hosted-column) Chooses how Cowork runs on the person's own computer, and third-party installs no longer read it | - -> **coworkEgressAllowedHosts details** +> Access-token audience of the gateway or proxy: an https URL or an AD FS relying-party identifier, sent as the RFC 8707 resource. Leave unset for Entra ID. > -> Applies only to **tool calls**, in Cowork, Code and Chat. In Cowork it covers the sandbox's web fetch, shell commands and package installs. In Chat it covers web fetch and commands in the file-analysis sandbox. In Code it's [translated into Claude Code's network sandbox allowlist](https://claude.com/docs/third-party/claude-desktop/code.md#applied-as-managed-policy), and by default a separately deployed Claude Code managed-settings file takes precedence. It does **not** cover Web Search (which runs at your inference provider), inference, or MCP traffic. A list other than `*` also bounds where Claude may browse in the built-in browser. When unset, Cowork and Chat refuse web fetch. +> > **More detail** +> > +> > Set this only for an IdP that implements RFC 8707 resource indicators. The app then sends `resource=` on the authorization, token and refresh requests, so the access token the IdP issues is audience-restricted to the gateway or proxy rather than to the IdP's own APIs. Use it with `bearerTokenType: access_token`; in `id_token` mode the ID token's audience is always `clientId`. Ignored with the OS-broker sign-in flow (the sign-in flow key set to `broker`), which is Entra-only. +> > +> > **Microsoft Entra ID:** leave unset — the v2.0 endpoint rejects `resource`; request the API scope in `scopes` instead (`api:///.default`). **AD FS:** enter one of the relying-party trust's identifiers, spelled as it is registered there. A value with no scheme (a host name with or without a port or path, a single name, or a GUID; `name:digits` also reads as a host name with a port) is sent as `https://`; an identifier with a scheme of its own (`urn:…`, or an organization-defined one such as `VENDOR:URI:…`) is sent exactly as written. A trust whose only identifier is a bare name or GUID will not match, because those are sent as `https://`: add an `https://…` or `urn:…` identifier to the trust and enter that one here. With any other identity provider, use an absolute URI without a fragment (RFC 8707 — the IdP rejects one as `invalid_target`). Changing it signs users in again. > -> Entries are exact hostnames (`api.github.com`), wildcards (`*.corp.com` matches subdomains at any depth, not `corp.com` itself), or `*` to allow all. IP addresses match only when listed exactly. In Cowork and Chat, web fetch always blocks `localhost` and private addresses, and shells reach only listed hosts (not your inference provider's, unless listed), or none when unset. Code's shell obeys that limit only on macOS, and with bubblewrap and socat on Linux or WSL2; elsewhere, Windows included, it reaches any host. Code's web fetch isn't limited. +> **redirectPort** `integer` > -> Any entry except bare `*` may carry a `:port` suffix (`*.corp.com:8443`) restricting it to that port. IPv6 literals are not supported. Invalid entries are dropped with a log warning and the rest still work. An unreadable value counts as an empty list. Ports are enforced for the Cowork sandbox's web fetch, shell, and package-install egress; plugin CLIs also reach hosts their plugin declares and ignore port-scoped entries for now, and the Code translation treats them as the bare host. Only deploy port-scoped entries once your whole fleet supports them (`disableAutoUpdates` pins builds). On an older build, a single one invalidates the session's whole shell and package-install allowlist. +> Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. > -> Open listed hosts on your network firewall too. - -> **allowedWorkspaceFolders details** +> **redirectHost** `enum` > -> Paths can reference `~` and these environment variables, expanded per user: `%OneDrive%`, `%OneDriveCommercial%`, `%OneDriveConsumer%`, `%APPDATA%`, `%LOCALAPPDATA%`, `%USERNAME%`, `%XDG_DOCUMENTS_DIR%`. The set is fixed; an entry that references any other `%VAR%`, or one that is unset on the device, allows none. +> Use localhost only if your IdP’s registered redirect URI specifies it. > -> Each folder is interpreted on the machine the session runs on. For a Code session on an SSH host, `~` means the remote user's home, an entry that references a `%VAR%` allows none there, and the session's working directory must be inside one of the folders as they exist on that host. One list serves every machine: `["~/work", "/srv/work"]` governs `~/work` for each user, on a managed Mac or a Linux host, and `/srv/work` on a host that has it. A folder that names nothing real on a given machine allows nothing there. On an SSH host, an entry counts only if it is an absolute path as that host spells one (`~/work`, not `work`; on Windows `C:\work`, not `\work`), with no `..`. On Linux or Mac a `\` counts as `/`, except a leading `\\`. One inside another listed folder does not count on its own (its read-only mode still applies); if it is a link, list the folder it points to. An empty list allows none; unset leaves access unrestricted. +> One of: `127.0.0.1`, `localhost` > -> A listed folder is one Claude may write as well as read, unless the entry's `mode` (Access mode in Setup) makes it read-only; that field's own description says how far read-only reaches. A Code session can reach every listed folder, not only the one it was opened in. Setting this key also turns on Claude Code's sandbox where it runs (macOS, or Linux and SSH hosts with bubblewrap): there a shell command normally writes in the listed folders without an approval prompt, and its writes to most other places, such as a package cache in the home directory, are refused. A home directory holds shell start-up files and SSH keys, so list work folders, not a whole home directory. +> **additionalRedirectReferrerHosts** `string` > -> The list also limits which folders of a project a chat reads. +> Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `path` | `string` | — | Absolute folder path. May start with \~ or one of the listed %VAR% tokens, expanded per user. Subfolders are included. | -> | `isDefaultSelected` | `boolean` | — | Shows as a folder chip on the new-task page and skips the trust prompt. Users can remove it. | -> | `mode` | `enum` | — | Read-only folders can be viewed and searched but not modified in Cowork. In Code, applies to file tools only. Over SSH, also to Bash in its sandbox. One of: `rw`, `ro`. | +> > **More detail** +> > +> > Only needed when the IdP completes sign-in from a host other than the authorization URL’s. When a callback is rejected for a referrer mismatch, the rejected host is named in the app log — add that hostname here. -> **blockReadsOutsideWorkingDirectories details** +*** + +#### `inferenceStreamIdleTimeoutSec` + +integerRange: 300–1,800Since 1.44121.1 + +**Stream idle timeout.** Extra seconds to wait for model output on a streaming response that is sending only keep-alive pings. Gateway provider only. Default 300. + +[Self-hosted install](#self-hosted-column): Server side. The host makes the model calls, so it sets how long a stream sending only keep-alive pings may wait for output. + +> **More detail** +> +> Raises how long Cowork, Chat and Code sessions wait for the next model event on an open streaming response (Claude Code's `CLAUDE_STREAM_IDLE_TIMEOUT_MS`). It only helps when the gateway writes SSE keep-alive `ping` events (or `:` comment lines) into the response while the upstream model is silent — for example a LiteLLM proxy with keep-alive pings enabled in front of Amazon Bedrock. With pings arriving, Claude Code accepts at least about five minutes of keep-alives and then waits this many seconds more for real model output before abandoning the request. Gateway provider only; the other providers keep Claude Code's defaults. +> +> A response on which nothing at all arrives — no pings — still fails after about 5 minutes regardless of this key, because at the device a silent connection cannot be told apart from a dead one. If long generations fail behind a gateway that does not send pings, configure the gateway to send them rather than raising this value. A common case is automatic compaction, in which a session sends its whole conversation in one streaming request and waits for a long summary; when that request fails, the error reads `Prompt is too long · automatic compaction failed:` followed by the cause. While this key is set, the app's value takes precedence over `CLAUDE_STREAM_IDLE_TIMEOUT_MS` in Claude Code's own managed settings for sessions the app starts; when it is unset, that setting still applies. Values outside 300–1800 are rejected at parse time (the error is listed in the diagnostics report) and the default applies. + +*** + +### Anthropic + +#### `inferenceAnthropicApiKey` + +stringSince 1.8089.0 + +**Claude API key.** Leave blank to sign in with your browser, or to supply the key via a credential helper. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +[Admin Console](#the-works-with-column): Not available. + +*** + +### Bedrock + +#### `inferenceBedrockRegion` + +stringSince 1.2581.0 + +**AWS region.** AWS region for the Bedrock runtime endpoint. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +*** + +#### `inferenceBedrockBaseUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Origin-pinned (A URL that a bootstrap server delivers must share the origin of bootstrapUrl, or Claude Desktop drops it. The limit is lifted when bootstrapOidc is set, and it does not apply to a value set in an MDM profile, the local configuration file or the Enterprise Admin Console.) + +Since 1.2581.0 + +**Bedrock base URL.** For VPC endpoints or gateway proxies. Host origin only. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +*** + +#### `inferenceBedrockServiceTier` + +enumSince 1.5186.0 + +**Bedrock service tier.** Sent as the X-Amzn-Bedrock-Service-Tier header. Leave unset for on-demand. + +One of: `flex`, `priority` + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +> **More detail** +> +> Tier availability varies by model and region. Reserved capacity uses a provisioned-throughput ARN as the model ID instead of this setting. Older bundled Claude Code CLI versions ignore this key. + +*** + +#### `inferenceBedrockBearerToken` + +stringSince 1.2581.0 + +**AWS bearer token.** Static bearer token for inference. For providers that support profile or helper-script credentials, prefer those. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +[Admin Console](#the-works-with-column): Not available. + +*** + +#### `inferenceBedrockSsoStartUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO start URL.** Enables in-app AWS sign-in (no AWS CLI needed). Set with the three SSO fields below. + +[Self-hosted install](#self-hosted-column): Not supported. Drives a browser sign-in on the person's computer, and a host never calls Bedrock as the person. + +*** + +#### `inferenceBedrockSsoRegion` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO region.** IAM Identity Center home region. + +[Self-hosted install](#self-hosted-column): Not supported. Configures a browser sign-in on the person's computer, and a host-run session has no browser. + +*** + +#### `inferenceBedrockSsoAccountId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO account ID.** 12-digit AWS account ID assigned to users in IAM Identity Center. + +[Self-hosted install](#self-hosted-column): Not supported. Names an AWS account for a browser sign-in on the person's computer, which a host never performs. + +*** + +#### `inferenceBedrockSsoRoleName` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO role name.** IAM Identity Center permission-set name granting bedrock:InvokeModel\* on the account above. + +[Self-hosted install](#self-hosted-column): Not supported. Names an AWS role for a browser sign-in that is only possible on the person's computer. + +*** + +#### `inferenceBedrockProfile` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**AWS profile name.** AWS named profile to use for Bedrock inference credentials. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +*** + +#### `inferenceBedrockAwsDir` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**AWS config directory.** Folder with AWS config/credentials. Defaults to \~/.aws when no bearer token is set. + +[Self-hosted install](#self-hosted-column): Not supported. Names a folder on the person's computer that a host does not have. + +*** + +#### `inferenceBedrockAwsCliPath` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.13576.0 + +**AWS CLI path.** Absolute path to the aws executable. Leave unset to find it on PATH. + +[Self-hosted install](#self-hosted-column): Not supported. Names a program on the person's computer, and a host has no such program, browser or person. + +*** + +### Vertex + +#### `inferenceVertexProjectId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**GCP project ID.** Google Cloud project ID for Vertex AI inference. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +*** + +#### `inferenceVertexRegion` + +stringSince 1.2581.0 + +**GCP region.** GCP region where your Vertex AI Claude models are deployed. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +*** + +#### `inferenceVertexBaseUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Origin-pinned (A URL that a bootstrap server delivers must share the origin of bootstrapUrl, or Claude Desktop drops it. The limit is lifted when bootstrapOidc is set, and it does not apply to a value set in an MDM profile, the local configuration file or the Enterprise Admin Console.) + +Since 1.2581.0 + +**Vertex AI base URL.** PSC endpoint, if using one. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +*** + +#### `inferenceVertexOAuthClientId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**Vertex OAuth client ID.** Desktop-app OAuth client ID. Enables Sign in with Google instead of a credentials file. + +[Self-hosted install](#self-hosted-column): Not supported. Configures a Google browser sign-in on the person's computer, and a host calls Vertex as its own identity. + +*** + +#### `inferenceVertexOAuthClientSecret` + +stringSince 1.2581.0 + +**Vertex OAuth client secret.** Secret for the Desktop-app OAuth client above. Google classifies installed-app client secrets as non-confidential, so this may be set from hosted config. + +[Self-hosted install](#self-hosted-column): Not supported. Secret for the person's own Google sign-in, and a host calls Vertex as its own Google identity. + +*** + +#### `inferenceVertexOAuthScopes` + +stringSince 1.2581.0 + +**Vertex OAuth scopes.** Override the Google OAuth scopes (space-separated). Leave blank for the default. + +[Self-hosted install](#self-hosted-column): Not supported. Sets scopes for a browser sign-in on the person's computer, and a host calls Vertex as its own identity. + +*** + +#### `inferenceVertexOAuthLoginHint` + +stringSince 1.12603.0 + +**Vertex OAuth login hint.** Pre-fill Google's account chooser and forward to your federated IdP. \{username} expands to the OS login name. + +[Self-hosted install](#self-hosted-column): Not supported. Steers a browser sign-in on the person's computer, and a host calls Vertex as its own Google identity. + +*** + +#### `inferenceVertexWorkforceAudience` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.10628.0 + +**Workforce Identity audience.** Workforce-pool provider audience. When set, sign-in uses your own IdP plus a GCP STS exchange instead of a Google identity. + +[Self-hosted install](#self-hosted-column): Not supported. Configures a sign-in the person completes on their computer, and a host calls Vertex as its own identity. + +*** + +#### `inferenceVertexWorkforceUserProject` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.10628.0 + +**Workforce Identity billing project.** GCP project for STS billing and quota. Defaults to the Vertex project ID above. + +[Self-hosted install](#self-hosted-column): Not supported. Bills the exchange of the person's own sign-in token, and a host calls Vertex as its own identity. + +*** + +#### `inferenceVertexWorkforceAuthFlow` + +enumSince 1.25927.0 + +**Workforce Identity sign-in flow.** How the IdP sign-in runs: system browser (default) or the OS Microsoft Entra broker. + +One of: `browser`, `broker` + +[Self-hosted install](#self-hosted-column): Not supported. Chooses how the person signs in on their computer, and a host calls Vertex as its own identity. + +> **More detail** +> +> * **`browser`** (default) — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. See the **IdP setup** notes on `inferenceGatewayOidc` for redirect-URI registration; the same rules apply here. +> * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, Company Portal on macOS). Requires the workforce-pool IdP to be **Microsoft Entra ID** — the `issuer` on `inferenceVertexWorkforceOidc` must be `https://login.microsoftonline.com/{tenant-id}/v2.0`. The broker satisfies Conditional Access policies that require a compliant/managed device or token protection, and needs no loopback redirect. The Entra app registration must include the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform. Not supported on Linux. +> +> The GCP STS token-exchange step is unchanged in either flow; only how the Entra id\_token is acquired differs. + +*** + +#### `inferenceVertexWorkforceOidc` + +object + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.10628.0 + +**Workforce Identity IdP (OIDC).** Your organization’s OIDC IdP. The app runs an authorization-code-with-PKCE flow against this issuer and exchanges the returned ID token at GCP STS. + +[Self-hosted install](#self-hosted-column): Not supported. Sets up the person's sign-in on their own computer, and a host calls Vertex as its own Google identity. + +> **Child attributes (9)** +> +> **clientId** `string` *required* +> +> OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). +> +> **issuer** `string` +> +> HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. +> +> **authorizationUrl** `string` +> +> HTTPS authorization endpoint. Used with the token URL when no issuer is set. +> +> **tokenUrl** `string` +> +> HTTPS token endpoint. Used with the authorization URL when no issuer is set. +> +> **scopes** `string` +> +> Space-separated scopes. Defaults to openid profile email offline\_access. +> +> **redirectPort** `integer` +> +> Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. +> +> **redirectHost** `enum` +> +> Use localhost only if your IdP’s registered redirect URI specifies it. +> +> One of: `127.0.0.1`, `localhost` +> +> **omitOfflineAccess** `boolean` +> +> Only enable if your IdP rejects the offline\_access scope on this client. Without it the app prompts for sign-in each time the token expires. +> +> **additionalRedirectReferrerHosts** `string` +> +> Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. +> +> > **More detail** +> > +> > Only needed when the IdP completes sign-in from a host other than the authorization URL’s. When a callback is rejected for a referrer mismatch, the rejected host is named in the app log — add that hostname here. + +*** + +#### `inferenceVertexCredentialsFile` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**GCP credentials file path.** Absolute path to service-account JSON. Leave blank to fall back to ADC. + +[Self-hosted install](#self-hosted-column): Not supported. Names a file on the person's computer that no host has. + +*** + +### Foundry + +#### `inferenceFoundryResource` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**Azure AI Foundry resource name.** Azure AI Foundry resource name used to construct the endpoint URL. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +*** + +#### `inferenceFoundryBaseUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Origin-pinned (A URL that a bootstrap server delivers must share the origin of bootstrapUrl, or Claude Desktop drops it. The limit is lifted when bootstrapOidc is set, and it does not apply to a value set in an MDM profile, the local configuration file or the Enterprise Admin Console.) + +Since 2.110.0 + +**Azure AI Foundry base URL.** Full base URL for a gateway or proxy in front of Foundry, path included (replaces [https://RESOURCE.services.ai.azure.com/anthropic](https://RESOURCE.services.ai.azure.com/anthropic)). + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +> **More detail** +> +> Set this only when the app reaches Foundry through a gateway or proxy you run, such as Azure API Management. Requests go to `/v1/messages` instead of `https://.services.ai.azure.com/anthropic/v1/messages`, carrying the same credential and headers the app would send to Foundry: each user's Entra ID token for the Azure Cognitive Services audience as `Authorization: Bearer` with Entra sign-in, otherwise the API key or the credential helper's output. Claude Code sessions receive the value as `ANTHROPIC_FOUNDRY_BASE_URL`, so use the same value you would give Claude Code in a terminal. `inferenceFoundryResource` is still required and should name the resource behind the gateway; the app sends nothing to the resource directly while this is set. Must be https, or http to a proxy at a loopback address on the device itself (127.0.0.1, localhost or \[::1]). + +*** + +#### `inferenceFoundryApiKey` + +stringSince 1.2581.0 + +**Azure AI Foundry API key.** API key for Azure AI Foundry inference. + +[Self-hosted install](#self-hosted-column): Not supported. Part of the device's own route to the model, and a session host's route is its operator's to set. + +[Admin Console](#the-works-with-column): Not available. + +*** + +#### `inferenceFoundryTenantId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.9255.0 + +**Entra ID tenant ID.** Directory (tenant) ID of the Entra ID app registration that has the Cognitive Services scope. + +[Self-hosted install](#self-hosted-column): Not supported. Names the tenant for an Entra sign-in on the person's computer. + +*** + +#### `inferenceFoundryClientId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.9255.0 + +**Entra ID client ID.** Application (client) ID of the Entra ID app registration. Device-code sign-in requires the app to allow public client flows. + +[Self-hosted install](#self-hosted-column): Not supported. Configures an Entra sign-in the person completes on their computer. + +*** + +#### `inferenceFoundryAuthFlow` + +enumSince 1.19367.0 + +**Entra ID sign-in flow.** How Entra sign-in runs: device code (default), system browser, or the OS identity broker. + +One of: `device-code`, `browser`, `broker` + +[Self-hosted install](#self-hosted-column): Not supported. Chooses how the person's Entra sign-in runs on their computer. + +> **More detail** +> +> * **`device-code`** (default) — shows a code to enter at microsoft.com/devicelogin. The app registration must have **Allow public client flows** enabled. +> * **`browser`** — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. The app registration must include `http://127.0.0.1/callback` under the **Mobile and desktop applications** platform (Entra ignores the loopback port, but not the path). Works with **Allow public client flows** disabled, and is unaffected by Conditional Access policies that block device-code authentication. +> * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, Company Portal on macOS), so it can satisfy Conditional Access policies that require a compliant/managed device or token protection. The app registration must include the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform. Not supported on Linux. +> +> App versions that predate this key always use device code; versions that predate the broker option treat `broker` as unset and use device code. + +*** + +### Models + +#### `modelDiscoveryEnabled` + +booleanSince 1.8089.0 + +**Model discovery.** Auto-populate the model picker from the provider at launch. + +[Self-hosted install](#self-hosted-column): Not supported. A session host states the models it offers, so Desktop discovers none itself, whatever this says. + +> **More detail** +> +> Auto-populate the model picker from the provider's model-list endpoint at launch. For gateway and Anthropic providers, a config that doesn't set this key skips discovery automatically when the model list below already makes it unnecessary; the toggle here only sets it explicitly on or off. Turn off if the endpoint isn't reachable from your network, or to use a fixed list. When off, the model list below is required and must use full model IDs (aliases like sonnet/opus are resolved via discovery). + +*** + +#### `modelPrefer1mContext` + +booleanSince 1.28929.0 + +**Use 1M wherever it’s available.** Every model that offers 1M, in your list or from your gateway, shows one option and requests 1M. + +[Self-hosted install](#self-hosted-column): Server side. When on, the host gives a session that names no model the 1M-token context, and tells Desktop. + +> **More detail** +> +> Every model that offers a 1M-token context window shows one option in the model picker, and sessions on it request 1M from your provider. A model offers 1M when its `inferenceModels` entry sets `supports1m` or, under discovery, when your gateway's model list marks it. Equivalent to setting `prefer1m` on each of those entries, but also applies under dynamic discovery. To leave one listed model out, remove its `supports1m`. Beside a model list in which no entry sets `supports1m`, this setting does nothing. Older Claude Desktop versions show both options and only start the default model on its 1M option. + +*** + +#### `inferenceModels` + +object\[]Since 1.2581.0 + +**Model list.** Override the auto-discovered model list. First entry is the default. + +[Self-hosted install](#self-hosted-column): Server side. The host runs a session only on a model from this list, and tells Desktop what to show. + +> **More detail** +> +> Use the **provider's exact model ID**: Vertex publisher IDs (`claude-sonnet-5`), Bedrock inference-profile IDs (`us.anthropic.claude-sonnet-5`), or Foundry deployment names. Entries may be plain ID strings or objects. +> +> **Gateway:** the `name` must be the exact ID your gateway's `/v1/models` endpoint returns. If you set `supports1m` on an alias (`sonnet`) but discovery returns the full ID, the variant won't appear. +> +> **Extended context** (`supports1m`) is a capability assertion you make about your deployment; only set it for models you've confirmed support the 1M-token window: +> +> ```json theme={null} +> [{"name": "claude-sonnet-5", "supports1m": true}, "claude-opus-4-8"] +> ``` +> +> `"claude-sonnet-5[1m]"` is shorthand for the same entry. When an ID is listed both bare and with `[1m]` (as a gateway lists it), the picker shows one model with a 1M variant; put `labelOverride` on the bare entry (a label on the `[1m]` spelling is ignored there); tier-tagged entries are not folded. `prefer1m: true` (no effect without `supports1m`) shows only the 1M variant of the model. Under dynamic discovery (no explicit list), set `modelPrefer1mContext` instead. +> +> **Display label** (`labelOverride`) is for IDs the picker can't derive a friendly name from (Bedrock ARNs, gateway routing aliases). Display-only; `name` is still what the app sends: +> +> ```json theme={null} +> [{"name": "arn:aws:bedrock:us-east-1:123:application-inference-profile/abc", "labelOverride": "Claude Opus (Prod)"}] +> ``` +> +> **Tier mapping** (`anthropicFamilyTier`) tells the app which Claude tier (`haiku`/`sonnet`/`opus`/`fable`/`mythos`) an entry stands in for, so bare tier aliases (e.g. in Code sessions) resolve to your model. `isFamilyDefault: true` picks the winner when several entries share a tier: +> +> ```json theme={null} +> [{"name": "us.anthropic.claude-opus-4-8", "anthropicFamilyTier": "opus"}] +> ``` +> +> **Auto mode on a gateway:** its safety classifier calls `claude-sonnet-5` by default, so include that exact ID in the list (see `autoModeEnabled`). + +> **Child attributes (7)** +> +> **name** `string` *required* +> +> Model ID exactly as the provider expects it. The first entry is the default model. +> +> **labelOverride** `string` +> +> Shown in the model picker. Leave blank to auto-format from the ID. +> +> **supports1m** `boolean` +> +> Adds a 1M-context variant of this model to the picker. Set only if the deployment accepts 1M-token context for it. +> +> **prefer1m** `boolean` +> +> Shows one option for this model and requests 1M from your provider. Does nothing unless the entry offers 1M. +> +> **anthropicFamilyTier** `enum` +> +> Which Claude tier this model stands in for. Pins the bare alias (e.g. ‘opus’) and, for opus/fable, the refusal fallback. +> +> One of: `sonnet`, `opus`, `haiku`, `fable`, `mythos` +> +> **isFamilyDefault** `boolean` +> +> When several models share a tier alias, marks this one as the model the alias resolves to. Otherwise the first listed wins. +> +> **maxEffort** `enum` +> +> Highest effort level offered for this model; higher levels are hidden and never requested by Claude Desktop. An unrecognized value caps the model at low. +> +> One of: `low`, `medium`, `high`, `xhigh`, `max` + +*** + +#### `defaultModelEffort` + +enumSince 2.110.0 + +**Default model effort.** Effort level the default model (the first listed model) starts at, instead of Anthropic’s recommended level: low, medium, high, xhigh or max. + +One of: `low`, `medium`, `high`, `xhigh`, `max` + +[Self-hosted install](#self-hosted-column): Server side. The host sets the effort of a session that names none, and tells Desktop what to preselect. + +> **More detail** +> +> The effort level the default model (the first `inferenceModels` entry, or the first model your endpoint returns under discovery) starts at in Chat, Cowork and Code, in place of Anthropic's recommended level for that model: one of `low`, `medium`, `high`, `xhigh`, `max`. It is a starting point, not a lock: a person's own effort choice for that model still applies unless `alwaysStartWithDefaultModel` is on, and other models keep their recommended level. A level the model doesn't offer falls to the nearest level it offers below it (its lowest level when none is lower), and it never exceeds that model's `maxEffort`. In Code sessions a `CLAUDE_CODE_EFFORT_LEVEL` environment variable or an `effortLevel` in Claude Code's own settings still takes precedence, as it does over any picker default. + +*** + +#### `alwaysStartWithDefaultModel` + +booleanSince 2.110.0 + +**Always start with the default model.** New conversations and tasks start on the default model and effort level, not each person’s last-used ones. People can still change both for the current one. + +[Self-hosted install](#self-hosted-column): Server side. Desktop's model picker acts on it, starting each new session on the default model. + +> **More detail** +> +> When `true`, each new conversation or task in Chat, Cowork and Code starts on the default model (the first `inferenceModels` entry), and the model and effort choices a person makes are no longer saved as their defaults. When unset or `false`, a person's last model and effort choice is remembered per tab, as before. Choices saved before the setting was turned on are kept and apply again if it is turned off. + +*** + +#### `inferenceModelPricingEnabled` + +booleanSince 1.37937.0 + +**Show estimated cost.** Show an estimated cost on the Usage page at Anthropic list price; turn on to set a multiplier or per-model rates. + +[Self-hosted install](#self-hosted-column): Server side. When on, the host gives its sessions the admin's rates and multiplier; Desktop shows cost once they report it per turn. + +> **More detail** +> +> Off unless set: the Usage page shows token counts only, since the app cannot know your negotiated provider rates. `true` turns on a USD estimate priced at Anthropic's published list price and is the only switch that does: `inferenceModelPricingMultiplier` and `inferenceModelPricing` refine the estimate while this is on and are ignored otherwise; turning this off hides them in the config editors without clearing them. Claude Code performs the calculation, so the same figures appear in its own cost reporting for Code sessions. Model IDs Claude Code cannot map to a Claude model (an opaque gateway alias, an inference-profile ARN it cannot resolve) are left out of the estimate until `inferenceModelPricing` gives them a rate. A machine-level Claude Code managed `modelPricing` (MDM / managed-settings.json / server-managed) takes precedence over all three keys. + +*** + +#### `inferenceModelPricingMultiplier` + +numberRange: 0–1Since 1.37937.0 + +**Price multiplier.** Scales every estimated cost (0.85 = 85% of the price); between 0 and 1. + +[Self-hosted install](#self-hosted-column): Server side. While Show estimated cost is on, the host hands Claude Code this multiplier for the cost its sessions report. + +> **More detail** +> +> Mirrors Claude Code's managed `modelPricing.multiplier`: a number in (0, 1] applied to every computed cost, whether the model was priced at Anthropic list price or by an `inferenceModelPricing` row; use it for a flat contracted discount. Applies only while `inferenceModelPricingEnabled` is `true`; on its own it does not turn the estimate on. Ignored when a machine-level Claude Code managed `modelPricing` is present. + +*** + +#### `inferenceModelPricing` + +object\[]Since 1.37937.0 + +**Model pricing.** Per-model rates replacing Anthropic list price in the Usage page’s estimate. + +[Self-hosted install](#self-hosted-column): Server side. While Show estimated cost is on, the host hands Claude Code these rates for the cost its sessions report. + +> **More detail** +> +> Each row replaces Anthropic list price for one model in the Usage page's estimate, in USD per million tokens (`inputPerMtok`, `outputPerMtok`, `cacheReadPerMtok`, `cacheWritePerMtok`, all four required; `cacheWritePerMtok` prices both 5-minute and 1-hour cache writes); rows apply only while `inferenceModelPricingEnabled` is `true` and do not turn the estimate on by themselves. Mirrors Claude Code's managed `modelPricing.overrides`, and `name` is matched the same way: a built-in Claude model ID (e.g. `claude-sonnet-4-6`, or its Bedrock, Vertex, or Foundry ID) covers every dated and provider spelling of that model; any other value (a gateway alias, an inference-profile ARN) matches that exact ID only (case-insensitive) and wins over a built-in row. An ID Claude Code cannot map to a Claude model at all gets no estimate until a row here prices it. `inferenceModelPricingMultiplier` still applies on top of a row. +> +> ```json theme={null} +> {"inferenceModelPricingEnabled": true, "inferenceModelPricingMultiplier": 0.9, "inferenceModelPricing": [{"name": "claude-sonnet-4-6", "inputPerMtok": 2.4, "outputPerMtok": 12, "cacheReadPerMtok": 0.24, "cacheWritePerMtok": 3}]} +> ``` +> +> These are estimates for visibility, not an invoice; your provider bills at its own rates. A machine-level Claude Code managed `modelPricing` (MDM / managed-settings.json / server-managed) takes precedence over this table. + +> **Child attributes (5)** +> +> **name** `string` *required* +> +> A model ID from the list above, or any other ID or alias your provider serves. A built-in Claude ID also covers its dated and provider forms. +> +> **inputPerMtok** `number` *required* +> +> USD per million input tokens. +> +> **outputPerMtok** `number` *required* +> +> USD per million output tokens. +> +> **cacheReadPerMtok** `number` *required* +> +> USD per million prompt-cache read tokens. +> +> **cacheWritePerMtok** `number` *required* +> +> USD per million prompt-cache write tokens (5-minute and 1-hour writes alike). + +*** + +#### `modelCatalogEnabled` + +booleanSince 2.110.0 + +**Model catalog metadata.** Fetch the published Claude Code model catalog to get model picker names, descriptions, and effort options. When off, the app uses only its bundled copy. + +[Self-hosted install](#self-hosted-column): Server side. The host serves the model catalog's rows to Desktop, and to nobody for whom this is off. + +[Admin Console](#the-works-with-column): Not available. + +> **More detail** +> +> When on (the default), the app reads the model catalog Anthropic publishes for Claude Code (a signed document fetched from `downloads.claude.ai`, or from `modelCatalogUrl` when that is set, and verified against a key built into the app; a copy bundled with the app is used until one has been fetched, or when the host is unreachable) and uses it to fill in each picker entry's display name, description, and thinking/effort options in the Chat, Cowork, and Code tabs. It never changes which models are offered, their order, or the default model (the first `inferenceModels` entry): those, 1M-context variants, and `labelOverride` still come from `inferenceModels` / discovery, and a model the catalog does not list keeps the built-in label. With `modelCatalogEnabled: false`, the app makes no catalog request and ignores any copy it fetched earlier. Picker names, descriptions, effort options, and recommended effort levels then come from the copy bundled with the installed app version, so they change only with app updates; `labelOverride`, `defaultModelEffort`, and `maxEffort` still apply. A model that copy does not list, typically one released after that version, may show no effort options until the app is updated. Applies to deployments configured on the device or by a bootstrap server; an install managed from the Claude admin console takes its model names and options from the console's settings and never fetches the catalog. + +*** + +#### `modelCatalogUrl` + +stringSince 2.110.0 + +**Model catalog URL.** Fetch the model catalog and its signature file from this URL (a mirror inside your network serving Anthropic’s published files) instead of downloads.claude.ai. + +[Self-hosted install](#self-hosted-column): Server side. Only Desktop versions too old to take the model catalog's rows from their session host fetch from here. + +[Admin Console](#the-works-with-column): Not available. + +> **More detail** +> +> When set, the app fetches the catalog document and its signature file (the same URL with `.raw-sig.json` appended to the path) from this URL instead of `https://downloads.claude.ai/model-catalog/v1/catalog.json`, for a gateway or mirror inside your network serving Anthropic's two published files byte-for-byte. The document is still verified against the key built into the app, so an edited or re-signed copy is refused and the app keeps its last verified copy (or the bundled one); there is no key to configure. `https://` is required (`http://` only to a loopback address, and only when set on the device itself; a bootstrap server may not deliver a loopback or non-`https://` value); the server must answer the GET directly (redirects are not followed) and may honor `If-None-Match` with `304`, and must serve a document at least as new as the one the install last accepted (or the bundled seed) — an older one is refused and re-fetched on the retry interval until the mirror catches up. Ignored when `modelCatalogEnabled` is `false`, and on an install managed from the Claude admin console (which never fetches the catalog). A value that is not a valid URL, names a link-local or cloud-metadata host (e.g. `169.254.169.254`, `metadata.google.internal`), or is a loopback / non-`https://` value a bootstrap server delivers, turns the catalog fetch off (no fallback to `downloads.claude.ai`); the last fetched or bundled copy keeps labelling the pickers. On an install configured for a bootstrap server, the default location is not fetched until the server's configuration applies after sign-in, so a device does not poll `downloads.claude.ai` while the server may yet name a mirror; a mirror URL set on the device, cached earlier, or served in a pre-sign-in subset still fetches. Diagnostics report the location only as `hosted`, `custom`, `invalid` or `pending`; the value itself is treated like `bootstrapUrl`: host name only in telemetry, printed in full in the diagnostics bundle. + +*** + +## Capabilities + +### Cowork surface + +#### `coworkTabEnabled` + +booleanDefault: trueSince 1.9659.0 + +**Allow Cowork.** Enable Cowork. Claude works on longer tasks like research, analysis, and documents. + +[Self-hosted install](#self-hosted-column): Not supported. On a session host desktopHome alone decides Cowork: to turn Cowork off, set desktopHome to off in its policy document. + +*** + +### Code surface + +#### `isClaudeCodeForDesktopEnabled` + +booleanDefault: trueSince 1.2581.0 + +**Allow Code.** Enable Code. Claude writes and runs code. + +[Self-hosted install](#self-hosted-column): Server side. The host refuses Code sessions and routines where the tab is off, and tells Desktop to hide it. + +*** + +#### `sshHostAllowlist` + +string\[] + +Beta (The feature that the key configures is in beta.) + +Since 1.40609.0 + +**SSH host allowlist.** SSH hosts for Code sessions. Unset: off unless the device’s Claude Code managed settings list hosts. An admin’s empty list: off even then. \* allows any host. + +[Guide for this setting](/docs/third-party/claude-desktop/ssh-remote-sessions.md) + +[Self-hosted install](#self-hosted-column): Not supported. Governs SSH sessions started from the person's computer, which self-hosted installs never offer. + +> **More detail** +> +> When off, the SSH option is hidden and any connection attempt is refused. +> +> Entries are exact hostnames (`build01.corp.example.com`) or `*.` wildcards (`*.corp.example.com` matches the apex and subdomains at any depth); matching is case-insensitive and ignores a `user@` prefix. The list is compared with the `HostName` that the user's SSH configuration (`~/.ssh/config`) gives for the host they entered, or with the entered host itself when the configuration has no entry for it or cannot be evaluated. So an alias is allowed when the host it points to is listed, whatever the alias is called, and refused when it is not. A session's jump hosts (`ProxyJump`, or `ProxyCommand ssh -W %h:%p host`) must be listed too, by `HostName`. One the app fails to read, and any other `ProxyCommand` (`ssh -i`…), is permitted when the resolved host matches (this key governs which hosts the app offers, not network egress). The built-in SSH library refuses every `ProxyJump`. +> +> This is opt-in because a remote session runs Claude Code on the SSH host and the app forwards the session's inference credential to it, plus your OTLP collector endpoint and auth headers when `otlpEndpoint` is set. List only hosts you trust with those. Token-based credentials are forwarded. File-based credentials (Bedrock IAM Identity Center sign-in or AWS profile, Vertex Google sign-in or a credentials file) are never forwarded, and a session that needs one from the device is refused. +> +> If this key is unset, an `sshHostAllowlist` in Claude Code's own managed-settings file on the device still applies; when both are set, this key wins where the app's configuration is admin-managed (MDM, the admin console, or a device-managed bootstrap URL) and otherwise applies only while that file sets none. `allowedWorkspaceFolders` still applies on the remote host. Claude Code's managed settings on a host replace the sandbox, network, permission, and MCP rules this app sends unless they set `parentSettingsBehavior` to `"merge"`. + +*** + +#### `sshClientPath` + +string + +Beta (The feature that the key configures is in beta.) + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.46388.1 + +**SSH client program.** Absolute path to the OpenSSH ssh program the app runs for SSH sessions. Unset: the first ssh on the user’s PATH. + +[Guide for this setting](/docs/third-party/claude-desktop/ssh-remote-sessions.md) + +[Self-hosted install](#self-hosted-column): Not supported. Names the ssh program on the person's computer, and self-hosted installs offer no SSH sessions. + +> **More detail** +> +> Pins which OpenSSH client the app runs wherever it starts `ssh`: evaluating the user's SSH configuration (`ssh -G`), making the SSH connection and its channels, and the Code tab's terminal. `ssh-keygen` and `ssh-add` are taken from the same directory when they exist there, otherwise from PATH. The program must be OpenSSH 7.6 or newer. To carry the connection on Windows it must be Win32-OpenSSH 9.4 or newer, or another OpenSSH 8.5 or newer under Program Files, such as Git for Windows' `usr\bin\ssh.exe`, only where device policy, or the configuration server it names, sets this key and sets the SSH connection engine setting to `system-openssh`; the app points such a client at the `.ssh` folder of the user's Windows profile, and asks for a password, code or key passphrase only on a direct connection (no jump host, `ProxyCommand`, `Match exec`, `KnownHostsCommand`, `PKCS11Provider` or `SecurityKeyProvider`); otherwise only a key that needs nothing typed signs in. Set such a client only on desktops with one user. On macOS and Linux a wrapper script that ends in one is accepted, on Windows it must be an `.exe` (no .cmd, .bat or .ps1). When this key is set and the program is missing, cannot be run, or is too old, SSH sessions fail with an error telling the user to ask their IT administrator — the app never falls back to another ssh. The connection itself runs through this program on the system-OpenSSH engine, which the SSH connection engine setting's `system-openssh` value selects on every platform; when the app's built-in SSH library makes the connection instead, this key still governs configuration evaluation (`ssh -G`), host-key lookups (`ssh-keygen`) and the terminal. On a device that a Claude.ai sign-in has moved to an admin-console organization (see `disableDeploymentModeChooser`), the device profile's value is ignored: set the key in admin settings (which cannot name such a client). There, until the organization's configuration has loaded, no client is pinned. + +*** + +#### `sshTransport` + +enum + +Beta (The feature that the key configures is in beta.) + +Since 1.52386.0 + +**SSH connection engine.** Which SSH engine carries Code sessions: the OpenSSH ssh program on the device, or the app’s built-in SSH library. Unset or auto: the build’s default. + +One of: `auto`, `system-openssh`, `builtin` + +[Guide for this setting](/docs/third-party/claude-desktop/ssh-remote-sessions.md) + +[Self-hosted install](#self-hosted-column): Not supported. Chooses the SSH engine on the person's computer, and self-hosted installs offer no SSH sessions. + +> **More detail** +> +> `system-openssh`: the app makes every SSH connection by running an OpenSSH `ssh` program — the one `sshClientPath` names, otherwise the first `ssh` on the user's PATH (on Windows, a Win32-OpenSSH `ssh.exe`: the PATH one, else the in-box or Microsoft-installed client) — so the organization's own OpenSSH build, with its Kerberos/GSSAPI, certificate and `ssh_config` support, is what authenticates. The program must be OpenSSH 7.6 or newer (Windows: Win32-OpenSSH 9.4 or newer, or another OpenSSH that `sshClientPath` names: see that key). When `sshClientPath` is set and that program cannot be used, sessions fail with an error telling the user to ask their IT administrator rather than falling back; when it is unset and Windows has no usable client, the built-in library is used. +> +> `builtin`: the app's built-in SSH library makes the connection, whatever the build's default. +> +> `auto` or unset: the build's default engine. +> +> An explicit value overrides the default at each host's next connect or reconnect. An open app takes a device profile's change at its next configuration check. From a configuration server it takes only `builtin`, once two checks in a row return it (about 12 minutes by default); other values wait until it is reopened or the user signs in again. A value that cannot be read, such as a misspelling, counts as `builtin` and waits likewise. Once a server's configuration has loaded it decides, even if it omits the key; until then the device profile's value applies. On a device that a Claude.ai sign-in has moved to an admin-console organization (see `disableDeploymentModeChooser`), the device profile's value is ignored: set the key in the admin console. There, until the organization's configuration has loaded, the build's default engine is used. + +*** + +### Chat surface + +#### `chatTabEnabled` + +booleanSince 1.13576.0 + +**Allow Chat.** Enable Chat. Quick questions and drafting. + +[Self-hosted install](#self-hosted-column): Not supported. No Chat session can start on a session host, so the switch has nothing to turn on or off there. + +*** + +#### `desktopHome` + +enumSince 1.52386.0 + +**Desktop home.** Unifies Chat and Cowork into one home. When set, it replaces Allow Chat, Advanced file analysis, and Allow Cowork. Leave unset to keep those. + +One of: `standard`, `off` + +[Self-hosted install](#self-hosted-column): Server side. Alone decides Cowork, which is on only while this is unset or standard; else the host refuses it and Desktop hides it. + +> **More detail** +> +> `standard` turns on Unified Claude, which combines Chat and Cowork into one experience. `off` turns Chat and Cowork off entirely. `isClaudeCodeForDesktopEnabled` still decides Code. Remove the key to hand control back to `chatTabEnabled`, `chatAdvancedFileAnalysisEnabled`, and `coworkTabEnabled`. Values are case-sensitive, so `Standard` is not recognized. A value that the app does not recognize is read as `off`, so update the app on devices before you deploy a value added in a later version. + +*** + +#### `chatAdvancedFileAnalysisEnabled` + +booleanSince 1.14271.0 + +**Advanced file analysis.** Allow Claude to run code in a local sandbox to analyze attached files it can’t read natively — like Excel and PowerPoint. Off by default. + +[Self-hosted install](#self-hosted-column): Not supported. Configures a Chat session's local sandbox, and no Chat session can start on a self-hosted install. + +> **More detail** +> +> Also enables inline data analysis. Of the user's own files, the sandbox can read only those attached to the conversation, plus folders added to the chat's project through the app (read-only). +> +> Commands in the sandbox can reach the hosts in `coworkEgressAllowedHosts`, and no others. If that list is unset or empty, they have no network access. With `*` in the list they can reach any host, as in Cowork. Plugin CLIs are the exception: they can always reach the hosts their plugin declares, plus the listed hosts (with `*`, only the declared hosts). Older app versions give the sandbox no network access by default. +> +> As in Cowork, commands run without an approval prompt. So they can upload anything the sandbox can read to a listed host, and run what they download from one. To have Claude ask before each command, set `Bash` to `ask` in `builtinToolPolicy`, which also applies to Cowork and Code. To let commands install packages, list the hosts of the package manager's default index (for pip, `pypi.org` and `files.pythonhosted.org`). For a private mirror, list its host instead. Nothing points package managers at a mirror, so each command must name it (for pip, `--index-url`). +> +> Project folders are not available in the sandbox of a chat started while a rule on `Read`, `Grep` or `Glob` is set: in `disabledBuiltinTools`, in `builtinToolPolicy` with a value other than `allow`, or as a deny or ask rule in Claude Code's own managed settings on the device, whether or not the rule covers the folder. They are not available either where those managed settings cannot be read, or where Claude Code takes its managed settings from a gateway. Claude's file tools still read what the rules allow. + +*** + +### Workspace + +#### `coworkEgressAllowedHosts` + +string\[]Since 1.2581.0 + +**Allowed egress hosts.** Hosts agent tools may reach in Cowork and Chat (Code: in part). An empty list acts as unset for tools, but stops Claude opening sites in the built-in browser. + +[Guide for this setting](/docs/third-party/claude-desktop/web-tools.md#web-fetch) + +[Self-hosted install](#self-hosted-column): Server side. Tools in the host's sessions make the network calls, so the host limits which addresses they may reach. + +> **More detail** +> +> Applies only to **tool calls**, in Cowork, Code and Chat. In Cowork it covers the sandbox's web fetch, shell commands and package installs. In Chat it covers web fetch and commands in the file-analysis sandbox. In Code it's [translated into Claude Code's network sandbox allowlist](https://claude.com/docs/third-party/claude-desktop/code.md#applied-as-managed-policy), and by default a separately deployed Claude Code managed-settings file takes precedence. It does **not** cover Web Search (which runs at your inference provider), inference, or MCP traffic. A list other than `*` also bounds where Claude may browse in the built-in browser. When unset, Cowork and Chat refuse web fetch. +> +> Entries are exact hostnames (`api.github.com`), wildcards (`*.corp.com` matches subdomains at any depth, not `corp.com` itself), or `*` to allow all. IP addresses match only when listed exactly. In Cowork and Chat, web fetch always blocks `localhost` and private addresses, and shells reach only listed hosts (not your inference provider's, unless listed), or none when unset. Code's shell obeys that limit only on macOS, and with bubblewrap and socat on Linux or WSL2; elsewhere, Windows included, it reaches any host. Code's web fetch isn't limited. +> +> Any entry except bare `*` may carry a `:port` suffix (`*.corp.com:8443`) restricting it to that port. IPv6 literals are not supported. Invalid entries are dropped with a log warning and the rest still work. An unreadable value counts as an empty list. Ports are enforced for the Cowork sandbox's web fetch, shell, and package-install egress; plugin CLIs also reach hosts their plugin declares and ignore port-scoped entries for now, and the Code translation treats them as the bare host. Only deploy port-scoped entries once your whole fleet supports them (`disableAutoUpdates` pins builds). On an older build, a single one invalidates the session's whole shell and package-install allowlist. +> +> Open listed hosts on your network firewall too. + +*** + +#### `allowedWorkspaceFolders` + +object\[]Since 1.2581.0 + +**Allowed workspace folders.** Folders where Claude may work. Applies to Cowork and Code sessions and to the project folders a chat reads. Leave unset for unrestricted access. + +[Self-hosted install](#self-hosted-column): Server side. The host refuses file access outside folders listed as full paths, and Desktop checks those listed with \~ or a variable. + +> **More detail** +> +> Paths can reference `~` and these environment variables, expanded per user: `%OneDrive%`, `%OneDriveCommercial%`, `%OneDriveConsumer%`, `%APPDATA%`, `%LOCALAPPDATA%`, `%USERNAME%`, `%XDG_DOCUMENTS_DIR%`. The set is fixed; an entry that references any other `%VAR%`, or one that is unset on the device, allows none. +> +> Each folder is interpreted on the machine the session runs on. For a Code session on an SSH host, `~` means the remote user's home, an entry that references a `%VAR%` allows none there, and the session's working directory must be inside one of the folders as they exist on that host. One list serves every machine: `["~/work", "/srv/work"]` governs `~/work` for each user, on a managed Mac or a Linux host, and `/srv/work` on a host that has it. A folder that names nothing real on a given machine allows nothing there. On an SSH host, an entry counts only if it is an absolute path as that host spells one (`~/work`, not `work`; on Windows `C:\work`, not `\work`), with no `..`. On Linux or Mac a `\` counts as `/`, except a leading `\\`. One inside another listed folder does not count on its own (its read-only mode still applies); if it is a link, list the folder it points to. An empty list allows none; unset leaves access unrestricted. +> +> A listed folder is one Claude may write as well as read, unless the entry's `mode` (Access mode in Setup) makes it read-only; that field's own description says how far read-only reaches. A Code session can reach every listed folder, not only the one it was opened in. Setting this key also turns on Claude Code's sandbox where it runs (macOS, or Linux and SSH hosts with bubblewrap): there a shell command normally writes in the listed folders without an approval prompt, and its writes to most other places, such as a package cache in the home directory, are refused. A home directory holds shell start-up files and SSH keys, so list work folders, not a whole home directory. +> +> The list also limits which folders of a project a chat reads. + +> **Child attributes (3)** +> +> **path** `string` *required* +> +> Absolute folder path. May start with \~ or one of the listed %VAR% tokens, expanded per user. Subfolders are included. +> +> **isDefaultSelected** `boolean` +> +> Shows as a folder chip on the new-task page and skips the trust prompt. Users can remove it. +> +> **mode** `enum` +> +> Read-only folders can be viewed and searched but not modified in Cowork. In Code, applies to file tools only. Over SSH, also to Bash in its sandbox. +> +> One of: `rw`, `ro` +> +> > **More detail** +> > +> > Read-only folders can be viewed and searched but not modified in Cowork (by Claude or via the UI). Bash runs in Cowork's isolated workspace where the folder is mounted read-only at the OS level; file-tool writes (Edit, Write) are blocked in-process by Claude Desktop. +> > +> > In local Code sessions, read-only applies to Claude's file tools only; Bash does **not** yet enforce it. +> > +> > In SSH sessions (earlier versions ignore the mode on the host), read-only is enforced by Claude Code's own permission rules: its file tools cannot modify the folder. A writable folder inside a read-only one is read-only too. Shell commands are stopped only where Claude Code's sandbox runs (Linux needs bubblewrap and socat), and only as far as that sandbox goes: keep read-only folders outside writable ones, and use the operating system's permissions where a folder must not change. The sandbox does not cover a path with `* ? [ ] ( ) { } | +` or a double quote. List each folder by its real path: shell commands may not be stopped in a folder listed through a link. Not enforced on Windows hosts, nor on a host with Claude Code managed settings of its own unless they set `parentSettingsBehavior` to `merge`. Not covered: MCP servers, hooks, the terminal, commands in `sandbox.excludedCommands`, and git worktrees, which Claude Desktop and Claude Code still create inside the folder. +> > +> > If a read-only entry's `%VAR%` cannot be filled in (unset, unsupported, or any `%VAR%` over SSH), the folder above the variable is read-only instead, or every listed folder if the entry names none above it. A variable that only another operating system sets (`%APPDATA%` on macOS) leaves the entry without effect while it is unset there. +> > +> > A read-only folder that contains Claude's own data directory (for example the home folder; over SSH, `~/.claude` on the host) is enforced in Cowork only. Configure narrower folders for Code coverage. Over SSH, keep a Claude Code config folder moved by `CLAUDE_CONFIG_DIR` outside read-only folders. + +*** + +#### `blockReadsOutsideWorkingDirectories` + +booleanSince 1.46388.1 + +**Block reads outside working directories.** Keep Claude from reading files outside a Code session’s working directories. File tools refuse such reads; sandboxed shell commands lose the home directory. + +[Self-hosted install](#self-hosted-column): Server side. The host starts Code sessions, so it hands Claude Code the block on reads outside their folders. + +> **More detail** +> +> When set to `true`, Code sessions refuse reads outside their working directories (the session folder plus any `allowedWorkspaceFolders`). The file tools (Read, Grep, Glob) refuse them in every permission mode; where Claude Code's sandbox runs (macOS, or Linux and SSH hosts with bubblewrap, once `allowedWorkspaceFolders` is set or an egress allowlist applies: in third-party deployments one applies unless `coworkEgressAllowedHosts` contains `*`, in first-party deployments none does) shell commands cannot see the home directory and other user folders (`/Users`, `/home`, mounted volumes) and a read there is refused with no prompt; elsewhere (Windows, Linux without bubblewrap, or neither folders nor an egress allowlist in effect) such shell reads prompt for approval. The app keeps the user's git configuration files (which may themselves embed credentials such as URL tokens; a symlinked one stays hidden), its own Claude Code installation, and the session's plugin and attachment folders readable (not on a Windows SSH host, where plugin files and attachments stay out of the file tools' reach under the block). An allowed folder that is or contains the home directory leaves it readable. +> +> Users can re-open folders (even their whole home) in their own Claude Code settings with `sandbox.filesystem.allowRead` or `permissions.additionalDirectories`; settings files tracked in a git repository cannot. The key travels on Claude Code's managed-settings channel: another Claude Code managed-settings source replaces it unless that source sets `parentSettingsBehavior` to `"merge"`, and one that sets `sandbox.filesystem.allowManagedReadPathsOnly` reduces it to approval prompts. This is `permissions.blockReadsOutsideWorkingDirectories` in Claude Code's [managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings). +> +> Unset (default): nothing changes. + +*** + +#### `autoModeEnabled` + +booleanSince 1.10628.0 + +**Allow Auto mode.** Offer Auto mode in Code (on unless set to false); set to true to also offer it in Cowork as “Automatically approve”. Claude decides which actions need approval. + +[Self-hosted install](#self-hosted-column): Server side. The host allows or refuses Auto mode for the sessions it runs, and tells Desktop what to offer. + +> **More detail** +> +> Left unset, users can select **Auto mode** in Code and new Code sessions start in it; a mode the user already chose, or a Claude Code settings file's `permissions.defaultMode`, takes precedence, and Cowork does not offer it. Set to `true` to also offer **Automatically approve** in Cowork (Cowork sessions still start by asking before each action until the user picks it). Set to `false` to remove the option from both tabs. In Auto mode Claude runs a safety classifier on each action and only prompts for approval on actions it judges risky, instead of following the static per-tool policy. +> +> Requires a session model that supports the safety classifier — which models qualify depends on the deployment's provider and the app version. With a model that lacks support the option is greyed out and Code sessions do not start in it. `builtinToolPolicy` and this key may both be set; Auto mode is a user-selectable option alongside the default policy, not a replacement for it. +> +> By default on a gateway, the safety classifier sends its own requests through your gateway to Claude Sonnet 5, whatever model the session uses. Make sure your gateway accepts the exact ID `claude-sonnet-5` and the `context-1m-2025-08-07` value in the `anthropic-beta` request header. If you set `inferenceModels`, list that ID there and in any group's model list (no `supports1m` needed). Sonnet 5 then also shows in the model picker. If the gateway rejects those requests or the list omits the ID, Auto mode stays available but can block actions it would otherwise allow. In Code, users see those actions marked **Blocked**. +> +> In Code sessions, a separately deployed Claude Code [managed-settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) file that sets `disableAutoMode` to `"disable"` also keeps Auto mode hidden and off, whatever this key says. + +*** + +#### `disableBypassPermissionsMode` + +booleanSince 1.46388.1 + +**Disable bypass permissions mode.** Remove the bypass permissions mode from Code sessions and Cowork tasks, so Claude always follows the permission policy. Off by default. + +[Self-hosted install](#self-hosted-column): Not supported. A session host never offers bypass mode, so every session it runs already has it off. + +> **More detail** +> +> When set to `true`, sessions cannot run in bypass permissions mode: the app stops offering the mode in Code and Cowork, and a session that requests it anyway is downgraded. This is the `disableBypassPermissionsMode` setting from the `permissions` section of Claude Code's [managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings); a separately deployed Claude Code managed-settings file that sets it to `"disable"` also removes the mode, whichever source sets it. +> +> Unset (default): users the deployment otherwise allows can choose bypass permissions mode. + +*** + +#### `disableBundledSkills` + +booleanSince 1.15962.0 + +**Disable bundled skills and workflows.** Disables Claude Code’s bundled skills and workflows (deep-research and similar). Use where WebFetch/WebSearch aren’t available. + +[Self-hosted install](#self-hosted-column): Server side. The host starts Claude Code, so it is the one that turns the bundled skills off. + +*** + +#### `skillCreationEnabled` + +booleanSince 1.25927.0 + +**Allow user-created skills.** Allow users to create and upload their own skills. When off, the creation and upload surfaces are hidden and the agent’s skill-creation tools are disabled. + +[Self-hosted install](#self-hosted-column): Server side. The host stores people's skills, so when this is off it refuses new ones and tells Desktop to hide creation. + +> **More detail** +> +> When on (default), users can create new skills and upload skill files in the app. Set to `false` to block user skill creation: the skill-creation and upload surfaces are hidden (the `skill_creation` feature is served as blocked by the organization), and the agent's skill-creation tools (saving skills from a conversation, skill proposals) are not offered in sessions — the same effect as turning off the **User-created skills** organization setting available to claude.ai enterprise admins. +> +> This is a feature-availability control enforced in the app's UI, not a data boundary: skills are files on the user's machine, and files already present there (or placed there outside the app) are not removed or blocked by this key. Skills themselves remain usable; organization-distributed plugins and bundled skills are unaffected (to disable bundled skills, use `disableBundledSkills`). + +*** + +#### `userPluginMarketplacesEnabled` + +booleanSince 1.37937.0 + +**Allow user-added plugin marketplaces.** Allow users to add plugin marketplaces. When off, marketplaces your organization did not provision are hidden and the app’s sessions do not load their plugins. + +[Self-hosted install](#self-hosted-column): Server side. Desktop hides and refuses adding a marketplace when off; no session host loads a person's own marketplaces yet. + +> **More detail** +> +> When on (default), users can add plugin marketplaces from the plugin browser. Set to `false` to restrict plugins to your organization's marketplaces: the add-marketplace surfaces are hidden, and the app refuses adds that still reach it (deep links, stale UI). Any other marketplace present on the device is then hidden in every tab, whether a user added it in the app earlier or something outside the app registered it (for example Claude Code in a terminal, under `~/.claude`): its plugins are not listed, and installs and updates from it are refused. The sessions the app starts load plugins only from your organization's marketplaces, the organization plugins directory, the app's own uploads and the user's own skills folder, enforced through Claude Code's marketplace allowlist (`strictKnownMarketplaces`, passed as the app's managed settings). Nothing is deleted: removing the key or setting it back to `true` restores them. Marketplaces provisioned by your organization (`allowedPluginMarketplaces`) and the organization plugins directory are unaffected, and plugins users uploaded are governed by `userPluginUploadsEnabled`, not this key. +> +> This is a feature-availability control, not a data boundary. Claude Code in a terminal reads the same `~/.claude` folder and is governed only by its own managed settings, not by this key. Claude Code may ignore this allowlist on a device that deploys its own Claude Code managed settings; restrict marketplaces in those settings as well. +> +> This key applies only while the app runs in third-party mode. If users could otherwise sign in to Claude.ai on the device, also set `disableDeploymentModeChooser` so the app stays in third-party mode. + +*** + +#### `userPluginUploadsEnabled` + +booleanSince 1.37937.0 + +**Allow user-added plugins.** Allow users to add their own plugins. When off, every in-app option for adding one is hidden and uploads that still reach the app are refused. + +[Self-hosted install](#self-hosted-column): Server side. The host keeps the plugins people upload and loads them in their sessions, and refuses new ones when this is off. + +> **More detail** +> +> When on (default), users can upload plugin files and create plugins with Claude. Set to `false` to stop users adding plugins of their own: every in-app option for doing so is hidden, and the app refuses uploads that still reach it. +> +> This is a feature-availability control enforced in the app, not a data boundary: plugins already installed (or placed on disk outside the app) are not removed or blocked by this key. Plugins from organization-provisioned marketplaces and the organization plugins directory are unaffected. +> +> This key applies only while the app runs in third-party mode. If users could otherwise sign in to Claude.ai on the device, also set `disableDeploymentModeChooser` so the app stays in third-party mode. + +*** + +#### `scheduledTasksEnabled` + +booleanSince 2.110.0 + +**Allow scheduled tasks.** Allow scheduled tasks in Cowork and Code. When off, the Scheduled page is hidden, existing tasks stop running, and Claude cannot create new ones. + +[Self-hosted install](#self-hosted-column): Server side. The host runs scheduled tasks, so when this is off it refuses to create or run them. + +> **More detail** +> +> When on (default), users can schedule Cowork tasks and Code sessions to run later or on a recurring schedule, and Claude can create such schedules when asked. +> +> Set to `false` to turn scheduled tasks off for every user. The Scheduled section in Cowork and the routines list in the Code tab are hidden, together with every other place a schedule can be created. Tasks that already exist on a device no longer run; they are kept, not deleted, and run again once the key is removed or set to `true`. Claude is not offered the tools that create, change or run these tasks, and sessions start without Claude Code's own in-session scheduling tools (the `/loop` command, its cron tools and its wake-up timer). +> +> It does not remove task files already on the user's machine. A change takes effect at the next app launch. + +*** + +#### `keepAwakeEnabled` + +booleanSince 2.7032.0 + +**Allow keep awake.** Let Claude keep the computer awake. When off, Claude never prevents sleep and hides the keep-awake switches in Settings, the Scheduled page and the Code tab. + +[Self-hosted install](#self-hosted-column): Server side. Desktop itself asks the person's computer to stay awake, and shows the keep-awake switches. + +> **More detail** +> +> When on (default), users can turn on **Keep computer awake** (Settings → This computer → System, also shown as **Keep awake** on the Scheduled page in Cowork and the Routines page in Code) so the computer does not idle-sleep while Claude is open and scheduled tasks keep running on an idle machine. The Code tab can also keep the computer awake while a session is working (**Keep computer awake while Claude works** in Settings → Claude Code, and a session's **Keep computer awake** menu item). +> +> Set to `false` to make sure Claude never prevents the computer from sleeping: those switches are hidden and no part of the app keeps the computer awake. Users' saved choices are kept but ignored, and apply again once the key is removed or set to `true`. Scheduled tasks are unaffected and still run only while the computer is awake and the app is open. +> +> A change takes effect on a running app. + +*** + +#### `developerModeEnabled` + +booleanSince 2.37337.1 + +**Allow Developer Mode.** Let users turn on Developer Mode. When off, the app’s developer tools and the option to install an unpacked extension are unavailable. + +[Self-hosted install](#self-hosted-column): Server side. Desktop offers its own Developer menu, developer tools and debugger on the person's computer. + +> **More detail** +> +> When on (default), a user can turn on **Developer Mode** (Help → Troubleshooting → Enable Developer Mode), which adds the **Developer** menu and lets them open the developer tools (Chrome DevTools, Inspect Element) and a debugger for the app's main process. +> +> Set to `false` to keep Developer Mode off on every device that receives this setting: the **Developer** menu and the Help → Troubleshooting → Enable Developer Mode item are removed, the developer tools and the debugger cannot be opened (any already open are closed), a user's own `developer_settings.json` opt-in is ignored, and the app refuses to install an extension from a folder. Packaged (`.mcpb`) extensions are governed by `isDesktopExtensionEnabled`, not this key. +> +> This is a feature control, not a sandbox: extensions already installed from a folder stay installed and keep working, and an extension folder copied into the app's extensions folder by hand is not blocked. +> +> A change takes effect on a running app, except that the **Install unpacked extension** button in Settings keeps its launch-time state until the app restarts (clicking it while the key is off shows an error). + +*** + +#### `quickEntryDefaultShortcut` + +stringSince 3.1623.0 + +**Default Quick Entry shortcut.** Set the shortcut that opens Quick Entry, such as Ctrl+Alt+K, for users who haven’t set their own in Settings. Use “off” for no shortcut. + +[Self-hosted install](#self-hosted-column): Server side. Desktop registers its Quick Entry shortcut with the operating system of the person's computer. + +> **More detail** +> +> Sets the default shortcut for Quick Entry, the small prompt window that opens over other apps. It replaces Claude's built-in shortcut (double-tap Option on macOS, Ctrl+Alt+Space on Windows and Linux) for users who haven't chosen their own. +> +> This is a default, not a lock. A shortcut that a user saves in Settings → This computer → System (**Quick access shortcut** on macOS, **Quick Entry keyboard shortcut** on Windows and Linux) takes precedence, including one saved before this key was set. +> +> Accepted values: +> +> * Modifiers and one key joined by `+`, such as `Ctrl+Alt+K` or `Alt+Space`. Modifiers include `Ctrl`, `Alt`, `Shift`, `Cmd` and `Super`. `CommandOrControl` means Cmd on macOS and Ctrl elsewhere, so one value works on every platform. A combination must pair `Ctrl`, `Cmd` or `Super` with `Alt` or `Shift`, except for `Alt+Space`. Write modifier and key names exactly as shown: `ctrl` is not read as `Ctrl`. +> * `off` (the string, not `false`): no shortcut. Users can still open Quick Entry from Claude's tray or menu bar icon and set a shortcut in Settings. +> * `double-tap-option`: macOS only. Windows and Linux keep the built-in shortcut. +> +> While Claude is running, other apps don't receive this shortcut. So Claude rejects other combinations, such as `F11`, `Ctrl+C`, `Shift+K` or `Alt+Shift+K`, which typing and other apps rely on. It also rejects any combination that includes `Insert`, `Capslock` or `F5`, which screen readers use. Choose a combination that users don't need elsewhere. +> +> If Claude can't use the value as a shortcut, it ignores the value and keeps the built-in one. If another app already uses the shortcut, Claude on macOS uses the built-in shortcut. On Windows and Linux, Quick Entry keeps its previous shortcut, or none at start-up. Users can choose another in Settings. +> +> A change takes effect on a running app. + +*** + +#### `quickEntryScreenshotsEnabled` + +booleanSince 3.6556.1 + +**Allow screenshots of the screen and other apps.** Let users take screenshots of their screen or other apps’ windows in Quick Entry on macOS. When off, it offers none and never asks for Screen Recording access. + +[Self-hosted install](#self-hosted-column): Server side. Desktop takes the picture on the person's computer and offers it in its own Quick Entry window. + +> **More detail** +> +> When on (default), Quick Entry on macOS lets a user click another app's window, or drag over part of the screen, to attach a picture of it to their prompt. Until the user grants the macOS Screen Recording permission, Quick Entry shows a **Turn on screenshots** button that asks for it. +> +> Set to `false` to turn this off on every device that receives this setting. Quick Entry still opens, but offers no screenshot and no such button, and Claude does not ask for that permission. Outside Quick Entry, another app's window that a user mentions with @ in a chat comes without its picture. Users cannot turn it back on. +> +> With `quickEntryFileSharingEnabled` off as well, Quick Entry shows no permission banner at all. +> +> On Windows and Linux, Quick Entry takes text only, so this key changes nothing there. +> +> This key does not cover: +> +> * A screenshot that a user takes with the operating system's own tools and then pastes or attaches. That is a file upload. +> * Pictures that Claude takes of its own content, such as an artifact, a file preview, a page in the built-in browser (`builtinBrowserEnabled`) or the feedback form. +> * A local MCP server or desktop extension that captures the screen (`isLocalDevMcpEnabled`, `isDesktopExtensionEnabled`). +> * Other apps, or the operating system, capturing Claude's windows. +> +> A change takes effect on a running app. + +*** + +#### `quickEntryFileSharingEnabled` + +booleanSince 3.6556.1 + +**Allow sharing files open in other apps.** Let users attach the file open in another app’s window in Quick Entry on macOS. When off, it offers none and never asks for Accessibility access. + +[Self-hosted install](#self-hosted-column): Server side. Desktop finds the file on the person's computer and offers it in its own Quick Entry window. + +> **More detail** +> +> When on (default), Quick Entry on macOS offers, on another app's window, to attach the file that is open in it to the user's prompt. Claude learns which file that is through the macOS Accessibility permission. Until the user grants it, Quick Entry shows a **Turn on file sharing** button that asks for it. +> +> Set to `false` to turn this off on every device that receives this setting, including devices where the permission is already granted. Quick Entry still opens, but offers no file from another app's window and no such button, and it does not ask for that permission. Outside Quick Entry, another app's window that a user mentions with @ in a chat comes without its file. Users cannot turn it back on. +> +> With `quickEntryScreenshotsEnabled` off as well, Quick Entry shows no permission banner at all. +> +> On Windows and Linux, Quick Entry takes text only, so this key changes nothing there. +> +> This key does not cover: +> +> * A file that a user attaches, pastes or drags into Claude themselves. That is a file upload. +> * Claude's other uses of the Accessibility permission where a user has granted it, such as telling a double tap of Option from a keyboard shortcut. +> +> A change takes effect on a running app. + +*** + +#### `skipWebFetchPreflight` + +booleanSince 1.37937.0 + +**Skip WebFetch domain check.** Skip Claude Code’s WebFetch domain lookup against api.anthropic.com in Code sessions. Off by default; turn on when that host is blocked. + +[Self-hosted install](#self-hosted-column): Not supported. A session host always skips the web fetch preflight check, whatever is written. + +> **More detail** +> +> Before fetching a page, Claude Code's WebFetch tool asks `api.anthropic.com` whether the domain is on Anthropic's content blocklist, and refuses the fetch if that lookup cannot complete. Third-party deployments route inference elsewhere and often block `api.anthropic.com` at the firewall; with the lookup on, every WebFetch in Code sessions then fails with "Unable to verify if domain … is safe to fetch", and where the host is reachable, every fetched hostname is sent to Anthropic. (Cowork sessions fetch through the app's own allowlisted fetch and never run this lookup.) +> +> Off (default): the lookup runs as it does today, so `api.anthropic.com` must be reachable from users' machines for Code-session WebFetch to work (listed under Egress Requirements). Set to `true` when users' machines cannot reach `api.anthropic.com` (corporate firewall, government network) or you do not want fetched hostnames sent there: Code sessions then fetch without the lookup and never contact that host for it. This is the same `skipWebFetchPreflight` setting Claude Code reads from its own [managed-settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) file; the app passes it to every session it starts. This key does not restrict which domains Claude may fetch. Neither does `coworkEgressAllowedHosts` in Code sessions, where it only pre-approves its hosts; `builtinToolPolicy` can require approval for every fetch. + +*** + +#### `builtinToolPolicy` + +object: name → valueSince 1.8089.0 + +**Built-in tool policy.** Approval per tool or rule such as Bash(curl \*). “ask” prompts the user before each matching call. “allow” is the default. To block, use Disabled built-in tools. + +[Self-hosted install](#self-hosted-column): Server side. The host hands each session the admin's allow or ask rule for each built-in tool. + +> **More detail** +> +> Keys use the same tool names and argument-scoped rule syntax as **Disabled built-in tools** (`disabledBuiltinTools`), and scopes apply in the same sessions. A bare `Bash` key also governs Claude Code's `PowerShell` tool (its shell on Windows PCs without Git for Windows); argument-scoped `Bash(…)` keys do not. Scoped **ask** rules reach sessions only through Claude Code's managed-settings channel, so another Claude Code managed-settings source replaces them unless it sets `parentSettingsBehavior` to `"merge"` (bare names hold either way). They need the same fleet-wide build support, and an older build drops a scoped **ask** entry as a configuration error (which also blocks WSL sessions on Windows until that client updates), so the tool runs unprompted. +> +> An **ask** entry, bare or scoped, also turns off the app's remembered “always allow” choices for that tool, so each prompted call is confirmed individually. **ask** on a file tool (`Read`, `Write`, `Edit`, `Glob`, `Grep`) prompts in Cowork, Chat and Code sessions. Calls that Cowork and Chat always refuse are still refused without a prompt: paths outside the session's connected folders (in Chat, outside its scratch directory and its project's folders) and protected or sensitive files inside them. A scheduled task in Cowork waits at the prompt, which appears in the task's session and, when that session is not in view, as a desktop notification. Code side chats cannot prompt, so they block matching calls. An unusable entry is dropped and recorded as a configuration error; a value other than `allow` or `ask` is treated as `ask` and reported. To remove a tool or deny a rule outright, use **Disabled built-in tools** instead. + +*** + +#### `disabledBuiltinTools` + +string\[]Since 1.2581.0 + +**Disabled built-in tools.** Built-in tools, or argument-scoped permission rules such as Read(//\*\*/.env), denied in Cowork and Code. + +[Self-hosted install](#self-hosted-column): Server side. The host starts each session with the built-in tools and tool uses the admin denies turned off. + +> **More detail** +> +> Each entry is a Claude Code [tool name](https://code.claude.com/docs/en/tools-reference) such as `Bash`, `Edit`, `WebFetch` or `WebSearch`, or an argument-scoped [permission rule](https://code.claude.com/docs/en/permissions#permission-rule-syntax) such as `Bash(curl *)` or `Edit(//**/*.env)`. A bare name covers every call (a bare `Bash` entry also covers the `PowerShell` tool); a scoped rule covers matching calls in every permission mode, including Auto and bypass. Scopes are matched for `Bash(…)` and `PowerShell(…)` (a command pattern) and for file paths written as `Read(…)` (covers `Read`, `Grep`, `Glob`) or `Edit(…)` (covers `Edit`, `Write`, `NotebookEdit`); many other tools take `Tool(:)`. `WebSearch` and `WebFetch` are bare-name only: to allow specific hosts, use `coworkEgressAllowedHosts`. +> +> Scoped `Bash(…)` rules apply in Code sessions only; Cowork's shell follows only a bare `Bash` entry. Start absolute file paths with `//`, not `/`: a relative pattern such as `Read(**/.env)` covers only a Code session's project folder and none of Cowork's connected folders. Scoped rules need fleet-wide build support (`disableAutoUpdates` pins builds): an older build passes a scoped entry to Claude Code unchecked. An entry whose pattern contains `)` followed by a space or comma is enforced only through Claude Code's managed-settings channel, so another Claude Code [managed-settings source](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) replaces it unless that source sets `parentSettingsBehavior` to `"merge"`; every other entry is enforced either way. +> +> An unusable entry (a tool name in the wrong letter case, an unbalanced parenthesis, a scoped `WebSearch(…)` or `WebFetch(…)`) is kept, because the deny list is served exactly as written, and raises a configuration warning. + +*** + +#### `toolSearchEnabled` + +booleanDefault: falseSince 1.21459.0 + +**Enable tool search.** Load MCP tool schemas on demand (tool search) instead of inlining every schema into context. + +[Guide for this setting](/docs/third-party/claude-desktop/gateway.md#mcp-tool-search) + +[Self-hosted install](#self-hosted-column): Server side. The host starts Claude Code, so it turns tool search on or off for its sessions. + +> **More detail** +> +> When enabled, Cowork, Code, and Chat sessions place only tool names in context up front, and Claude fetches a tool's full schema the first time it needs it. Use this when many MCP tools are configured and their inlined schemas crowd out the context window. If your endpoint does not accept the request shape it then receives, requests fail with HTTP 400. +> +> * **Claude API, Vertex AI, Bedrock, or Bedrock Mantle with no custom base URL**: not needed. The app leaves Claude Code's experimental betas on there, as terminal Claude Code does, so tool search is on by default (on Vertex AI, for Claude 4.5 and newer models). To turn it off in Code, Cowork, and Chat, set `ENABLE_TOOL_SEARCH` to `false` in the `env` block of OS-level Claude Code managed settings (with `parentSettingsBehavior: "merge"`). Earlier app versions treat these like the last case. +> * **Gateway provider, app versions bundling Claude Code 2.1.247 or later**: requests add only the tool-search shape (the `tool-search-tool-2025-10-19` `anthropic-beta` value, deferred tool loading, `tool_reference` content blocks); every other experimental Claude Code beta stays suppressed. OS-level Claude Code managed settings that keep that suppression or turn `ENABLE_TOOL_SEARCH` off still win; set `ENABLE_TOOL_SEARCH` to `force` there instead (with `parentSettingsBehavior: "merge"`). Sessions the app runs in Claude Code's gateway mode (an opt-in for users on the gateway's own sign-in) get its gateway-safe tool-search shape instead. +> * **Foundry, a custom base URL, and earlier app versions**: the app suppresses Claude Code's experimental betas for the session and the key lifts that, so requests carry the tool-search shape together with Claude Code's other experimental betas for that provider. On Vertex with app versions bundling Claude Code older than 2.1.221, leave this unset while any model older than Claude 4.5 is in use; those engines send the header regardless of model and Vertex's pre-4.5 stacks reject it. + +*** + +#### `organizationInstructions` + +stringSince 1.37937.0 + +**Organization instructions.** Appended to Claude’s system prompt in Chat, Cowork, and Code. Guidance the model follows, not an enforced control. Up to 3,000 characters. + +[Self-hosted install](#self-hosted-column): Server side. The host adds the admin's instructions to every session it starts. + +> **More detail** +> +> Free-text instructions from your organization that Claude Desktop appends, in a clearly delimited block, after its own system prompt in **Chat**, **Cowork**, and **Code** (every chat, task, and Code session, including the sub-agents they spawn): for example house style, data-handling rules, or topics to decline. The model is told these instructions come from the organization's administrator and take priority over a user's personal preferences. +> +> This is guidance the model follows, not an enforced control: like any system-prompt text it steers the model's behavior and is usually honored, but it does not guarantee an outcome and is not a substitute for the restriction keys (tool policy, egress allowlist, folder allowlist). The app's own system prompt is never replaced or shortened by this key; in Code sessions it is added after Claude Code's own prompt and any `CLAUDE.md` instructions still apply. +> +> Read from the app's loaded configuration when a session starts; a changed value generally takes effect for sessions started after the next app launch. Leading and trailing whitespace is trimmed; an empty string is treated as unset. Maximum 3,000 characters; a longer value is rejected (the key is ignored with a configuration error) rather than truncated. Line breaks are preserved when the value is delivered as JSON, a bootstrap response, a `.mobileconfig` profile, or a `.reg` file; the Group Policy (ADMX) and Intune text box for this setting is single-line. + +*** + +#### `requireCoworkFullVmSandbox` + +booleanDefault: false + +Deprecated (On third-party deployments Claude Desktop no longer reads the key and ignores any value set for it. Remove it from your configuration.) + +Since 1.2581.0 + +**Require full VM sandbox.** Runs tools inside an isolated VM instead of the host. Stronger isolation; slower file access and no host-process tools. + +[Self-hosted install](#self-hosted-column): Not supported. Chooses how Cowork runs on the person's own computer, and third-party installs no longer read it. + +[Admin Console](#the-works-with-column): Not available. + +*** + +### Authentication + +#### `disableDeploymentModeChooser` + +booleanDefault: falseSince 1.3834.0 + +**Disable Claude.ai sign-in.** Users see only this provider at the login screen. The option to sign in to Claude.ai is hidden. + +[Self-hosted install](#self-hosted-column): MDM profile. Shapes Desktop's sign-in screen and configuration source, settled before Desktop reaches the host. + +[Admin Console](#the-works-with-column): Not available. + +> **More detail** +> +> Set in a device-management profile, this key also keeps that profile in charge. Without it, a user who signs in to Claude.ai with an organization whose Claude Desktop deployment is configured in the admin console moves the device to that organization's configuration, at later launches too. The profile then still supplies what no configuration server can deliver, such as the network proxy, and a few device safeguards, such as `sessionRetentionHold`; every other key, update keys included, comes from the organization's configuration. A profile that sets only app-behavior keys (`disableAutoUpdates`, …) and no other key, not even `forceLoginOrgUUID`, is not affected: it keeps those keys over the organization's configuration without this key, and adding this key there would make the profile the device's whole configuration. The account menu offers the way back to a profile that sets a provider or a server. `forceLoginOrgUUID` in the profile limits the move to the organizations it lists. A value served only by the profile's own `bootstrapUrl` server does not keep the device. + +*** + +#### `disableDeepLinkRegistration` + +booleanDefault: falseSince 1.6889.0 + +**Disable claude:// deep-link handling.** Stop external apps and websites from opening Claude Desktop via claude:// links. + +[Self-hosted install](#self-hosted-column): MDM profile. Desktop registers claude:// links on the person's computer at launch, before it has signed in to the host. + +*** + +### Built-in browser + +#### `builtinBrowserEnabled` + +booleanDefault: falseSince 2.2553.0 + +**Allow the built-in browser.** Offer the built-in browser in Cowork and Code sessions so users and Claude can open and work with web pages. Site sign-ins stay on the device until cleared. + +[Self-hosted install](#self-hosted-column): Not supported. The browser pane lives in Desktop on the person's computer, and host sessions get no browser tools. + +[Admin Console](#the-works-with-column): Set automatically. + +> **More detail** +> +> When enabled, Cowork and Code sessions get a built-in browser pane. Users can open any site in it; Claude can open, read, and act on pages with its browser tools once the user approves each site (private-network hosts ask again per action unless the user always allows the host). Pages load directly from the user's machine, so your network controls apply; the pane's sign-ins and cookies stay in the app's browser profile on the device until cleared. +> +> Off (default): no browser pane; Code sessions keep the localhost-only dev-server preview. With `bootstrapUrl` set, put this key in the served configuration: a device-profile value alone leaves the browser off. On an install managed from the Claude admin console this follows the console's Built-in browser switch. +> +> When a public site opens or is framed in the pane, and before Claude works with it, the app checks its address (query removed) against Anthropic's site safety list on `releases.claude.com`, signed out, with no account, organization, or device identifier (admin console installs: signed in, on the host that serves their configuration). A site it blocks stays blocked to Claude under every key below. Private addresses, names resolving to them, and internal-suffix or single-label names are never sent (a name under a public domain is checked even if only your VPN resolves it). Allow `releases.claude.com` through your firewall: if a check fails, users can browse but Claude's page tools stay off for that site. +> +> `builtinBrowserDefaultDomainPolicy` and its two site lists restrict where Claude may browse. A separately deployed Claude Code [managed-settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) file still applies: `disableBrowserExternalNavigation: true` keeps the browser off even with this key on, and `browserExternalPageTools: "disabled"` keeps the pane but turns Claude's page tools off for external sites. Takes effect after the app restarts. + +*** + +#### `builtinBrowserDefaultDomainPolicy` + +enumDefault: allowSince 2.2553.0 + +**Default site policy in the built-in browser.** Whether Claude may open sites in the built-in browser by default; the allowed or blocked list is the exception. Mirrors the Claude in Chrome site policy. + +One of: `allow` (default), `block` + +[Self-hosted install](#self-hosted-column): Not supported. Sets the default for Desktop's browser tools, and host sessions get no browser tools to allow or block. + +[Admin Console](#the-works-with-column): Set automatically. + +> **More detail** +> +> Applies when `builtinBrowserEnabled` is on, in both Cowork and Code sessions, and decides which sites Claude may open, read, or act on with its browser tools; users can still view any site themselves. `allow` (default): every site except entries in `builtinBrowserBlockedDomains`. `block`: no site except entries in `builtinBrowserAllowedDomains`. Under either policy `coworkEgressAllowedHosts`, when set to anything but `*`, is an outer bound: sites outside it are refused to Claude in the browser too. A site Anthropic's site safety list blocks stays blocked to Claude under either policy (see `builtinBrowserEnabled`); for a site the list only flags for confirmation, Claude asks the user before each of its actions under `allow`, and skips that confirmation only when the site matches a `builtinBrowserAllowedDomains` entry under `block`. A value that cannot be read is treated as `block` until it is fixed. +> +> The policy also limits what pages load: a page in the pane, including one a user opened, cannot load frames, scripts, images, or other content from a site the policy does not admit (a blocked page a user opens still loads content from its own site). Under `block`, or with a `coworkEgressAllowedHosts` list, include the CDN and API hosts your allowed sites depend on. +> +> This key and the two site lists work the same way as the Claude in Chrome site policy in the admin console. They are set separately here, except on an install managed from the Claude admin console, where they follow your organization's browser site permissions there. + +*** + +#### `builtinBrowserAllowedDomains` + +string\[]Since 2.2553.0 + +**Allowed sites in the built-in browser.** Sites Claude may open, read, and act on in the built-in browser when the default site policy is block. Users can still view other sites. + +[Self-hosted install](#self-hosted-column): Not supported. Lists sites allowed for Desktop's browser tools, and host sessions get no browser tools. + +[Admin Console](#the-works-with-column): Set automatically. + +> **More detail** +> +> Used when `builtinBrowserDefaultDomainPolicy` is `block`; ignored under `allow`. A site matching an entry is one Claude may open and work with using its browser tools; every other external site is treated as blocked by your organization: Claude cannot open it, cannot read or act on it, and frames, popups, and redirects into it from a page Claude is working on are refused. A user can still type its address and view it themselves. Listing a site here never unblocks a site Anthropic's site safety list blocks (see `builtinBrowserEnabled`); for a site that list only flags for confirmation, an entry here is your organization vouching for it, so Claude works with it without asking before each action. +> +> Entries use the same grammar as `coworkEgressAllowedHosts`, except that bare `*` is dropped: as in Claude in Chrome, no allowed-sites entry opens every site. Set the policy to `allow` for that. A wildcard whose base is a public suffix (`*.co.uk`, `*.github.io`) is likewise ignored so an entry can never open a whole shared registry. Any other entry outside that grammar is kept but matches nothing (the app log and the editor name it); a value that cannot be read at all allows nothing until it is fixed. A plain hostname entry (`example.com`) also covers its `www.` form, and a `www.` entry covers the bare name, but no other subdomain. `localhost` dev servers are always reachable, so listing them changes nothing. +> +> Empty or unset (default): under `block`, Claude may open no external site. On an install managed from the Claude admin console this follows your organization's browser site permissions there. + +*** + +#### `builtinBrowserBlockedDomains` + +string\[]Since 2.2553.0 + +**Blocked sites in the built-in browser.** Sites Claude may not open, read, or act on in the built-in browser when the default site policy is allow. Users can still view them. + +[Self-hosted install](#self-hosted-column): Not supported. Lists sites blocked for Desktop's browser tools, and host sessions get no browser tools. + +[Admin Console](#the-works-with-column): Set automatically. + +> **More detail** +> +> Used when `builtinBrowserDefaultDomainPolicy` is `allow` (the default); ignored under `block`. A site matching an entry is treated as blocked by your organization: Claude cannot open it, cannot read or act on it with its browser tools, and frames, popups, and redirects into it from a page Claude is working on are refused. A user can still type its address and view it themselves: the pane shows a "blocked by your organization's policy" banner and Claude's tools stay off there. To take the external browser away from users as well, deploy Claude Code's `disableBrowserExternalNavigation` managed setting instead. A blocked site is refused before the site safety check, so its address is never sent to Anthropic. +> +> Entries use the same grammar as `coworkEgressAllowedHosts`; `*` blocks every external site. An entry outside that grammar is kept but matches nothing (the app log and the editor name it); a value that cannot be read at all blocks every external site until it is fixed. As in Claude in Chrome, a plain hostname entry (`example.com`) also covers its `www.` form, and a `www.` entry covers the bare name, but no other subdomain. `localhost` dev servers are never affected. +> +> Use this key for exceptions inside an allowed egress wildcard or when egress is open. Empty or unset (default): no sites beyond the egress list are blocked. On an install managed from the Claude admin console this follows your organization's browser site permissions there. + +*** + +### Claude.ai data import + +#### `claudeAiImport` + +objectSince 1.10628.0 + +**Claude.ai data import.** Lets users import Claude.ai chats and projects, plus earlier Claude sessions on this computer, when `enabled` is true. `automatic3pImport` is a separate switch. + +[Self-hosted install](#self-hosted-column): Server side. Desktop can still export sessions stored on the person's computer, and imports none, since no session runs there. + +> **Child attributes (5)** +> +> **enabled** `boolean` (default: false) +> +> Lets users import a Claude.ai data export and earlier Claude sessions on this computer from Settings → Import. Doesn’t affect a provisioned sign-in import. +> +> **allowedOrganizationUuids** `string[]` +> +> When set, users import by sign-in only, and only from the Claude.ai organizations with these IDs. +> +> > **More detail** +> > +> > A list of Claude.ai organization IDs (UUIDs). When set, users can import only by signing in to Claude.ai, and only from an organization on the list: a sign-in to any other organization, or to a personal account, is refused before anything is downloaded. Importing from a file and from earlier sessions on this computer is turned off. The list narrows `enabled` and turns nothing on by itself; `automatic3pImport` is not affected. An entry that is not a UUID allows nothing and is reported. An empty list, or one that cannot be read, allows no organization, so no import is offered; a null or blank value is read as not set. A provisioned sign-in import names no organization, so it is not offered while the list is set. Each import is reported to your OpenTelemetry collector as the event `desktop_claude_ai_import`, with the ID of the organization it came from. It is an info-level event: set `otlpDesktopLogLevel` to `info` to receive it. +> +> **automatic3pImport** `boolean` +> +> Copy this computer’s earlier third-party sessions into the app once, in the background. Independent of `enabled`. +> +> > **More detail** +> > +> > Under device-delivered configuration (device management, a configuration file or a bootstrap URL) this runs only when set to `true`; for organizations managed from the Claude admin console (the hosted configuration) it is on unless an admin turns it off there. When the app launches under this organization, it copies this computer's earlier third-party sessions into its store, with Settings → Import's importer (originals are kept). It lists the earlier configuration's Cowork artifacts in this organization. If still offered, optional plugins the user switched on return. Organization plugins directory: switched on. `allowedPluginMarketplaces` entry with an unchanged source or on the new gateway or bootstrap origin: reinstalled without asking. Plugins the user uploaded (unless `userPluginUploadsEnabled` is off; they can run programs on this computer) and skills they saved (unless `skillCreationEnabled` is off) are installed again without asking, on or off as they were; a skill that declares tools, hooks, metadata or unknown settings arrives off. Not copied: plugins from user-added marketplaces or with code in another repository. Earlier Cowork projects are added, their instructions held until the user accepts them. The user's Cowork memory, global instructions and Instructions for Claude are copied and used at once, unreviewed (no memory if it was paused). Earlier scheduled tasks are added, each on or off as it was: one that was on runs at its next scheduled time. Runs at most once per device under device-delivered configuration and once more after it joins the hosted configuration. Under the hosted configuration it takes sessions from any earlier device configuration (including ones a console sign-in created) but never those stored under another organization's hosted configuration; under device-delivered configuration, only those stored while no organization ID was configured, and only once one is. Turn on `enabled` too so users can import skipped sessions by hand. +> +> **exportEnabled** `boolean` (default: false) +> +> Lets users export this computer’s chats, Cowork tasks, and Code sessions as a zip another install can import. No effect unless `enabled` is true. +> +> > **More detail** +> > +> > Allows users to write this computer's chats, Cowork tasks, and Code sessions to a portable zip that another install can import from Settings > Import. Transcripts contain conversation content including tool outputs; only session-record metadata is projected to a fixed field allowlist. Treat exported zips as sensitive data. +> +> **bannerBehavior** `enum` +> +> Prompt to import on a new chat or task. Off if unset. `show`: always; needs `enabled` or a sign-in import. `detect`: if `enabled` finds earlier Claude sessions. +> +> One of: `off`, `detect`, `show` + +*** + +## Connectors + +### MCP + +#### `managedMcpServers` + +object\[]Since 1.2581.0 + +**Managed MCP servers.** Org-pushed MCP servers: remote (HTTP/SSE) or local (stdio command). May embed bearer tokens. + +[Self-hosted install](#self-hosted-column): Server side. The host connects the admin's MCP servers and applies each tool's rule, and tells Desktop which local ones to start. + +> **More detail** +> +> For OAuth-authenticated entries, the app builds the redirect URI as `http://:/callback`; register that exact value with the OAuth provider. Tokens refresh automatically during a session. +> +> `toolPolicy` locks the per-tool approval state, keyed by tool name: `"blocked"` removes the tool from the session and labels it admin-blocked, `"ask"` requires approval on every call (Allow once / Deny only; no persistent always-allow; a scheduled Cowork task waits at that prompt), `"allow"` pre-approves. Tools **not listed** follow the user's choice: the prompt offers a persistent Always allow, except for tools that can modify data, which show a session-scoped **Allow for this task** alongside **Allow for all tasks** with a malicious-instruction warning. In Code sessions, `blocked` and `ask` are forwarded as Claude Code permission rules; `allow` is not. +> +> Keys may contain `*` wildcards (`"read_*"` matches every tool whose name starts with `read_`; anchored, and `*` is the only wildcard). When several wildcard keys match, the strictest applies (blocked > ask > allow). An exact-name key wins over matching wildcards, with two exceptions in the stricter direction: in Code sessions a wildcard `ask`, or a wildcard `blocked` other than the bare `"*"`, beats a less strict exact key (so `"*": "blocked"` plus exact `"allow"` entries still works as deny-by-default there); and in chat approval prompts and always-allow persistence a wildcard `ask` keeps every matching tool behind a per-call prompt even when a more permissive exact key matches, while direct tool invocations such as artifact or widget calls follow the exact key. +> +> For the bundled Microsoft 365 connector, the send tools (`outlook_send_mail`, `outlook_send_draft`, `outlook_forward_mail`, `outlook_create_event`, `outlook_update_event`, `teams_send_chat_message`, `teams_send_channel_message`, `teams_reply_channel_message`) cannot be loosened below `ask`; an `allow` setting resolves to `ask`. + +> **Child attributes** +> +> **name** `string` *required* +> +> Unique name for this server. Shown to users and used to key tool policy and sign-in state. +> +> **toolPolicy** `object: name → value` +> +> Lock the approval state for specific tools. Unlisted tools stay user-controlled. +> +> > **More detail** +> > +> > Also governs the same server when an installed plugin provides it. A plugin's MCP server matches an entry by URL, else by name (case-insensitive; a plugin server that runs locally matches by name only), and then follows that entry's `toolPolicy` alone: `orgPluginSettings` is not consulted for it, even when the entry sets no `toolPolicy`. A built-in entry (one with `server`) is the exception: it applies to a plugin's server of the same name only when a `toolPolicy` is written on it, and then carries that `toolPolicy` and the built-in's rule that its send and other irreversible tools cannot be loosened below `ask`, but not the built-in's other default prompts. An `http`, `sse` or `stdio` entry is also a server the app itself connects to or launches. To set permissions for a server that only a plugin runs, without the app connecting to or launching anything, use an entry with `transport: "policy-only"`. +> > +> > Any value other than `allow`, `ask` or `blocked` is read as `blocked` for that tool, and a `toolPolicy` that is not a map of tool names blocks every tool of the server; both are reported as configuration errors. +> > +> > For a plugin server that Claude Code launches or connects to itself (a marketplace plugin's), the permissions travel on Claude Code's managed-settings channel: another Claude Code [managed-settings source](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) on the device replaces them unless that source sets `parentSettingsBehavior` to `"merge"`. `blocked` on a server the app connects to itself holds either way. +> +> **microsoft365** +> +> Applies when `server` is `microsoft365`. The in-app configuration window calls it **Microsoft 365**. +> +> **server** `string` *required* +> +> Which bundled connector this entry turns on. Set instead of a transport; each built-in server has its own fields. +> +> Must be: `microsoft365` +> +> **tenantId** `string` *required* +> +> Your organization’s Microsoft Entra directory (tenant) ID. +> +> **clientId** `string` *required* +> +> OAuth app client ID for this built-in server. +> +> **azureCloud** `enum` +> +> Microsoft cloud for sign-in and Graph. Leave as global for commercial Microsoft 365; US Government clouds require your own app registration (Client ID). +> +> One of: `global`, `us-gov-high`, `us-gov-dod` +> +> **continuousAccessEvaluation** `enum` (default: enabled) +> +> Request CAE-capable Microsoft Graph tokens: long-lived (up to about 28 hours) but revocable within minutes. Set “disabled” to keep standard one-hour tokens. +> +> One of: `enabled` (default), `disabled` +> +> > **More detail** +> > +> > With Continuous Access Evaluation the server declares the `cp1` client capability, so Microsoft Entra issues access tokens that live up to about 28 hours and are cut off within minutes by a claims challenge when an administrator revokes sessions, disables the account, or the user’s risk changes — and, where the tenant enforces an IP named-location or Global Secure Access compliant-network Conditional Access policy, when the token is presented from outside that network. Tenants without such a policy get the longer lifetime and the fast revocation but no network-based replay protection; set `disabled` to keep standard one-hour, non-CAE tokens on every sign-in path. A change applies to tokens issued after the connector respawns with it; an already-cached long-lived token is served until it expires (Disconnect → Connect signs in afresh). +> +> **scope** `string` +> +> What the server may request at sign-in. If blank, Desktop’s default read set is used. +> +> **websearch** +> +> Applies when `server` is `websearch`. The in-app configuration window calls it **Web search**. +> +> **headers** `object: name → value` +> +> Static headers sent on every request — routing and tenant headers only. No credentials here; use the headers helper script for tokens and rotating values. +> +> > **More detail** +> > +> > On a `websearch` entry, every provider but `custom` needs `headers` or `headersHelper`: the app drops an entry that sets neither. +> +> **headersHelper** `string` +> +> Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) +> +> Script that prints the auth header as a JSON object to stdout. Runs before each request (cached for the TTL below). +> +> > **More detail** +> > +> > Absolute path to an executable that prints a single JSON object of request headers to stdout, e.g. `{"X-Subscription-Token": "…"}`. The app runs it before each request and caches the result for the TTL below. Use this to pull the key from a secrets manager instead of storing it inline in `headers`. +> > +> > The helper runs with `CLAUDE_CODE_MCP_SERVER_NAME` set to this entry’s `name`, so one executable can serve several servers. For a name that holds a double quote, a percent sign or a control character the variable is not set. Claude Code also sets `CLAUDE_CODE_MCP_SERVER_URL` for its own `headersHelper`; this app does not. A name can contain characters such as `&`: put it in double quotes, compare it with the names you expect, and do not pass it on to another command. +> +> **headersHelperArgs** `string[]` +> +> Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) +> +> Arguments passed to the headers helper script, one per entry, in order. Leave unset to run it with none. +> +> > **More detail** +> > +> > Each entry reaches the executable as one argument, exactly as written: `["--environment", "production"]` runs `helper --environment production`. Use it to keep one installed script and let each server’s entry say what it does (which environment, tenant or endpoint to use), instead of packaging a script per server. +> > +> > Entries may not be empty and may not contain a double quote (`"`), a percent sign (`%`) or control characters, on any platform: a Windows `.cmd`/`.bat` helper receives its arguments through `cmd.exe`, where those characters would change the command. A `.cmd`/`.bat` script sees each argument quoted (`%1` is `"production"`, `%~1` strips the quotes); `.ps1`, `.exe` and POSIX helpers receive them bare. Arguments are visible in the app log and to other processes on the machine, so do not put secrets in them; the helper exists to fetch the secret. A server whose list breaks these rules is dropped, and reported, rather than run with other arguments. +> > +> > An app version that does not know this setting ignores it and runs the helper with no arguments: have the script fail when an argument it needs is missing. +> +> **headersHelperTtlSec** `integer` +> +> How long the helper’s headers are reused before it runs again, in seconds. Defaults to 300. +> +> **headersHelperRefreshBufferSec** `integer` +> +> Seconds before the TTL expires at which the helper re-runs mid-session. Defaults to 60. Keep it larger than the helper’s typical runtime. +> +> **server** `string` *required* +> +> Which bundled connector this entry turns on. Set instead of a transport; each built-in server has its own fields. +> +> Must be: `websearch` +> +> **provider** `enum` *required* +> +> Runs search from the desktop, for inference providers without native web search. Supply the provider’s API key through the headers helper script below. +> +> One of: `brave`, `tavily`, `exa`, `custom` +> +> > **More detail** +> > +> > For inference providers without native web search (Bedrock, custom gateways). On Anthropic API and Vertex, the model’s built-in web search is available without this. +> > +> > The provider’s API key is a credential — have the **headers helper script** print its auth header rather than storing it in `headers`: +> > +> > * **Brave** — `X-Subscription-Token` +> > * **Exa** — `x-api-key` +> > * **Tavily** — `Authorization` (Bearer …) +> > +> > To turn web search off entirely, or to require approval for each search, list the bare `WebSearch` name in `disabledBuiltinTools` or `builtinToolPolicy`; it takes no per-host scope. +> +> **customUrl** `string` +> +> POST endpoint accepting \{q} JSON and returning a results\[] array. Only used when provider is Custom. +> +> > **More detail** +> > +> > Required when `provider` is `custom`: the app drops such an entry without it. +> +> **github** +> +> Applies when `server` is `github`. The in-app configuration window calls it **GitHub**. +> +> **server** `string` *required* +> +> Which bundled connector this entry turns on. Set instead of a transport; each built-in server has its own fields. +> +> Must be: `github` +> +> **clientId** `string` *required* +> +> GitHub OAuth app client ID (device flow must be enabled on the app). +> +> **host** `string` +> +> Leave blank for github.com. For GitHub Enterprise Server, your instance’s base URL. +> +> **scope** `string` +> +> Space-separated GitHub OAuth scopes. If blank, Desktop’s default read set is used. Ignored for GitHub Apps (permissions come from the app registration). +> +> **toolsets** `string` +> +> Comma-separated github-mcp-server toolsets to enable. If blank, the bundled server’s default toolsets are used. +> +> **readOnly** `boolean` +> +> Offer only read tools — the server registers no write tools at all. +> +> **http / sse** +> +> Applies when `transport` is `http` or `sse`. The in-app configuration window calls it **Streamable HTTP** or **SSE (legacy)**. +> +> **transport** `enum` *required* +> +> How the app connects: Streamable HTTP, legacy SSE, or a local command (stdio). policy-only connects to nothing; it only sets a plugin server’s tool policy. +> +> One of: `http`, `sse` +> +> **url** `string` *required* +> +> HTTPS endpoint of the remote MCP server. Use the server’s final address: HTTP redirects are not followed. +> +> **oauth** `object` +> +> OAuth for a remote server: true to auto-register a client, a pre-registered client ID with tenant and scope, or mode “hosted” for an Anthropic-signed identity. +> +> [Guide for this setting](/docs/third-party/claude-desktop/mcp-sign-in.md) +> +> > **More detail** +> > +> > **Auto-register**: Claude registers itself as a client with the MCP server’s authorization server the first time a user connects. **Bring your own client**: for a server whose provider requires an OAuth client that you register. Enter its **Client ID**, and add a **Client secret** and **Authorization server** only when the provider also requires the secret. Leave **None** for a server that needs no sign-in or authenticates with headers. +> +> > **Child attributes** +> > +> > **dcr** +> > +> > Applies when `oauth.mode` is `dcr`. The in-app configuration window calls it **Auto-register (dynamic client registration)**. No other fields apply. +> > +> > Write `"oauth": true`. `{"mode": "dcr"}` means the same and takes no other member. To register automatically with scopes of your choice, write an object that sets any of `scope`, `appendOfflineAccess` and `additionalRedirectReferrerHosts` and nothing else, as Bring your own client describes. +> > +> > **byo** +> > +> > Applies when `oauth.mode` is `byo`. The in-app configuration window calls it **Bring your own client**. +> > +> > `mode` can be left out. Without `clientId` the object may set only `scope`, `appendOfflineAccess` and `additionalRedirectReferrerHosts`, and the app registers a client automatically; with any other member listed here and no `clientId`, the app drops the entry. +> > +> > **oauth.clientId** `string` +> > +> > OAuth client ID from your IdP app registration. Leave unset to auto-register (dynamic client registration) and only narrow scopes. +> > +> > **oauth.clientSecret** `string` +> > +> > Only for IdPs that require one (e.g. Box). Hosted config can store only a Google Desktop-app secret (GOCSPX-…); for other IdPs use the client secret helper. +> > +> > **oauth.clientSecretHelper** `string` +> > +> > Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) +> > +> > Executable that prints the client secret on stdout as a JSON object with a single clientSecret key; any other output is rejected. Overrides the inline value. +> > +> > > **More detail** +> > > +> > > Claude runs the executable with no arguments whenever that server connects and whenever its sign-in is refreshed in the background (the result is not cached), and reads **stdout**, which must be exactly one JSON object of the form `{"clientSecret": "…"}`: no other keys, and no banner or log lines before or after it (write those to stderr, which is only logged; keep stdout and stderr together under 64 KB). The helper must exit with code `0` within 30 seconds. Any other output stops that server from connecting, with an error that names its `clientSecretHelper`, instead of sending a wrong value to the identity provider. Use this to pull the secret from Keychain, 1Password CLI, or an internal secret broker instead of writing it into the configuration, and prefer a helper that does not prompt the user, since it also runs during background refreshes. +> > > +> > > The helper runs with `CLAUDE_CODE_MCP_SERVER_NAME` set to this entry’s `name`, so one executable can serve several servers. For a name that holds a double quote, a percent sign or a control character the variable is not set. Claude Code also sets `CLAUDE_CODE_MCP_SERVER_URL` for its own `headersHelper`; this app does not. A name can contain characters such as `&`: put it in double quotes, compare it with the names you expect, and do not pass it on to another command. +> > +> > **oauth.authorizationServer** `string[]` +> > +> > Issuer URLs the OAuth sign-in may use, as a JSON array. Pre-filled by presets; ask your IdP admin if unsure. +> > +> > **oauth.authorizationUrl** `string` +> > +> > Only for IdPs that don’t serve a .well-known discovery document. Set together with Token URL; requires Client ID. +> > +> > **oauth.tokenUrl** `string` +> > +> > Only for IdPs that don’t serve a .well-known discovery document. Set together with Authorization URL; requires Client ID. +> > +> > **oauth.tenantId** `string` +> > +> > Required for single-tenant Entra apps. Leave blank for multi-tenant or non-Microsoft IdPs. +> > +> > **oauth.authFlow** `enum` +> > +> > How Entra sign-in runs for this server: the system browser (default) or the OS identity broker. +> > +> > One of: `browser`, `broker` +> > +> > > **More detail** +> > > +> > > * **`browser`** (default) — opens the system browser for an authorization-code (PKCE) sign-in on the loopback redirect URI. +> > > * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, the Company Portal SSO extension on macOS), so it can satisfy Conditional Access policies that require a compliant or managed device or token protection. Requires **Tenant ID**, **Client ID**, and **Scope**. The app registration must list the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform, and the device must be Entra-registered (macOS also needs the Company Portal SSO extension). Not supported on Linux. When the broker is not available on a device, sign-in falls back to the system browser. +> > > +> > > App versions that predate this key always use the system browser. +> > +> > **oauth.scope** `string` +> > +> > Space-separated scopes sent on the authorize request. Leave unset to use the scopes the server advertises. Required when Tenant ID is set. +> > +> > **oauth.appendOfflineAccess** `boolean` +> > +> > Adds offline\_access to the authorize request so the IdP returns a refresh token for silent renewal. +> > +> > > **More detail** +> > > +> > > Leave off if Scope already includes `offline_access` or the server rejects it. +> > > +> > > With explicit endpoints (Authorization URL / Token URL, no discovery) this toggle can’t take effect on its own — the app can’t confirm the AS advertises `offline_access`, so include `offline_access` in **Scope** instead for silent refresh. +> > +> > **oauth.callbackHost** `enum` +> > +> > Use localhost only if your IdP’s registered redirect URI specifies it. +> > +> > One of: `127.0.0.1`, `localhost` +> > +> > **oauth.callbackPort** `integer` +> > +> > Only set if your IdP requires an exact-match redirect port. Entra accepts any. +> > +> > **oauth.additionalRedirectReferrerHosts** `string` +> > +> > Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. +> > +> > > **More detail** +> > > +> > > Only needed when the IdP completes sign-in from a host other than the authorization URL’s. When a callback is rejected for a referrer mismatch, the rejected host is named in the app log — add that hostname here. +> > +> > **hosted** +> > +> > Applies when `oauth.mode` is `hosted`. The in-app configuration window calls it **Anthropic-hosted client identity (requires Claude.ai sign-in)**. +> > +> > Always write `"mode": "hosted"`. Without it the object is read as Bring your own client, which needs `clientId` beside `authorizationServer`, so the app drops the entry. +> > +> > **oauth.clientId** `string` +> > +> > Set by the Claude.ai control plane when it serves this configuration (the URL of Anthropic’s hosted client-metadata document); not authored. +> > +> > **oauth.authorizationServer** `string[]` *required* +> > +> > The exact issuer string(s) the server’s OAuth authorization server advertises in its metadata, as a JSON array — matched exactly, including path and any trailing slash. Required: Anthropic signs the client identity only for an authorization server listed here. +> > +> > **oauth.scope** `string` +> > +> > Space-separated scopes sent on the authorize request. Leave unset to use the scopes the server advertises. Required when Tenant ID is set. +> +> **headers** `object: name → value` +> +> Static headers sent on every request — routing and tenant headers only. No credentials here; use the headers helper script for tokens and rotating values. +> +> **headersHelper** `string` +> +> Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) +> +> Absolute path to an executable that prints a JSON object of HTTP headers on stdout. Merged over static headers; the helper wins on conflict. +> +> > **More detail** +> > +> > Absolute path to an executable that prints a single JSON object of request headers to stdout, e.g. `{"X-Subscription-Token": "…"}`. The app runs it before each request and caches the result for the TTL below. Use this to pull the key from a secrets manager instead of storing it inline in `headers`. +> > +> > The helper runs with `CLAUDE_CODE_MCP_SERVER_NAME` set to this entry’s `name`, so one executable can serve several servers. For a name that holds a double quote, a percent sign or a control character the variable is not set. Claude Code also sets `CLAUDE_CODE_MCP_SERVER_URL` for its own `headersHelper`; this app does not. A name can contain characters such as `&`: put it in double quotes, compare it with the names you expect, and do not pass it on to another command. +> +> **headersHelperArgs** `string[]` +> +> Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) +> +> Arguments passed to the headers helper script, one per entry, in order. Leave unset to run it with none. +> +> > **More detail** +> > +> > Each entry reaches the executable as one argument, exactly as written: `["--environment", "production"]` runs `helper --environment production`. Use it to keep one installed script and let each server’s entry say what it does (which environment, tenant or endpoint to use), instead of packaging a script per server. +> > +> > Entries may not be empty and may not contain a double quote (`"`), a percent sign (`%`) or control characters, on any platform: a Windows `.cmd`/`.bat` helper receives its arguments through `cmd.exe`, where those characters would change the command. A `.cmd`/`.bat` script sees each argument quoted (`%1` is `"production"`, `%~1` strips the quotes); `.ps1`, `.exe` and POSIX helpers receive them bare. Arguments are visible in the app log and to other processes on the machine, so do not put secrets in them; the helper exists to fetch the secret. A server whose list breaks these rules is dropped, and reported, rather than run with other arguments. +> > +> > An app version that does not know this setting ignores it and runs the helper with no arguments: have the script fail when an argument it needs is missing. +> +> **headersHelperTtlSec** `integer` +> +> How long the helper’s headers are reused before it runs again, in seconds. Defaults to 300. +> +> **headersHelperRefreshBufferSec** `integer` +> +> Seconds before the TTL expires at which the helper re-runs mid-session. Defaults to 60. Keep it larger than the helper’s typical runtime. +> +> **icon** `string` +> +> Icon shown for this connector: a PNG or JPEG image as a base64 data: URI, at most 4,096 characters. +> +> > **More detail** +> > +> > Replaces the website's icon or the generic connector icon for this connector. The image is stored in the configuration itself, so the app makes no network request to show it. A PNG of 48 by 48 pixels or smaller works well. A URL, an SVG or another format, or a value over 4,096 characters (spaces and line breaks not counted) is not used: a device reports a configuration warning and shows the default icon, and the admin console will not save it. Each icon adds to the size of the configuration every device receives, and Windows Group Policy holds the whole `managedMcpServers` list in one value of at most 65,535 characters, so keep icons small. +> +> **stdio** +> +> Applies when `transport` is `stdio`. The in-app configuration window calls it **Local command (stdio)**. +> +> **transport** `string` *required* +> +> How the app connects: Streamable HTTP, legacy SSE, or a local command (stdio). policy-only connects to nothing; it only sets a plugin server’s tool policy. +> +> Must be: `stdio` +> +> **command** `string` *required* +> +> Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) +> +> Absolute path to the server executable, run on the user’s machine. +> +> **args** `string[]` +> +> Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) +> +> Arguments passed to the command, one per entry. +> +> **env** `object: name → value` +> +> Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) +> +> Environment variables set for the command. +> +> **envHelper** `string` +> +> Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) +> +> Script that prints environment variables as a JSON object to stdout. Runs when the local server starts (cached for the TTL below). +> +> > **More detail** +> > +> > Absolute path to an executable that prints a single JSON object of environment variables to stdout, e.g. `{"API_KEY": "…"}`. The app runs it before spawning the server and merges the result over `env` (the helper wins on conflict). Use this to pull secrets from a secrets manager instead of storing them inline in `env`. +> > +> > * If the helper fails, the server does not start; the failure names the helper path in the app log and the diagnostics report. +> > * A helper with nothing to set must print `{}`. Empty stdout is treated as a failure. +> > * A helper-emitted `PATH` replaces the static map’s `PATH` and supports the same `${PATH}` placeholder expansion as a static entry. +> > * The helper runs with `CLAUDE_CODE_MCP_SERVER_NAME` set to this entry’s `name`, so one executable can serve several servers. For a name that holds a double quote, a percent sign or a control character the variable is not set. Claude Code also sets `CLAUDE_CODE_MCP_SERVER_URL` for its own `headersHelper`; this app does not. A name can contain characters such as `&`: put it in double quotes, compare it with the names you expect, and do not pass it on to another command. +> +> **envHelperArgs** `string[]` > -> When set to `true`, Code sessions refuse reads outside their working directories (the session folder plus any `allowedWorkspaceFolders`). The file tools (Read, Grep, Glob) refuse them in every permission mode; where Claude Code's sandbox runs (macOS, or Linux and SSH hosts with bubblewrap, once `allowedWorkspaceFolders` is set or an egress allowlist applies: in third-party deployments one applies unless `coworkEgressAllowedHosts` contains `*`, in first-party deployments none does) shell commands cannot see the home directory and other user folders (`/Users`, `/home`, mounted volumes) and a read there is refused with no prompt; elsewhere (Windows, Linux without bubblewrap, or neither folders nor an egress allowlist in effect) such shell reads prompt for approval. The app keeps the user's git configuration files (which may themselves embed credentials such as URL tokens; a symlinked one stays hidden), its own Claude Code installation, and the session's plugin and attachment folders readable (not on a Windows SSH host, where plugin files and attachments stay out of the file tools' reach under the block). An allowed folder that is or contains the home directory leaves it readable. +> Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) > -> Users can re-open folders (even their whole home) in their own Claude Code settings with `sandbox.filesystem.allowRead` or `permissions.additionalDirectories`; settings files tracked in a git repository cannot. The key travels on Claude Code's managed-settings channel: another Claude Code managed-settings source replaces it unless that source sets `parentSettingsBehavior` to `"merge"`, and one that sets `sandbox.filesystem.allowManagedReadPathsOnly` reduces it to approval prompts. This is `permissions.blockReadsOutsideWorkingDirectories` in Claude Code's [managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings). +> Arguments passed to the environment helper script, one per entry, in order. Leave unset to run it with none. > -> Unset (default): nothing changes. +> > **More detail** +> > +> > Each entry reaches the executable as one argument, exactly as written: `["--environment", "production"]` runs `helper --environment production`. Use it to keep one installed script and let each server’s entry say what it does (which environment, tenant or endpoint to use), instead of packaging a script per server. +> > +> > Entries may not be empty and may not contain a double quote (`"`), a percent sign (`%`) or control characters, on any platform: a Windows `.cmd`/`.bat` helper receives its arguments through `cmd.exe`, where those characters would change the command. A `.cmd`/`.bat` script sees each argument quoted (`%1` is `"production"`, `%~1` strips the quotes); `.ps1`, `.exe` and POSIX helpers receive them bare. Arguments are visible in the app log and to other processes on the machine, so do not put secrets in them; the helper exists to fetch the secret. A server whose list breaks these rules is dropped, and reported, rather than run with other arguments. +> > +> > An app version that does not know this setting ignores it and runs the helper with no arguments: have the script fail when an argument it needs is missing. +> +> **envHelperTtlSec** `integer` (default: 300) +> +> Maximum age of a cached helper result, in seconds (default 300). Applies when the server starts or restarts. +> +> > **More detail** +> > +> > How long the app may reuse the helper's output before running it again. The check happens only when the server process is (re)started. Environment variables are fixed at process creation, and a running server never sees refreshed values until its next restart. Set this at or below your token lifetime: a server that crash-loops because its token expired can be respawned with the same cached environment until the TTL lapses. Default: 300 seconds. +> +> **startupTimeoutSec** `integer` (default: 120) +> +> Maximum wait in seconds for the server to start and list its tools. +> +> **icon** `string` +> +> Icon shown for this connector: a PNG or JPEG image as a base64 data: URI, at most 4,096 characters. +> +> > **More detail** +> > +> > Replaces the website's icon or the generic connector icon for this connector. The image is stored in the configuration itself, so the app makes no network request to show it. A PNG of 48 by 48 pixels or smaller works well. A URL, an SVG or another format, or a value over 4,096 characters (spaces and line breaks not counted) is not used: a device reports a configuration warning and shows the default icon, and the admin console will not save it. Each icon adds to the size of the configuration every device receives, and Windows Group Policy holds the whole `managedMcpServers` list in one value of at most 65,535 characters, so keep icons small. +> +> **policy-only** +> +> Applies when `transport` is `policy-only`. The in-app configuration window calls it **Tool permissions only (plugin server)**. +> +> **transport** `string` *required* +> +> How the app connects: Streamable HTTP, legacy SSE, or a local command (stdio). policy-only connects to nothing; it only sets a plugin server’s tool policy. +> +> Must be: `policy-only` +> +> > **More detail** +> > +> > An entry with `transport: "policy-only"` is not a server: it sets tool permissions for an MCP server that an installed plugin provides, and nothing else. Set `name` to the server's name as the plugin declares it (matched case-insensitively) and `toolPolicy` to the permissions. The plugin keeps launching or connecting to its own server; the app never connects to, launches or lists anything for the entry, so it takes no `url`, `command`, `oauth` or other connection settings (an entry that sets one is rejected). It takes precedence over `orgPluginSettings` for that server in chat, Cowork and Code sessions alike; with no `toolPolicy` the server is left unrestricted. An entry whose name matches no installed plugin server does nothing. +> > +> > Desktop versions that predate `policy-only` do not recognise it: they drop the entry (listed under Configuration parse errors in the diagnostics report) and apply `orgPluginSettings` to that server instead. If every entry in the list is `policy-only`, those versions cannot read `managedMcpServers` at all: they report a parse error for it and, until they are updated, leave MCP servers that users added themselves, or that a project's `.mcp.json` declares, out of Code sessions. While older versions are still in use, keep the same permissions in `orgPluginSettings` too, and do not deploy a list made only of `policy-only` entries until every desktop has updated. + +*** + +#### `mcpPersistentAlwaysAllowEnabled` + +booleanDefault: trueSince 1.24012.9 + +**Allow persistent tool approvals.** Offer the persistent “Always allow” approval options for MCP tools. Disable to keep tool approvals per-call or session-scoped only. + +[Self-hosted install](#self-hosted-column): Server side. When off, the host leaves lasting MCP tool approvals out of its sessions, and tells Desktop not to offer them. + +> **More detail** +> +> When enabled (the default), approval prompts for tools without a `toolPolicy` entry offer a persistent grant: **Always allow**, or **Allow for all tasks** for tools that can modify data. The Tool permissions picker in Connector settings also lets users pre-approve tools. These grants persist across sessions with no expiry. +> +> When disabled, the persistent options are hidden from approval prompts and from the Connector settings picker, and previously stored persistent grants stop being honored. Scheduled-task runs also stop offering, recording, and replaying the **Allow for all scheduled runs** approval (**Always allow** in Code sessions), unless a scheduled-task approval lifetime of one day or more is set. Users can still approve each call. Outside scheduled-task runs, in chat and Cowork they can also choose **Allow for this task**, except for read-only tools on servers they added themselves. +> +> A per-tool `toolPolicy` entry on `managedMcpServers` always takes precedence over this key: `blocked`, `ask`, and `allow` behave exactly as documented there whether this key is enabled or not. +> +> This key governs chat and Cowork, and also Code sessions on the device (including WSL) or over SSH. In those Code sessions, with the key disabled, the prompt for an MCP tool offers **Allow for this session** instead of **Always allow**, except on scheduled-task runs. This approval is not saved to Claude Code's settings files. It lasts until the session is deleted, and sessions forked or started from it do not inherit it. Claude Code's own allow rules and hooks still apply. Allow rules in its settings files, including ones saved earlier with **Always allow**, and hooks in its settings or plugins keep allowing the tool until they are removed. Code sessions receive only the `blocked` and `ask` values of `toolPolicy` entries, so a tool set to `allow` still prompts there, and this key applies to it. + +*** + +#### `mcpScheduledTaskApprovalLifetimeDays` + +integerRange: 0–3,650Since 2.7032.0 + +**Scheduled-task tool approval lifetime.** How many days a scheduled task may reuse a lasting MCP-tool approval before it asks again. 0 removes the lasting option. Leave blank for no time limit. + +[Self-hosted install](#self-hosted-column): Server side. The host limits how many days a scheduled task may reuse a lasting MCP tool approval, and tells Desktop. + +> **More detail** +> +> On a scheduled task, the approval prompt for an MCP tool can offer a lasting approval, so later runs use that tool without asking: **Allow for all scheduled runs** in Cowork, **Always allow** in the Code tab. This setting limits how long that approval lasts. With a limit, the button reads **Allow for N days**. Once an approval is older than that, the next run asks again, and approving again renews it. `0` removes the lasting option, and approvals already stored stop being reused. Leave it blank to change nothing. Choose a number comfortably longer than the gap between runs. +> +> The limit covers MCP tools only, and a `toolPolicy` entry on `managedMcpServers` still takes precedence. If a configuration server delivers the setting, then after each launch scheduled tasks ask instead of reusing stored approvals (as at `0`) until the app has fetched the configuration again. +> +> If `mcpPersistentAlwaysAllowEnabled` is off, a limit of one day or more brings the lasting option back for scheduled tasks only. +> +> Code tab: the limit covers only lasting approvals given after this setting took effect. An earlier one was usually saved as an allow rule in Claude Code's own settings: for a scheduled task, the project's `.claude/settings.local.json`, under `permissions.allow`. Any allow rule in Claude Code's settings keeps allowing the tool without asking, even at `0`, until that entry is removed. That includes a rule written by hand, and one saved by **Always allow** in an ordinary Code session in the same project, which the app offers whenever `mcpPersistentAlwaysAllowEnabled` is on. In an ordinary Code session over SSH, if this setting has a value (even `0`), **Always allow** for a tool of a server set up on the host lasts for the session only and saves no rule there. + +*** + +#### `isLocalDevMcpEnabled` + +booleanDefault: trueSince 1.2581.0 + +**Allow local MCP servers.** Local stdio servers added via the Developer settings. On third-party deployments, off also stops plugins’ local servers. Remote servers keep working. + +[Self-hosted install](#self-hosted-column): Server side. When off, only the local MCP servers the host names start on the person's computer, and none the person added. + +> **More detail** +> +> On third-party deployments, `false` from any source also stops plugins' local (`stdio`) MCP servers in Cowork, Chat and Code sessions. That covers `.mcpb` bundles and plugins from every marketplace, your organization's included. In Code it also stops the local servers in Claude Code's own configuration files (`~/.claude.json`, a project's `.mcp.json`). It also stops a local server in Claude Code's `managed-mcp.json` whose command, arguments or environment use `${VAR}`. Remote servers keep working. Plugins placed in the org-plugins directory on the computer are not affected: the desktop still runs their servers. +> +> Set to `false` in a device-management profile, this key also locks down the local (`stdio`) entries of `managedMcpServers`: the app starts one only when that profile itself lists an entry of the same name, and with the profile's own command, arguments and environment. Only the profile's value engages this. A `false` from a configuration server or the admin console turns user-added servers off and does not engage it. +> +> Claude Code's own managed settings, on the device or (for Code sessions on a Claude API key) from the Claude Console, may override this key: see [managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings). + +*** + +#### `allowedPluginMcpServers` + +object\[]Since 2.2553.0 + +**Allowed plugin MCP servers.** Servers plugins may connect in sessions, beyond the managed list above and organization plugins. An empty list allows none; unset keeps today’s rules. + +[Self-hosted install](#self-hosted-column): Server side. The host connects a plugin's remote MCP server only where this list admits it; while it is unset, none connects. + +> **More detail** +> +> Unset (default): with managed servers listed, sessions take MCP servers only from plugins and the desktop; with no managed servers listed, this key restricts nothing. Either way, `isLocalDevMcpEnabled` set to `false` stops plugins' local servers and, in Code, those of Claude Code's own configuration files. +> +> When set, Cowork, Chat and Code sessions connect the managed list above and the servers the desktop serves from the administrator's org-plugins directory, plus only servers declared by other plugins (user-installed or marketplace) that match an entry. An entry in the managed list above with `transport: "policy-only"` sets a plugin server's tool permissions but does not admit it; to admit that server, list the server's own URL here. Claude Code configuration-file servers (`~/.claude.json`, a project's `.mcp.json`, `claude mcp add`) are never connected. With the key set, the desktop starts no plugin server on the computer itself, whatever the entries say. The one exception is the MCP servers it serves to sessions from the org-plugins directory. Each entry is a URL pattern in Claude Code's form, `{"serverUrl": "https://*.example.com/*"}` (`*` wildcards; a host `*` spans `a.b`): a plugin's remote server connects when its URL matches an entry. No entry admits a plugin's local (stdio) server, and an empty list admits no plugin server. Other shapes, the `serverName` and `serverCommand` forms included, are dropped and reported; a value that is not a list, or has no readable entry, locks sessions to the managed list and the org-plugins directory's servers, and stops every other desktop-started plugin server. User-added local servers and extensions keep their own keys. +> +> Claude Code's own managed settings, on the device or (for Code sessions on a Claude API key) from the Claude Console, may override this key: see [managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings). + +> **Child attributes (1)** +> +> **serverUrl** `string` *required* +> +> URL pattern a plugin’s remote server must match, with \* wildcards. + +*** + +#### `deniedPluginMcpServers` + +object\[]Since 2.16120.0 + +**Blocked plugin MCP servers.** Remote servers plugins may not connect, even if the allowed list admits them; in Code sessions, configuration-file servers too. Unset or empty blocks none. + +[Self-hosted install](#self-hosted-column): Server side. The host refuses a plugin's remote MCP server that this list matches, even where the allowed list admits it. + +> **More detail** +> +> Unset (default) or an empty list: nothing is blocked. +> +> When set, Cowork, Chat and Code sessions do not connect a plugin's remote server whose URL matches an entry. The key works with or without `allowedPluginMcpServers`; a server that matches both lists stays blocked. In a Code session that reads Claude Code configuration-file servers (`~/.claude.json`, a project's `.mcp.json`, `claude mcp add`), a matching remote server from those files is refused as well. The managed list above, the servers the desktop serves from the administrator's org-plugins directory, user-added local servers and extensions are not affected: remove those at their own keys. Each entry is a URL pattern in Claude Code's form, `{"serverUrl": "https://*.example.com/*"}` (`*` wildcards; a host `*` spans `a.b`). An entry matches an address, not a server: the same server under another host name or an IP address, or behind a plugin's local (stdio) server, which has no URL, is not matched. `https://*.example.com/*` does not match `http://`, `wss://` or the bare `example.com`; a pattern such as `example.com/*`, which names no scheme, matches nothing, and a lone `*` matches every URL. To keep a plugin's servers out whatever address they use, set `allowedPluginMcpServers`, which admits only the servers it lists. The desktop reads no other shape, the `serverName` and `serverCommand` forms included: a value that is not a list, or that holds any entry the desktop cannot read, is reported and blocks every plugin's remote server (and those configuration-file remote servers), because skipping an entry of a block list would let its server connect. The servers named above as not affected still connect. +> +> Claude Code's own managed settings, on the device or (for Code sessions on a Claude API key) from the Claude Console, may override this key: see [managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings). + +> **Child attributes (1)** +> +> **serverUrl** `string` *required* +> +> URL pattern of the remote servers to block, with \* wildcards. + +*** + +#### `mcpToolTimeoutSec` + +integerRange: 60–3,600Since 1.37937.0 + +**MCP tool call timeout.** Per-call timeout for MCP tool calls, in seconds. Default 180 (3 minutes). + +[Self-hosted install](#self-hosted-column): Server side. The host starts Claude Code, so it sets how long an MCP tool call may run. + +> **More detail** +> +> Sets the per-call timeout the agent applies to every MCP tool call; a call that runs longer fails with a timeout error the model can see. Cowork and chat sessions default to 180 seconds. Code sessions have no desktop-imposed MCP tool timeout today, so setting this key introduces one there as well. The desktop's own request deadlines toward MCP servers — the managed servers above and, where `isLocalDevMcpEnabled` permits them, user-added local servers — follow this value so they never cut a call short first; while the key is unset, calls to user-added local servers are additionally limited to 60 seconds by the desktop. Values outside 60–3600 are rejected at parse time (the error is listed in the diagnostics report) and the defaults apply. +> +> The timeout is global (there is no per-server or per-tool form), so size it for the slowest tool you need to complete: long-running tools on one server extend the window during which a stuck call on any server holds its turn. Cowork's built-in shell tool runs under the same cap: a single command's `timeout_ms` (itself limited to 600 seconds) cannot exceed this value. + +*** + +### Authentication + +#### `microsoftAuthBroker` + +enumDefault: autoSince 1.19367.0 + +**Microsoft 365 native sign-in broker.** “disabled” forces browser-based Microsoft 365 sign-in; “required” fails sign-in when the OS broker is unavailable, so the refresh token stays broker-held. + +One of: `auto` (default), `disabled`, `required` + +[Self-hosted install](#self-hosted-column): Not supported. Steers the sign-in of Desktop's bundled Microsoft 365 connector, started for no session on a self-hosted install. + +> **More detail** +> +> `auto` (default): use the OS sign-in broker where available (WAM on Windows, the Company Portal SSO extension on macOS) and fall back to a browser sign-in otherwise. `disabled`: always use the browser sign-in. `required`: fail sign-in when the broker is unavailable rather than falling back to the browser, so the refresh token stays broker-held. Linux has no broker, so `required` is not supported there. Desktop builds older than the version that introduced `required` treat it as `disabled` (browser-only sign-in) — the opposite posture — so gate rollout on client version. + +*** + +#### `microsoftAuthDefaultAccount` + +enumDefault: disabledSince 2.26454.0 + +**Microsoft 365 sign-in with the Windows account.** “enabled”: when a user clicks Connect on Windows, Microsoft 365 signs in with the work account already signed in to Windows, without the account picker. + +One of: `enabled`, `disabled` (default) + +[Self-hosted install](#self-hosted-column): Not supported. Picks the account for Desktop's bundled Microsoft 365 connector, started for no session on a self-hosted install. + +> **More detail** +> +> `disabled` (default): Connect shows the account picker when no account is connected. `enabled`: on Windows, when `microsoftAuthBroker` is not `disabled`, Connect first signs in silently with the account Windows already uses. The `tenantId` on the `microsoft365` entry in managed MCP servers must be a tenant GUID. With `common`, `organizations` or `consumers`, users always get the picker. Users also get the picker for accounts from another tenant, guest accounts and personal Microsoft accounts, when the silent sign-in fails, and when the computer cannot store credentials securely. A user who already signed in to Microsoft 365 through the browser keeps that account. After a user disconnects Microsoft 365, or a different person signs in to Claude on this computer, Connect always shows the picker for that connector on this computer, including for a disconnect that happened before this setting was turned on. Turning this setting off stops new silent sign-ins and signs nobody out: users already connected keep their account until they disconnect. macOS and Linux are not affected. Third-party deployments only: first-party installs ignore this setting. + +*** + +### Extensions + +#### `isDesktopExtensionEnabled` + +booleanDefault: falseSince 1.2581.0 + +**Allow desktop extensions.** .dxt and .mcpb installs. + +[Self-hosted install](#self-hosted-column): Not supported. Desktop keeps extensions off on a self-hosted install, whatever this setting says. + +> **More detail** +> +> 1P builds default to enabled at runtime unless this is explicitly set. In 3P, enabling this allows loading extensions; local install additionally requires an org policy backend. + +*** + +#### `isDesktopExtensionSignatureRequired` + +booleanDefault: falseSince 1.2581.0 + +**Require signed extensions.** Reject desktop extensions that are not signed by a trusted publisher. + +[Self-hosted install](#self-hosted-column): Not supported. Desktop installs no extension on a self-hosted install, so there is no signature for it to require. + +*** + +## Telemetry & updates + +### `deploymentOrganizationUuid` + +stringSince 1.2581.0 + +**Organization UUID.** A UUID you generate. Tags telemetry so Anthropic support can locate your fleet’s events, and namespaces each user’s local data. Not used for auth. + +[Self-hosted install](#self-hosted-column): MDM profile. Tags the desktop app's telemetry and names its local data on the person's computer. + +[Admin Console](#the-works-with-column): Set automatically. + +> **More detail** +> +> If unset, the app uses the organization of your Anthropic sign-in, where the connection has one. Otherwise, telemetry is tagged with a value the app derives from your connection settings. Where it cannot derive one, telemetry is tagged with a placeholder UUID shared with other unconfigured deployments. In the last two cases, local data is stored under the placeholder. **Changing this value orphans data** stored under the previous value (sessions, skills, plugins). + +*** + +### `disableEssentialTelemetry` + +booleanDefault: falseSince 1.2581.0 + +**Block essential telemetry.** Crash and performance reports to Anthropic. + +[Guide for this setting](/docs/third-party/claude-desktop/telemetry.md#essential-telemetry) + +[Self-hosted install](#self-hosted-column): MDM profile. Desktop starts its crash reports to Anthropic at launch, before sign-in, and a host's sessions never send any. + +> **More detail** +> +> "Essential" means the signals Anthropic needs to keep your deployment working: **crash stacks**, **startup failure reasons**, **version/OS metadata**, and **crash dumps** (each an unfiltered copy of part of the app's memory). Reports carry a random install ID and an organization ID. The organization ID is the one you set, one the app takes from your Anthropic sign-in or derives from your connection settings, or a placeholder shared with other unconfigured deployments. Reports can also include a summary of your settings, the host names of addresses you configured, text you set for display (such as the display name, subtitle, and banner text and link), and a one-way digest of a session ID. +> +> **What you lose when this is on:** when a Claude Desktop build hits a bug that only reproduces on your OS version or locale, Anthropic can't see it unless a user manually reports. Fixes ship slower. +> +> **Why this is discouraged, not blocked:** some air-gapped environments require zero outbound telemetry as a matter of policy. The switch exists for them. If you don't have that constraint, leave it off. + +*** + +### `disableNonessentialTelemetry` + +booleanDefault: falseSince 1.2581.0 + +**Block nonessential telemetry.** Product-usage analytics (no message content) and diagnostic-report uploads. + +[Guide for this setting](/docs/third-party/claude-desktop/telemetry.md#non-essential-telemetry) + +[Self-hosted install](#self-hosted-column): MDM profile. Desktop sends usage analytics to Anthropic from before sign-in, and a host's sessions never send any. + +> **More detail** +> +> "Nonessential" covers two things: **product-usage analytics** (which features get used, navigation patterns; no prompts or completions) and the **Send** action in Help → Generate Diagnostic Report. Turning this on stops both. +> +> Destinations are listed under Egress Requirements → Nonessential telemetry. + +*** + +### `disableNonessentialServices` + +booleanDefault: falseSince 1.2581.0 + +**Block nonessential services.** Connector favicons, artifact-preview and MCP Apps iframes, and the Linux spellcheck dictionary. Connector widgets fall back to text; spellcheck is off on Linux. + +[Self-hosted install](#self-hosted-column): MDM profile. Desktop fetches connector icons, preview frames and a dictionary, starting before it has signed in to the host. + +> **More detail** +> +> "Nonessential services" covers these outbound fetches the app runs without: **connector favicons** (the icon proxy), the **artifact-preview** iframe origin, the **MCP Apps widget** iframe origin (`*.claudemcpcontent.com`), and the **spellcheck dictionary** the built-in spellchecker downloads on Linux. Turning this on blocks all of them. (macOS and Windows use the system spellchecker. Windows still downloads a dictionary for a language it cannot check natively; this key does not stop that download.) +> +> **What you lose when this is on:** connectors show without icons, the hosted artifact preview frame does not load (artifacts still render locally), connectors that return MCP Apps show the text tool result instead of the widget, Excel files in the Code tab preview only through Claude’s workspace (the local VM) instead of that frame, and spellcheck underlines are off on Linux. +> +> Destinations are listed under Egress Requirements → Nonessential services. + +*** + +### OTLP + +#### `otlpEndpoint` + +stringSince 1.2581.0 + +**OTLP endpoint.** Where OpenTelemetry logs and metrics are sent. Leave blank to disable. + +[Self-hosted install](#self-hosted-column): Not supported. Whoever runs the host names the collector in the host's own configuration, for its sessions and Desktop's events. + +*** + +#### `otlpProtocol` + +enumDefault: http/protobufSince 1.2581.0 + +**OTLP protocol.** Transport protocol for the OpenTelemetry exporters. + +One of: `http/protobuf` (default), `http/json`, `grpc` + +[Self-hosted install](#self-hosted-column): Not supported. Set beside the collector's address in the host's own configuration. + +> **More detail** +> +> Code sessions export over the protocol set here. Chats and Cowork tasks export over `http/protobuf` instead of `grpc` on Windows, and on other platforms whenever the Claude Code engine is given an HTTP proxy (the operating system's proxy, `egressProxyUrl` or `egressProxyPacUrl`, or `HTTPS_PROXY` / `HTTP_PROXY` in a Claude Code settings file); the application log notes the substitution. The desktop application's own events always go over `http/json` to `/v1/logs`. None of this changes the endpoint, so choose `grpc` only for a collector that also serves OTLP/HTTP at the same address; otherwise keep `http/protobuf` and point `otlpEndpoint` at the collector's OTLP/HTTP receiver (conventionally port 4318). + +*** + +#### `otlpHeaders` + +object: name → valueSince 1.2581.0 + +**OTLP headers.** Static collector headers — routing and tenant headers only. No credentials here; use Collector authentication or the headers helper script for tokens. + +[Self-hosted install](#self-hosted-column): Not supported. The host keeps the collector's headers in its own configuration, so no document that a device fetches holds them. + +*** + +#### `otlpAuthMode` + +enumSince 1.30096.1 + +**Collector authentication.** inference-credential sends the user’s inference bearer token to the collector as Authorization: Bearer. + +One of: `none`, `inference-credential` + +[Self-hosted install](#self-hosted-column): Not supported. Would send the person's model token to the collector; a self-hosted Desktop holds none, and no host reads this. + +> **More detail** +> +> `inference-credential` adds `Authorization: Bearer ` to every export, using the token the app currently holds for the inference provider, with no helper script to deploy. The collector must accept that token as issued: an identity-provider sign-in (`external-idp`, gateway or Bedrock proxy) forwards the identity provider’s token, which carries the audience you registered, Microsoft Entra on Foundry issues the Foundry resource’s token, and Vertex workforce identity forwards a Google Cloud access token; static gateway and Bedrock keys are forwarded as-is. Because the token can also call inference as the user, use this only for a collector you operate; for anything else, use the headers helper script with an ingest-scoped credential. Kinds that never produce a bearer (AWS SigV4 kinds on Bedrock, Google ADC / OAuth files on Vertex, API-key kinds) export without it, and so does Sign in with Claude Console, whose token is the user’s own and is never sent to a collector. Use the helper script instead. Cowork tasks pick up the current token each time they start; a Code session keeps the token it started with for as long as it stays open; the desktop’s own event exporter uses the current token on every flush. Before sign-in, exports go out unauthenticated. An `Authorization` header printed by the headers helper script wins over this. + +*** + +#### `otlpHeadersHelper` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.30096.1 + +**OTLP headers helper script.** Absolute path to an executable that prints a JSON object of collector headers. Merged over the static headers and Collector authentication; the helper wins. + +[Self-hosted install](#self-hosted-column): Not supported. Desktop sends its own events to the host, which holds the collector's headers, so it runs no helper. + +> **More detail** +> +> Absolute path to an executable that prints a single JSON object of HTTP headers on stdout, e.g. `{"Authorization": "Bearer …"}`. The desktop runs it (no arguments; output cached for a few minutes, and a failure is not retried for 30 seconds) whenever it needs collector headers and merges the result over **OTLP headers** and the **Collector authentication** header (the helper wins on conflict). Cowork tasks get the current output when they start; Code and Cowork sessions are also given the script as Claude Code’s own `otelHeadersHelper`, so an open session re-runs it as tokens rotate (on Windows this applies to `.exe`, `.cmd` and `.bat` helpers; a `.ps1` helper applies at session start only); the desktop’s own event exporter re-runs it per flush. Session start waits at most two seconds for a slow helper and otherwise proceeds without its headers until it finishes. Use this when the collector needs a credential the inference sign-in cannot provide, when the collector token rotates, or when the config comes from a hosted admin console, which cannot store header values. If the helper fails, telemetry is sent without its headers — check the app log. + +*** + +#### `otlpResourceAttributes` + +object: name → valueSince 1.5354.0 + +**Resource attributes.** Extra resource attributes to attach to every span/metric. A static enduser.id set here always wins over the runtime identity. + +[Self-hosted install](#self-hosted-column): Server side. The host stamps these attributes on the session telemetry it sends and on Desktop's events that it forwards. + +> **More detail** +> +> Extra resource attributes to attach to every span, metric, and log sent to your collector. When End-user attribution is on and no `enduser.id` is set here, the desktop fills it with the signed-in user's runtime identity; a value you set here always wins. `process.owner` (the OS login name) is always emitted; set it here to override. + +*** + +#### `otlpDesktopLogLevel` + +enumDefault: errorSince 1.9255.0 + +**Desktop telemetry export level.** Controls the Claude Desktop application’s events, separate from Cowork and Code sessions. Defaults to error. + +One of: `off`, `error` (default), `warn`, `info`, `debug` + +[Self-hosted install](#self-hosted-column): Server side. The host tells Desktop at which level to send its own events, and filters them again before it forwards them. + +*** + +#### `otlpContentCapture` + +enum\[]Since 1.15962.0 + +**Content capture.** Content categories Claude Desktop sends unredacted to your collector. `userPrompts` also sends Claude’s responses. If empty, no category is enabled (default). + +Any of: `userPrompts`, `assistantResponses`, `toolDetails`, `toolContent`, `rawApiBodies` + +[Self-hosted install](#self-hosted-column): Server side. The host decides how much of a session's content its telemetry carries. + +> **More detail** +> +> Each category enables a class of raw content in OpenTelemetry events sent to your collector (this data never reaches Anthropic): +> +> * `userPrompts` — user-typed prompt text +> * `assistantResponses` — assistant message text +> * `toolDetails` — tool input arguments, e.g. the web-search query string +> * `toolContent` — tool output content, e.g. fetched page text or command stdout +> * `rawApiBodies` — inference API request and response bodies, each cut at 61,440 characters by default +> +> These mirror Claude Code's `OTEL_LOG_*` env vars; see the [Claude Code monitoring docs](https://code.claude.com/docs/en/monitoring-usage). +> +> In Claude Desktop, Claude's responses are included when user prompts are captured, even if `assistantResponses` is not listed. To exclude them, set `OTEL_LOG_ASSISTANT_RESPONSES` to `0` in the `env` block of Claude Code's managed settings, not in Claude Desktop's managed configuration. That `0` also wins when `assistantResponses` is listed, but `rawApiBodies` still includes responses. Claude Desktop ignores a `0` set in Claude Code's per-user Windows registry policy (`HKCU`). If a device has several managed sources, set the `0` in the highest-priority one with a policy. Excluding responses this way requires Claude Desktop 2.37337.1 or later. +> +> Claude Code managed settings set no policy if they are missing, empty, or hold only `wslInheritsWindowsSettings`, `managedSourcesBehavior`, or empty objects such as `"permissions": {}`. Adding `OTEL_LOG_ASSISTANT_RESPONSES` to such settings makes them a policy, so also set `parentSettingsBehavior` to `"merge"` there. Without `"merge"`, Claude Code can drop the restrictions that Claude Desktop passes to it. If the settings already set a policy, add only `OTEL_LOG_ASSISTANT_RESPONSES` to their `env` block, and read [Interaction with Claude Code's own managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) before you change `parentSettingsBehavior`. + +*** + +#### `otlpTracesEnabled` -> **autoModeEnabled details** +booleanSince 1.22209.0 + +**Export traces.** Also export OpenTelemetry traces from Cowork tasks and Code sessions. Uses Claude Code’s session tracing. + +[Self-hosted install](#self-hosted-column): Server side. The host turns traces on or off in the session telemetry it sends. + +> **More detail** > -> Left unset, users can select **Auto mode** in Code and new Code sessions start in it; a mode the user already chose, or a Claude Code settings file's `permissions.defaultMode`, takes precedence, and Cowork does not offer it. Set to `true` to also offer **Automatically approve** in Cowork (Cowork sessions still start by asking before each action until the user picks it). Set to `false` to remove the option from both tabs. In Auto mode Claude runs a safety classifier on each action and only prompts for approval on actions it judges risky, instead of following the static per-tool policy. +> Enables Claude Code's session tracing (`CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1` + `OTEL_TRACES_EXPORTER=otlp`) in spawned Cowork tasks and Code sessions. Each user interaction exports a trace whose spans and events carry `trace_id`/`span_id`, enabling end-to-end correlation in your observability backend (metrics do not carry trace context; correlate those via `session.id`). Traces go to the collector endpoint and protocol configured above. When `otlpEndpoint` is set, this key alone decides whether those sessions export traces: leaving it unset or `false` keeps traces off even if Claude Code's own settings or managed settings (for example a `managed-settings.json` on the device) turn tracing on. Without `otlpEndpoint` it has no effect. The span structure may evolve between Claude Code releases; see the [Claude Code monitoring docs](https://code.claude.com/docs/en/monitoring-usage). + +*** + +#### `otlpAttrMaxChars` + +integerRange: 256–15,000,000Since 2.31226.0 + +**Telemetry attribute length limit.** Maximum length, in characters, of captured content such as a raw API body (256–15,000,000). Cowork tasks and Code sessions use 61,440 when unset. + +[Self-hosted install](#self-hosted-column): Server side. The host cuts long values in the session telemetry it sends. + +> **More detail** > -> Requires a session model that supports the safety classifier — which models qualify depends on the deployment's provider and the app version. With a model that lacks support the option is greyed out and Code sessions do not start in it. `builtinToolPolicy` and this key may both be set; Auto mode is a user-selectable option alongside the default policy, not a replacement for it. +> Captured content longer than this is cut at the end and marked as truncated. > -> By default on a gateway, the safety classifier sends its own requests through your gateway to Claude Sonnet 5, whatever model the session uses. Make sure your gateway accepts the exact ID `claude-sonnet-5` and the `context-1m-2025-08-07` value in the `anthropic-beta` request header. If you set `inferenceModels`, list that ID there and in any group's model list (no `supports1m` needed). Sonnet 5 then also shows in the model picker. If the gateway rejects those requests or the list omits the ID, Auto mode stays available but can block actions it would otherwise allow. In Code, users see those actions marked **Blocked**. +> * Cowork tasks and Code sessions: 61,440 when unset. Applies to model responses, tool content and raw API bodies. User prompts are not cut, and `tool_input` keeps its own smaller limits. A cut request body keeps the oldest messages and loses the newest, so to capture whole bodies with `rawApiBodies`, set this just above your longest body, not at the maximum. Lower it to reduce volume. While this key and `otlpEndpoint` are set, Claude Code's own settings and managed settings (for example a `managed-settings.json` on the device) cannot change the limit or the export interval. +> * Claude add-in for Microsoft 365: 4,000 when unset. Values above 32,000 count as 32,000. +> * The desktop application's own events are not affected. > -> In Code sessions, a separately deployed Claude Code [managed-settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) file that sets `disableAutoMode` to `"disable"` also keeps Auto mode hidden and off, whatever this key says. +> A collector refuses an export over its size limit, and every event in that export is lost. By default an OpenTelemetry Collector accepts 20 MiB per OTLP/HTTP request (`max_request_body_size`) and 4 MiB per gRPC message (`max_recv_msg_size_mib`). Keep that limit at a few times the size of your longest body: one export can carry several, and a character takes one byte in Latin text and up to three otherwise. With this key set, Code sessions export events as they happen, not every five seconds, as Cowork tasks already do, so the collector sees more, smaller requests. -> **disableBypassPermissionsMode details** -> -> When set to `true`, sessions cannot run in bypass permissions mode: the app stops offering the mode in Code and Cowork, and a session that requests it anyway is downgraded. This is the `disableBypassPermissionsMode` setting from the `permissions` section of Claude Code's [managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings); a separately deployed Claude Code managed-settings file that sets it to `"disable"` also removes the mode, whichever source sets it. -> -> Unset (default): users the deployment otherwise allows can choose bypass permissions mode. +*** + +### Auto update + +#### `disableAutoUpdates` + +booleanDefault: falseSince 1.2581.0 + +**Block auto-updates.** Stop Claude Desktop from fetching updates entirely (no time limit). You’ll need to push new versions yourself. -> **skillCreationEnabled details** +[Self-hosted install](#self-hosted-column): MDM profile. Desktop starts its updater at launch, before it has signed in to the host. + +> **More detail** > -> When on (default), users can create new skills and upload skill files in the app. Set to `false` to block user skill creation: the skill-creation and upload surfaces are hidden (the `skill_creation` feature is served as blocked by the organization), and the agent's skill-creation tools (saving skills from a conversation, skill proposals) are not offered in sessions — the same effect as turning off the **User-created skills** organization setting available to claude.ai enterprise admins. +> In third-party deployments this also keeps Cowork's workspace image and tools from being fetched ahead of use; they are then fetched when a task first needs them. > -> This is a feature-availability control enforced in the app's UI, not a data boundary: skills are files on the user's machine, and files already present there (or placed there outside the app) are not removed or blocked by this key. Skills themselves remain usable; organization-distributed plugins and bundled skills are unaffected (to disable bundled skills, use `disableBundledSkills`). +> When a newer version is installed on a device while Claude is open, the app shows "Relaunch to update" in the sidebar. The check makes no network request. On Windows this covers installs from the MSIX package, for one person or for the whole device, not the Microsoft Store version or the .exe installer. There it offers the newest version it finds on the device, which may be one installed for someone else. The click quits Claude, and Windows may then open the newer version. Where it does not (it did not on the Windows Server machines tested), people open Claude again and get the newer version. If Windows refuses the switch, Claude comes back on the version it had, and so does the notice. The switch may also end the Cowork tasks of others signed in on that computer. A separate setting has Claude restart by itself if nobody relaunches within a set number of hours. -> **userPluginMarketplacesEnabled details** -> -> When on (default), users can add plugin marketplaces from the plugin browser. Set to `false` to restrict plugins to your organization's marketplaces: the add-marketplace surfaces are hidden, and the app refuses adds that still reach it (deep links, stale UI). Any other marketplace present on the device is then hidden in every tab, whether a user added it in the app earlier or something outside the app registered it (for example Claude Code in a terminal, under `~/.claude`): its plugins are not listed, and installs and updates from it are refused. The sessions the app starts load plugins only from your organization's marketplaces, the organization plugins directory, the app's own uploads and the user's own skills folder, enforced through Claude Code's marketplace allowlist (`strictKnownMarketplaces`, passed as the app's managed settings). Nothing is deleted: removing the key or setting it back to `true` restores them. Marketplaces provisioned by your organization (`allowedPluginMarketplaces`) and the organization plugins directory are unaffected, and plugins users uploaded are governed by `userPluginUploadsEnabled`, not this key. +*** + +#### `installedUpdateEnforcementEnabled` + +booleanSince 3.6556.1 + +**Restart to apply installed updates.** With auto-updates blocked, Claude restarts for a newer version installed while it was open, after 72 hours or your window. On Windows it may stay closed. + +[Self-hosted install](#self-hosted-column): Not supported. Governs Desktop's own restart for a version installed on the computer, and no session host passes it on to Desktop yet. + +> **More detail** > -> This is a feature-availability control, not a data boundary. Claude Code in a terminal reads the same `~/.claude` folder and is governed only by its own managed settings, not by this key. Claude Code may ignore this allowlist on a device that deploys its own Claude Code managed settings; restrict marketplaces in those settings as well. +> Set it where `disableAutoUpdates` is set. Both are app-behavior keys: a profile that sets any app-behavior key becomes the only source for all of them, so a profile that held this key alone would drop a `disableAutoUpdates` set elsewhere. > -> This key applies only while the app runs in third-party mode. If users could otherwise sign in to Claude.ai on the device, also set `disableDeploymentModeChooser` so the app stays in third-party mode. - -> **userPluginUploadsEnabled details** +> Applies only while `disableAutoUpdates` is on, where you distribute new versions yourself. When a newer version is installed on a device while Claude is open, the app shows "Relaunch to update" in the sidebar. With this setting on, if nobody relaunches within the window, the app restarts itself and comes back on the page it was showing. `installedUpdateEnforcementHours` sets the window and says what holds the restart off. > -> When on (default), users can upload plugin files and create plugins with Claude. Set to `false` to stop users adding plugins of their own: every in-app option for doing so is hidden, and the app refuses uploads that still reach it. +> On Windows this covers installs from the MSIX package. Claude closes, switches to the newest version on the device (it may be one installed for someone else), and Windows may then open it. Where it does not, Claude stays closed, and scheduled tasks and background work stop, until someone opens it; opened after five minutes, it starts on its default page. If Windows refuses the switch, Claude comes back on the version it had and does not try again until it is reopened. The switch may also end the Cowork tasks of others signed in on that computer. > -> This is a feature-availability control enforced in the app, not a data boundary: plugins already installed (or placed on disk outside the app) are not removed or blocked by this key. Plugins from organization-provisioned marketplaces and the organization plugins directory are unaffected. +> Where it is not set, the restart is off in third-party deployments, and in first-party deployments it follows Anthropic's own rollout; `false` keeps it off. An unreadable value counts as `false`. Turning it on starts a whole new window. It has no effect on updates that Claude downloads itself; `autoUpdaterEnforcementHours` times those. > -> This key applies only while the app runs in third-party mode. If users could otherwise sign in to Claude.ai on the device, also set `disableDeploymentModeChooser` so the app stays in third-party mode. +> A version from before this setting existed does not restart by itself and does not know the name: it ignores it in a macOS profile, and from other sources it may show people a configuration warning at every launch. A Windows machine policy that holds only such names, or a Linux managed-settings file that holds one and sets no connection, is rejected as unusable, and the app then also ignores the configuration saved on the device itself. -> **scheduledTasksEnabled details** -> -> When on (default), users can schedule Cowork tasks and Code sessions to run later or on a recurring schedule, and Claude can create such schedules when asked. +*** + +#### `installedUpdateEnforcementHours` + +integerRange: 1–72Since 3.6556.1 + +**Installed-update enforcement window.** Hours Claude waits to restart for a newer version installed while it was open. Blank: 72 hours, then until the computer is idle. A number skips the idle wait. + +[Self-hosted install](#self-hosted-column): Not supported. Times Desktop's own restart for a version installed on the computer, and no session host passes it on to Desktop yet. + +> **More detail** > -> Set to `false` to turn scheduled tasks off for every user. The Scheduled section in Cowork and the routines list in the Code tab are hidden, together with every other place a schedule can be created. Tasks that already exist on a device no longer run; they are kept, not deleted, and run again once the key is removed or set to `true`. Claude is not offered the tools that create, change or run these tasks, and sessions start without Claude Code's own in-session scheduling tools (the `/loop` command, its cron tools and its wake-up timer). +> No effect unless `disableAutoUpdates` is on and the restart is on (`installedUpdateEnforcementEnabled`). The window starts when the open app first finds a newer version installed; on Linux, where it cannot read the version, any replacement of the app counts. Only time with the app open and the computer awake counts. > -> It does not remove task files already on the user's machine. A change takes effect at the next app launch. +> Leaving it blank uses the 72-hour default *and* then waits for the machine to be idle (10+ minutes without input) before restarting; setting any explicit value (including 72) restarts once the window elapses regardless of user activity. In both cases the restart holds off while Claude is mid-task, unless the task runs on an SSH host and the app expects to pick it up again after the restart. Where the system reports no idle time, as some Wayland sessions do, a blank window never restarts: set a number. -> **keepAwakeEnabled details** -> -> When on (default), users can turn on **Keep computer awake** (Settings → This computer → System, also shown as **Keep awake** on the Scheduled page in Cowork and the Routines page in Code) so the computer does not idle-sleep while Claude is open and scheduled tasks keep running on an idle machine. The Code tab can also keep the computer awake while a session is working (**Keep computer awake while Claude works** in Settings → Claude Code, and a session's **Keep computer awake** menu item). +*** + +#### `autoUpdaterEnforcementHours` + +integerRange: 1–72Since 1.2581.0 + +**Auto-update enforcement window.** Hours before a downloaded update force-installs. Only applies when auto-updates are enabled. Blank = 72-hour default. + +[Self-hosted install](#self-hosted-column): Server side. Desktop itself quits and installs a downloaded update of the app on the person's computer. + +> **More detail** > -> Set to `false` to make sure Claude never prevents the computer from sleeping: those switches are hidden and no part of the app keeps the computer awake. Users' saved choices are kept but ignored, and apply again once the key is removed or set to `true`. Scheduled tasks are unaffected and still run only while the computer is awake and the app is open. +> Has no effect when `disableAutoUpdates` is in place at launch: nothing is downloaded, so this timer never arms. If the policy reaches an already-running app after an update has begun to download, that one update still installs on this timer; no further updates are fetched. > -> A change takes effect on a running app. +> Leaving it blank uses the 72-hour default *and* then waits for the machine to be idle (10+ minutes without input) before restarting; setting any explicit value (including 72) restarts once the window elapses regardless of user activity. In both cases the restart holds off while Claude is mid-task, unless the task runs on an SSH host and the app expects to pick it up again after the restart. -> **developerModeEnabled details** -> -> When on (default), a user can turn on **Developer Mode** (Help → Troubleshooting → Enable Developer Mode), which adds the **Developer** menu and lets them open the developer tools (Chrome DevTools, Inspect Element) and a debugger for the app's main process. +*** + +#### `updateViaUpdatesHost` + +booleanDefault: falseSince 1.26832.0 + +**Check for updates on releases.claude.com.** Read the update feed from releases.claude.com so api.anthropic.com can stay blocked. + +[Self-hosted install](#self-hosted-column): Not supported. Where the session host answers the app's update checks, no Anthropic update server is left to choose. + +> **More detail** > -> Set to `false` to keep Developer Mode off on every device that receives this setting: the **Developer** menu and the Help → Troubleshooting → Enable Developer Mode item are removed, the developer tools and the debugger cannot be opened (any already open are closed), a user's own `developer_settings.json` opt-in is ignored, and the app refuses to install an extension from a folder. Packaged (`.mcpb`) extensions are governed by `isDesktopExtensionEnabled`, not this key. +> By default the app asks `api.anthropic.com` which version to install. That host also serves the model APIs, so organizations that block un-approved LLM endpoints at the network edge end up blocking updates too. > -> This is a feature control, not a sandbox: extensions already installed from a folder stay installed and keep working, and an extension folder copied into the app's extensions folder by hand is not blocked. +> Turn this on to read the same feed from `releases.claude.com`, a hostname that carries no model API. `api.anthropic.com` can then stay blocked without breaking auto-update. Rollout behavior is unchanged; the installer download still comes from `downloads.claude.ai` as before. > -> A change takes effect on a running app, except that the **Install unpacked extension** button in Settings keeps its launch-time state until the app restarts (clicking it while the key is off shows an error). +> If a device profile sets `bootstrapUrl` to a URL on `config.claude.com` and leaves `bootstrapEnabled` on, the app reads the feed from `releases.claude.com` whatever this key says. Older versions of the app do so only when this key is on, so turn it on as well. + +*** + +#### `releaseChannel` -> **quickEntryDefaultShortcut details** +enumDefault: stableSince 3.1623.0 + +**Release channel.** On Stable, devices take each release as it rolls out. On Staggered, they update less often, usually to a version first out on Stable a week or more earlier. + +One of: `stable` (default), `staggered` + +[Self-hosted install](#self-hosted-column): MDM profile. On staggered, the person can update only once Desktop has downloaded a build; the session host ignores the channel. + +> **More detail** > -> Sets the default shortcut for Quick Entry, the small prompt window that opens over other apps. It replaces Claude's built-in shortcut (double-tap Option on macOS, Ctrl+Alt+Space on Windows and Linux) for users who haven't chosen their own. +> Default: `stable`, which takes each release as it rolls out. > -> This is a default, not a lock. A shortcut that a user saves in Settings → This computer → System (**Quick access shortcut** on macOS, **Quick Entry keyboard shortcut** on Windows and Linux) takes precedence, including one saved before this key was set. +> Alternative: `staggered`, which usually updates on Thursdays to a release that has been live in production on `stable` with no known breaking issues. Typically the `staggered` release will be 7-14 days behind `stable`; urgent fixes may be released sooner. > -> Accepted values: +> Devices download their new version at the next update check and install it on restart. Devices on `staggered` receive features and fixes, security fixes included, later than devices on `stable`. A device that's currently ahead of `staggered` will stay ahead until `staggered` catches up to its version. > -> * Modifiers and one key joined by `+`, such as `Ctrl+Alt+K` or `Alt+Space`. Modifiers include `Ctrl`, `Alt`, `Shift`, `Cmd` and `Super`. `CommandOrControl` means Cmd on macOS and Ctrl elsewhere, so one value works on every platform. A combination must pair `Ctrl`, `Cmd` or `Super` with `Alt` or `Shift`, except for `Alt+Space`. Write modifier and key names exactly as shown: `ctrl` is not read as `Ctrl`. -> * `off` (the string, not `false`): no shortcut. Users can still open Quick Entry from Claude's tray or menu bar icon and set a shortcut in Settings. -> * `double-tap-option`: macOS only. Windows and Linux keep the built-in shortcut. +> Switching to `stable` or removing the setting updates devices to the newest release. > -> While Claude is running, other apps don't receive this shortcut. So Claude rejects other combinations, such as `F11`, `Ctrl+C`, `Shift+K` or `Alt+Shift+K`, which typing and other apps rely on. It also rejects any combination that includes `Insert`, `Capslock` or `F5`, which screen readers use. Choose a combination that users don't need elsewhere. +> * An unreadable value, such as a misspelling or capital letter, is read as `staggered`. +> * The setting applies only in third-party mode. A user who signs in to Claude.ai follows `stable`, unless their organization manages Claude Desktop from the admin console. +> * On a device managed from the admin console, this setting applies only while a user is signed in. With no one signed in, the device follows `stable`. +> * The setting has no effect on Linux or Microsoft Store installs. +> * See [the installation page](https://claude.com/docs/third-party/claude-desktop/installation.md) for more details on where to set the key. + +*** + +### Configuration updates + +#### `relaunchEnforcementHours` + +integerDefault: 24Range: 0–336Since 1.40609.0 + +**Configuration relaunch window.** Hours a user may keep working on the old configuration after a managed-configuration change is detected. 0 = restart required at once. Blank = 24 hours. + +[Self-hosted install](#self-hosted-column): Server side. Desktop itself restarts on the person's computer after a change to the settings it reads from the device. + +> **More detail** > -> If Claude can't use the value as a shortcut, it ignores the value and keeps the built-in one. If another app already uses the shortcut, Claude on macOS uses the built-in shortcut. On Windows and Linux, Quick Entry keeps its previous shortcut, or none at start-up. Users can choose another in Settings. +> Set it via MDM (plist, registry, or file) or serve it from your configuration endpoint (remote bootstrap configuration). When the running app observes a managed-configuration change it cannot apply without restarting, it shows the sidebar relaunch card and starts this window. The window starts at the running app’s next configuration re-check (the re-check interval beside it), so allow up to one re-check interval on top of this value between saving a change and the restart dialog. When the window ends the app blocks with a restart dialog and restarts on its own after 2 minutes with no activity (no running Claude task and no keyboard or pointer input); the user can also restart right away. Defaults to 24 hours. Set a larger value (up to 336 = 14 days) to give users longer; `0` shows the dialog at the first observation. One case gets no window, whatever this value: when a device-management profile that sets more than app-behavior keys first applies to an app that started without one, and the app will run on that profile after restarting, the dialog shows at the re-check that confirms it, because until the restart the app stays connected the way it started. > -> A change takes effect on a running app. +> A served value is read from the newest served configuration, so tightening or loosening the window takes effect without a restart once two re-checks in a row have served it, and a change to this key alone never asks for one. Like the update keys beside it, a value from a device-management profile that sets only app-behavior keys applies without making the rest of the configuration device-managed, and takes precedence over a served one. Because the key is grouped with the other app-behavior keys, a profile that sets any of them claims the whole group: set this key in the same profile as the update keys you deploy, or a served value is ignored on those devices and the 24-hour default applies. -> **quickEntryScreenshotsEnabled details** -> -> When on (default), Quick Entry on macOS lets a user click another app's window, or drag over part of the screen, to attach a picture of it to their prompt. Until the user grants the macOS Screen Recording permission, Quick Entry shows a **Turn on screenshots** button that asks for it. +*** + +#### `configRecheckIntervalMinutes` + +integerDefault: 10Range: 2–30Since 1.46388.1 + +**Configuration re-check interval.** Minutes between the running app’s checks for a changed managed configuration. Blank = 10 minutes. + +[Self-hosted install](#self-hosted-column): Server side. The host refreshes its own copy of the policy at least this often, and tells Desktop how often to ask it again. + +> **More detail** > -> Set to `false` to turn this off on every device that receives this setting. Quick Entry still opens, but offers no screenshot and no such button, and Claude does not ask for that permission. Outside Quick Entry, another app's window that a user mentions with @ in a chat comes without its picture. Users cannot turn it back on. +> How often the running app re-checks its managed configuration for changes: it re-polls your configuration endpoint with a conditional request, so an unchanged configuration costs one `304` round-trip. A detected change shows the sidebar relaunch card and starts the `relaunchEnforcementHours` window, so a saved change reaches a running app within roughly one interval. Defaults to 10 minutes; each wait is jittered by ±10% so a fleet does not poll in lockstep. Values outside 2–30 are rejected with a parse error and the default applies. > -> With `quickEntryFileSharingEnabled` off as well, Quick Entry shows no permission banner at all. +> Applied without a restart: a new served value re-arms the timer once two checks in a row have served it, and a change to this key alone never asks for a relaunch. Set it via MDM or serve it from your configuration endpoint; like the update keys beside it, a value from a device-management profile that sets only app-behavior keys applies without making the rest of the configuration device-managed, and takes precedence over a served one. Because the key is grouped with the other app-behavior keys, a profile that sets any of them claims the whole group, and every key in it is then read from that profile alone: deploy this key in the same profile as the update keys (`disableAutoUpdates`, `autoUpdaterEnforcementHours`, …). A profile that sets the update keys without it ignores a served interval and the default applies; a profile that sets only this key ignores served update settings, so a served `disableAutoUpdates` no longer holds on those devices. A profile that also manages the connection itself (sets `bootstrapUrl` or the provider keys) follows the normal tier order instead: once a served configuration is in hand it, not the profile, supplies this key. + +*** + +#### `disableLocalConfigCache` + +booleanDefault: false + +Admin Console only (Only the Enterprise Admin Console can set the key. Claude Desktop ignores it in an MDM profile, in the local configuration file and in a bootstrap server's response.) + +Since 2.7032.0 + +**Keep only your organization ID and restrictions on disk.** Don’t keep your organization’s name or any permissive setting on disk between launches; only your organization ID and restrictions are kept. + +> **More detail** > -> On Windows and Linux, Quick Entry takes text only, so this key changes nothing there. +> By default the app keeps on disk, from the last configuration the admin console served, your organization’s ID and name and the few settings a launch applies before the console answers (the telemetry switches, the Microsoft 365 sign-in broker setting, the default Quick Entry shortcut, and restrictions). When this is on, it keeps only your organization ID and those restrictions (for example telemetry blocked, or local MCP servers off), never the name or anything you have allowed, and cuts an earlier copy down at the next launch that reaches the console, or at once when a running app confirms the change; signing out deletes the kept copy too. While on: the app’s crash reporting does not start on these devices, and the sign-in screen cannot show your organization’s name before the console answers. Error stack traces and performance timings still leave these devices unless **Block essential telemetry** is on. > -> This key does not cover: +> A running app picks up a change to this setting once two configuration checks in a row have served it; changing it alone never asks for a relaunch. It applies only to organizations managed from the Claude admin console; the setting is ignored when a customer configuration server or a device profile sends it. + +*** + +## Limits + +### Session retention + +#### `chatSessionRetentionDays` + +integerRange: 1–3,650Since 1.52386.0 + +**Chat retention period.** Delete chats, with their files, after this many days without activity. Unset: kept until the user deletes them. Projects and memory stay. + +[Self-hosted install](#self-hosted-column): Not supported. Chat runs only on the person's computer, so a session host holds no chats to delete. + +> **More detail** > -> * A screenshot that a user takes with the operating system's own tools and then pastes or attaches. That is a file upload. -> * Pictures that Claude takes of its own content, such as an artifact, a file preview, a page in the built-in browser (`builtinBrowserEnabled`) or the feedback form. -> * A local MCP server or desktop extension that captures the screen (`isLocalDevMcpEnabled`, `isDesktopExtensionEnabled`). -> * Other apps, or the operating system, capturing Claude's windows. +> The app deletes whole sessions in the background shortly after it fetches this configuration (at launch and on each re-poll), or some minutes after launch and then daily when the configuration comes from device management alone. Idle time runs from the session's last activity; viewing an old Code session counts as activity, viewing an old chat or Cowork task without continuing it does not durably. A session that is running or open on screen is skipped and checked again on the next pass, as is a chat or Cowork task whose folder changed on disk within the period. Pinned sessions are not exempt. Minimum 1 day; a value that cannot be read as a whole number of days deletes nothing. Set through the served configuration or in the device-management profile that carries the rest of the configuration. What it does not reach: another account's sessions on the device (evaluated when that account signs in), Code sessions on a remote machine (SSH/WSL), Cowork background (dispatch) tasks the sidebar does not list, a chat or Cowork task whose folder cannot be located, and Claude Code files not named by a session id (prompt history, plans, shell snapshots), which keep Claude Code's own retention. Honored only by Claude Desktop configured for a third-party model provider. + +*** + +#### `coworkSessionRetentionDays` + +integerRange: 1–3,650Since 1.52386.0 + +**Cowork retention period.** Delete Cowork tasks, with their uploads and outputs, after this many days without activity. Unset: kept until the user deletes them. Spaces and memory stay. + +[Self-hosted install](#self-hosted-column): Server side. The host keeps the Cowork sessions it runs, so it deletes those left idle longer than the admin allows. + +> **More detail** > -> A change takes effect on a running app. +> The app deletes whole sessions in the background shortly after it fetches this configuration (at launch and on each re-poll), or some minutes after launch and then daily when the configuration comes from device management alone. Idle time runs from the session's last activity; viewing an old Code session counts as activity, viewing an old chat or Cowork task without continuing it does not durably. A session that is running or open on screen is skipped and checked again on the next pass, as is a chat or Cowork task whose folder changed on disk within the period. Pinned sessions are not exempt. Minimum 1 day; a value that cannot be read as a whole number of days deletes nothing. Set through the served configuration or in the device-management profile that carries the rest of the configuration. What it does not reach: another account's sessions on the device (evaluated when that account signs in), Code sessions on a remote machine (SSH/WSL), Cowork background (dispatch) tasks the sidebar does not list, a chat or Cowork task whose folder cannot be located, and Claude Code files not named by a session id (prompt history, plans, shell snapshots), which keep Claude Code's own retention. Honored only by Claude Desktop configured for a third-party model provider. + +*** + +#### `codeSessionRetentionDays` + +integerRange: 1–3,650Since 1.52386.0 -> **quickEntryFileSharingEnabled details** +**Code retention period.** Delete Code sessions, conversation included, after this many days without activity. Unset: kept until the user deletes them. Uncommitted work stays on disk. + +[Self-hosted install](#self-hosted-column): Server side. The host keeps the Code sessions it runs, so it deletes those left idle longer than the admin allows. + +> **More detail** > -> When on (default), Quick Entry on macOS offers, on another app's window, to attach the file that is open in it to the user's prompt. Claude learns which file that is through the macOS Accessibility permission. Until the user grants it, Quick Entry shows a **Turn on file sharing** button that asks for it. +> The app deletes whole sessions in the background shortly after it fetches this configuration (at launch and on each re-poll), or some minutes after launch and then daily when the configuration comes from device management alone. Idle time runs from the session's last activity; viewing an old Code session counts as activity, viewing an old chat or Cowork task without continuing it does not durably. A session that is running or open on screen is skipped and checked again on the next pass, as is a chat or Cowork task whose folder changed on disk within the period. Pinned sessions are not exempt. Minimum 1 day; a value that cannot be read as a whole number of days deletes nothing. Set through the served configuration or in the device-management profile that carries the rest of the configuration. What it does not reach: another account's sessions on the device (evaluated when that account signs in), Code sessions on a remote machine (SSH/WSL), Cowork background (dispatch) tasks the sidebar does not list, a chat or Cowork task whose folder cannot be located, and Claude Code files not named by a session id (prompt history, plans, shell snapshots), which keep Claude Code's own retention. Honored only by Claude Desktop configured for a third-party model provider. + +*** + +#### `sessionRetentionHold` + +booleanSince 1.52386.0 + +**Suspend session deletion.** Suspend all automatic session deletion for these users (legal hold). While on, the retention periods above delete nothing. + +[Self-hosted install](#self-hosted-column): Server side. The host keeps the sessions, so it is the one that stops deleting them during a hold. + +> **More detail** > -> Set to `false` to turn this off on every device that receives this setting, including devices where the permission is already granted. Quick Entry still opens, but offers no file from another app's window and no such button, and it does not ask for that permission. Outside Quick Entry, another app's window that a user mentions with @ in a chat comes without its file. Users cannot turn it back on. +> Meant to be set per user or group, through the served configuration's group overrides or in the same device-management profile that carries the rest of the configuration (a profile carrying only this key makes the device profile-managed, like any policy key); a hold in the device's profile also counts when the served configuration does not restate it. Deletion stops at the first configuration fetch that carries this value, before it takes effect as configuration at the next relaunch; a device that cannot reach its configuration server deletes nothing. + +*** + +### Token limits + +#### `inferenceMaxTokensPerWindow` + +integerRange: 1 or moreSince 1.2581.0 + +**Max tokens per window.** Limits each person’s input and output tokens per window. Cached tokens do not count, so this does not cap your provider’s bill. Leave blank for no limit. + +[Self-hosted install](#self-hosted-column): Server side. The host makes the model calls, so it counts each person's tokens and stops them at the cap. + +> **More detail** > -> With `quickEntryScreenshotsEnabled` off as well, Quick Entry shows no permission banner at all. +> Requires `inferenceTokenWindowHours` to also be set — without a window length the cap is inert and no limit is enforced. > -> On Windows and Linux, Quick Entry takes text only, so this key changes nothing there. +> Where the app runs the sessions, it keeps each person’s count in a local file, so someone who uses two devices has a separate count on each. + +*** + +#### `inferenceTokenWindowHours` + +integerRange: 1–720Since 1.2581.0 + +**Token cap window.** The count resets to zero at the end of each window. A window can last 1 to 720 hours (30 days). + +[Self-hosted install](#self-hosted-column): Server side. Sets the length of the window for the token cap, which the host counts. + +> **More detail** > -> This key does not cover: +> Required when `inferenceMaxTokensPerWindow` is set — the cap only takes effect once both are configured. > -> * A file that a user attaches, pastes or drags into Claude themselves. That is a file upload. -> * Claude's other uses of the Accessibility permission where a user has granted it, such as telling a double tap of Option from a keyboard shortcut. +> Each person’s window starts the first time they use the app after their previous window ends, so 24 hours does not mean midnight to midnight. + +*** + +## Appearance + +### `endUserAttribution` + +booleanSince 1.25927.0 + +**End-user attribution.** Show the signed-in user’s identity-provider identity in the sidebar and account menu, and emit it as the OpenTelemetry enduser.id resource attribute. + +[Self-hosted install](#self-hosted-column): Server side. The host puts the person's identity on the telemetry it sends, and tells Desktop whether to show the person's name. + +> **More detail** > -> A change takes effect on a running app. +> When on (default), the app resolves the signed-in user's identity from the configured credential source (the identity provider claim, or the OS login name when no claim is available) and shows it in the sidebar footer, the account menu, and the Code session greeting. If an OpenTelemetry collector is configured, the same identity is also emitted as the `enduser.id` resource attribute on every span, metric, and log sent to your collector — unless you have set a static `enduser.id` under **Resource attributes**, in which case your static value is kept and the runtime identity is not emitted. When off, no identity is shown in the app and no runtime `enduser.id` is emitted; a static `enduser.id` under **Resource attributes** still passes through unchanged. This setting does not gate the `process.owner` resource attribute (the OS login name), which is standard OpenTelemetry process metadata and is always emitted — set a static `process.owner` under **Resource attributes** to override it. Applies to both Cowork tasks and Code sessions. + +*** + +### `deploymentDisplayName` + +stringSince 1.24012.0 -> **skipWebFetchPreflight details** +**Deployment display name.** Overrides the provider label shown in the sidebar footer, user-menu header, and connection-error banner. + +[Self-hosted install](#self-hosted-column): Server side. Desktop shows this name in place of the provider's name in its own window. + +[Admin Console](#the-works-with-column): Set automatically. + +> **More detail** > -> Before fetching a page, Claude Code's WebFetch tool asks `api.anthropic.com` whether the domain is on Anthropic's content blocklist, and refuses the fetch if that lookup cannot complete. Third-party deployments route inference elsewhere and often block `api.anthropic.com` at the firewall; with the lookup on, every WebFetch in Code sessions then fails with "Unable to verify if domain … is safe to fetch", and where the host is reachable, every fetched hostname is sent to Anthropic. (Cowork sessions fetch through the app's own allowlisted fetch and never run this lookup.) +> Set this to the name users should see for this deployment (for example, "Claude for Government"). When unset, the desktop shows the default provider label. Maximum 60 characters. + +*** + +### `deploymentDisplaySubtitle` + +stringSince 1.24012.0 + +**Deployment display subtitle.** Optional detail shown after the deployment display name in the account-menu header. + +[Self-hosted install](#self-hosted-column): Server side. Desktop shows this detail after the deployment's name in its account menu. + +[Admin Console](#the-works-with-column): Not available. + +> **More detail** > -> Off (default): the lookup runs as it does today, so `api.anthropic.com` must be reachable from users' machines for Code-session WebFetch to work (listed under Egress Requirements). Set to `true` when users' machines cannot reach `api.anthropic.com` (corporate firewall, government network) or you do not want fetched hostnames sent there: Code sessions then fetch without the lookup and never contact that host for it. This is the same `skipWebFetchPreflight` setting Claude Code reads from its own [managed-settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) file; the app passes it to every session it starts. This key does not restrict which domains Claude may fetch. Neither does `coworkEgressAllowedHosts` in Code sessions, where it only pre-approves its hosts; `builtinToolPolicy` can require approval for every fetch. +> Optional detail shown after the deployment display name in the account-menu header (for example, "Claude for Veterans Affairs · Claude for Government"). Shown only when the display name is also set. Maximum 60 characters. + +*** + +### `disableConfigDeprecationWarnings` -> **builtinToolPolicy details** +booleanSince 1.40609.0 + +**Hide configuration deprecation warnings.** Don’t show users the in-app warning that this configuration uses a deprecated field. The final reminder in the 24 hours before the cut-off still appears. + +[Self-hosted install](#self-hosted-column): Server side. Desktop shows its warning about deprecated settings in its own window, for configuration that Desktop reads itself. + +> **More detail** > -> Keys use the same tool names and argument-scoped rule syntax as **Disabled built-in tools** (`disabledBuiltinTools`), and scopes apply in the same sessions. A bare `Bash` key also governs Claude Code's `PowerShell` tool (its shell on Windows PCs without Git for Windows); argument-scoped `Bash(…)` keys do not. Scoped **ask** rules reach sessions only through Claude Code's managed-settings channel, so another Claude Code managed-settings source replaces them unless it sets `parentSettingsBehavior` to `"merge"` (bare names hold either way). They need the same fleet-wide build support, and an older build drops a scoped **ask** entry as a configuration error (which also blocks WSL sessions on Windows until that client updates), so the tool runs unprompted. +> When the organization's configuration uses a field that is deprecated — a renamed key, or a legacy value or entry form — the app shows every user a dismissable warning naming the field, what to use instead, and the date support ends (each field's cut-off is listed in the configuration changelog and takes effect at 12:00 PM Pacific Time on that date). The warning shows from the field's announced warning date until dismissed, and once more in the 24 hours before the cut-off. Set this to `true` to suppress the first showing for your users while you migrate; the final 24-hour reminder is always shown, and the deprecation stays listed in the diagnostic report (Help → Troubleshooting) and the hosted configuration editor regardless. + +*** + +### `banner` + +objectSince 1.7196.0 + +**Organization banner.** A persistent banner across the top of the app window after sign-in. + +[Self-hosted install](#self-hosted-column): Server side. Desktop draws the admin's banner across the top of its own window. + +> **More detail** > -> An **ask** entry, bare or scoped, also turns off the app's remembered “always allow” choices for that tool, so each prompted call is confirmed individually. **ask** on a file tool (`Read`, `Write`, `Edit`, `Glob`, `Grep`) prompts in Cowork, Chat and Code sessions. Calls that Cowork and Chat always refuse are still refused without a prompt: paths outside the session's connected folders (in Chat, outside its scratch directory and its project's folders) and protected or sensitive files inside them. A scheduled task in Cowork waits at the prompt, which appears in the task's session and, when that session is not in view, as a desktop notification. Code side chats cannot prompt, so they block matching calls. An unusable entry is dropped and recorded as a configuration error; a value other than `allow` or `ask` is treated as `ask` and reported. To remove a tool or deny a rule outright, use **Disabled built-in tools** instead. +> Use this for compliance notices, an internal-support link, or to identify the deployment. The banner is shown on every page after sign-in and cannot be dismissed by the user. Colors are six-digit hex (`#RRGGBB`); when `linkUrl` is set the banner text becomes an HTTPS link. -> **disabledBuiltinTools details** +> **Child attributes (5)** > -> Each entry is a Claude Code [tool name](https://code.claude.com/docs/en/tools-reference) such as `Bash`, `Edit`, `WebFetch` or `WebSearch`, or an argument-scoped [permission rule](https://code.claude.com/docs/en/permissions#permission-rule-syntax) such as `Bash(curl *)` or `Edit(//**/*.env)`. A bare name covers every call (a bare `Bash` entry also covers the `PowerShell` tool); a scoped rule covers matching calls in every permission mode, including Auto and bypass. Scopes are matched for `Bash(…)` and `PowerShell(…)` (a command pattern) and for file paths written as `Read(…)` (covers `Read`, `Grep`, `Glob`) or `Edit(…)` (covers `Edit`, `Write`, `NotebookEdit`); many other tools take `Tool(:)`. `WebSearch` and `WebFetch` are bare-name only: to allow specific hosts, use `coworkEgressAllowedHosts`. +> **enabled** `boolean` > -> Scoped `Bash(…)` rules apply in Code sessions only; Cowork's shell follows only a bare `Bash` entry. Start absolute file paths with `//`, not `/`: a relative pattern such as `Read(**/.env)` covers only a Code session's project folder and none of Cowork's connected folders. Scoped rules need fleet-wide build support (`disableAutoUpdates` pins builds): an older build passes a scoped entry to Claude Code unchecked. An entry whose pattern contains `)` followed by a space or comma is enforced only through Claude Code's managed-settings channel, so another Claude Code [managed-settings source](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) replaces it unless that source sets `parentSettingsBehavior` to `"merge"`; every other entry is enforced either way. +> Turns the banner on. When false or unset, the other banner fields are ignored. > -> An unusable entry (a tool name in the wrong letter case, an unbalanced parenthesis, a scoped `WebSearch(…)` or `WebFetch(…)`) is kept, because the deny list is served exactly as written, and raises a configuration warning. - -> **toolSearchEnabled details** +> **text** `string` > -> When enabled, Cowork, Code, and Chat sessions place only tool names in context up front, and Claude fetches a tool's full schema the first time it needs it. Use this when many MCP tools are configured and their inlined schemas crowd out the context window. If your endpoint does not accept the request shape it then receives, requests fail with HTTP 400. +> Single line, truncated on overflow. Maximum 200 characters. > -> * **Claude API, Vertex AI, Bedrock, or Bedrock Mantle with no custom base URL**: not needed. The app leaves Claude Code's experimental betas on there, as terminal Claude Code does, so tool search is on by default (on Vertex AI, for Claude 4.5 and newer models). To turn it off in Code, Cowork, and Chat, set `ENABLE_TOOL_SEARCH` to `false` in the `env` block of OS-level Claude Code managed settings (with `parentSettingsBehavior: "merge"`). Earlier app versions treat these like the last case. -> * **Gateway provider, app versions bundling Claude Code 2.1.247 or later**: requests add only the tool-search shape (the `tool-search-tool-2025-10-19` `anthropic-beta` value, deferred tool loading, `tool_reference` content blocks); every other experimental Claude Code beta stays suppressed. OS-level Claude Code managed settings that keep that suppression or turn `ENABLE_TOOL_SEARCH` off still win; set `ENABLE_TOOL_SEARCH` to `force` there instead (with `parentSettingsBehavior: "merge"`). Sessions the app runs in Claude Code's gateway mode (an opt-in for users on the gateway's own sign-in) get its gateway-safe tool-search shape instead. -> * **Foundry, a custom base URL, and earlier app versions**: the app suppresses Claude Code's experimental betas for the session and the key lifts that, so requests carry the tool-search shape together with Claude Code's other experimental betas for that provider. On Vertex with app versions bundling Claude Code older than 2.1.221, leave this unset while any model older than Claude 4.5 is in use; those engines send the header regardless of model and Vertex's pre-4.5 stacks reject it. - -> **organizationInstructions details** +> **backgroundColor** `string` (default: #F5F5F5) +> +> Six-digit hex (#RRGGBB). Applied exactly as configured; not theme-adapted. +> +> **textColor** `string` (default: #000000) > -> Free-text instructions from your organization that Claude Desktop appends, in a clearly delimited block, after its own system prompt in **Chat**, **Cowork**, and **Code** (every chat, task, and Code session, including the sub-agents they spawn): for example house style, data-handling rules, or topics to decline. The model is told these instructions come from the organization's administrator and take priority over a user's personal preferences. +> Six-digit hex (#RRGGBB). Applied exactly as configured; not theme-adapted. > -> This is guidance the model follows, not an enforced control: like any system-prompt text it steers the model's behavior and is usually honored, but it does not guarantee an outcome and is not a substitute for the restriction keys (tool policy, egress allowlist, folder allowlist). The app's own system prompt is never replaced or shortened by this key; in Code sessions it is added after Claude Code's own prompt and any `CLAUDE.md` instructions still apply. +> **linkUrl** `string` > -> Read from the app's loaded configuration when a session starts; a changed value generally takes effect for sessions started after the next app launch. Leading and trailing whitespace is trimmed; an empty string is treated as unset. Maximum 3,000 characters; a longer value is rejected (the key is ignored with a configuration error) rather than truncated. Line breaks are preserved when the value is delivered as JSON, a bootstrap response, a `.mobileconfig` profile, or a `.reg` file; the Group Policy (ADMX) and Intune text box for this setting is single-line. +> Optional HTTPS URL. The banner text becomes a link when set. -## Connectors +*** -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Claude.ai data import `claudeAiImport` | `object` | MDM + Bootstrap Added in 1.10628.0 | — | Lets users import Claude.ai chats and projects, plus earlier Claude sessions on this computer, when `enabled` is true. `automatic3pImport` is a separate switch. | [`reported`](#self-hosted-column) Desktop can still export sessions stored on the person's computer, and imports none, since no session runs there | +### Feature discovery -> **claudeAiImport details** -> -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `enabled` | `boolean` | `false` | Lets users import a Claude.ai data export and earlier Claude sessions on this computer from Settings → Import. Doesn’t affect a provisioned sign-in import. | -> | `allowedOrganizationUuids` | `string[]` | — | When set, users import by sign-in only, and only from the Claude.ai organizations with these IDs. | -> | `automatic3pImport` | `boolean` | — | Copy this computer’s earlier third-party sessions into the app once, in the background. Independent of `enabled`. | -> | `exportEnabled` | `boolean` | `false` | Lets users export this computer’s chats, Cowork tasks, and Code sessions as a zip another install can import. No effect unless `enabled` is true. | -> | `bannerBehavior` | `enum` | — | Prompt to import on a new chat or task. Off if unset. `show`: always; needs `enabled` or a sign-in import. `detect`: if `enabled` finds earlier Claude sessions. One of: `off`, `detect`, `show`. | +#### `disableFeatureDiscovery` -### Authentication +booleanDefault: falseSince 1.21459.0 -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Microsoft 365 native sign-in broker `microsoftAuthBroker` | `enum` | MDM + Bootstrap Added in 1.19367.0 | `auto` | “disabled” forces browser-based Microsoft 365 sign-in; “required” fails sign-in when the OS broker is unavailable, so the refresh token stays broker-held. One of: `auto`, `disabled`, `required`. Defaults to `auto`. | [`none`](#self-hosted-column) Steers the sign-in of Desktop's bundled Microsoft 365 connector, started for no session on a self-hosted install | -| Microsoft 365 sign-in with the Windows account `microsoftAuthDefaultAccount` | `enum` | MDM + Bootstrap Added in 2.26454.0 | `disabled` | “enabled”: when a user clicks Connect on Windows, Microsoft 365 signs in with the work account already signed in to Windows, without the account picker. One of: `enabled`, `disabled`. Defaults to `disabled`. | [`none`](#self-hosted-column) Picks the account for Desktop's bundled Microsoft 365 connector, started for no session on a self-hosted install | +**Hide feature announcements.** Suppress unprompted feature-announcement UI: the post-update “What’s new” nudge and new-feature tips. Users can still open release notes themselves. -> **microsoftAuthBroker details** -> -> `auto` (default): use the OS sign-in broker where available (WAM on Windows, the Company Portal SSO extension on macOS) and fall back to a browser sign-in otherwise. `disabled`: always use the browser sign-in. `required`: fail sign-in when the broker is unavailable rather than falling back to the browser, so the refresh token stays broker-held. Linux has no broker, so `required` is not supported there. Desktop builds older than the version that introduced `required` treat it as `disabled` (browser-only sign-in) — the opposite posture — so gate rollout on client version. +[Self-hosted install](#self-hosted-column): Server side. Desktop hides its own announcements of new features. -> **microsoftAuthDefaultAccount details** +> **More detail** > -> `disabled` (default): Connect shows the account picker when no account is connected. `enabled`: on Windows, when `microsoftAuthBroker` is not `disabled`, Connect first signs in silently with the account Windows already uses. The `tenantId` on the `microsoft365` entry in managed MCP servers must be a tenant GUID. With `common`, `organizations` or `consumers`, users always get the picker. Users also get the picker for accounts from another tenant, guest accounts and personal Microsoft accounts, when the silent sign-in fails, and when the computer cannot store credentials securely. A user who already signed in to Microsoft 365 through the browser keeps that account. After a user disconnects Microsoft 365, or a different person signs in to Claude on this computer, Connect always shows the picker for that connector on this computer, including for a disconnect that happened before this setting was turned on. Turning this setting off stops new silent sign-ins and signs nobody out: users already connected keep their account until they disconnect. macOS and Linux are not affected. Third-party deployments only: first-party installs ignore this setting. +> Covers the version-shipped announcement UI baked into each release: the **What's new** button that appears on its own after an update, and the one-time **New feature** tips (coach-marks) that point out newly shipped capabilities. Useful when your organization gates feature availability and doesn't want the app advertising capabilities you haven't rolled out. +> +> User-initiated surfaces stay: the What's-new menu item and header button still open the release notes on demand. Auto-update behavior is unaffected — that is governed by `disableAutoUpdates` and `autoUpdaterEnforcementHours`. -### Extensions +*** -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Allow desktop extensions `isDesktopExtensionEnabled` | `boolean` | MDM + Bootstrap Added in 1.2581.0 | `false` | .dxt and .mcpb installs. Defaults to `false`. | [`none`](#self-hosted-column) Desktop keeps extensions off on a self-hosted install, whatever this setting says | -| Require signed extensions `isDesktopExtensionSignatureRequired` | `boolean` | MDM + Bootstrap Added in 1.2581.0 | `false` | Reject desktop extensions that are not signed by a trusted publisher. Defaults to `false`. | [`none`](#self-hosted-column) Desktop installs no extension on a self-hosted install, so there is no signature for it to require | +## Plugins -> **isDesktopExtensionEnabled details** -> -> 1P builds default to enabled at runtime unless this is explicitly set. In 3P, enabling this allows loading extensions; local install additionally requires an org policy backend. +### `allowedPluginMarketplaces` -### MCP +object\[]Since 1.17377.1 -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Managed MCP servers `managedMcpServers` | `object[]` | MDM + Bootstrap Added in 1.2581.0 | — | Org-pushed MCP servers: remote (HTTP/SSE) or local (stdio command). May embed bearer tokens. | [`server`](#self-hosted-column) The host connects the admin's MCP servers and applies each tool's rule, and tells Desktop which local ones to start | -| Allow persistent tool approvals `mcpPersistentAlwaysAllowEnabled` | `boolean` | MDM + Bootstrap Added in 1.24012.9 | `true` | Offer the persistent “Always allow” approval options for MCP tools. Disable to keep tool approvals per-call or session-scoped only. Defaults to `true`. | [`server`](#self-hosted-column) When off, the host leaves lasting MCP tool approvals out of its sessions, and tells Desktop not to offer them | -| Scheduled-task tool approval lifetime `mcpScheduledTaskApprovalLifetimeDays` | `integer` | MDM + Bootstrap Added in 2.7032.0 | — | How many days a scheduled task may reuse a lasting MCP-tool approval before it asks again. 0 removes the lasting option. Leave blank for no time limit. Range: 0–3650. | [`server`](#self-hosted-column) The host limits how many days a scheduled task may reuse a lasting MCP tool approval, and tells Desktop | -| Allow local MCP servers `isLocalDevMcpEnabled` | `boolean` | MDM + Bootstrap Added in 1.2581.0 | `true` | Local stdio servers added via the Developer settings. On third-party deployments, off also stops plugins’ local servers. Remote servers keep working. Defaults to `true`. | [`server`](#self-hosted-column) When off, only the local MCP servers the host names start on the person's computer, and none the person added | -| Allowed plugin MCP servers `allowedPluginMcpServers` | `object[]` | MDM + Bootstrap Added in 2.2553.0 | — | Servers plugins may connect in sessions, beyond the managed list above and organization plugins. An empty list allows none; unset keeps today’s rules. | [`server`](#self-hosted-column) The host connects a plugin's remote MCP server only where this list admits it; while it is unset, none connects | -| Blocked plugin MCP servers `deniedPluginMcpServers` | `object[]` | MDM + Bootstrap Added in 2.16120.0 | — | Remote servers plugins may not connect, even if the allowed list admits them; in Code sessions, configuration-file servers too. Unset or empty blocks none. | [`server`](#self-hosted-column) The host refuses a plugin's remote MCP server that this list matches, even where the allowed list admits it | -| MCP tool call timeout `mcpToolTimeoutSec` | `integer` | MDM + Bootstrap Added in 1.37937.0 | — | Per-call timeout for MCP tool calls, in seconds. Default 180 (3 minutes). Range: 60–3600. | [`server`](#self-hosted-column) The host starts Claude Code, so it sets how long an MCP tool call may run | +**Plugin marketplaces.** Git repositories or hosted marketplace.json URLs to surface as plugin marketplaces in the Directory’s Organization tab. The app re-fetches each periodically. -> **managedMcpServers details** -> -> For OAuth-authenticated entries, the app builds the redirect URI as `http://:/callback`; register that exact value with the OAuth provider. Tokens refresh automatically during a session. +[Self-hosted install](#self-hosted-column): Server side. The host fetches the admin's plugin marketplaces and loads their plugins into the sessions it runs. + +> **Child attributes** > -> `toolPolicy` locks the per-tool approval state, keyed by tool name: `"blocked"` removes the tool from the session and labels it admin-blocked, `"ask"` requires approval on every call (Allow once / Deny only; no persistent always-allow; a scheduled Cowork task waits at that prompt), `"allow"` pre-approves. Tools **not listed** follow the user's choice: the prompt offers a persistent Always allow, except for tools that can modify data, which show a session-scoped **Allow for this task** alongside **Allow for all tasks** with a malicious-instruction warning. In Code sessions, `blocked` and `ask` are forwarded as Claude Code permission rules; `allow` is not. +> **expectedName** `string` > -> Keys may contain `*` wildcards (`"read_*"` matches every tool whose name starts with `read_`; anchored, and `*` is the only wildcard). When several wildcard keys match, the strictest applies (blocked > ask > allow). An exact-name key wins over matching wildcards, with two exceptions in the stricter direction: in Code sessions a wildcard `ask`, or a wildcard `blocked` other than the bare `"*"`, beats a less strict exact key (so `"*": "blocked"` plus exact `"allow"` entries still works as deny-by-default there); and in chat approval prompts and always-allow persistence a wildcard `ask` keeps every matching tool behind a per-call prompt even when a more permissive exact key matches, while direct tool invocations such as artifact or widget calls follow the exact key. +> Rejects the marketplace if its manifest name differs. > -> For the bundled Microsoft 365 connector, the send tools (`outlook_send_mail`, `outlook_send_draft`, `outlook_forward_mail`, `outlook_create_event`, `outlook_update_event`, `teams_send_chat_message`, `teams_send_channel_message`, `teams_reply_channel_message`) cannot be loosened below `ask`; an `allow` setting resolves to `ask`. +> > **More detail** +> > +> > When set, each fetch or clone is rejected if the marketplace's `manifest.name` differs, so an upstream rename cannot silently replace another configured marketplace. It also lets a new entry replace a removed one. Any change to an entry's `url`, `repo` or `path` (not `ref`) counts as removing that marketplace and adding another, which uninstalls the plugins that users installed from it, unless the new entry names the marketplace it replaces: in the same change that removes the old entry, set the new entry's `expectedName` to exactly the old marketplace's manifest name (letter case counts), and keep it set. The plugins that users installed then stay installed, with their stored settings, and load from the new source, where the new marketplace lists them under the same names. A plugin that is installed outside the marketplace's own folder and cannot be moved into it (its code comes from another repository, the new marketplace does not list it, or the new entry has not installed yet) is uninstalled as at any removal. The new entry's `installationPreference` applies as for any new entry; under `available` nothing else is installed and a plugin that a user switched off stays off. Until the new entry installs (it cannot be fetched, or it is refused), the plugins that stay installed do not load; they load again, with no reinstall, once it does. Removing the old entry first and adding the new one in a later change uninstalls the plugins on every computer that syncs in between. > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `name` | `string` | — | Unique name for this server. Shown to users and used to key tool policy and sign-in state. | -> | `server` | `string` | — | Which bundled connector this entry turns on. Set instead of a transport; each built-in server has its own fields. One of: `microsoft365`, `websearch`, `github`. | -> | `tenantId` | `string` | — | Your organization’s Microsoft Entra directory (tenant) ID. | -> | `clientId` | `string` | — | OAuth app client ID for this built-in server. | -> | `azureCloud` | `enum` | — | Microsoft cloud for sign-in and Graph. Leave as global for commercial Microsoft 365; US Government clouds require your own app registration (Client ID). One of: `global`, `us-gov-high`, `us-gov-dod`. | -> | `continuousAccessEvaluation` | `enum` | `enabled` | Request CAE-capable Microsoft Graph tokens: long-lived (up to about 28 hours) but revocable within minutes. Set “disabled” to keep standard one-hour tokens. One of: `enabled`, `disabled`. | -> | `scope` | `string` | — | What the server may request at sign-in. If blank, Desktop’s default read set is used. | -> | `toolPolicy` | `object` | — | Lock the approval state for specific tools. Unlisted tools stay user-controlled. | -> | `headers` | `object` | — | Static headers sent on every request — routing and tenant headers only. No credentials here; use the headers helper script for tokens and rotating values. | -> | `headersHelper` | `string` | — | Script that prints the auth header as a JSON object to stdout. Runs before each request (cached for the TTL below). | -> | `headersHelperArgs` | `string[]` | — | Arguments passed to the headers helper script, one per entry, in order. Leave unset to run it with none. | -> | `headersHelperTtlSec` | `integer` | — | How long the helper’s headers are reused before it runs again, in seconds. Defaults to 300. | -> | `headersHelperRefreshBufferSec` | `integer` | — | Seconds before the TTL expires at which the helper re-runs mid-session. Defaults to 60. Keep it larger than the helper’s typical runtime. | -> | `provider` | `enum` | — | Runs search from the desktop, for inference providers without native web search. Supply the provider’s API key through the headers helper script below. One of: `brave`, `tavily`, `exa`, `custom`. | -> | `customUrl` | `string` | — | POST endpoint accepting \{q} JSON and returning a results\[] array. Only used when provider is Custom. | -> | `host` | `string` | — | Leave blank for github.com. For GitHub Enterprise Server, your instance’s base URL. | -> | `toolsets` | `string` | — | Comma-separated github-mcp-server toolsets to enable. If blank, the bundled server’s default toolsets are used. | -> | `readOnly` | `boolean` | — | Offer only read tools — the server registers no write tools at all. | -> | `transport` | `enum` | — | How the app connects: Streamable HTTP, legacy SSE, or a local command (stdio). policy-only connects to nothing; it only sets a plugin server’s tool policy. One of: `http`, `sse`, `stdio`, `policy-only`. | -> | `url` | `string` | — | HTTPS endpoint of the remote MCP server. Use the server’s final address: HTTP redirects are not followed. | -> | `oauth` | `object` | — | OAuth for a remote server: true to auto-register a client, a pre-registered client ID with tenant and scope, or mode “hosted” for an Anthropic-signed identity. | -> | `oauth.clientId` | `string` | — | OAuth client ID from your IdP app registration. Leave unset to auto-register (dynamic client registration) and only narrow scopes. | -> | `oauth.clientSecret` | `string` | — | Only for IdPs that require one (e.g. Box). Hosted config can store only a Google Desktop-app secret (GOCSPX-…); for other IdPs use the client secret helper. | -> | `oauth.clientSecretHelper` | `string` | — | Executable that prints the client secret on stdout as a JSON object with a single clientSecret key; any other output is rejected. Overrides the inline value. | -> | `oauth.authorizationServer` | `string[]` | — | Issuer URLs the OAuth sign-in may use, as a JSON array. Pre-filled by presets; ask your IdP admin if unsure. | -> | `oauth.authorizationUrl` | `string` | — | Only for IdPs that don’t serve a .well-known discovery document. Set together with Token URL; requires Client ID. | -> | `oauth.tokenUrl` | `string` | — | Only for IdPs that don’t serve a .well-known discovery document. Set together with Authorization URL; requires Client ID. | -> | `oauth.tenantId` | `string` | — | Required for single-tenant Entra apps. Leave blank for multi-tenant or non-Microsoft IdPs. | -> | `oauth.authFlow` | `enum` | — | How Entra sign-in runs for this server: the system browser (default) or the OS identity broker. One of: `browser`, `broker`. | -> | `oauth.scope` | `string` | — | Space-separated scopes sent on the authorize request. Leave unset to use the scopes the server advertises. Required when Tenant ID is set. | -> | `oauth.appendOfflineAccess` | `boolean` | — | Adds offline\_access to the authorize request so the IdP returns a refresh token for silent renewal. | -> | `oauth.callbackHost` | `enum` | — | Use localhost only if your IdP’s registered redirect URI specifies it. One of: `127.0.0.1`, `localhost`. | -> | `oauth.callbackPort` | `integer` | — | Only set if your IdP requires an exact-match redirect port. Entra accepts any. | -> | `oauth.additionalRedirectReferrerHosts` | `string` | — | Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. | -> | `icon` | `string` | — | Icon shown for this connector: a PNG or JPEG image as a base64 data: URI, at most 4,096 characters. | -> | `command` | `string` | — | Absolute path to the server executable, run on the user’s machine. | -> | `args` | `string[]` | — | Arguments passed to the command, one per entry. | -> | `env` | `object` | — | Environment variables set for the command. | -> | `envHelper` | `string` | — | Script that prints environment variables as a JSON object to stdout. Runs when the local server starts (cached for the TTL below). | -> | `envHelperArgs` | `string[]` | — | Arguments passed to the environment helper script, one per entry, in order. Leave unset to run it with none. | -> | `envHelperTtlSec` | `integer` | `300` | Maximum age of a cached helper result, in seconds (default 300). Applies when the server starts or restarts. | -> | `startupTimeoutSec` | `integer` | `120` | Maximum wait in seconds for the server to start and list its tools. | - -> **mcpPersistentAlwaysAllowEnabled details** +> **installationPreference** `enum` > -> When enabled (the default), approval prompts for tools without a `toolPolicy` entry offer a persistent grant: **Always allow**, or **Allow for all tasks** for tools that can modify data. The Tool permissions picker in Connector settings also lets users pre-approve tools. These grants persist across sessions with no expiry. +> Whether users install plugins themselves or get them automatically. > -> When disabled, the persistent options are hidden from approval prompts and from the Connector settings picker, and previously stored persistent grants stop being honored. Scheduled-task runs also stop offering, recording, and replaying the **Allow for all scheduled runs** approval (**Always allow** in Code sessions), unless a scheduled-task approval lifetime of one day or more is set. Users can still approve each call. Outside scheduled-task runs, in chat and Cowork they can also choose **Allow for this task**, except for read-only tools on servers they added themselves. +> One of: `available`, `auto_install`, `required` > -> A per-tool `toolPolicy` entry on `managedMcpServers` always takes precedence over this key: `blocked`, `ask`, and `allow` behave exactly as documented there whether this key is enabled or not. +> > **More detail** +> > +> > `available` (the default) lets users install from the Directory's Organization tab. `auto_install` installs automatically once per pin (the commit SHA, or a `url` source's `manifestSha256`); a plugin the user removes stays removed until the pin changes. `required` reinstalls on every sync, so it cannot stay removed. A change that only moves the pin of existing entries, with nothing else in the configuration changed, reaches running apps without a restart once the app's next two configuration checks both return it; any other change to this list asks for a restart. An `auto_install` or `required` entry without that pin (a full 40-character commit SHA in `ref`, or `manifestSha256` for a `url` source) is treated as `available` and reported as a config warning: the marketplace still lists, but the entry installs nothing. Left at (or treated as) `available`, a `url` marketplace served from your inference gateway's or bootstrap server's own origin may instead mark individual plugins `"installationPreference": "auto_install"` in its `marketplace.json`: those install automatically with no pin (each such archive needs a `sha256`), and a plugin the user removes stays removed. On any other origin those marks are ignored. > -> This key governs chat and Cowork, and also Code sessions on the device (including WSL) or over SSH. In those Code sessions, with the key disabled, the prompt for an MCP tool offers **Allow for this session** instead of **Always allow**, except on scheduled-task runs. This approval is not saved to Claude Code's settings files. It lasts until the session is deleted, and sessions forked or started from it do not inherit it. Claude Code's own allow rules and hooks still apply. Allow rules in its settings files, including ones saved earlier with **Always allow**, and hooks in its settings or plugins keep allowing the tool until they are removed. Code sessions receive only the `blocked` and `ask` values of `toolPolicy` entries, so a tool set to `allow` still prompts there, and this key applies to it. - -> **mcpScheduledTaskApprovalLifetimeDays details** +> **credentialHelper** `string` > -> On a scheduled task, the approval prompt for an MCP tool can offer a lasting approval, so later runs use that tool without asking: **Allow for all scheduled runs** in Cowork, **Always allow** in the Code tab. This setting limits how long that approval lasts. With a limit, the button reads **Allow for N days**. Once an approval is older than that, the next run asks again, and approving again renews it. `0` removes the lasting option, and approvals already stored stop being reused. Leave it blank to change nothing. Choose a number comfortably longer than the gap between runs. +> Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) > -> The limit covers MCP tools only, and a `toolPolicy` entry on `managedMcpServers` still takes precedence. If a configuration server delivers the setting, then after each launch scheduled tasks ask instead of reusing stored approvals (as at `0`) until the app has fetched the configuration again. +> Executable that prints an access token for this marketplace. > -> If `mcpPersistentAlwaysAllowEnabled` is off, a limit of one day or more brings the lasting option back for scheduled tasks only. +> > **More detail** +> > +> > Prints to stdout one of: a bare token (sent as the git password for username `x-access-token`, which GitHub, GitLab and Azure DevOps accept, and as `Authorization: Bearer` for `url` sources); git-credential lines `username=` and `password=` when the host needs a particular username (Bitbucket Data Center project or repository access tokens on 9.3+: `x-token-auth`; GitLab deploy tokens: `gitlab+deploy-token-N`) — sent as HTTP Basic for `url` sources; `authtype=Bearer` and `credential=` to send `Authorization: Bearer ` (Bitbucket Data Center HTTP access tokens on any version); or, for `url` sources only, a JSON object of HTTP headers such as `{"Authorization": "Bearer …", "X-Tenant": "acme"}` (the form an MCP server's `headersHelper` prints), all sent on every request to that marketplace — a `git` source refuses this form. Other keys, blank lines and CRLF are ignored in the line forms; output that opens with `{` must be a valid header object or the fetch is refused. > -> Code tab: the limit covers only lasting approvals given after this setting took effect. An earlier one was usually saved as an allow rule in Claude Code's own settings: for a scheduled task, the project's `.claude/settings.local.json`, under `permissions.allow`. Any allow rule in Claude Code's settings keeps allowing the tool without asking, even at `0`, until that entry is removed. That includes a rule written by hand, and one saved by **Always allow** in an ordinary Code session in the same project, which the app offers whenever `mcpPersistentAlwaysAllowEnabled` is on. In an ordinary Code session over SSH, if this setting has a value (even `0`), **Always allow** for a tool of a server set up on the host lasts for the session only and saves no rule there. - -> **isLocalDevMcpEnabled details** +> **github** > -> On third-party deployments, `false` from any source also stops plugins' local (`stdio`) MCP servers in Cowork, Chat and Code sessions. That covers `.mcpb` bundles and plugins from every marketplace, your organization's included. In Code it also stops the local servers in Claude Code's own configuration files (`~/.claude.json`, a project's `.mcp.json`). It also stops a local server in Claude Code's `managed-mcp.json` whose command, arguments or environment use `${VAR}`. Remote servers keep working. Plugins placed in the org-plugins directory on the computer are not affected: the desktop still runs their servers. +> Applies when `source` is `github`. The in-app configuration window calls it **GitHub**. > -> Set to `false` in a device-management profile, this key also locks down the local (`stdio`) entries of `managedMcpServers`: the app starts one only when that profile itself lists an entry of the same name, and with the profile's own command, arguments and environment. Only the profile's value engages this. A `false` from a configuration server or the admin console turns user-added servers off and does not engage it. +> **source** `string` *required* > -> Claude Code's own managed settings, on the device or (for Code sessions on a Claude API key) from the Claude Console, may override this key: see [managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings). - -> **allowedPluginMcpServers details** +> Where the marketplace is fetched from: a GitHub repository (set repo), any Git remote (set url), or a hosted marketplace.json file (set url). > -> Unset (default): with managed servers listed, sessions take MCP servers only from plugins and the desktop; with no managed servers listed, this key restricts nothing. Either way, `isLocalDevMcpEnabled` set to `false` stops plugins' local servers and, in Code, those of Claude Code's own configuration files. +> Must be: `github` > -> When set, Cowork, Chat and Code sessions connect the managed list above and the servers the desktop serves from the administrator's org-plugins directory, plus only servers declared by other plugins (user-installed or marketplace) that match an entry. An entry in the managed list above with `transport: "policy-only"` sets a plugin server's tool permissions but does not admit it; to admit that server, list the server's own URL here. Claude Code configuration-file servers (`~/.claude.json`, a project's `.mcp.json`, `claude mcp add`) are never connected. With the key set, the desktop starts no plugin server on the computer itself, whatever the entries say. The one exception is the MCP servers it serves to sessions from the org-plugins directory. Each entry is a URL pattern in Claude Code's form, `{"serverUrl": "https://*.example.com/*"}` (`*` wildcards; a host `*` spans `a.b`): a plugin's remote server connects when its URL matches an entry. No entry admits a plugin's local (stdio) server, and an empty list admits no plugin server. Other shapes, the `serverName` and `serverCommand` forms included, are dropped and reported; a value that is not a list, or has no readable entry, locks sessions to the managed list and the org-plugins directory's servers, and stops every other desktop-started plugin server. User-added local servers and extensions keep their own keys. +> **repo** `string` *required* > -> Claude Code's own managed settings, on the device or (for Code sessions on a Claude API key) from the Claude Console, may override this key: see [managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings). +> GitHub repository in owner/repo form. Case-insensitive. > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `serverUrl` | `string` | — | URL pattern a plugin’s remote server must match, with \* wildcards. | - -> **deniedPluginMcpServers details** +> **ref** `string` > -> Unset (default) or an empty list: nothing is blocked. +> Commit SHA, branch, or tag. Leave empty to track the default branch; auto\_install and required need a full 40-character commit SHA. > -> When set, Cowork, Chat and Code sessions do not connect a plugin's remote server whose URL matches an entry. The key works with or without `allowedPluginMcpServers`; a server that matches both lists stays blocked. In a Code session that reads Claude Code configuration-file servers (`~/.claude.json`, a project's `.mcp.json`, `claude mcp add`), a matching remote server from those files is refused as well. The managed list above, the servers the desktop serves from the administrator's org-plugins directory, user-added local servers and extensions are not affected: remove those at their own keys. Each entry is a URL pattern in Claude Code's form, `{"serverUrl": "https://*.example.com/*"}` (`*` wildcards; a host `*` spans `a.b`). An entry matches an address, not a server: the same server under another host name or an IP address, or behind a plugin's local (stdio) server, which has no URL, is not matched. `https://*.example.com/*` does not match `http://`, `wss://` or the bare `example.com`; a pattern such as `example.com/*`, which names no scheme, matches nothing, and a lone `*` matches every URL. To keep a plugin's servers out whatever address they use, set `allowedPluginMcpServers`, which admits only the servers it lists. The desktop reads no other shape, the `serverName` and `serverCommand` forms included: a value that is not a list, or that holds any entry the desktop cannot read, is reported and blocks every plugin's remote server (and those configuration-file remote servers), because skipping an entry of a block list would let its server connect. The servers named above as not affected still connect. +> **path** `string` > -> Claude Code's own managed settings, on the device or (for Code sessions on a Claude API key) from the Claude Console, may override this key: see [managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings). +> Folder within the repository that contains the marketplace, when it isn’t at the root. > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `serverUrl` | `string` | — | URL pattern of the remote servers to block, with \* wildcards. | - -> **mcpToolTimeoutSec details** +> **credentialKind** `enum` > -> Sets the per-call timeout the agent applies to every MCP tool call; a call that runs longer fails with a timeout error the model can see. Cowork and chat sessions default to 180 seconds. Code sessions have no desktop-imposed MCP tool timeout today, so setting this key introduces one there as well. The desktop's own request deadlines toward MCP servers — the managed servers above and, where `isLocalDevMcpEnabled` permits them, user-added local servers — follow this value so they never cut a call short first; while the key is unset, calls to user-added local servers are additionally limited to 60 seconds by the desktop. Values outside 60–3600 are rejected at parse time (the error is listed in the diagnostics report) and the defaults apply. +> How fetches authenticate: anonymously, with the user’s git credentials, via a helper executable, or as the app does to its gateway or bootstrap server (url). > -> The timeout is global (there is no per-server or per-tool form), so size it for the slowest tool you need to complete: long-running tools on one server extend the window during which a stuck call on any server holds its turn. Cowork's built-in shell tool runs under the same cap: a single command's `timeout_ms` (itself limited to 600 seconds) cannot exceed this value. - -## Telemetry & updates - -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Organization UUID `deploymentOrganizationUuid` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | A UUID you generate. Tags telemetry so Anthropic support can locate your fleet’s events, and namespaces each user’s local data. Not used for auth. | [`client`](#self-hosted-column) Tags the desktop app's telemetry and names its local data on the person's computer | -| Block essential telemetry `disableEssentialTelemetry` | `boolean` | MDM + Bootstrap Added in 1.2581.0 | `false` | Crash and performance reports to Anthropic. Defaults to `false`. | [`client`](#self-hosted-column) Desktop starts its crash reports to Anthropic at launch, before sign-in, and a host's sessions never send any | -| Block nonessential telemetry `disableNonessentialTelemetry` | `boolean` | MDM + Bootstrap Added in 1.2581.0 | `false` | Product-usage analytics (no message content) and diagnostic-report uploads. Defaults to `false`. | [`client`](#self-hosted-column) Desktop sends usage analytics to Anthropic from before sign-in, and a host's sessions never send any | -| Block nonessential services `disableNonessentialServices` | `boolean` | MDM + Bootstrap Added in 1.2581.0 | `false` | Connector favicons, artifact-preview and MCP Apps iframes, and the Linux spellcheck dictionary. Connector widgets fall back to text; spellcheck is off on Linux. Defaults to `false`. | [`client`](#self-hosted-column) Desktop fetches connector icons, preview frames and a dictionary, starting before it has signed in to the host | - -> **deploymentOrganizationUuid details** +> One of: `anonymous`, `userGit`, `credentialHelper` > -> If unset, the app uses the organization of your Anthropic sign-in, where the connection has one. Otherwise, telemetry is tagged with a value the app derives from your connection settings. Where it cannot derive one, telemetry is tagged with a placeholder UUID shared with other unconfigured deployments. In the last two cases, local data is stored under the placeholder. **Changing this value orphans data** stored under the previous value (sessions, skills, plugins). - -> **disableEssentialTelemetry details** +> **git** > -> "Essential" means the signals Anthropic needs to keep your deployment working: **crash stacks**, **startup failure reasons**, **version/OS metadata**, and **crash dumps** (each an unfiltered copy of part of the app's memory). Reports carry a random install ID and an organization ID. The organization ID is the one you set, one the app takes from your Anthropic sign-in or derives from your connection settings, or a placeholder shared with other unconfigured deployments. Reports can also include a summary of your settings, the host names of addresses you configured, text you set for display (such as the display name, subtitle, and banner text and link), and a one-way digest of a session ID. +> Applies when `source` is `git`. The in-app configuration window calls it **Git URL**. > -> **What you lose when this is on:** when a Claude Desktop build hits a bug that only reproduces on your OS version or locale, Anthropic can't see it unless a user manually reports. Fixes ship slower. +> **source** `string` *required* > -> **Why this is discouraged, not blocked:** some air-gapped environments require zero outbound telemetry as a matter of policy. The switch exists for them. If you don't have that constraint, leave it off. - -> **disableNonessentialTelemetry details** +> Where the marketplace is fetched from: a GitHub repository (set repo), any Git remote (set url), or a hosted marketplace.json file (set url). > -> "Nonessential" covers two things: **product-usage analytics** (which features get used, navigation patterns; no prompts or completions) and the **Send** action in Help → Generate Diagnostic Report. Turning this on stops both. +> Must be: `git` > -> Destinations are listed under Egress Requirements → Nonessential telemetry. - -> **disableNonessentialServices details** +> **url** `string` *required* > -> "Nonessential services" covers these outbound fetches the app runs without: **connector favicons** (the icon proxy), the **artifact-preview** iframe origin, the **MCP Apps widget** iframe origin (`*.claudemcpcontent.com`), and the **spellcheck dictionary** the built-in spellchecker downloads on Linux. Turning this on blocks all of them. (macOS and Windows use the system spellchecker. Windows still downloads a dictionary for a language it cannot check natively; this key does not stop that download.) +> HTTPS Git remote of the marketplace repository (git), or direct HTTPS URL of a hosted marketplace.json file (url). > -> **What you lose when this is on:** connectors show without icons, the hosted artifact preview frame does not load (artifacts still render locally), connectors that return MCP Apps show the text tool result instead of the widget, Excel files in the Code tab preview only through Claude’s workspace (the local VM) instead of that frame, and spellcheck underlines are off on Linux. +> > **More detail** +> > +> > For `git` sources, the HTTPS remote the app clones. For `url` sources, the HTTPS address of a `marketplace.json` whose plugins are `archive` entries (a zip `url` plus its `sha256`; `ref` and `path` do not apply). Archive URLs must be same-origin with the manifest URL: that origin is the only host to open on the firewall and the only one a credential is sent to. If any archive fails to download or verify, nothing from that fetch is installed and the next sync retries. +> > +> > When Installation is `auto_install` or `required`, set `manifestSha256` to the SHA-256 of that exact file and give every archive a `sha256`: a served manifest with a different digest is refused and unpinned archives are skipped, so publishing a new manifest means updating `manifestSha256`; with no `manifestSha256` at all the entry is treated as `available` (and a config warning says so). A marketplace served from your inference gateway's or bootstrap server's own origin may instead leave Installation at `available` and mark individual plugins `"installationPreference": "auto_install"` in the manifest (each with a `sha256`); those install with no pin and a new manifest is picked up on the periodic re-fetch. On any other origin the per-plugin marks are ignored. +> > +> > `credentialKind` selects what is sent: `anonymous` (the default) nothing, `userGit` the user's stored git credential for that host as HTTP Basic, `credentialHelper` the helper's output as `Authorization` (or, for `url` sources, as the HTTP headers it prints as a JSON object), and `inferenceCredential` (`url` sources only) the credential the app already sends your inference gateway or enabled bootstrap server, so the manifest must be on one of those two origins; when there is nothing to send yet, no request is made and the entry reports why. See [Host the marketplace over HTTPS](https://claude.com/docs/third-party/claude-desktop/extensions.md#host-the-marketplace-over-https-instead-of-git) for an example manifest and credential details. > -> Destinations are listed under Egress Requirements → Nonessential services. - -### Auto update - -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Block auto-updates `disableAutoUpdates` | `boolean` | MDM + Bootstrap Added in 1.2581.0 | `false` | Stop Claude Desktop from fetching updates entirely (no time limit). You’ll need to push new versions yourself. Defaults to `false`. | [`client`](#self-hosted-column) Desktop starts its updater at launch, before it has signed in to the host | -| Restart to apply installed updates `installedUpdateEnforcementEnabled` | `boolean` | MDM + Bootstrap Added in 3.6556.1 | — | With auto-updates blocked, Claude restarts for a newer version installed while it was open, after 72 hours or your window. On Windows it may stay closed. | [`none`](#self-hosted-column) Governs Desktop's own restart for a version installed on the computer, and no session host passes it on to Desktop yet | -| Installed-update enforcement window `installedUpdateEnforcementHours` | `integer` | MDM + Bootstrap Added in 3.6556.1 | — | Hours Claude waits to restart for a newer version installed while it was open. Blank: 72 hours, then until the computer is idle. A number skips the idle wait. Range: 1–72. | [`none`](#self-hosted-column) Times Desktop's own restart for a version installed on the computer, and no session host passes it on to Desktop yet | -| Auto-update enforcement window `autoUpdaterEnforcementHours` | `integer` | MDM + Bootstrap Added in 1.2581.0 | — | Hours before a downloaded update force-installs. Only applies when auto-updates are enabled. Blank = 72-hour default. Range: 1–72. | [`reported`](#self-hosted-column) Desktop itself quits and installs a downloaded update of the app on the person's computer | -| Check for updates on releases.claude.com `updateViaUpdatesHost` | `boolean` | MDM + Bootstrap Added in 1.26832.0 | `false` | Read the update feed from releases.claude.com so api.anthropic.com can stay blocked. Defaults to `false`. | [`none`](#self-hosted-column) Where the session host answers the app's update checks, no Anthropic update server is left to choose | -| Release channel `releaseChannel` | `enum` | MDM + Bootstrap Added in 3.1623.0 | `stable` | On Stable, devices take each release as it rolls out. On Staggered, they update less often, usually to a version first out on Stable a week or more earlier. One of: `stable`, `staggered`. Defaults to `stable`. | [`client`](#self-hosted-column) On staggered, the person can update only once Desktop has downloaded a build; the session host ignores the channel | - -> **disableAutoUpdates details** +> **ref** `string` > -> In third-party deployments this also keeps Cowork's workspace image and tools from being fetched ahead of use; they are then fetched when a task first needs them. +> Commit SHA, branch, or tag. Leave empty to track the default branch; auto\_install and required need a full 40-character commit SHA. > -> When a newer version is installed on a device while Claude is open, the app shows "Relaunch to update" in the sidebar. The check makes no network request. On Windows this covers installs from the MSIX package, for one person or for the whole device, not the Microsoft Store version or the .exe installer. There it offers the newest version it finds on the device, which may be one installed for someone else. The click quits Claude, and Windows may then open the newer version. Where it does not (it did not on the Windows Server machines tested), people open Claude again and get the newer version. If Windows refuses the switch, Claude comes back on the version it had, and so does the notice. The switch may also end the Cowork tasks of others signed in on that computer. A separate setting has Claude restart by itself if nobody relaunches within a set number of hours. - -> **installedUpdateEnforcementEnabled details** +> **path** `string` > -> Set it where `disableAutoUpdates` is set. Both are app-behavior keys: a profile that sets any app-behavior key becomes the only source for all of them, so a profile that held this key alone would drop a `disableAutoUpdates` set elsewhere. +> Folder within the repository that contains the marketplace, when it isn’t at the root. > -> Applies only while `disableAutoUpdates` is on, where you distribute new versions yourself. When a newer version is installed on a device while Claude is open, the app shows "Relaunch to update" in the sidebar. With this setting on, if nobody relaunches within the window, the app restarts itself and comes back on the page it was showing. `installedUpdateEnforcementHours` sets the window and says what holds the restart off. +> **credentialKind** `enum` > -> On Windows this covers installs from the MSIX package. Claude closes, switches to the newest version on the device (it may be one installed for someone else), and Windows may then open it. Where it does not, Claude stays closed, and scheduled tasks and background work stop, until someone opens it; opened after five minutes, it starts on its default page. If Windows refuses the switch, Claude comes back on the version it had and does not try again until it is reopened. The switch may also end the Cowork tasks of others signed in on that computer. +> How fetches authenticate: anonymously, with the user’s git credentials, via a helper executable, or as the app does to its gateway or bootstrap server (url). > -> Where it is not set, the restart is off in third-party deployments, and in first-party deployments it follows Anthropic's own rollout; `false` keeps it off. An unreadable value counts as `false`. Turning it on starts a whole new window. It has no effect on updates that Claude downloads itself; `autoUpdaterEnforcementHours` times those. +> One of: `anonymous`, `userGit`, `credentialHelper` > -> A version from before this setting existed does not restart by itself and does not know the name: it ignores it in a macOS profile, and from other sources it may show people a configuration warning at every launch. A Windows machine policy that holds only such names, or a Linux managed-settings file that holds one and sets no connection, is rejected as unusable, and the app then also ignores the configuration saved on the device itself. - -> **installedUpdateEnforcementHours details** +> **url** > -> No effect unless `disableAutoUpdates` is on and the restart is on (`installedUpdateEnforcementEnabled`). The window starts when the open app first finds a newer version installed; on Linux, where it cannot read the version, any replacement of the app counts. Only time with the app open and the computer awake counts. +> Applies when `source` is `url`. The in-app configuration window calls it **Marketplace URL**. > -> Leaving it blank uses the 72-hour default *and* then waits for the machine to be idle (10+ minutes without input) before restarting; setting any explicit value (including 72) restarts once the window elapses regardless of user activity. In both cases the restart holds off while Claude is mid-task, unless the task runs on an SSH host and the app expects to pick it up again after the restart. Where the system reports no idle time, as some Wayland sessions do, a blank window never restarts: set a number. - -> **autoUpdaterEnforcementHours details** +> **source** `string` *required* > -> Has no effect when `disableAutoUpdates` is in place at launch: nothing is downloaded, so this timer never arms. If the policy reaches an already-running app after an update has begun to download, that one update still installs on this timer; no further updates are fetched. +> Where the marketplace is fetched from: a GitHub repository (set repo), any Git remote (set url), or a hosted marketplace.json file (set url). > -> Leaving it blank uses the 72-hour default *and* then waits for the machine to be idle (10+ minutes without input) before restarting; setting any explicit value (including 72) restarts once the window elapses regardless of user activity. In both cases the restart holds off while Claude is mid-task, unless the task runs on an SSH host and the app expects to pick it up again after the restart. - -> **updateViaUpdatesHost details** +> Must be: `url` > -> By default the app asks `api.anthropic.com` which version to install. That host also serves the model APIs, so organizations that block un-approved LLM endpoints at the network edge end up blocking updates too. +> **url** `string` *required* > -> Turn this on to read the same feed from `releases.claude.com`, a hostname that carries no model API. `api.anthropic.com` can then stay blocked without breaking auto-update. Rollout behavior is unchanged; the installer download still comes from `downloads.claude.ai` as before. +> HTTPS Git remote of the marketplace repository (git), or direct HTTPS URL of a hosted marketplace.json file (url). > -> If a device profile sets `bootstrapUrl` to a URL on `config.claude.com` and leaves `bootstrapEnabled` on, the app reads the feed from `releases.claude.com` whatever this key says. Older versions of the app do so only when this key is on, so turn it on as well. - -> **releaseChannel details** +> > **More detail** +> > +> > For `git` sources, the HTTPS remote the app clones. For `url` sources, the HTTPS address of a `marketplace.json` whose plugins are `archive` entries (a zip `url` plus its `sha256`; `ref` and `path` do not apply). Archive URLs must be same-origin with the manifest URL: that origin is the only host to open on the firewall and the only one a credential is sent to. If any archive fails to download or verify, nothing from that fetch is installed and the next sync retries. +> > +> > When Installation is `auto_install` or `required`, set `manifestSha256` to the SHA-256 of that exact file and give every archive a `sha256`: a served manifest with a different digest is refused and unpinned archives are skipped, so publishing a new manifest means updating `manifestSha256`; with no `manifestSha256` at all the entry is treated as `available` (and a config warning says so). A marketplace served from your inference gateway's or bootstrap server's own origin may instead leave Installation at `available` and mark individual plugins `"installationPreference": "auto_install"` in the manifest (each with a `sha256`); those install with no pin and a new manifest is picked up on the periodic re-fetch. On any other origin the per-plugin marks are ignored. +> > +> > `credentialKind` selects what is sent: `anonymous` (the default) nothing, `userGit` the user's stored git credential for that host as HTTP Basic, `credentialHelper` the helper's output as `Authorization` (or, for `url` sources, as the HTTP headers it prints as a JSON object), and `inferenceCredential` (`url` sources only) the credential the app already sends your inference gateway or enabled bootstrap server, so the manifest must be on one of those two origins; when there is nothing to send yet, no request is made and the entry reports why. See [Host the marketplace over HTTPS](https://claude.com/docs/third-party/claude-desktop/extensions.md#host-the-marketplace-over-https-instead-of-git) for an example manifest and credential details. > -> Default: `stable`, which takes each release as it rolls out. +> **manifestSha256** `string` > -> Alternative: `staggered`, which usually updates on Thursdays to a release that has been live in production on `stable` with no known breaking issues. Typically the `staggered` release will be 7-14 days behind `stable`; urgent fixes may be released sooner. +> SHA-256 of the exact marketplace.json to accept. Without it auto\_install and required act as available; a served manifest with any other digest is refused. > -> Devices download their new version at the next update check and install it on restart. Devices on `staggered` receive features and fixes, security fixes included, later than devices on `stable`. A device that's currently ahead of `staggered` will stay ahead until `staggered` catches up to its version. +> **credentialKind** `enum` > -> Switching to `stable` or removing the setting updates devices to the newest release. +> How fetches authenticate: anonymously, with the user’s git credentials, via a helper executable, or as the app does to its gateway or bootstrap server (url). > -> * An unreadable value, such as a misspelling or capital letter, is read as `staggered`. -> * The setting applies only in third-party mode. A user who signs in to Claude.ai follows `stable`, unless their organization manages Claude Desktop from the admin console. -> * On a device managed from the admin console, this setting applies only while a user is signed in. With no one signed in, the device follows `stable`. -> * The setting has no effect on Linux or Microsoft Store installs. -> * See [the installation page](https://claude.com/docs/third-party/claude-desktop/installation.md) for more details on where to set the key. +> One of: `anonymous`, `userGit`, `credentialHelper`, `inferenceCredential` -### Configuration updates - -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Configuration relaunch window `relaunchEnforcementHours` | `integer` | MDM + Bootstrap Added in 1.40609.0 | `24` | Hours a user may keep working on the old configuration after a managed-configuration change is detected. 0 = restart required at once. Blank = 24 hours. Defaults to `24`. Range: 0–336. | [`reported`](#self-hosted-column) Desktop itself restarts on the person's computer after a change to the settings it reads from the device | -| Configuration re-check interval `configRecheckIntervalMinutes` | `integer` | MDM + Bootstrap Added in 1.46388.1 | `10` | Minutes between the running app’s checks for a changed managed configuration. Blank = 10 minutes. Defaults to `10`. Range: 2–30. | [`server`](#self-hosted-column) The host refreshes its own copy of the policy at least this often, and tells Desktop how often to ask it again | -| Keep only your organization ID and restrictions on disk `disableLocalConfigCache` | `boolean` | hybrid-only Added in 2.7032.0 | `false` | Don’t keep your organization’s name or any permissive setting on disk between launches; only your organization ID and restrictions are kept. Defaults to `false`. | — | +*** -> **relaunchEnforcementHours details** -> -> Set it via MDM (plist, registry, or file) or serve it from your configuration endpoint (remote bootstrap configuration). When the running app observes a managed-configuration change it cannot apply without restarting, it shows the sidebar relaunch card and starts this window. The window starts at the running app’s next configuration re-check (the re-check interval beside it), so allow up to one re-check interval on top of this value between saving a change and the restart dialog. When the window ends the app blocks with a restart dialog and restarts on its own after 2 minutes with no activity (no running Claude task and no keyboard or pointer input); the user can also restart right away. Defaults to 24 hours. Set a larger value (up to 336 = 14 days) to give users longer; `0` shows the dialog at the first observation. One case gets no window, whatever this value: when a device-management profile that sets more than app-behavior keys first applies to an app that started without one, and the app will run on that profile after restarting, the dialog shows at the re-check that confirms it, because until the restart the app stays connected the way it started. -> -> A served value is read from the newest served configuration, so tightening or loosening the window takes effect without a restart once two re-checks in a row have served it, and a change to this key alone never asks for one. Like the update keys beside it, a value from a device-management profile that sets only app-behavior keys applies without making the rest of the configuration device-managed, and takes precedence over a served one. Because the key is grouped with the other app-behavior keys, a profile that sets any of them claims the whole group: set this key in the same profile as the update keys you deploy, or a served value is ignored on those devices and the 24-hour default applies. +### `orgPluginSettings` -> **configRecheckIntervalMinutes details** -> -> How often the running app re-checks its managed configuration for changes: it re-polls your configuration endpoint with a conditional request, so an unchanged configuration costs one `304` round-trip. A detected change shows the sidebar relaunch card and starts the `relaunchEnforcementHours` window, so a saved change reaches a running app within roughly one interval. Defaults to 10 minutes; each wait is jittered by ±10% so a fleet does not poll in lockstep. Values outside 2–30 are rejected with a parse error and the default applies. -> -> Applied without a restart: a new served value re-arms the timer once two checks in a row have served it, and a change to this key alone never asks for a relaunch. Set it via MDM or serve it from your configuration endpoint; like the update keys beside it, a value from a device-management profile that sets only app-behavior keys applies without making the rest of the configuration device-managed, and takes precedence over a served one. Because the key is grouped with the other app-behavior keys, a profile that sets any of them claims the whole group, and every key in it is then read from that profile alone: deploy this key in the same profile as the update keys (`disableAutoUpdates`, `autoUpdaterEnforcementHours`, …). A profile that sets the update keys without it ignores a served interval and the default applies; a profile that sets only this key ignores served update settings, so a served `disableAutoUpdates` no longer holds on those devices. A profile that also manages the connection itself (sets `bootstrapUrl` or the provider keys) follows the normal tier order instead: once a served configuration is in hand it, not the profile, supplies this key. +object\[]Since 1.8089.0 -> **disableLocalConfigCache details** -> -> By default the app keeps on disk, from the last configuration the admin console served, your organization’s ID and name and the few settings a launch applies before the console answers (the telemetry switches, the Microsoft 365 sign-in broker setting, the default Quick Entry shortcut, and restrictions). When this is on, it keeps only your organization ID and those restrictions (for example telemetry blocked, or local MCP servers off), never the name or anything you have allowed, and cuts an earlier copy down at the next launch that reaches the console, or at once when a running app confirms the change; signing out deletes the kept copy too. While on: the app’s crash reporting does not start on these devices, and the sign-in screen cannot show your organization’s name before the console answers. Error stack traces and performance timings still leave these devices unless **Block essential telemetry** is on. -> -> A running app picks up a change to this setting once two configuration checks in a row have served it; changing it alone never asks for a relaunch. It applies only to organizations managed from the Claude admin console; the setting is ignored when a customer configuration server or a device profile sends it. +**Organization plugin settings.** Admin policy applied to plugin-delivered MCP servers. -### OTLP +[Self-hosted install](#self-hosted-column): Server side. The host applies the admin's per-tool locks, and no plugin's MCP server is started on the computer. -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| OTLP endpoint `otlpEndpoint` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Where OpenTelemetry logs and metrics are sent. Leave blank to disable. | [`none`](#self-hosted-column) Whoever runs the host names the collector in the host's own configuration, for its sessions and Desktop's events | -| OTLP protocol `otlpProtocol` | `enum` | MDM + Bootstrap Added in 1.2581.0 | `http/protobuf` | Transport protocol for the OpenTelemetry exporters. One of: `http/protobuf`, `http/json`, `grpc`. Defaults to `http/protobuf`. | [`none`](#self-hosted-column) Set beside the collector's address in the host's own configuration | -| OTLP headers `otlpHeaders` | `object` | MDM + Bootstrap Added in 1.2581.0 | — | Static collector headers — routing and tenant headers only. No credentials here; use Collector authentication or the headers helper script for tokens. | [`none`](#self-hosted-column) The host keeps the collector's headers in its own configuration, so no document that a device fetches holds them | -| Collector authentication `otlpAuthMode` | `enum` | MDM + Bootstrap Added in 1.30096.1 | — | inference-credential sends the user’s inference bearer token to the collector as Authorization: Bearer. One of: `none`, `inference-credential`. | [`none`](#self-hosted-column) Would send the person's model token to the collector; a self-hosted Desktop holds none, and no host reads this | -| OTLP headers helper script `otlpHeadersHelper` | `string` | MDM + Bootstrap Added in 1.30096.1 | — | Absolute path to an executable that prints a JSON object of collector headers. Merged over the static headers and Collector authentication; the helper wins. | [`none`](#self-hosted-column) Desktop sends its own events to the host, which holds the collector's headers, so it runs no helper | -| Resource attributes `otlpResourceAttributes` | `object` | MDM + Bootstrap Added in 1.5354.0 | — | Extra resource attributes to attach to every span/metric. A static enduser.id set here always wins over the runtime identity. | [`server`](#self-hosted-column) The host stamps these attributes on the session telemetry it sends and on Desktop's events that it forwards | -| Desktop telemetry export level `otlpDesktopLogLevel` | `enum` | MDM + Bootstrap Added in 1.9255.0 | `error` | Controls the Claude Desktop application’s events, separate from Cowork and Code sessions. Defaults to error. One of: `off`, `error`, `warn`, `info`, `debug`. Defaults to `error`. | [`server`](#self-hosted-column) The host tells Desktop at which level to send its own events, and filters them again before it forwards them | -| Content capture `otlpContentCapture` | `enum[]` | MDM + Bootstrap Added in 1.15962.0 | — | Content categories Claude Desktop sends unredacted to your collector. `userPrompts` also sends Claude’s responses. If empty, no category is enabled (default). One of: `userPrompts`, `assistantResponses`, `toolDetails`, `toolContent`, `rawApiBodies`. | [`server`](#self-hosted-column) The host decides how much of a session's content its telemetry carries | -| Export traces `otlpTracesEnabled` | `boolean` | MDM + Bootstrap Added in 1.22209.0 | — | Also export OpenTelemetry traces from Cowork tasks and Code sessions. Uses Claude Code’s session tracing. | [`server`](#self-hosted-column) The host turns traces on or off in the session telemetry it sends | -| Telemetry attribute length limit `otlpAttrMaxChars` | `integer` | MDM + Bootstrap Added in 2.31226.0 | — | Maximum length, in characters, of captured content such as a raw API body (256–15,000,000). Cowork tasks and Code sessions use 61,440 when unset. Range: 256–15000000. | [`server`](#self-hosted-column) The host cuts long values in the session telemetry it sends | - -> **otlpProtocol details** +> **More detail** > -> Code sessions export over the protocol set here. Chats and Cowork tasks export over `http/protobuf` instead of `grpc` on Windows, and on other platforms whenever the Claude Code engine is given an HTTP proxy (the operating system's proxy, `egressProxyUrl` or `egressProxyPacUrl`, or `HTTPS_PROXY` / `HTTP_PROXY` in a Claude Code settings file); the application log notes the substitution. The desktop application's own events always go over `http/json` to `/v1/logs`. None of this changes the endpoint, so choose `grpc` only for a collector that also serves OTLP/HTTP at the same address; otherwise keep `http/protobuf` and point `otlpEndpoint` at the collector's OTLP/HTTP receiver (conventionally port 4318). - -> **otlpAuthMode details** +> Locks per-tool permissions on MCP servers provided by any installed plugin — from the org-plugins directory or a plugin marketplace, remote or run locally — one entry per server name (compared case-insensitively): > -> `inference-credential` adds `Authorization: Bearer ` to every export, using the token the app currently holds for the inference provider, with no helper script to deploy. The collector must accept that token as issued: an identity-provider sign-in (`external-idp`, gateway or Bedrock proxy) forwards the identity provider’s token, which carries the audience you registered, Microsoft Entra on Foundry issues the Foundry resource’s token, and Vertex workforce identity forwards a Google Cloud access token; static gateway and Bedrock keys are forwarded as-is. Because the token can also call inference as the user, use this only for a collector you operate; for anything else, use the headers helper script with an ingest-scoped credential. Kinds that never produce a bearer (AWS SigV4 kinds on Bedrock, Google ADC / OAuth files on Vertex, API-key kinds) export without it, and so does Sign in with Claude Console, whose token is the user’s own and is never sent to a collector. Use the helper script instead. Cowork tasks pick up the current token each time they start; a Code session keeps the token it started with for as long as it stays open; the desktop’s own event exporter uses the current token on every flush. Before sign-in, exports go out unauthenticated. An `Authorization` header printed by the headers helper script wins over this. - -> **otlpHeadersHelper details** +> ```json theme={null} +> [{"serverName": "internal-search", "tools": [{"toolName": "delete_document", "permission": "blocked"}]}] +> ``` > -> Absolute path to an executable that prints a single JSON object of HTTP headers on stdout, e.g. `{"Authorization": "Bearer …"}`. The desktop runs it (no arguments; output cached for a few minutes, and a failure is not retried for 30 seconds) whenever it needs collector headers and merges the result over **OTLP headers** and the **Collector authentication** header (the helper wins on conflict). Cowork tasks get the current output when they start; Code and Cowork sessions are also given the script as Claude Code’s own `otelHeadersHelper`, so an open session re-runs it as tokens rotate (on Windows this applies to `.exe`, `.cmd` and `.bat` helpers; a `.ps1` helper applies at session start only); the desktop’s own event exporter re-runs it per flush. Session start waits at most two seconds for a slow helper and otherwise proceeds without its headers until it finishes. Use this when the collector needs a credential the inference sign-in cannot provide, when the collector token rotates, or when the config comes from a hosted admin console, which cannot store header values. If the helper fails, telemetry is sent without its headers — check the app log. - -> **otlpResourceAttributes details** +> The older record form (`{"mcpServers": {"internal-search": {"toolPolicy": {"delete_document": "blocked"}}}}`) is no longer accepted. Desktop versions before 1.15200.0 parse only the record form: on those builds an array value is ignored and plugin tool locks are **not enforced**, so update the fleet past 1.15200.0 before deploying the array form. > -> Extra resource attributes to attach to every span, metric, and log sent to your collector. When End-user attribution is on and no `enduser.id` is set here, the desktop fills it with the signed-in user's runtime identity; a value you set here always wins. `process.owner` (the OS login name) is always emitted; set it here to override. +> If a Managed MCP servers entry is for the same server (same URL, else same name), that entry decides alone: its `toolPolicy` (if any) applies and the entry here is ignored. A value that cannot be read blocks every tool of every plugin-provided MCP server no Managed MCP servers entry covers. +> +> For a plugin server that Claude Code launches or connects to itself (a marketplace plugin's), the permissions travel on Claude Code's managed-settings channel: another Claude Code [managed-settings source](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) on the device replaces them unless that source sets `parentSettingsBehavior` to `"merge"`. `blocked` on a server the app connects to itself holds either way. -> **otlpContentCapture details** +> **Child attributes (2)** > -> Each category enables a class of raw content in OpenTelemetry events sent to your collector (this data never reaches Anthropic): +> **serverName** `string` *required* > -> * `userPrompts` — user-typed prompt text -> * `assistantResponses` — assistant message text -> * `toolDetails` — tool input arguments, e.g. the web-search query string -> * `toolContent` — tool output content, e.g. fetched page text or command stdout -> * `rawApiBodies` — inference API request and response bodies, each cut at 61,440 characters by default +> Name of the plugin-delivered MCP server this policy applies to. > -> These mirror Claude Code's `OTEL_LOG_*` env vars; see the [Claude Code monitoring docs](https://code.claude.com/docs/en/monitoring-usage). +> **tools** `object[]` > -> In Claude Desktop, Claude's responses are included when user prompts are captured, even if `assistantResponses` is not listed. To exclude them, set `OTEL_LOG_ASSISTANT_RESPONSES` to `0` in the `env` block of Claude Code's managed settings, not in Claude Desktop's managed configuration. That `0` also wins when `assistantResponses` is listed, but `rawApiBodies` still includes responses. Claude Desktop ignores a `0` set in Claude Code's per-user Windows registry policy (`HKCU`). If a device has several managed sources, set the `0` in the highest-priority one with a policy. Excluding responses this way requires Claude Desktop 2.37337.1 or later. +> Per-tool approval locks for this server. > -> Claude Code managed settings set no policy if they are missing, empty, or hold only `wslInheritsWindowsSettings`, `managedSourcesBehavior`, or empty objects such as `"permissions": {}`. Adding `OTEL_LOG_ASSISTANT_RESPONSES` to such settings makes them a policy, so also set `parentSettingsBehavior` to `"merge"` there. Without `"merge"`, Claude Code can drop the restrictions that Claude Desktop passes to it. If the settings already set a policy, add only `OTEL_LOG_ASSISTANT_RESPONSES` to their `env` block, and read [Interaction with Claude Code's own managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) before you change `parentSettingsBehavior`. +> > **Child attributes (2)** +> > +> > **tools.toolName** `string` *required* +> > +> > MCP tool name as the server reports it. +> > +> > **tools.permission** `enum` *required* +> > +> > Approval state locked for this tool. Unlisted tools stay user-controlled. +> > +> > One of: `allow`, `ask`, `blocked` -> **otlpTracesEnabled details** -> -> Enables Claude Code's session tracing (`CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1` + `OTEL_TRACES_EXPORTER=otlp`) in spawned Cowork tasks and Code sessions. Each user interaction exports a trace whose spans and events carry `trace_id`/`span_id`, enabling end-to-end correlation in your observability backend (metrics do not carry trace context; correlate those via `session.id`). Traces go to the collector endpoint and protocol configured above. When `otlpEndpoint` is set, this key alone decides whether those sessions export traces: leaving it unset or `false` keeps traces off even if Claude Code's own settings or managed settings (for example a `managed-settings.json` on the device) turn tracing on. Without `otlpEndpoint` it has no effect. The span structure may evolve between Claude Code releases; see the [Claude Code monitoring docs](https://code.claude.com/docs/en/monitoring-usage). +*** -> **otlpAttrMaxChars details** -> -> Captured content longer than this is cut at the end and marked as truncated. -> -> * Cowork tasks and Code sessions: 61,440 when unset. Applies to model responses, tool content and raw API bodies. User prompts are not cut, and `tool_input` keeps its own smaller limits. A cut request body keeps the oldest messages and loses the newest, so to capture whole bodies with `rawApiBodies`, set this just above your longest body, not at the maximum. Lower it to reduce volume. While this key and `otlpEndpoint` are set, Claude Code's own settings and managed settings (for example a `managed-settings.json` on the device) cannot change the limit or the export interval. -> * Claude add-in for Microsoft 365: 4,000 when unset. Values above 32,000 count as 32,000. -> * The desktop application's own events are not affected. -> -> A collector refuses an export over its size limit, and every event in that export is lost. By default an OpenTelemetry Collector accepts 20 MiB per OTLP/HTTP request (`max_request_body_size`) and 4 MiB per gRPC message (`max_recv_msg_size_mib`). Keep that limit at a few times the size of your longest body: one export can carry several, and a character takes one byte in Latin text and up to three otherwise. With this key set, Code sessions export events as they happen, not every five seconds, as Cowork tasks already do, so the collector sees more, smaller requests. +## Source -## Limits +### Bootstrap -### Session retention +#### `bootstrapEnabled` -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Chat retention period `chatSessionRetentionDays` | `integer` | MDM + Bootstrap Added in 1.52386.0 | — | Delete chats, with their files, after this many days without activity. Unset: kept until the user deletes them. Projects and memory stay. Range: 1–3650. | [`none`](#self-hosted-column) Chat runs only on the person's computer, so a session host holds no chats to delete | -| Cowork retention period `coworkSessionRetentionDays` | `integer` | MDM + Bootstrap Added in 1.52386.0 | — | Delete Cowork tasks, with their uploads and outputs, after this many days without activity. Unset: kept until the user deletes them. Spaces and memory stay. Range: 1–3650. | [`server`](#self-hosted-column) The host keeps the Cowork sessions it runs, so it deletes those left idle longer than the admin allows | -| Code retention period `codeSessionRetentionDays` | `integer` | MDM + Bootstrap Added in 1.52386.0 | — | Delete Code sessions, conversation included, after this many days without activity. Unset: kept until the user deletes them. Uncommitted work stays on disk. Range: 1–3650. | [`server`](#self-hosted-column) The host keeps the Code sessions it runs, so it deletes those left idle longer than the admin allows | -| Suspend session deletion `sessionRetentionHold` | `boolean` | MDM + Bootstrap Added in 1.52386.0 | — | Suspend all automatic session deletion for these users (legal hold). While on, the retention periods above delete nothing. | [`server`](#self-hosted-column) The host keeps the sessions, so it is the one that stops deleting them during a hold | +booleanDefault: true -> **chatSessionRetentionDays details** -> -> The app deletes whole sessions in the background shortly after it fetches this configuration (at launch and on each re-poll), or some minutes after launch and then daily when the configuration comes from device management alone. Idle time runs from the session's last activity; viewing an old Code session counts as activity, viewing an old chat or Cowork task without continuing it does not durably. A session that is running or open on screen is skipped and checked again on the next pass, as is a chat or Cowork task whose folder changed on disk within the period. Pinned sessions are not exempt. Minimum 1 day; a value that cannot be read as a whole number of days deletes nothing. Set through the served configuration or in the device-management profile that carries the rest of the configuration. What it does not reach: another account's sessions on the device (evaluated when that account signs in), Code sessions on a remote machine (SSH/WSL), Cowork background (dispatch) tasks the sidebar does not list, a chat or Cowork task whose folder cannot be located, and Claude Code files not named by a session id (prompt history, plans, shell snapshots), which keep Claude Code's own retention. Honored only by Claude Desktop configured for a third-party model provider. +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) -> **coworkSessionRetentionDays details** -> -> The app deletes whole sessions in the background shortly after it fetches this configuration (at launch and on each re-poll), or some minutes after launch and then daily when the configuration comes from device management alone. Idle time runs from the session's last activity; viewing an old Code session counts as activity, viewing an old chat or Cowork task without continuing it does not durably. A session that is running or open on screen is skipped and checked again on the next pass, as is a chat or Cowork task whose folder changed on disk within the period. Pinned sessions are not exempt. Minimum 1 day; a value that cannot be read as a whole number of days deletes nothing. Set through the served configuration or in the device-management profile that carries the rest of the configuration. What it does not reach: another account's sessions on the device (evaluated when that account signs in), Code sessions on a remote machine (SSH/WSL), Cowork background (dispatch) tasks the sidebar does not list, a chat or Cowork task whose folder cannot be located, and Claude Code files not named by a session id (prompt history, plans, shell snapshots), which keep Claude Code's own retention. Honored only by Claude Desktop configured for a third-party model provider. +Since 1.10628.0 -> **codeSessionRetentionDays details** -> -> The app deletes whole sessions in the background shortly after it fetches this configuration (at launch and on each re-poll), or some minutes after launch and then daily when the configuration comes from device management alone. Idle time runs from the session's last activity; viewing an old Code session counts as activity, viewing an old chat or Cowork task without continuing it does not durably. A session that is running or open on screen is skipped and checked again on the next pass, as is a chat or Cowork task whose folder changed on disk within the period. Pinned sessions are not exempt. Minimum 1 day; a value that cannot be read as a whole number of days deletes nothing. Set through the served configuration or in the device-management profile that carries the rest of the configuration. What it does not reach: another account's sessions on the device (evaluated when that account signs in), Code sessions on a remote machine (SSH/WSL), Cowork background (dispatch) tasks the sidebar does not list, a chat or Cowork task whose folder cannot be located, and Claude Code files not named by a session id (prompt history, plans, shell snapshots), which keep Claude Code's own retention. Honored only by Claude Desktop configured for a third-party model provider. +**Use bootstrap config.** Fetch and apply the URL above at launch. Turn off to keep the URL saved but skip the fetch. -> **sessionRetentionHold details** -> -> Meant to be set per user or group, through the served configuration's group overrides or in the same device-management profile that carries the rest of the configuration (a profile carrying only this key makes the device profile-managed, like any policy key); a hold in the device's profile also counts when the served configuration does not restate it. Deletion stops at the first configuration fetch that carries this value, before it takes effect as configuration at the next relaunch; a device that cannot reach its configuration server deletes nothing. +[Self-hosted install](#self-hosted-column): MDM profile. Controls whether the desktop app fetches its configuration, so it cannot travel inside that document. -### Token limits +[Admin Console](#the-works-with-column): Not available. -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Max tokens per window `inferenceMaxTokensPerWindow` | `integer` | MDM + Bootstrap Added in 1.2581.0 | — | Limits each person’s input and output tokens per window. Cached tokens do not count, so this does not cap your provider’s bill. Leave blank for no limit. | [`server`](#self-hosted-column) The host makes the model calls, so it counts each person's tokens and stops them at the cap | -| Token cap window `inferenceTokenWindowHours` | `integer` | MDM + Bootstrap Added in 1.2581.0 | — | The count resets to zero at the end of each window. A window can last 1 to 720 hours (30 days). Range: 1–720. | [`server`](#self-hosted-column) Sets the length of the window for the token cap, which the host counts | +*** -> **inferenceMaxTokensPerWindow details** -> -> Requires `inferenceTokenWindowHours` to also be set — without a window length the cap is inert and no limit is enforced. -> -> Where the app runs the sessions, it keeps each person’s count in a local file, so someone who uses two devices has a separate count on each. +#### `bootstrapUrl` -> **inferenceTokenWindowHours details** -> -> Required when `inferenceMaxTokensPerWindow` is set — the cap only takes effect once both are configured. -> -> Each person’s window starts the first time they use the app after their previous window ends, so 24 hours does not mean midnight to midnight. +string -## Appearance +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| End-user attribution `endUserAttribution` | `boolean` | MDM + Bootstrap Added in 1.25927.0 | — | Show the signed-in user’s identity-provider identity in the sidebar and account menu, and emit it as the OpenTelemetry enduser.id resource attribute. | [`server`](#self-hosted-column) The host puts the person's identity on the telemetry it sends, and tells Desktop whether to show the person's name | -| Deployment display name `deploymentDisplayName` | `string` | MDM + Bootstrap Added in 1.24012.0 | — | Overrides the provider label shown in the sidebar footer, user-menu header, and connection-error banner. | [`reported`](#self-hosted-column) Desktop shows this name in place of the provider's name in its own window | -| Deployment display subtitle `deploymentDisplaySubtitle` | `string` | MDM + Bootstrap Added in 1.24012.0 | — | Optional detail shown after the deployment display name in the account-menu header. | [`reported`](#self-hosted-column) Desktop shows this detail after the deployment's name in its account menu | -| Hide configuration deprecation warnings `disableConfigDeprecationWarnings` | `boolean` | MDM + Bootstrap Added in 1.40609.0 | — | Don’t show users the in-app warning that this configuration uses a deprecated field. The final reminder in the 24 hours before the cut-off still appears. | [`reported`](#self-hosted-column) Desktop shows its warning about deprecated settings in its own window, for configuration that Desktop reads itself | -| Organization banner `banner` | `object` | MDM + Bootstrap Added in 1.7196.0 | — | A persistent banner across the top of the app window after sign-in. | [`reported`](#self-hosted-column) Desktop draws the admin's banner across the top of its own window | +Since 1.10628.0 -> **endUserAttribution details** -> -> When on (default), the app resolves the signed-in user's identity from the configured credential source (the identity provider claim, or the OS login name when no claim is available) and shows it in the sidebar footer, the account menu, and the Code session greeting. If an OpenTelemetry collector is configured, the same identity is also emitted as the `enduser.id` resource attribute on every span, metric, and log sent to your collector — unless you have set a static `enduser.id` under **Resource attributes**, in which case your static value is kept and the runtime identity is not emitted. When off, no identity is shown in the app and no runtime `enduser.id` is emitted; a static `enduser.id` under **Resource attributes** still passes through unchanged. This setting does not gate the `process.owner` resource attribute (the OS login name), which is standard OpenTelemetry process metadata and is always emitted — set a static `process.owner` under **Resource attributes** to override it. Applies to both Cowork tasks and Code sessions. +**Bootstrap config URL.** HTTPS endpoint that returns a per-user JSON config overlay. Values from the response override local settings and become read-only. -> **deploymentDisplayName details** -> -> Set this to the name users should see for this deployment (for example, "Claude for Government"). When unset, the desktop shows the default provider label. Maximum 60 characters. +[Self-hosted install](#self-hosted-column): MDM profile. Tells the desktop app where to fetch its configuration, so it cannot travel inside that document. -> **deploymentDisplaySubtitle details** -> -> Optional detail shown after the deployment display name in the account-menu header (for example, "Claude for Veterans Affairs · Claude for Government"). Shown only when the display name is also set. Maximum 60 characters. +[Admin Console](#the-works-with-column): Not available. -> **disableConfigDeprecationWarnings details** -> -> When the organization's configuration uses a field that is deprecated — a renamed key, or a legacy value or entry form — the app shows every user a dismissable warning naming the field, what to use instead, and the date support ends (each field's cut-off is listed in the configuration changelog and takes effect at 12:00 PM Pacific Time on that date). The warning shows from the field's announced warning date until dismissed, and once more in the 24 hours before the cut-off. Set this to `true` to suppress the first showing for your users while you migrate; the final 24-hour reminder is always shown, and the deprecation stays listed in the diagnostic report (Help → Troubleshooting) and the hosted configuration editor regardless. +*** -> **banner details** -> -> Use this for compliance notices, an internal-support link, or to identify the deployment. The banner is shown on every page after sign-in and cannot be dismissed by the user. Colors are six-digit hex (`#RRGGBB`); when `linkUrl` is set the banner text becomes an HTTPS link. -> -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `enabled` | `boolean` | — | Turns the banner on. When false or unset, the other banner fields are ignored. | -> | `text` | `string` | — | Single line, truncated on overflow. Maximum 200 characters. | -> | `backgroundColor` | `string` | `#F5F5F5` | Six-digit hex (#RRGGBB). Applied exactly as configured; not theme-adapted. | -> | `textColor` | `string` | `#000000` | Six-digit hex (#RRGGBB). Applied exactly as configured; not theme-adapted. | -> | `linkUrl` | `string` | — | Optional HTTPS URL. The banner text becomes a link when set. | +#### `bootstrapOidc` -### Feature discovery +object -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Hide feature announcements `disableFeatureDiscovery` | `boolean` | MDM + Bootstrap Added in 1.21459.0 | `false` | Suppress unprompted feature-announcement UI: the post-update “What’s new” nudge and new-feature tips. Users can still open release notes themselves. Defaults to `false`. | [`reported`](#self-hosted-column) Desktop hides its own announcements of new features | +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) -> **disableFeatureDiscovery details** -> -> Covers the version-shipped announcement UI baked into each release: the **What's new** button that appears on its own after an update, and the one-time **New feature** tips (coach-marks) that point out newly shipped capabilities. Useful when your organization gates feature availability and doesn't want the app advertising capabilities you haven't rolled out. -> -> User-initiated surfaces stay: the What's-new menu item and header button still open the release notes on demand. Auto-update behavior is unaffected — that is governed by `disableAutoUpdates` and `autoUpdaterEnforcementHours`. +Since 1.10628.0 -## Plugins +**Bootstrap OIDC parameters.** When set, the bootstrap request sends a Bearer token from a browser sign-in (authorization-code-with-PKCE). -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Plugin marketplaces `allowedPluginMarketplaces` | `object[]` | MDM + Bootstrap Added in 1.17377.1 | — | Git repositories or hosted marketplace.json URLs to surface as plugin marketplaces in the Directory’s Organization tab. The app re-fetches each periodically. | [`server`](#self-hosted-column) The host fetches the admin's plugin marketplaces and loads their plugins into the sessions it runs | -| Organization plugin settings `orgPluginSettings` | `object[]` | MDM + Bootstrap Added in 1.8089.0 | — | Admin policy applied to plugin-delivered MCP servers. | [`server`](#self-hosted-column) The host applies the admin's per-tool locks, and no plugin's MCP server is started on the computer | +[Guide for this setting](/docs/third-party/claude-desktop/bootstrap.md) -> **allowedPluginMarketplaces details** +[Self-hosted install](#self-hosted-column): MDM profile. Names the sign-in the desktop app uses to fetch its configuration, so it cannot travel inside it. + +[Admin Console](#the-works-with-column): Not available. + +> **More detail** +> +> Set this to use a separate identity provider (Microsoft Entra ID, Okta, Ping, or any compliant OIDC provider) for the bootstrap sign-in. The app runs an authorization-code-with-PKCE flow in the system browser. Omit to use device-code mode against the bootstrap server's own origin. > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `source` | `string` | — | Where the marketplace is fetched from: a GitHub repository (set repo), any Git remote (set url), or a hosted marketplace.json file (set url). One of: `github`, `git`, `url`. | -> | `repo` | `string` | — | GitHub repository in owner/repo form. Case-insensitive. | -> | `ref` | `string` | — | Commit SHA, branch, or tag. Leave empty to track the default branch; auto\_install and required need a full 40-character commit SHA. | -> | `path` | `string` | — | Folder within the repository that contains the marketplace, when it isn’t at the root. | -> | `expectedName` | `string` | — | Rejects the marketplace if its manifest name differs. | -> | `installationPreference` | `enum` | — | Whether users install plugins themselves or get them automatically. One of: `available`, `auto_install`, `required`. | -> | `credentialKind` | `enum` | — | How fetches authenticate: anonymously, with the user’s git credentials, via a helper executable, or as the app does to its gateway or bootstrap server (url). One of: `anonymous`, `userGit`, `credentialHelper`, `inferenceCredential`. | -> | `credentialHelper` | `string` | — | Executable that prints an access token for this marketplace. | -> | `url` | `string` | — | HTTPS Git remote of the marketplace repository (git), or direct HTTPS URL of a hosted marketplace.json file (url). | -> | `manifestSha256` | `string` | — | SHA-256 of the exact marketplace.json to accept. Without it auto\_install and required act as available; a served manifest with any other digest is refused. | +> This is an **object-typed key** — in an MDM profile it is a single JSON-string value, not separate keys with dotted names like `bootstrapOidc.clientId`. Writing the sub-fields as separate registry values causes the app to silently fall through to device-code mode. -> **orgPluginSettings details** +> **Child attributes (8)** > -> Locks per-tool permissions on MCP servers provided by any installed plugin — from the org-plugins directory or a plugin marketplace, remote or run locally — one entry per server name (compared case-insensitively): +> **clientId** `string` *required* > -> ```json theme={null} -> [{"serverName": "internal-search", "tools": [{"toolName": "delete_document", "permission": "blocked"}]}] -> ``` +> OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). > -> The older record form (`{"mcpServers": {"internal-search": {"toolPolicy": {"delete_document": "blocked"}}}}`) is no longer accepted. Desktop versions before 1.15200.0 parse only the record form: on those builds an array value is ignored and plugin tool locks are **not enforced**, so update the fleet past 1.15200.0 before deploying the array form. +> **issuer** `string` > -> If a Managed MCP servers entry is for the same server (same URL, else same name), that entry decides alone: its `toolPolicy` (if any) applies and the entry here is ignored. A value that cannot be read blocks every tool of every plugin-provided MCP server no Managed MCP servers entry covers. +> HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. > -> For a plugin server that Claude Code launches or connects to itself (a marketplace plugin's), the permissions travel on Claude Code's managed-settings channel: another Claude Code [managed-settings source](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) on the device replaces them unless that source sets `parentSettingsBehavior` to `"merge"`. `blocked` on a server the app connects to itself holds either way. +> **authorizationUrl** `string` +> +> HTTPS authorization endpoint. Used with the token URL when no issuer is set. +> +> **tokenUrl** `string` +> +> HTTPS token endpoint. Used with the authorization URL when no issuer is set. +> +> **scopes** `string` +> +> Space-separated; the token’s audience must match what your bootstrap server validates. +> +> **redirectPort** `integer` +> +> Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. +> +> **redirectHost** `enum` +> +> Use localhost only if your IdP’s registered redirect URI specifies it. +> +> One of: `127.0.0.1`, `localhost` +> +> **additionalRedirectReferrerHosts** `string` +> +> Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `serverName` | `string` | — | Name of the plugin-delivered MCP server this policy applies to. | -> | `tools` | `object[]` | — | Per-tool approval locks for this server. | -> | `tools.toolName` | `string` | — | MCP tool name as the server reports it. | -> | `tools.permission` | `enum` | — | Approval state locked for this tool. Unlisted tools stay user-controlled. One of: `allow`, `ask`, `blocked`. | +> > **More detail** +> > +> > Only needed when the IdP completes sign-in from a host other than the authorization URL’s. When a callback is rejected for a referrer mismatch, the rejected host is named in the app log — add that hostname here. -## Source +*** -### Bootstrap +#### `bootstrapHeaders` -| Setting | Type | Availability | Default | Description | Self-hosted install | -| - | - | - | - | - | - | -| Use bootstrap config `bootstrapEnabled` | `boolean` | MDM only Added in 1.10628.0 | `true` | Fetch and apply the URL above at launch. Turn off to keep the URL saved but skip the fetch. Defaults to `true`. | [`client`](#self-hosted-column) Controls whether the desktop app fetches its configuration, so it cannot travel inside that document | -| Bootstrap config URL `bootstrapUrl` | `string` | MDM only Added in 1.10628.0 | — | HTTPS endpoint that returns a per-user JSON config overlay. Values from the response override local settings and become read-only. | [`client`](#self-hosted-column) Tells the desktop app where to fetch its configuration, so it cannot travel inside that document | -| Bootstrap OIDC parameters `bootstrapOidc` | `object` | MDM only Added in 1.10628.0 | — | When set, the bootstrap request sends a Bearer token from a browser sign-in (authorization-code-with-PKCE). | [`client`](#self-hosted-column) Names the sign-in the desktop app uses to fetch its configuration, so it cannot travel inside it | -| Bootstrap request headers `bootstrapHeaders` | `object` | MDM only Added in 1.32885.1 | — | HTTP headers sent on every bootstrap config fetch. Use this instead of embedding user:pass@ in the URL. | [`client`](#self-hosted-column) Sets headers the desktop app sends to fetch its configuration, so it cannot travel inside that document | -| Bootstrap headers helper script `bootstrapHeadersHelper` | `string` | MDM only Added in 1.32885.1 | — | Absolute path to an executable that prints a JSON object of bootstrap request headers. Merged over the static headers; the helper wins. | [`client`](#self-hosted-column) Names a program on the person's computer that supplies headers for fetching the app's configuration | -| Trust bootstrap-delivered settings `trustBootstrapDelivery` | `boolean` | MDM only Added in 1.26832.0 | `false` | Skip the per-user consent prompt for sign-in targets, inference endpoints, helper scripts, and connectors the bootstrap server delivers. Defaults to `false`. | [`client`](#self-hosted-column) Skips a consent prompt on the person's computer for what the configuration server sends | +object: name → value -> **bootstrapOidc details** -> -> Set this to use a separate identity provider (Microsoft Entra ID, Okta, Ping, or any compliant OIDC provider) for the bootstrap sign-in. The app runs an authorization-code-with-PKCE flow in the system browser. Omit to use device-code mode against the bootstrap server's own origin. -> -> This is an **object-typed key** — in an MDM profile it is a single JSON-string value, not separate keys with dotted names like `bootstrapOidc.clientId`. Writing the sub-fields as separate registry values causes the app to silently fall through to device-code mode. -> -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `clientId` | `string` | — | OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). | -> | `issuer` | `string` | — | HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. | -> | `authorizationUrl` | `string` | — | HTTPS authorization endpoint. Used with the token URL when no issuer is set. | -> | `tokenUrl` | `string` | — | HTTPS token endpoint. Used with the authorization URL when no issuer is set. | -> | `scopes` | `string` | — | Space-separated; the token’s audience must match what your bootstrap server validates. | -> | `redirectPort` | `integer` | — | Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. | -> | `redirectHost` | `enum` | — | Use localhost only if your IdP’s registered redirect URI specifies it. One of: `127.0.0.1`, `localhost`. | -> | `additionalRedirectReferrerHosts` | `string` | — | Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. | +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.32885.1 -> **bootstrapHeaders details** +**Bootstrap request headers.** HTTP headers sent on every bootstrap config fetch. Use this instead of embedding user:pass@ in the URL. + +[Guide for this setting](/docs/third-party/claude-desktop/bootstrap.md) + +[Self-hosted install](#self-hosted-column): MDM profile. Sets headers the desktop app sends to fetch its configuration, so it cannot travel inside that document. + +[Admin Console](#the-works-with-column): Not available. + +> **More detail** > > Static headers sent on every request to the bootstrap config URL — for a service-account credential (`Authorization: Basic …`, an API key header) or a routing/tenant header. When either this or the headers helper script is set and no separate `bootstrapOidc` provider is configured, the app treats the headers as sufficient auth and does not require a per-user sign-in for the bootstrap fetch. These headers (and the helper script's below) also accompany requests to a plugin marketplace this server hosts on its own origin (`allowedPluginMarketplaces` with `credentialKind: "inferenceCredential"`). Header values are masked in diagnostics and telemetry. For a rotating token, use the headers helper script instead. -> **bootstrapHeadersHelper details** +*** + +#### `bootstrapHeadersHelper` + +string + +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.32885.1 + +**Bootstrap headers helper script.** Absolute path to an executable that prints a JSON object of bootstrap request headers. Merged over the static headers; the helper wins. + +[Guide for this setting](/docs/third-party/claude-desktop/bootstrap.md) + +[Self-hosted install](#self-hosted-column): MDM profile. Names a program on the person's computer that supplies headers for fetching the app's configuration. + +[Admin Console](#the-works-with-column): Not available. + +> **More detail** > > Absolute path to an executable that prints a single JSON object of HTTP headers on stdout, e.g. `{"Authorization": "Bearer …"}`. The app runs it (no arguments; output cached for a few minutes) before each bootstrap config fetch and merges the result over **Bootstrap request headers** (the helper wins on conflict). Use this instead of embedding `user:pass@` in the bootstrap URL, or when the bootstrap server needs a rotating token from a secrets manager. When either this or the static headers are set and no separate `bootstrapOidc` provider is configured, the app treats them as sufficient auth and does not require a per-user sign-in for the bootstrap fetch. If a per-user sign-in also runs (`bootstrapOidc` or the server’s own device-code flow), that Bearer token wins on `Authorization`. +*** + +#### `trustBootstrapDelivery` + +booleanDefault: false + +MDM only (You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response.) + +Since 1.26832.0 + +**Trust bootstrap-delivered settings.** Skip the per-user consent prompt for sign-in targets, inference endpoints, helper scripts, and connectors the bootstrap server delivers. + +[Self-hosted install](#self-hosted-column): MDM profile. Skips a consent prompt on the person's computer for what the configuration server sends. + +[Admin Console](#the-works-with-column): Not available. + +*** + +## Labels and badges + +### Entry labels + +The labels under a key start with its type and, where one is recorded, its default, and end with the Claude Desktop version that added the key. Between those, a label appears only where the key differs from most keys. + +* **No MDM only or Admin Console only label**: You can set the key in an MDM profile or the local configuration file, or return it from a bootstrap server. +* **MDM only**: You can set the key only in an MDM profile or the local configuration file. Claude Desktop ignores it in a bootstrap server's response. [Read more](/docs/third-party/claude-desktop/bootstrap.md#response-schema). +* **Admin Console only**: Only the Enterprise Admin Console can set the key. Claude Desktop ignores it in an MDM profile, in the local configuration file and in a bootstrap server's response. [Read more](/docs/third-party/claude-desktop/admin-console.md). +* **Beta**: The feature that the key configures is in beta. +* **Deprecated**: On third-party deployments Claude Desktop no longer reads the key and ignores any value set for it. Remove it from your configuration. +* **Consent required**: A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval. [Read more](/docs/third-party/claude-desktop/bootstrap.md#keys-that-require-user-consent). +* **Origin-pinned**: A URL that a bootstrap server delivers must share the origin of bootstrapUrl, or Claude Desktop drops it. The limit is lifted when bootstrapOidc is set, and it does not apply to a value set in an MDM profile, the local configuration file or the Enterprise Admin Console. [Read more](/docs/third-party/claude-desktop/bootstrap.md#origin-pinning). +* **required**: The object or list entry that holds this field is not valid without it. Depending on the key, Claude Desktop then drops that entry alone, treats the key as unset, or applies a restrictive value in its place. + +### The Works with column + +Unless a label in its entry says otherwise, a key can be set in an MDM profile or the local configuration file, or returned from a bootstrap server. A badge marks another kind of deployment that the key also works with. + +* **Self-hosted**: Something acts on the key on a self-hosted install. Its [Self-hosted install](#self-hosted-column) line gives the reason, and reads Server side or MDM profile, as the badge does on hover. Without the badge, that line reads Not supported, or the entry has none. +* **Admin Console**: The key takes effect where your organization manages Claude Desktop from the Enterprise Admin Console. [Read more](/docs/third-party/claude-desktop/admin-console.md). + + * **No hover text**: The hosted configuration can hold the key. Set it on the console's pages or, where no page has a field for it, by importing a configuration file or through the Admin API. + * **Set automatically** on hover and in the key's entry: Anthropic fills the key in from your organization's own settings, such as its name or its built-in browser settings, each time an app downloads the configuration. A value written for the key in the hosted configuration has no effect. + * **No badge**, and **Not available** in the key's entry: The hosted configuration can't hold the key, so you can't set it from the console. + + The hosted configuration refuses some values of keys that it can hold, for example an API key or token in a request header, and the Claude API as the inference provider. On a device that also has an MDM profile, the app still reads a few keys from the profile, for example the network proxy keys, which the console can't set. The Enterprise Admin Console guide lists them. + +### Self-hosted install line + +The self-hosted word matters only on a self-hosted install, where sessions run on a session host that your organization operates and not on the person's computer. The word says who acts on the key on such an install, and so where to set it; the text beside it gives the reason. On any other install, ignore it. + +* **Server side** (`server`): in the document your session host reads; the host applies it itself. +* **Server side** (`reported`): in the same document; the host passes it on to Claude Desktop, which applies it in its own windows or on the person's computer. +* **MDM profile** (`client`): in Claude Desktop's own configuration on the computer (device management, the local file, or a bootstrap server that configuration names); the session host ignores it. +* **Not supported** (`none`): nothing acts on it on a self-hosted install, whichever of those places sets it. + +One exception to the four words: where a device-management profile sets only app-behavior keys, that profile alone decides all of them (of the keys here: `disableAutoUpdates`, `installedUpdateEnforcementEnabled`, `installedUpdateEnforcementHours`, `autoUpdaterEnforcementHours`, `updateViaUpdatesHost`, `releaseChannel`, `relaunchEnforcementHours`, `configRecheckIntervalMinutes`, `egressProxyUrl`, `egressProxyPacUrl`). + +The word is what this Claude Desktop release declares. A session host acts on a `server` or `reported` key only from the host version that reads it; until then nothing applies the key on a self-hosted install, and Claude Desktop does not fall back to a value set on the computer. + ## Guides +* [Configuration implementation](/docs/third-party/claude-desktop/configuration-format.md): how configuration differs between a device's own configuration, the Enterprise Admin Console, and a self-hosted install, and how to write each value type. +* [Configuration changelog](/docs/third-party/claude-desktop/configuration-changelog.md): the desktop release each key first appeared in. +* [Models and effort levels](/docs/third-party/claude-desktop/models.md): how the keys under **Models** work together. +* [Unified Claude](/docs/third-party/claude-desktop/unified-claude.md#how-unified-claude-interacts-with-chat-and-cowork-settings): how `desktopHome` overrides the other keys under **Chat surface** and **Cowork surface**. +* [Automatic deletion of idle sessions](/docs/third-party/claude-desktop/data-storage.md#automatic-deletion-of-idle-sessions): which key under **Session retention** covers a conversation started from the home screen. + ### Recommended security profiles The profiles below are illustrative examples rather than built-in presets, and the labels are descriptive only. Use them as starting points and adjust for your environment. Layer the inference-provider keys for your cloud on top of whichever profile you choose. diff --git a/content/claude/third-party/claude-desktop/credential-helper.md b/content/claude/third-party/claude-desktop/credential-helper.md index 20060c1211..9e691e6efc 100644 --- a/content/claude/third-party/claude-desktop/credential-helper.md +++ b/content/claude/third-party/claude-desktop/credential-helper.md @@ -40,7 +40,7 @@ Set [`inferenceCredentialHelperArgs`](/docs/third-party/claude-desktop/configura } ``` -In a macOS configuration profile or the Windows registry, write the array as a JSON string, as with the other [array-typed keys](/docs/third-party/claude-desktop/configuration.md#value-types). A [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md) can deliver `inferenceCredentialHelperArgs` too, under the same [user-consent rule](/docs/third-party/claude-desktop/bootstrap.md#keys-that-require-user-consent) as the helper path. In the nested response format ([`bootstrap-config-v2`](/docs/third-party/claude-desktop/bootstrap#response-schema)), set `args` next to `command` in `inference.credential`. +In a macOS configuration profile or the Windows registry, write the array as a JSON string, as with the other [array-typed keys](/docs/third-party/claude-desktop/configuration-format.md#value-types). A [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md) can deliver `inferenceCredentialHelperArgs` too, under the same [user-consent rule](/docs/third-party/claude-desktop/bootstrap.md#keys-that-require-user-consent) as the helper path. In the nested response format ([`bootstrap-config-v2`](/docs/third-party/claude-desktop/bootstrap#response-schema)), set `args` next to `command` in `inference.credential`. On Windows, a `.cmd` or `.bat` helper receives each argument wrapped in double quotes, so read the values with `%~1`, `%~2`, and so on to remove the quotes. A `.ps1` helper, a `.exe` helper, and helpers on macOS and Linux receive each value as written. diff --git a/content/claude/third-party/claude-desktop/extensions.md b/content/claude/third-party/claude-desktop/extensions.md index 5377c506b8..222f285eda 100644 --- a/content/claude/third-party/claude-desktop/extensions.md +++ b/content/claude/third-party/claude-desktop/extensions.md @@ -205,7 +205,7 @@ You can add marketplaces directly in the [in-app configuration window](/docs/thi The Plugins section of the in-app configuration window, with the Add marketplace menu and the organization plugins folder. -To write the configuration yourself instead, add the repository to the [`allowedPluginMarketplaces`](/docs/third-party/claude-desktop/configuration#allowedpluginmarketplaces) configuration key. The key is read from an MDM profile, local configuration, or the [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md) response. In an MDM profile the value is a JSON array encoded as a string (see [Value types](/docs/third-party/claude-desktop/configuration.md#value-types)). In a local configuration file or the bootstrap response the value is a native JSON array. +To write the configuration yourself instead, add the repository to the [`allowedPluginMarketplaces`](/docs/third-party/claude-desktop/configuration#allowedpluginmarketplaces) configuration key. The key is read from an MDM profile, local configuration, or the [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md) response. In an MDM profile the value is a JSON array encoded as a string (see [Value types](/docs/third-party/claude-desktop/configuration-format.md#value-types)). In a local configuration file or the bootstrap response the value is a native JSON array. ```xml .mobileconfig (macOS) theme={null} allowedPluginMarketplaces diff --git a/content/claude/third-party/claude-desktop/foundry.md b/content/claude/third-party/claude-desktop/foundry.md index 6d6fc28bbf..7a1a27516d 100644 --- a/content/claude/third-party/claude-desktop/foundry.md +++ b/content/claude/third-party/claude-desktop/foundry.md @@ -115,20 +115,79 @@ Then click **Export** to produce a `.mobileconfig` (macOS) or `.reg` (Windows) f The full set of `inferenceFoundry*` keys is below. Set `inferenceProvider` to `foundry`, supply the resource name, and provide exactly one credential source. -| Setting | Type | Availability | Default | Description | -| - | - | - | - | - | -| Azure AI Foundry resource name `inferenceFoundryResource` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Azure AI Foundry resource name used to construct the endpoint URL. | -| Azure AI Foundry base URL `inferenceFoundryBaseUrl` | `string` | MDM + Bootstrap Added in 2.110.0 | — | Full base URL for a gateway or proxy in front of Foundry, path included (replaces [https://RESOURCE.services.ai.azure.com/anthropic](https://RESOURCE.services.ai.azure.com/anthropic)). | -| Azure AI Foundry API key `inferenceFoundryApiKey` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | API key for Azure AI Foundry inference. | -| Entra ID tenant ID `inferenceFoundryTenantId` | `string` | MDM + Bootstrap Added in 1.9255.0 | — | Directory (tenant) ID of the Entra ID app registration that has the Cognitive Services scope. | -| Entra ID client ID `inferenceFoundryClientId` | `string` | MDM + Bootstrap Added in 1.9255.0 | — | Application (client) ID of the Entra ID app registration. Device-code sign-in requires the app to allow public client flows. | -| Entra ID sign-in flow `inferenceFoundryAuthFlow` | `enum` | MDM + Bootstrap Added in 1.19367.0 | — | How Entra sign-in runs: device code (default), system browser, or the OS identity broker. One of: `device-code`, `browser`, `broker`. | - -> **inferenceFoundryBaseUrl details** +[Entry labels](/docs/third-party/claude-desktop/configuration.md#entry-labels) says what each label means. + +#### `inferenceFoundryResource` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**Azure AI Foundry resource name.** Azure AI Foundry resource name used to construct the endpoint URL. + +*** + +#### `inferenceFoundryBaseUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Origin-pinned (A URL that a bootstrap server delivers must share the origin of bootstrapUrl, or Claude Desktop drops it. The limit is lifted when bootstrapOidc is set, and it does not apply to a value set in an MDM profile, the local configuration file or the Enterprise Admin Console.) + +Since 2.110.0 + +**Azure AI Foundry base URL.** Full base URL for a gateway or proxy in front of Foundry, path included (replaces [https://RESOURCE.services.ai.azure.com/anthropic](https://RESOURCE.services.ai.azure.com/anthropic)). + +> **More detail** > > Set this only when the app reaches Foundry through a gateway or proxy you run, such as Azure API Management. Requests go to `/v1/messages` instead of `https://.services.ai.azure.com/anthropic/v1/messages`, carrying the same credential and headers the app would send to Foundry: each user's Entra ID token for the Azure Cognitive Services audience as `Authorization: Bearer` with Entra sign-in, otherwise the API key or the credential helper's output. Claude Code sessions receive the value as `ANTHROPIC_FOUNDRY_BASE_URL`, so use the same value you would give Claude Code in a terminal. `inferenceFoundryResource` is still required and should name the resource behind the gateway; the app sends nothing to the resource directly while this is set. Must be https, or http to a proxy at a loopback address on the device itself (127.0.0.1, localhost or \[::1]). -> **inferenceFoundryAuthFlow details** +*** + +#### `inferenceFoundryApiKey` + +stringSince 1.2581.0 + +**Azure AI Foundry API key.** API key for Azure AI Foundry inference. + +*** + +#### `inferenceFoundryTenantId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.9255.0 + +**Entra ID tenant ID.** Directory (tenant) ID of the Entra ID app registration that has the Cognitive Services scope. + +*** + +#### `inferenceFoundryClientId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.9255.0 + +**Entra ID client ID.** Application (client) ID of the Entra ID app registration. Device-code sign-in requires the app to allow public client flows. + +*** + +#### `inferenceFoundryAuthFlow` + +enumSince 1.19367.0 + +**Entra ID sign-in flow.** How Entra sign-in runs: device code (default), system browser, or the OS identity broker. + +One of: `device-code`, `browser`, `broker` + +> **More detail** > > * **`device-code`** (default) — shows a code to enter at microsoft.com/devicelogin. The app registration must have **Allow public client flows** enabled. > * **`browser`** — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. The app registration must include `http://127.0.0.1/callback` under the **Mobile and desktop applications** platform (Entra ignores the loopback port, but not the path). Works with **Allow public client flows** disabled, and is unaffected by Conditional Access policies that block device-code authentication. @@ -136,6 +195,8 @@ The full set of `inferenceFoundry*` keys is below. Set `inferenceProvider` to `f > > App versions that predate this key always use device code; versions that predate the broker option treat `broker` as unset and use device code. +*** + You must also set `inferenceModels` to a list of Microsoft Foundry deployment names. See the [Configuration reference](/docs/third-party/claude-desktop/configuration.md#inferencemodels). ## What users experience diff --git a/content/claude/third-party/claude-desktop/gateway.md b/content/claude/third-party/claude-desktop/gateway.md index 921ae756dd..fe7a4015a8 100644 --- a/content/claude/third-party/claude-desktop/gateway.md +++ b/content/claude/third-party/claude-desktop/gateway.md @@ -168,25 +168,86 @@ Then click **Export** to produce a `.mobileconfig` (macOS) or `.reg` (Windows) f ### Configuration keys -| Setting | Type | Availability | Default | Description | -| - | - | - | - | - | -| Gateway base URL `inferenceGatewayBaseUrl` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Full URL of the inference gateway endpoint. | -| Gateway API key `inferenceGatewayApiKey` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | API key for the configured inference gateway. | -| Gateway auth scheme `inferenceGatewayAuthScheme` | `enum` | MDM + Bootstrap Added in 1.3036.0 | `bearer` | How the gateway credential is sent on the wire (Authorization: Bearer vs x-api-key header). One of: `bearer`, `x-api-key`. Defaults to `bearer`. Deprecated: `inferenceGatewayAuthScheme: "sso"`; use inferenceCredentialKind: "interactive". The original spelling will keep working; no end date has been set. | -| Gateway sign-in flow `inferenceGatewayOidcAuthFlow` | `enum` | MDM + Bootstrap Added in 1.25927.0 | — | How the IdP sign-in runs: system browser (default) or the OS Microsoft Entra broker. One of: `browser`, `broker`. Deprecated: `inferenceGatewayOidcAuthFlow`; use inferenceIdpAuthFlow together with inferenceIdpOidc once every desktop in the fleet is on a release that reads them. The original spelling will keep working; no end date has been set. | -| Gateway SSO IdP (OIDC) `inferenceGatewayOidc` | `object` | MDM + Bootstrap Added in 1.6889.0 | — | External IdP for gateway sign-in. The user’s token from this issuer is sent to the gateway as the Bearer credential. Deprecated: `inferenceGatewayOidc`; use inferenceIdpOidc with inferenceCredentialKind: "external-idp" once every desktop in the fleet is on a release that reads them. The original spelling will keep working; no end date has been set. | -| Identity provider sign-in flow `inferenceIdpAuthFlow` | `enum` | MDM + Bootstrap Added in 2.7032.0 | — | How the identity-provider sign-in runs: system browser (default) or the OS Microsoft Entra broker. One of: `browser`, `broker`. | -| Identity provider (OIDC) `inferenceIdpOidc` | `object` | MDM + Bootstrap Added in 2.7032.0 | — | Your organization’s OpenID Connect identity provider. The user’s token is sent as the Bearer credential to the gateway or the Bedrock proxy. | -| Stream idle timeout `inferenceStreamIdleTimeoutSec` | `integer` | MDM + Bootstrap Added in 1.44121.1 | — | Extra seconds to wait for model output on a streaming response that is sending only keep-alive pings. Gateway provider only. Default 300. Range: 300–1800. | - -> **inferenceGatewayOidcAuthFlow details** +[Entry labels](/docs/third-party/claude-desktop/configuration.md#entry-labels) says what each label means. + +#### `inferenceGatewayBaseUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Origin-pinned (A URL that a bootstrap server delivers must share the origin of bootstrapUrl, or Claude Desktop drops it. The limit is lifted when bootstrapOidc is set, and it does not apply to a value set in an MDM profile, the local configuration file or the Enterprise Admin Console.) + +Since 1.2581.0 + +**Gateway base URL.** Full URL of the inference gateway endpoint. + +*** + +#### `inferenceGatewayApiKey` + +stringSince 1.2581.0 + +**Gateway API key.** API key for the configured inference gateway. + +*** + +#### `inferenceGatewayAuthScheme` + +enumDefault: bearerSince 1.3036.0 + +**Gateway auth scheme.** How the gateway credential is sent on the wire (Authorization: Bearer vs x-api-key header). + +One of: `bearer` (default), `x-api-key` + +> [!WARNING] +> +> **Deprecated** +> +> * `inferenceGatewayAuthScheme: "sso"`; use inferenceCredentialKind: "interactive". The original spelling will keep working; no end date has been set. + +*** + +#### `inferenceGatewayOidcAuthFlow` + +enumSince 1.25927.0 + +**Gateway sign-in flow.** How the IdP sign-in runs: system browser (default) or the OS Microsoft Entra broker. + +One of: `browser`, `broker` + +> [!WARNING] +> +> **Deprecated** +> +> * Use inferenceIdpAuthFlow together with inferenceIdpOidc once every desktop in the fleet is on a release that reads them. The original spelling will keep working; no end date has been set. + +> **More detail** > > * **`browser`** (default) — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. See the **IdP setup** notes on `inferenceGatewayOidc` for redirect-URI registration. > * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, Company Portal on macOS). Requires the IdP to be **Microsoft Entra ID** — the `issuer` on `inferenceGatewayOidc` must be `https://login.microsoftonline.com/{tenant-id}/v2.0`. The broker satisfies Conditional Access policies that require a compliant/managed device or token protection, and needs no loopback redirect. The Entra app registration must include the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform. Not supported on Linux. > > Broker mode mints a token in the customer's own Entra tenant with the customer-configured `scopes`, and forwards it to the customer's own gateway; both endpoints of that trust relationship are inside the customer's control. A desktop that has the `external-idp` kind reads this key, together with `inferenceGatewayOidc`, as that kind's sign-in flow; it stays readable. -> **inferenceGatewayOidc details** +*** + +#### `inferenceGatewayOidc` + +object + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6889.0 + +**Gateway SSO IdP (OIDC).** External IdP for gateway sign-in. The user’s token from this issuer is sent to the gateway as the Bearer credential. + +> [!WARNING] +> +> **Deprecated** +> +> * Use inferenceIdpOidc with inferenceCredentialKind: "external-idp" once every desktop in the fleet is on a release that reads them. The original spelling will keep working; no end date has been set. + +> **More detail** > > **External IdP mode.** The app discovers `/.well-known/openid-configuration`, runs an OIDC authorization-code-with-PKCE sign-in in the system browser with `clientId`, and sends the resulting token as `Authorization: Bearer` on every inference request. Leave this unset for a gateway that hosts its own RFC 8414 metadata at `/.well-known/oauth-authorization-server`. A desktop that has the `external-idp` kind reads this block as that kind's identity-provider key; it stays readable, so a fleet keeps this spelling until every desktop is on such a release. > @@ -195,29 +256,105 @@ Then click **Export** to produce a `.mobileconfig` (macOS) or `.reg` (Windows) f > **IdP setup.** The callback is `http://127.0.0.1:/callback` by default (`http://localhost:/callback` with `redirectHost: "localhost"`); register exactly the one you use and include `/callback`. **Entra:** a public-client app with a *Mobile and desktop applications* redirect URI of `http://127.0.0.1/callback` (any port; omitting the path fails with `AADSTS50011`); in `access_token` mode also grant the gateway API's delegated permission, or sign-in fails with `AADSTS65001`. **Okta:** a *Native* app with the exact URI `http://127.0.0.1:/callback` and that port in `redirectPort`. > > **Refresh.** With `offline_access` the app renews the token silently and prompts a browser sign-in only when refresh fails. Google never returns an `id_token` on refresh, so a Google Workspace-backed gateway in `id_token` mode re-prompts about hourly; `access_token` mode is unaffected. + +> **Child attributes (11)** +> +> **clientId** `string` *required* +> +> OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). +> +> **issuer** `string` +> +> HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. +> +> **authorizationUrl** `string` +> +> HTTPS authorization endpoint. Used with the token URL when no issuer is set. +> +> **tokenUrl** `string` +> +> HTTPS token endpoint. Used with the authorization URL when no issuer is set. +> +> **bearerTokenType** `enum` (default: id\_token) +> +> Which token to send as the bearer. Use access token for a gateway or proxy that validates as an OAuth resource server. +> +> One of: `id_token` (default), `access_token` +> +> > **More detail** +> > +> > In **access-token** mode the token's audience must be your gateway or proxy. On IdPs where the requested scopes decide the audience (**Entra ID**), include its API resource scope in `scopes` — `api:///.default`, or a named delegated scope you exposed via *Expose an API*. With only the standard OIDC scopes (`openid profile email offline_access`) Entra returns a v1.0 Microsoft Graph token whose issuer (`https://sts.windows.net//`) doesn't match the v2.0 issuer configured here, so a gateway that validates `iss` rejects it. On IdPs that set the access-token audience out-of-band (Keycloak audience mapper, Auth0 default audience, Okta custom authorization server), a resource scope in `scopes` isn't required — the audience comes from the IdP-side configuration. +> +> **scopes** `string` +> +> Space-separated scopes. Required in access-token mode: set the gateway or proxy API scope. offline\_access is appended automatically unless disabled below. +> +> **appendOfflineAccess** `boolean` (default: true) +> +> Automatically append offline\_access to scopes so the IdP returns a refresh token for silent refresh. +> +> > **More detail** +> > +> > Turn off only if your authorization server rejects `offline_access` as an unknown scope; include the server’s own refresh-token scope in **Scopes** instead. > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `clientId` | `string` | — | OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). | -> | `issuer` | `string` | — | HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. | -> | `authorizationUrl` | `string` | — | HTTPS authorization endpoint. Used with the token URL when no issuer is set. | -> | `tokenUrl` | `string` | — | HTTPS token endpoint. Used with the authorization URL when no issuer is set. | -> | `bearerTokenType` | `enum` | `id_token` | Which token to send as the bearer. Use access token for a gateway or proxy that validates as an OAuth resource server. One of: `id_token`, `access_token`. | -> | `scopes` | `string` | — | Space-separated scopes. Required in access-token mode: set the gateway or proxy API scope. offline\_access is appended automatically unless disabled below. | -> | `appendOfflineAccess` | `boolean` | `true` | Automatically append offline\_access to scopes so the IdP returns a refresh token for silent refresh. | -> | `resource` | `string` | — | Access-token audience of the gateway or proxy: an https URL or an AD FS relying-party identifier, sent as the RFC 8707 resource. Leave unset for Entra ID. | -> | `redirectPort` | `integer` | — | Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. | -> | `redirectHost` | `enum` | — | Use localhost only if your IdP’s registered redirect URI specifies it. One of: `127.0.0.1`, `localhost`. | -> | `additionalRedirectReferrerHosts` | `string` | — | Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. | - -> **inferenceIdpAuthFlow details** +> **resource** `string` +> +> Access-token audience of the gateway or proxy: an https URL or an AD FS relying-party identifier, sent as the RFC 8707 resource. Leave unset for Entra ID. +> +> > **More detail** +> > +> > Set this only for an IdP that implements RFC 8707 resource indicators. The app then sends `resource=` on the authorization, token and refresh requests, so the access token the IdP issues is audience-restricted to the gateway or proxy rather than to the IdP's own APIs. Use it with `bearerTokenType: access_token`; in `id_token` mode the ID token's audience is always `clientId`. Ignored with the OS-broker sign-in flow (the sign-in flow key set to `broker`), which is Entra-only. +> > +> > **Microsoft Entra ID:** leave unset — the v2.0 endpoint rejects `resource`; request the API scope in `scopes` instead (`api:///.default`). **AD FS:** enter one of the relying-party trust's identifiers, spelled as it is registered there. A value with no scheme (a host name with or without a port or path, a single name, or a GUID; `name:digits` also reads as a host name with a port) is sent as `https://`; an identifier with a scheme of its own (`urn:…`, or an organization-defined one such as `VENDOR:URI:…`) is sent exactly as written. A trust whose only identifier is a bare name or GUID will not match, because those are sent as `https://`: add an `https://…` or `urn:…` identifier to the trust and enter that one here. With any other identity provider, use an absolute URI without a fragment (RFC 8707 — the IdP rejects one as `invalid_target`). Changing it signs users in again. +> +> **redirectPort** `integer` +> +> Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. +> +> **redirectHost** `enum` +> +> Use localhost only if your IdP’s registered redirect URI specifies it. +> +> One of: `127.0.0.1`, `localhost` +> +> **additionalRedirectReferrerHosts** `string` +> +> Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. +> +> > **More detail** +> > +> > Only needed when the IdP completes sign-in from a host other than the authorization URL’s. When a callback is rejected for a referrer mismatch, the rejected host is named in the app log — add that hostname here. + +*** + +#### `inferenceIdpAuthFlow` + +enumSince 2.7032.0 + +**Identity provider sign-in flow.** How the identity-provider sign-in runs: system browser (default) or the OS Microsoft Entra broker. + +One of: `browser`, `broker` + +> **More detail** > > * **`browser`** (default) — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. See the **IdP setup** notes on `inferenceIdpOidc` for redirect-URI registration. > * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, Company Portal on macOS). Requires the IdP to be **Microsoft Entra ID** — the `issuer` on `inferenceIdpOidc` must be `https://login.microsoftonline.com/{tenant-id}/v2.0`. The broker satisfies Conditional Access policies that require a compliant/managed device or token protection, and needs no loopback redirect. The Entra app registration must include the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform. Not supported on Linux. > > Broker mode mints a token in the customer's own Entra tenant with the customer-configured `scopes` and forwards it to the customer's own gateway or proxy; both endpoints of that trust relationship are inside the customer's control. -> **inferenceIdpOidc details** +*** + +#### `inferenceIdpOidc` + +object + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 2.7032.0 + +**Identity provider (OIDC).** Your organization’s OpenID Connect identity provider. The user’s token is sent as the Bearer credential to the gateway or the Bedrock proxy. + +> **More detail** > > Used with `inferenceCredentialKind: "external-idp"`. The app discovers `/.well-known/openid-configuration`, runs an OIDC authorization-code (PKCE) sign-in in the browser with `clientId` (or through the OS broker, see `inferenceIdpAuthFlow`) and sends the token as `Authorization: Bearer` on every inference request: to `inferenceGatewayBaseUrl` on the gateway provider, or on Bedrock to `inferenceBedrockBaseUrl`, which is then required: only a proxy that validates the token accepts it, never Amazon Bedrock itself (to sign in straight to Bedrock use `interactive`, AWS IAM Identity Center). On Bedrock this kind has no model discovery: list the models in `inferenceModels`. > @@ -228,27 +365,91 @@ Then click **Export** to produce a `.mobileconfig` (macOS) or `.reg` (Windows) f > **Refresh.** With `offline_access` the app renews the token silently and asks for a browser sign-in only when refresh fails (Google returns no `id_token` on refresh, so `id_token` mode there re-prompts about hourly). > > **Older names.** Gateway configurations written before this key use `inferenceGatewayOidc` / `inferenceGatewayOidcAuthFlow` with the `interactive` kind; they stay readable and mean the same sign-in. + +> **Child attributes (11)** +> +> **clientId** `string` *required* +> +> OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). +> +> **issuer** `string` +> +> HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. +> +> **authorizationUrl** `string` > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `clientId` | `string` | — | OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). | -> | `issuer` | `string` | — | HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. | -> | `authorizationUrl` | `string` | — | HTTPS authorization endpoint. Used with the token URL when no issuer is set. | -> | `tokenUrl` | `string` | — | HTTPS token endpoint. Used with the authorization URL when no issuer is set. | -> | `bearerTokenType` | `enum` | `id_token` | Which token to send as the bearer. Use access token for a gateway or proxy that validates as an OAuth resource server. One of: `id_token`, `access_token`. | -> | `scopes` | `string` | — | Space-separated scopes. Required in access-token mode: set the gateway or proxy API scope. offline\_access is appended automatically unless disabled below. | -> | `appendOfflineAccess` | `boolean` | `true` | Automatically append offline\_access to scopes so the IdP returns a refresh token for silent refresh. | -> | `resource` | `string` | — | Access-token audience of the gateway or proxy: an https URL or an AD FS relying-party identifier, sent as the RFC 8707 resource. Leave unset for Entra ID. | -> | `redirectPort` | `integer` | — | Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. | -> | `redirectHost` | `enum` | — | Use localhost only if your IdP’s registered redirect URI specifies it. One of: `127.0.0.1`, `localhost`. | -> | `additionalRedirectReferrerHosts` | `string` | — | Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. | - -> **inferenceStreamIdleTimeoutSec details** +> HTTPS authorization endpoint. Used with the token URL when no issuer is set. +> +> **tokenUrl** `string` +> +> HTTPS token endpoint. Used with the authorization URL when no issuer is set. +> +> **bearerTokenType** `enum` (default: id\_token) +> +> Which token to send as the bearer. Use access token for a gateway or proxy that validates as an OAuth resource server. +> +> One of: `id_token` (default), `access_token` +> +> > **More detail** +> > +> > In **access-token** mode the token's audience must be your gateway or proxy. On IdPs where the requested scopes decide the audience (**Entra ID**), include its API resource scope in `scopes` — `api:///.default`, or a named delegated scope you exposed via *Expose an API*. With only the standard OIDC scopes (`openid profile email offline_access`) Entra returns a v1.0 Microsoft Graph token whose issuer (`https://sts.windows.net//`) doesn't match the v2.0 issuer configured here, so a gateway that validates `iss` rejects it. On IdPs that set the access-token audience out-of-band (Keycloak audience mapper, Auth0 default audience, Okta custom authorization server), a resource scope in `scopes` isn't required — the audience comes from the IdP-side configuration. +> +> **scopes** `string` +> +> Space-separated scopes. Required in access-token mode: set the gateway or proxy API scope. offline\_access is appended automatically unless disabled below. +> +> **appendOfflineAccess** `boolean` (default: true) +> +> Automatically append offline\_access to scopes so the IdP returns a refresh token for silent refresh. +> +> > **More detail** +> > +> > Turn off only if your authorization server rejects `offline_access` as an unknown scope; include the server’s own refresh-token scope in **Scopes** instead. +> +> **resource** `string` +> +> Access-token audience of the gateway or proxy: an https URL or an AD FS relying-party identifier, sent as the RFC 8707 resource. Leave unset for Entra ID. +> +> > **More detail** +> > +> > Set this only for an IdP that implements RFC 8707 resource indicators. The app then sends `resource=` on the authorization, token and refresh requests, so the access token the IdP issues is audience-restricted to the gateway or proxy rather than to the IdP's own APIs. Use it with `bearerTokenType: access_token`; in `id_token` mode the ID token's audience is always `clientId`. Ignored with the OS-broker sign-in flow (the sign-in flow key set to `broker`), which is Entra-only. +> > +> > **Microsoft Entra ID:** leave unset — the v2.0 endpoint rejects `resource`; request the API scope in `scopes` instead (`api:///.default`). **AD FS:** enter one of the relying-party trust's identifiers, spelled as it is registered there. A value with no scheme (a host name with or without a port or path, a single name, or a GUID; `name:digits` also reads as a host name with a port) is sent as `https://`; an identifier with a scheme of its own (`urn:…`, or an organization-defined one such as `VENDOR:URI:…`) is sent exactly as written. A trust whose only identifier is a bare name or GUID will not match, because those are sent as `https://`: add an `https://…` or `urn:…` identifier to the trust and enter that one here. With any other identity provider, use an absolute URI without a fragment (RFC 8707 — the IdP rejects one as `invalid_target`). Changing it signs users in again. +> +> **redirectPort** `integer` +> +> Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. +> +> **redirectHost** `enum` +> +> Use localhost only if your IdP’s registered redirect URI specifies it. +> +> One of: `127.0.0.1`, `localhost` +> +> **additionalRedirectReferrerHosts** `string` +> +> Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. +> +> > **More detail** +> > +> > Only needed when the IdP completes sign-in from a host other than the authorization URL’s. When a callback is rejected for a referrer mismatch, the rejected host is named in the app log — add that hostname here. + +*** + +#### `inferenceStreamIdleTimeoutSec` + +integerRange: 300–1,800Since 1.44121.1 + +**Stream idle timeout.** Extra seconds to wait for model output on a streaming response that is sending only keep-alive pings. Gateway provider only. Default 300. + +> **More detail** > > Raises how long Cowork, Chat and Code sessions wait for the next model event on an open streaming response (Claude Code's `CLAUDE_STREAM_IDLE_TIMEOUT_MS`). It only helps when the gateway writes SSE keep-alive `ping` events (or `:` comment lines) into the response while the upstream model is silent — for example a LiteLLM proxy with keep-alive pings enabled in front of Amazon Bedrock. With pings arriving, Claude Code accepts at least about five minutes of keep-alives and then waits this many seconds more for real model output before abandoning the request. Gateway provider only; the other providers keep Claude Code's defaults. > > A response on which nothing at all arrives — no pings — still fails after about 5 minutes regardless of this key, because at the device a silent connection cannot be told apart from a dead one. If long generations fail behind a gateway that does not send pings, configure the gateway to send them rather than raising this value. A common case is automatic compaction, in which a session sends its whole conversation in one streaming request and waits for a long summary; when that request fails, the error reads `Prompt is too long · automatic compaction failed:` followed by the cause. While this key is set, the app's value takes precedence over `CLAUDE_STREAM_IDLE_TIMEOUT_MS` in Claude Code's own managed settings for sessions the app starts; when it is unset, that setting still applies. Values outside 300–1800 are rejected at parse time (the error is listed in the diagnostics report) and the default applies. +*** + To send additional HTTP headers on every inference request (tenant routing, org IDs, and similar), set [`inferenceCustomHeaders`](/docs/third-party/claude-desktop/configuration#inferencecustomheaders). It applies to all providers, not just gateways. ### Single sign-on configuration keys @@ -281,7 +482,7 @@ The `inferenceGatewayOidc` value is one JSON object with these fields: > [!WARNING] > -> `inferenceGatewayOidc` is **one MDM key whose value is a JSON string** — not separate keys like `inferenceGatewayOidc.clientId`. See [how object-typed keys are encoded](/docs/third-party/claude-desktop/configuration.md#value-types). The in-app **Export** produces the correct format automatically. +> `inferenceGatewayOidc` is **one MDM key whose value is a JSON string** — not separate keys like `inferenceGatewayOidc.clientId`. See [how object-typed keys are encoded](/docs/third-party/claude-desktop/configuration-format.md#value-types). The in-app **Export** produces the correct format automatically. In a macOS `.mobileconfig` payload (Okta example): diff --git a/content/claude/third-party/claude-desktop/installation.md b/content/claude/third-party/claude-desktop/installation.md index 44403e98c6..5d805aca2f 100644 --- a/content/claude/third-party/claude-desktop/installation.md +++ b/content/claude/third-party/claude-desktop/installation.md @@ -71,7 +71,7 @@ Building the configuration in the app is optional. The [in-app configuration win Choose a bootstrap server when your organization doesn't use MDM, or when per-user credentials or frequently changing settings would make per-group profiles unwieldy. The tradeoff is that you operate the endpoint. -A device whose MDM profile or registry policy sets any key other than the [app-behavior keys](/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence) uses that configuration, except as described under [Devices with a managed profile](/docs/third-party/claude-desktop/admin-console.md#devices-with-a-managed-profile). When a bootstrap response is in effect, it replaces MDM-delivered values wholesale, and a few device-level keys are only available via MDM (see the Availability column in the [configuration reference](/docs/third-party/claude-desktop/configuration.md)). +A device whose MDM profile or registry policy sets any key other than the [app-behavior keys](/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence) uses that configuration, except as described under [Devices with a managed profile](/docs/third-party/claude-desktop/admin-console.md#devices-with-a-managed-profile). When a bootstrap response is in effect, it replaces MDM-delivered values wholesale, and a few device-level keys are only available via MDM (the keys labeled **MDM only** in the [configuration reference](/docs/third-party/claude-desktop/configuration.md)). Pick your path: @@ -213,19 +213,47 @@ By default, Claude Desktop downloads updates from Anthropic's update server auto In 3P deployments you can: * **Leave auto-update enabled** (recommended) so fixes reach users without IT intervention. Set `autoUpdaterEnforcementHours` to shorten the enforcement window (1 to 72 hours; values above 72 are rejected). Setting the key also makes the window strict: the restart fires as soon as the window elapses, without waiting for a pause in user activity. -* **Take releases later** by setting [`releaseChannel`](/docs/third-party/claude-desktop/configuration#releasechannel) to `staggered`, the slower channel. Devices on the default, `stable`, take each release as it rolls out. Devices on `staggered` update to the release that Anthropic has marked for that channel. On Thursdays, Anthropic marks a release that has fully rolled out on `stable`, a tested production build from at least one week prior. A device on a release newer than the marked one stays on it until Anthropic marks a release newer than its own. Features and fixes, including security fixes, reach `staggered` devices later. -* **Disable auto-update** (`disableAutoUpdates`) and redistribute new builds through your MDM on your own cadence. This is required for [air-gapped environments](#offline-installation) but means your IT team owns the update pipeline. +* **Switch to a slower release channel** by setting [`releaseChannel`](/docs/third-party/claude-desktop/configuration#releasechannel) to `staggered`. Devices on the default release channel, `stable`, take each release as it rolls out. Devices on `staggered` typically trail `stable` by 7-14 days. Usually once a week, Anthropic marks a tested release from `stable` as the new `staggered` release. Urgent fixes may be released sooner. Features and fixes, including security fixes, reach `staggered` devices later. +* **Disable auto-update** (`disableAutoUpdates`) and redistribute new builds through your MDM on your own cadence. This is required for [air-gapped environments](#offline-installation) but means your IT team owns the update pipeline. To move open apps to each version you install, see [Restart open apps after you install a new version](#restart-open-apps-after-you-install-a-new-version). > [!WARNING] > -> Moving a device from `staggered` to `stable` updates it to a newer release, and setting `staggered` again doesn't take it back to the older one. A device also follows `stable` if you remove `releaseChannel` or set it only where the device doesn't read it. +> `stable` is the default. Moving a device from `staggered` to `stable` updates it to a newer release, and setting `staggered` again doesn't move it back to the older one. Removing `releaseChannel`, or setting it only where the device doesn't read it, does the same. -Set `releaseChannel` in the first of these that the device has: +Set `releaseChannel` in: -* **An MDM profile that sets only [app-behavior keys](/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence)**, such as an update policy, a restart window, or a network proxy: put the key in that profile -* **A [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md) or the [admin console](/docs/third-party/claude-desktop/admin-console.md)**: return the key in the server's response, or set it in the console -* **Any other configuration**, such as an MDM profile that sets the inference provider: put the key with the rest of that configuration +* **An MDM profile that sets only [app-behavior keys](/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence)**: put the key in that profile, even if the device also has a bootstrap server or the admin console +* **A [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md)**: return the key from the server +* **The [admin console](/docs/third-party/claude-desktop/admin-console.md)**: open **Organization settings**, go to the **Telemetry & updates** page, and set the **Release channel** +* **Any other configuration, with no bootstrap server and no admin console**, such as an MDM profile that sets the inference provider: put the key with the rest of that configuration -`releaseChannel` has no effect on devices where something else installs updates, such as Linux devices, which [update through apt](/docs/third-party/claude-desktop/telemetry.md#auto-updates), and devices that installed Claude Desktop from the Microsoft Store. +`releaseChannel` has no effect on Linux, which [updates through apt](/docs/third-party/claude-desktop/telemetry.md#auto-updates), or on installs from the Microsoft Store. + +App versions from before `releaseChannel` existed may reject a Windows or Linux machine policy that names it, and then turn off local settings. See [Telemetry and egress](/docs/third-party/claude-desktop/telemetry.md) for the network paths the updater uses. + +### Restart open apps after you install a new version + +When you set [`disableAutoUpdates`](/docs/third-party/claude-desktop/configuration#disableautoupdates) and install new versions with your own tools, an install can land while Claude Desktop is open. The open app finds the newer version on the device and shows **Relaunch to update** in the sidebar. Clicking **Relaunch to update** moves the person to the newer version. + +On Windows, the app shows **Relaunch to update** for installs from the `.msix` package. Clicking it closes Claude Desktop, and Windows may then open the newer version. If Claude Desktop stays closed, open it again to get the newer version. Quitting and reopening Claude Desktop without the click can start the earlier version again, while signing out of Windows and back in moves the person to the newer version. + +You can also have Claude Desktop restart itself when nobody clicks. Two keys control the restart: + +* [`installedUpdateEnforcementEnabled`](/docs/third-party/claude-desktop/configuration#installedupdateenforcementenabled): set it to `true` to turn on the restart, which is off by default +* [`installedUpdateEnforcementHours`](/docs/third-party/claude-desktop/configuration#installedupdateenforcementhours): how long the app waits after it finds the newer version. With a number from 1 to 72, the app restarts when those hours end, even while someone is using the computer. With the key unset, the app waits 72 hours and then until the computer has been idle for 10 minutes. + +The hours count only while the app is open and the computer is awake, and they start again from zero each time the app starts. The restart also waits while Claude is working on a task, except a task on an SSH host that the app expects to pick up again afterward. + +On Windows, the restart covers installs from the `.msix` package. Claude Desktop closes and switches to the newest version on the device, and Windows may then open it. If the configuration that turns on the restart also reaches Windows devices, plan for the following: + +* **Claude Desktop can stay closed**: where Windows doesn't open it, scheduled tasks and other background work stop until someone opens Claude Desktop. Opened more than five minutes after it closed, it starts on its default page instead of the page it was showing. +* **Windows can refuse the switch**: Claude Desktop comes back on the version it had and shows **Relaunch to update** again. It doesn't try again by itself until Claude Desktop next starts, such as after someone quits and reopens it, or until you install a newer version. +* **Other people use the same computer**: the switch can end the Cowork tasks of anyone else signed in to it, and the newest version on the device can be one that was installed for someone else. + +Set the restart keys in the same place as `disableAutoUpdates`, such as the same MDM profile or configuration file. If an MDM profile sets only the restart keys, devices ignore a `disableAutoUpdates` value from any other source, such as a configuration file or a bootstrap server. See [Update keys and managed precedence](/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence). + +> [!NOTE] +> +> Add the restart keys after your devices have a version that supports them. An earlier version can show people a configuration warning at every launch, or reject the managed configuration that holds the keys and ignore the device's own configuration too. For what each platform does with a key it doesn't know, see [`installedUpdateEnforcementEnabled`](/docs/third-party/claude-desktop/configuration#installedupdateenforcementenabled). diff --git a/content/claude/third-party/claude-desktop/mantle.md b/content/claude/third-party/claude-desktop/mantle.md index 41ead295a1..ed308eb78f 100644 --- a/content/claude/third-party/claude-desktop/mantle.md +++ b/content/claude/third-party/claude-desktop/mantle.md @@ -49,24 +49,136 @@ Then click **Export** to produce a `.mobileconfig` (macOS) or `.reg` (Windows) f Mantle reuses the `inferenceBedrock*` key names. Only `inferenceBedrockRegion`, `inferenceBedrockBearerToken`, and `inferenceBedrockBaseUrl` apply; the other keys below (`inferenceBedrockProfile`, `inferenceBedrockSso*`, `inferenceBedrockAwsDir`, `inferenceBedrockAwsCliPath`, `inferenceBedrockServiceTier`) are ignored for this provider. -| Setting | Type | Availability | Default | Description | -| - | - | - | - | - | -| AWS region `inferenceBedrockRegion` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | AWS region for the Bedrock runtime endpoint. | -| Bedrock base URL `inferenceBedrockBaseUrl` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | For VPC endpoints or gateway proxies. Host origin only. | -| Bedrock service tier `inferenceBedrockServiceTier` | `enum` | MDM + Bootstrap Added in 1.5186.0 | — | Sent as the X-Amzn-Bedrock-Service-Tier header. Leave unset for on-demand. One of: `flex`, `priority`. | -| AWS bearer token `inferenceBedrockBearerToken` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Static bearer token for inference. For providers that support profile or helper-script credentials, prefer those. | -| AWS SSO start URL `inferenceBedrockSsoStartUrl` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | Enables in-app AWS sign-in (no AWS CLI needed). Set with the three SSO fields below. | -| AWS SSO region `inferenceBedrockSsoRegion` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | IAM Identity Center home region. | -| AWS SSO account ID `inferenceBedrockSsoAccountId` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | 12-digit AWS account ID assigned to users in IAM Identity Center. | -| AWS SSO role name `inferenceBedrockSsoRoleName` | `string` | MDM + Bootstrap Added in 1.6259.0 | — | IAM Identity Center permission-set name granting bedrock:InvokeModel\* on the account above. | -| AWS profile name `inferenceBedrockProfile` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | AWS named profile to use for Bedrock inference credentials. | -| AWS config directory `inferenceBedrockAwsDir` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Folder with AWS config/credentials. Defaults to \~/.aws when no bearer token is set. | -| AWS CLI path `inferenceBedrockAwsCliPath` | `string` | MDM + Bootstrap Added in 1.13576.0 | — | Absolute path to the aws executable. Leave unset to find it on PATH. | - -> **inferenceBedrockServiceTier details** +[Entry labels](/docs/third-party/claude-desktop/configuration.md#entry-labels) says what each label means. + +#### `inferenceBedrockRegion` + +stringSince 1.2581.0 + +**AWS region.** AWS region for the Bedrock runtime endpoint. + +*** + +#### `inferenceBedrockBaseUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Origin-pinned (A URL that a bootstrap server delivers must share the origin of bootstrapUrl, or Claude Desktop drops it. The limit is lifted when bootstrapOidc is set, and it does not apply to a value set in an MDM profile, the local configuration file or the Enterprise Admin Console.) + +Since 1.2581.0 + +**Bedrock base URL.** For VPC endpoints or gateway proxies. Host origin only. + +*** + +#### `inferenceBedrockServiceTier` + +enumSince 1.5186.0 + +**Bedrock service tier.** Sent as the X-Amzn-Bedrock-Service-Tier header. Leave unset for on-demand. + +One of: `flex`, `priority` + +> **More detail** > > Tier availability varies by model and region. Reserved capacity uses a provisioned-throughput ARN as the model ID instead of this setting. Older bundled Claude Code CLI versions ignore this key. +*** + +#### `inferenceBedrockBearerToken` + +stringSince 1.2581.0 + +**AWS bearer token.** Static bearer token for inference. For providers that support profile or helper-script credentials, prefer those. + +*** + +#### `inferenceBedrockSsoStartUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO start URL.** Enables in-app AWS sign-in (no AWS CLI needed). Set with the three SSO fields below. + +*** + +#### `inferenceBedrockSsoRegion` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO region.** IAM Identity Center home region. + +*** + +#### `inferenceBedrockSsoAccountId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO account ID.** 12-digit AWS account ID assigned to users in IAM Identity Center. + +*** + +#### `inferenceBedrockSsoRoleName` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.6259.0 + +**AWS SSO role name.** IAM Identity Center permission-set name granting bedrock:InvokeModel\* on the account above. + +*** + +#### `inferenceBedrockProfile` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**AWS profile name.** AWS named profile to use for Bedrock inference credentials. + +*** + +#### `inferenceBedrockAwsDir` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**AWS config directory.** Folder with AWS config/credentials. Defaults to \~/.aws when no bearer token is set. + +*** + +#### `inferenceBedrockAwsCliPath` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.13576.0 + +**AWS CLI path.** Absolute path to the aws executable. Leave unset to find it on PATH. + +*** + You must also set `inferenceModels`. As with the standard Amazon Bedrock provider, server-side Web Search is not supported. See the [Configuration reference](/docs/third-party/claude-desktop/configuration.md#inferencemodels). ## What users experience diff --git a/content/claude/third-party/claude-desktop/mdm.md b/content/claude/third-party/claude-desktop/mdm.md index a7a57e19f1..db6c063862 100644 --- a/content/claude/third-party/claude-desktop/mdm.md +++ b/content/claude/third-party/claude-desktop/mdm.md @@ -41,7 +41,7 @@ The window is organized into sections in the left sidebar. Work through them in | **Connection** | Inference provider (Gateway, Claude API, Google Cloud's Agent Platform, Bedrock, Bedrock Mantle, or Foundry) and its credentials Model list Organization UUID Optional credential-helper script | | **Capabilities** | Which of Cowork, Code, and Chat are available Allowed egress hosts for the sandbox Disabled built-in tools Allowed workspace folders | | **Connectors** | Managed MCP servers pushed to all users Whether users can add their own local MCP servers Whether desktop extensions (`.mcpb`) are allowed Whether unsigned extensions are rejected | -| **Telemetry & updates** | OpenTelemetry collector endpoint Whether auto-updates are blocked, and the enforcement window if not The three Anthropic-bound telemetry toggles (essential, nonessential, nonessential services) | +| **Telemetry & updates** | OpenTelemetry collector endpoint Whether auto-updates are blocked The enforcement window for downloaded updates, or the restart for versions you install yourself The three Anthropic-bound telemetry toggles (essential, nonessential, nonessential services) | | **Limits** | Per-device token cap and its window length Retention periods after which idle chats, Cowork tasks, and Code sessions are deleted, and the hold that suspends deletion | | **Appearance** | Persistent banner shown across the app window Deployment display name and subtitle Whether the signed-in user's identity is shown and exported (end-user attribution) Whether feature announcements are shown | | **Plugins** | [Plugin marketplaces](/docs/third-party/claude-desktop/extensions.md#plugin-marketplaces-admin), added by GitHub repo, git URL, or hosted `marketplace.json` URL Shows the org-plugins folder path for your platform; plugin bundles are mounted to that folder via your MDM, not through this window | @@ -139,7 +139,7 @@ A user who signs in to any organization that uses the [Enterprise Admin Console] A small group of **app-behavior keys** is treated specially, so you can set an update policy, a restart window, or a network proxy from MDM without managing the whole configuration: -* The update keys `disableAutoUpdates`, `autoUpdaterEnforcementHours`, `updateViaUpdatesHost`, and [`releaseChannel`](/docs/third-party/claude-desktop/configuration#releasechannel). +* The update keys `disableAutoUpdates`, `autoUpdaterEnforcementHours`, `installedUpdateEnforcementEnabled`, `installedUpdateEnforcementHours`, `updateViaUpdatesHost`, and [`releaseChannel`](/docs/third-party/claude-desktop/configuration#releasechannel). * The configuration lifecycle keys [`relaunchEnforcementHours`](/docs/third-party/claude-desktop/configuration#relaunchenforcementhours) and [`configRecheckIntervalMinutes`](/docs/third-party/claude-desktop/configuration#configrecheckintervalminutes), which MDM can set from version 1.46388.1. * The network proxy keys `egressProxyUrl` and `egressProxyPacUrl`. See [Network proxy](/docs/third-party/claude-desktop/network-proxy.md#pin-a-proxy-from-managed-configuration). diff --git a/content/claude/third-party/claude-desktop/models.md b/content/claude/third-party/claude-desktop/models.md index a0f7d8f5e9..0e5aa93b1f 100644 --- a/content/claude/third-party/claude-desktop/models.md +++ b/content/claude/third-party/claude-desktop/models.md @@ -76,4 +76,4 @@ With this configuration, a user who starts a new Cowork session sees Claude Sonn In that session, the user can switch to Claude Opus 5, which starts at its recommended high effort, or raise Claude Sonnet 5 to high. The session keeps either choice. The user's next new conversation or session opens on Claude Sonnet 5 at medium effort again. -The example is plain JSON, which is the form a [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md) response and the Linux managed file use. For a macOS profile or the Windows registry, encode the same values as the [Value types](/docs/third-party/claude-desktop/configuration.md#value-types) section describes. +The example is plain JSON, which is the form a [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md) response and the Linux managed file use. For a macOS profile or the Windows registry, encode the same values as the [Value types](/docs/third-party/claude-desktop/configuration-format.md#value-types) section describes. diff --git a/content/claude/third-party/claude-desktop/network-proxy.md b/content/claude/third-party/claude-desktop/network-proxy.md index 734994144c..931a51820e 100644 --- a/content/claude/third-party/claude-desktop/network-proxy.md +++ b/content/claude/third-party/claude-desktop/network-proxy.md @@ -66,7 +66,7 @@ On Linux, or wherever you deploy the local configuration file, the key sits alon } ``` -In a macOS configuration profile the same key is a `egressProxyUrlhttp://proxy.example.com:8080` pair in the `com.anthropic.claudefordesktop` payload, and on Windows it is a `REG_SZ` value named `egressProxyUrl` under `HKLM\SOFTWARE\Policies\Claude`. See [Value types](/docs/third-party/claude-desktop/configuration.md#value-types) and [Deploy with MDM](/docs/third-party/claude-desktop/mdm.md) for the surrounding profile and registry structure. +In a macOS configuration profile the same key is a `egressProxyUrlhttp://proxy.example.com:8080` pair in the `com.anthropic.claudefordesktop` payload, and on Windows it is a `REG_SZ` value named `egressProxyUrl` under `HKLM\SOFTWARE\Policies\Claude`. See [Value types](/docs/third-party/claude-desktop/configuration-format.md#value-types) and [Deploy with MDM](/docs/third-party/claude-desktop/mdm.md) for the surrounding profile and registry structure. Three behaviors to plan for: diff --git a/content/claude/third-party/claude-desktop/ssh-remote-sessions.md b/content/claude/third-party/claude-desktop/ssh-remote-sessions.md index 00dfeb511d..efbf45b6fe 100644 --- a/content/claude/third-party/claude-desktop/ssh-remote-sessions.md +++ b/content/claude/third-party/claude-desktop/ssh-remote-sessions.md @@ -134,7 +134,7 @@ Each entry is an exact hostname, an IP address, or a `*.` wildcard. Claude Desktop matches entries against the `HostName` that the device's `~/.ssh/config` gives for the entered host, or against the entered host itself when the configuration has no entry for it or can't be evaluated. An alias is allowed when it resolves to a listed host, whatever the alias is called, and is refused when it resolves to a host outside the list. In the allowlist, enter the hostnames that aliases resolve to. -A `ProxyCommand` is permitted when the resolved hostname matches. The app doesn't inspect where the command itself connects. The allowlist limits which hosts Claude Desktop connects to. It doesn't limit what the device can reach over SSH from a terminal. Use network controls for that. +A session's [jump hosts](#jump-hosts-and-the-allowlist) must match an entry too. The allowlist limits which hosts Claude Desktop connects to. It doesn't limit what the device can reach over SSH from a terminal. Use network controls for that, and for a hard boundary. For example, this Linux managed-settings file turns the feature on for one domain: @@ -144,7 +144,23 @@ For example, this Linux managed-settings file turns the feature on for one domai } ``` -In a `.mobileconfig` or registry policy, write the array as a JSON string as described under [Value types](/docs/third-party/claude-desktop/configuration.md#value-types). In a [bootstrap](/docs/third-party/claude-desktop/bootstrap.md) response, the key sits inside the `codeSurface` object. +In a `.mobileconfig` or registry policy, write the array as a JSON string as described under [Value types](/docs/third-party/claude-desktop/configuration-format.md#value-types). In a [bootstrap](/docs/third-party/claude-desktop/bootstrap.md) response, the key sits inside the `codeSurface` object. + +### Jump hosts and the allowlist + +Add each jump host, or bastion, that Claude Desktop checks to `sshHostAllowlist`, by the `HostName` that the device's `~/.ssh/config` gives for it. Add the jump hosts before devices update to Claude Desktop 3.1623.0 or later, or users can't connect through them. To hold updates until devices have the new allowlist, see [Auto-updates](/docs/third-party/claude-desktop/telemetry.md#auto-updates). + +> [!WARNING] +> +> The allowlist has one kind of entry, so users can also start a session on any host that you list, and that session receives your [inference credential](#inference-credentials-on-the-remote-host). List only jump hosts that you'd also let users run sessions on. + +Claude Desktop checks jump hosts in the `ProxyJump` that the device's `~/.ssh/config` sets for the session's host, or in a `ProxyCommand` written as `ssh -W %h:%p `. If one that it checks isn't on the allowlist when the app connects or reconnects a session, the connection fails. When the user starts a session or sends a message, they see [Your organization doesn't allow this SSH connection](#your-organization-doesn%E2%80%99t-allow-this-ssh-connection), and the card's details give that jump host's `HostName`. + +Find the names to add in a terminal on a user's device. Skip `proxyjump` lines on devices that use the built-in client, which [refuses every `ProxyJump`](#ssh-configuration-on-the-device), listed or not. + +1. Run `ssh -G` with a host that users connect to, for example `ssh -G build01`. Look for a `proxyjump` line, or a `proxycommand` line written as `ssh -W %h:%p `. The command still counts with any of `-l`, `-p`, `-J`, `-q`, `-v`, `-N`, `-T`, `-x`, or `-a`, and the hosts after `-J` are jump hosts too. If a `proxycommand` line runs a program other than `ssh`, add nothing for it. +2. Run `ssh -G` with each jump host on that line, without any `:port`, and note the `hostname` that it prints. If the output for the first jump host on that line has a line of either kind, repeat this step with it. Ignore such a line in a later jump host's output. +3. Add each hostname, or a wildcard that covers it, to the `sshHostAllowlist` that applies on the device. To tell which one applies, see [Interaction with Claude Code managed settings on the device](#interaction-with-claude-code-managed-settings-on-the-device). Then have users quit and reopen Claude Desktop, because an open app keeps the list from a [bootstrap server](/docs/third-party/claude-desktop/bootstrap.md#availability) or the [admin console](/docs/third-party/claude-desktop/admin-console.md#configuration-updates) until it restarts. ### Interaction with Claude Code managed settings on the device @@ -278,9 +294,9 @@ The host needs the following. * `git` on the path, for git features. * A home directory that the SSH user can write to and run programs from, with about 1 GB of disk space for the three Claude Code versions the app keeps and a fourth while an update installs. A home directory mounted `noexec` doesn't work. -The device needs the OpenSSH client (`ssh` and `ssh-keygen`). Claude Desktop runs the first `ssh` on the user's `PATH`; to pin a specific OpenSSH installation instead, set [`sshClientPath`](/docs/third-party/claude-desktop/configuration#sshclientpath) (beta, Claude Desktop 1.46388.1 or later) to the program's absolute path, and `ssh-keygen` is then taken from the same directory when present. If the pinned program is missing or cannot be run, SSH connections fail with an error that shows the configured path, rather than falling back to another `ssh`. +The device needs the OpenSSH client (`ssh` and `ssh-keygen`). Claude Desktop runs the first `ssh` on the user's `PATH`; to pin a specific OpenSSH installation instead, set [`sshClientPath`](/docs/third-party/claude-desktop/configuration#sshclientpath) (beta, Claude Desktop 1.46388.1 or later) to the program's absolute path, and `ssh-keygen` is then taken from the same directory when present. If the pinned program is missing or cannot be run, SSH connections fail with an error that shows the configured path, rather than falling back to another `ssh`. For the `ssh` that carries the connection on a Windows device, see [Prepare Windows devices for the OpenSSH client](#prepare-windows-devices-for-the-openssh-client). -On macOS and Linux, Claude Desktop makes the SSH connection by running the device's OpenSSH client, so your own OpenSSH build's Kerberos (GSSAPI), certificate, and `ssh_config` support handles authentication. The program is the one `sshClientPath` names, or else the first `ssh` on the user's `PATH`, and it must be OpenSSH 7.6 or newer. On Windows, the app's built-in SSH client makes the connection by default, and the app runs the device's OpenSSH tools to evaluate the user's SSH configuration, look up host keys, and run the session's terminal. To have the device's OpenSSH client carry the connection on Windows too, set [`sshTransport`](/docs/third-party/claude-desktop/configuration#sshtransport) (beta) to `system-openssh`; the client must be Win32-OpenSSH 9.4 or newer. On a Windows device with no usable OpenSSH client and no `sshClientPath`, the built-in client is used regardless. Set `sshTransport` to `builtin` to use the built-in client on every platform. A change applies to new connections, and sessions that are already connected keep their client. +On macOS and Linux, Claude Desktop makes the SSH connection by running the device's OpenSSH client, so your own OpenSSH build's Kerberos (GSSAPI), certificate, and `ssh_config` support handles authentication. The program is the one `sshClientPath` names, or else the first `ssh` on the user's `PATH`, and it must be OpenSSH 7.6 or newer. On Windows, the app's built-in SSH client makes the connection by default, and the app runs the device's OpenSSH tools to evaluate the user's SSH configuration, look up host keys, and run the session's terminal. To have the device's OpenSSH client carry the connection on Windows too, set [`sshTransport`](/docs/third-party/claude-desktop/configuration#sshtransport) (beta) to `system-openssh`; a client that the app finds itself must be Win32-OpenSSH 9.4 or newer. On a Windows device with no usable OpenSSH client and no `sshClientPath`, the built-in client is used regardless. For what to check first, see [Prepare Windows devices for the OpenSSH client](#prepare-windows-devices-for-the-openssh-client). Set `sshTransport` to `builtin` to use the built-in client on every platform. A change applies to new connections, and sessions that are already connected keep their client. The built-in client also makes the connection in these cases: @@ -303,11 +319,33 @@ Each side of a remote session needs its own network access. * Devices installed with the regular installer must reach `downloads.claude.ai`: Claude Desktop downloads the remote server there and uploads it to the host over SFTP. Devices installed with the [offline installer](/docs/third-party/claude-desktop/installation.md#offline-installation) don't: it bundles the remote server and the Claude Code engine for Linux x64 and arm64 hosts, and Claude Desktop uploads both over SFTP. Hosts on other platforms still need the download, so an offline-installed device that cannot reach `downloads.claude.ai` fails the session with a message saying the installer doesn't include remote components for that platform. * The host must reach your inference endpoint and, if configured, your OTLP collector, plus whatever the user's own work needs. With the regular installer, it downloads the Claude Code engine from `downloads.claude.ai` when it can; when that fails, Claude Desktop downloads the engine on the device and uploads it over SFTP. Unless you disabled telemetry, the engine on the host also reports to the same Anthropic hosts as a local Code session (see [Telemetry and egress](/docs/third-party/claude-desktop/telemetry.md)). Blocking them does not affect the session. +### Prepare Windows devices for the OpenSSH client + +On Windows devices, the app's built-in SSH client makes the SSH connection by default. The device's OpenSSH client makes it when you set [`sshTransport`](/docs/third-party/claude-desktop/configuration#sshtransport) (beta) to `system-openssh`. + +With the device's OpenSSH client on a Windows device: + +* **Repeated sign-ins**: each time Claude Desktop connects or reconnects to a host, it signs in at least twice, to run commands and to transfer files, and once more for each terminal that opens. A Windows host takes at least one more sign-in each time. On a Windows device, each sign-in is a separate `ssh` process. They stay open together, so a per-user login limit on the host has to leave room for them. Claude Desktop repeats a typed password or key passphrase itself for the other sign-ins of that connection. A host that asks for a one-time code, a push approval, or a security key touch asks again at each sign-in. +* **Host keys that aren't on record**: where the app can show a prompt, it asks the user whether to trust the key, and records a trusted key in the user's `known_hosts` file. To distribute host keys instead, see [SSH configuration on the device](#ssh-configuration-on-the-device). +* **Saved passwords**: when the session's host asks for the account password, the sign-in dialog has a **Remember password for ``** checkbox. To turn saved passwords off, set [`disableSshSavedPasswords`](https://code.claude.com/docs/en/desktop#managed-settings) to `true` in Claude Code's managed settings on the device, by the steps for `disableDesktopLocalSessions` under [Interaction with Claude Code managed settings on the device](#interaction-with-claude-code-managed-settings-on-the-device). The dialog then has no checkbox, and the app stops using passwords that it saved earlier. It doesn't delete them. + +Before you set `sshTransport`, check what the device's OpenSSH client needs on Windows: + +* **One value for all platforms**: `sshTransport` has no per-platform form. A Windows registry policy reaches Windows devices only. A value from a bootstrap server or the Enterprise Admin Console reaches the macOS and Linux devices that it serves too, where the device's OpenSSH client already makes the connection by default. +* **Devices with a bootstrap server**: an available [bootstrap response](/docs/third-party/claude-desktop/bootstrap.md) replaces the registry's value of `sshTransport`, even if the response leaves the key out, so return the key in the response too. If you set `sshClientPath`, return it too, but only in a response that goes to Windows devices alone. It has no per-platform form either, and SSH connections fail on a macOS or Linux device that gets a Windows path. +* **Client version**: with no [`sshClientPath`](/docs/third-party/claude-desktop/configuration#sshclientpath), a usable client prints a version that starts with `OpenSSH_for_Windows_` and is 9.4 or later. Run `ssh -V` in a Command Prompt window on a device, signed in as the user. If that output is anything else, run `ssh.exe -V` in `%SystemRoot%\System32\OpenSSH` and in `%ProgramFiles%\OpenSSH`: Claude Desktop uses the first usable client that it finds, on the `PATH`, then in those two folders in that order. If you set `sshClientPath`, run that program with `-V` instead. In Claude Desktop 3.1623 and earlier, it has to pass the same test. +* **Devices without a usable client**: on a Windows device with no usable OpenSSH client and no `sshClientPath`, the built-in client is used regardless. Add the **OpenSSH Client** optional feature in Windows and install pending Windows updates, or install [Microsoft's newer build](https://learn.microsoft.com/en-us/troubleshoot/windows-server/system-management-components/upgrade-in-box-openssh-to-latest-openssh-release). Run the version check again, then have users quit and reopen Claude Desktop. +* **Application control**: `ssh` shows its prompts through three helper programs that ship with Claude Desktop, `claude-ssh-askpass.exe`, `claude-ssh-broker.exe`, and `claude-ssh-proxy.exe`. Allow them in your application control policy by their publisher, Anthropic, PBC. Their folder changes with each update, and the files carry no product name or version. Allow the `ssh.exe` that the version check found too. If Windows refuses to start the helpers, sign-ins that need a password, a one-time code, or a key passphrase fail, and `ssh` refuses a host whose key isn't on record. See [This computer won't start Claude's SSH sign-in helper](#this-computer-won%E2%80%99t-start-claude%E2%80%99s-ssh-sign-in-helper). +* **Key files**: `ssh` doesn't read a PuTTY `.ppk` key file. Export the key in OpenSSH format, and have the user select the exported file as the connection's identity file. +* **SSH configuration files**: `ssh` reads the user's `~/.ssh/config` itself, and the connection fails if `ssh` rejects the file. In a Command Prompt window on a device, signed in as the user, run the usable client with `-G` and a host, for example `ssh -G build01.corp.example.com`. Use the client's full path if it isn't the first `ssh` on the `PATH`. `ssh` prints the host's settings if it accepts the file, and an error if it doesn't. +* **Microsoft Store installs**: where Claude Desktop is installed from the Microsoft Store, it can't show `ssh`'s prompts. Use a sign-in method that needs no prompt, such as a key held by the SSH agent, and have users connect to each host once from a terminal before adding it in the app. + ### SSH configuration on the device Claude Desktop applies the host's entry in the user's `~/.ssh/config`. With the device's OpenSSH client (the default on macOS and Linux), `ssh` reads the entry itself, so settings such as `ProxyJump`, certificate host keys, and GSSAPI authentication apply, and the app still connects only to the resolved hostname that passed `sshHostAllowlist`. The built-in client (the default on Windows) applies the hostname, port, user, identity file, SSH agent, and `ProxyCommand`. * For hosts behind a bastion, configure a `ProxyJump` or `ProxyCommand`. `ProxyJump` works only when the device's OpenSSH client carries the connection (the default on macOS and Linux). The built-in client refuses it. For the card that the user sees, see [Ask your IT administrator to set sshTransport to system-openssh](#ask-your-it-administrator-to-set-sshtransport-to-system-openssh). +* A bastion must match `sshHostAllowlist` too. See [Jump hosts and the allowlist](#jump-hosts-and-the-allowlist). * With the device's OpenSSH client, OpenSSH's own host key checking applies. For a host whose key isn't on record yet, where the app can show a prompt, it shows the key's fingerprint, asks the user whether to trust it, and records a trusted key in the user's `known_hosts` file, unless the user's own SSH configuration accepts new keys without asking. The app can't show a prompt on every connection, for example when it reconnects in the background. Distribute the host keys or a host certificate authority to the devices, so that each host's key is on record before users connect. `@cert-authority` entries are honored. A key that differs from the one on record for the host is refused, whatever the entry's `StrictHostKeyChecking` says, unless another setting in the SSH configuration that applies to the host takes that check away, such as `NoHostAuthenticationForLocalhost yes` for a host on a loopback address. * With the device's OpenSSH client, you can keep the app from asking users to trust the key of a host that isn't on record yet. Distribute the host keys in the client's system-wide `known_hosts` file, such as `/etc/ssh/ssh_known_hosts`, or distribute a host certificate authority. Then set `StrictHostKeyChecking yes`, for example under `Host *`, in the client's system-wide configuration file, such as `/etc/ssh/ssh_config`, which also governs other uses of that client, such as `git` over SSH. Where the SSH configuration that applies to a host has `StrictHostKeyChecking yes`, Claude Desktop doesn't ask the user to trust such a key, and `ssh` refuses the host if it can't verify the key. A key that differs from the one on record is handled the same way with or without this setting. The setting doesn't bind the user. By OpenSSH's own rules, `ssh` reads the user's `~/.ssh/config` before the system-wide file and keeps the first value it finds for a setting, so a `StrictHostKeyChecking` line there applies in place of yours. `ssh` also accepts a key that the user adds to their own `known_hosts` file, but under `yes` a connection from a terminal doesn't record the key. A user who picks a host that `ssh` refuses sees "Couldn't connect to" followed by the host, with [SSH host key verification failed](#ssh-host-key-verification-failed) under **View details**. * With the built-in client, the host's key must already be in the device's `~/.ssh/known_hosts` as a plain entry. The app does not prompt to accept a new key and does not evaluate `@cert-authority` entries, so have users connect once from a terminal before adding the host in the app. @@ -328,7 +366,15 @@ Where the session's terminal can't use that connection, and always with the buil ### Your organization doesn't allow this SSH connection -The `sshHostAllowlist` in effect on this device is unset, empty, or has no entry that matches the host. The card's details say which. The name that must match is the `HostName` that the device's `~/.ssh/config` resolves the entered host to, so an entry that lists only an alias doesn't allow the host. Which configuration source supplies the key on a device follows [Interaction with Claude Code managed settings on the device](#interaction-with-claude-code-managed-settings-on-the-device). For a device that moved to an admin console organization, see [Devices that move to an admin console organization](#devices-that-move-to-an-admin-console-organization). The connection test reports the same denial as "Your organization's settings do not allow this connection." Before Claude Desktop 2.31226.0, the card's title was "SSH isn't allowed by your organization". +The `sshHostAllowlist` in effect on this device is unset, empty, or has no entry that matches the host or a jump host on the way to it. The card's details say which. The name that must match is the `HostName` that the device's `~/.ssh/config` resolves the entered host to, so an entry that lists only an alias doesn't allow the host. Which configuration source supplies the key on a device follows [Interaction with Claude Code managed settings on the device](#interaction-with-claude-code-managed-settings-on-the-device). For a device that moved to an admin console organization, see [Devices that move to an admin console organization](#devices-that-move-to-an-admin-console-organization). The connection test, and the "Couldn't connect to" card on the New session page, report the same denial as "Your organization's settings do not allow this connection." Before Claude Desktop 2.31226.0, the card's title was "SSH isn't allowed by your organization". + +For a jump host, read the warning under [Jump hosts and the allowlist](#jump-hosts-and-the-allowlist), then add the first name in the details to the allowlist. That name is the jump host's `HostName`, and the second name is the host that the user entered. + +```text theme={null} +SSH host "bastion.corp.example.com" is not allowed by your organization's managed settings. It is a jump host on the way to "build01". +``` + +If the next attempt names another jump host, add that one too. To find every name beforehand, see [Jump hosts and the allowlist](#jump-hosts-and-the-allowlist). Requires Claude Desktop 3.1623.0 or later. ### SSH to this device isn't available @@ -361,7 +407,7 @@ These cards require Claude Desktop 2.31226.0 or later. Before Claude Desktop 2.3 ### This computer won't start Claude's SSH sign-in helper -On a Windows device where the device's OpenSSH client makes the connection, Windows refused to start one of the helper programs through which Claude Desktop shows `ssh`'s prompts. Without them the app can't ask for a password or a one-time code, so the user can't sign in to a host that needs one. Select **View details** on the card for the blocked program's path and the error code. Allow `claude-ssh-askpass.exe`, `claude-ssh-broker.exe`, and `claude-ssh-proxy.exe` in that folder, then have the user try again. Requires Claude Desktop 2.37337.0 or later. +On a Windows device where the device's OpenSSH client makes the connection, Windows refused to start one of the helper programs through which Claude Desktop shows `ssh`'s prompts. Without them the app can't ask for a password or a one-time code, so the user can't sign in to a host that needs one. Select **View details** on the card for the blocked program's path and the error code. Allow the helper programs as described under [Prepare Windows devices for the OpenSSH client](#prepare-windows-devices-for-the-openssh-client), then have the user try again. Requires Claude Desktop 2.37337.0 or later. ### This computer's ssh refuses a backslash or dollar sign in user names diff --git a/content/claude/third-party/claude-desktop/telemetry.md b/content/claude/third-party/claude-desktop/telemetry.md index 0ee3361d07..596ac917df 100644 --- a/content/claude/third-party/claude-desktop/telemetry.md +++ b/content/claude/third-party/claude-desktop/telemetry.md @@ -78,7 +78,7 @@ Set [`otlpEndpoint`](/docs/third-party/claude-desktop/configuration#otlpendpoint The receiver must implement the OpenTelemetry protocol (OTLP) over HTTP in both its protobuf and JSON encodings, as an OpenTelemetry Collector does by default. If your logging or SIEM platform accepts only its own HTTP ingestion format, run an OpenTelemetry Collector that receives OTLP and forwards to that platform, and set `otlpEndpoint` to the collector's address. Each device opens its own connection to the collector, so the collector must present a TLS certificate the operating system trusts. See [TLS-intercepting proxies](/docs/third-party/claude-desktop/network-proxy.md#tls-intercepting-proxies) if a TLS-intercepting proxy sits in between. -[`otlpHeaders`](/docs/third-party/claude-desktop/configuration#otlpheaders) is a JSON object that maps each header name to its value, for example `{"Authorization":"Bearer ","X-Tenant":"agency"}`. As with the other object-typed keys described under [Value types](/docs/third-party/claude-desktop/configuration.md#value-types), write it as a JSON string. +[`otlpHeaders`](/docs/third-party/claude-desktop/configuration#otlpheaders) is a JSON object that maps each header name to its value, for example `{"Authorization":"Bearer ","X-Tenant":"agency"}`. As with the other object-typed keys described under [Value types](/docs/third-party/claude-desktop/configuration-format.md#value-types), write it as a JSON string. The app reads both keys at launch, so users must restart it after a change. If the collector refuses requests or cannot be reached, the app keeps working, shows no error, and drops the affected telemetry batches. Check the collector's own request logs to confirm data is arriving. diff --git a/content/claude/third-party/claude-desktop/vertex.md b/content/claude/third-party/claude-desktop/vertex.md index 78793957f9..4381ac24ae 100644 --- a/content/claude/third-party/claude-desktop/vertex.md +++ b/content/claude/third-party/claude-desktop/vertex.md @@ -257,41 +257,186 @@ The full set of `inferenceVertex*` keys is below. Set `inferenceProvider` to `ve The region can be a single region such as `us-east5`, the `eu` or `us` multi-region, or `global`. The app routes inference to a different endpoint host for multi-regions and `global`; if you allowlist egress by hostname, see the [inference provider egress hosts](/docs/third-party/claude-desktop/telemetry.md#inference-provider). -| Setting | Type | Availability | Default | Description | -| - | - | - | - | - | -| GCP project ID `inferenceVertexProjectId` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Google Cloud project ID for Vertex AI inference. | -| GCP region `inferenceVertexRegion` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | GCP region where your Vertex AI Claude models are deployed. | -| Vertex AI base URL `inferenceVertexBaseUrl` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | PSC endpoint, if using one. | -| Vertex OAuth client ID `inferenceVertexOAuthClientId` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Desktop-app OAuth client ID. Enables Sign in with Google instead of a credentials file. | -| Vertex OAuth client secret `inferenceVertexOAuthClientSecret` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Secret for the Desktop-app OAuth client above. Google classifies installed-app client secrets as non-confidential, so this may be set from hosted config. | -| Vertex OAuth scopes `inferenceVertexOAuthScopes` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Override the Google OAuth scopes (space-separated). Leave blank for the default. | -| Vertex OAuth login hint `inferenceVertexOAuthLoginHint` | `string` | MDM + Bootstrap Added in 1.12603.0 | — | Pre-fill Google's account chooser and forward to your federated IdP. \{username} expands to the OS login name. | -| Workforce Identity audience `inferenceVertexWorkforceAudience` | `string` | MDM + Bootstrap Added in 1.10628.0 | — | Workforce-pool provider audience. When set, sign-in uses your own IdP plus a GCP STS exchange instead of a Google identity. | -| Workforce Identity billing project `inferenceVertexWorkforceUserProject` | `string` | MDM + Bootstrap Added in 1.10628.0 | — | GCP project for STS billing and quota. Defaults to the Vertex project ID above. | -| Workforce Identity sign-in flow `inferenceVertexWorkforceAuthFlow` | `enum` | MDM + Bootstrap Added in 1.25927.0 | — | How the IdP sign-in runs: system browser (default) or the OS Microsoft Entra broker. One of: `browser`, `broker`. | -| Workforce Identity IdP (OIDC) `inferenceVertexWorkforceOidc` | `object` | MDM + Bootstrap Added in 1.10628.0 | — | Your organization’s OIDC IdP. The app runs an authorization-code-with-PKCE flow against this issuer and exchanges the returned ID token at GCP STS. | -| GCP credentials file path `inferenceVertexCredentialsFile` | `string` | MDM + Bootstrap Added in 1.2581.0 | — | Absolute path to service-account JSON. Leave blank to fall back to ADC. | - -> **inferenceVertexWorkforceAuthFlow details** +[Entry labels](/docs/third-party/claude-desktop/configuration.md#entry-labels) says what each label means. + +#### `inferenceVertexProjectId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**GCP project ID.** Google Cloud project ID for Vertex AI inference. + +*** + +#### `inferenceVertexRegion` + +stringSince 1.2581.0 + +**GCP region.** GCP region where your Vertex AI Claude models are deployed. + +*** + +#### `inferenceVertexBaseUrl` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Origin-pinned (A URL that a bootstrap server delivers must share the origin of bootstrapUrl, or Claude Desktop drops it. The limit is lifted when bootstrapOidc is set, and it does not apply to a value set in an MDM profile, the local configuration file or the Enterprise Admin Console.) + +Since 1.2581.0 + +**Vertex AI base URL.** PSC endpoint, if using one. + +*** + +#### `inferenceVertexOAuthClientId` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**Vertex OAuth client ID.** Desktop-app OAuth client ID. Enables Sign in with Google instead of a credentials file. + +*** + +#### `inferenceVertexOAuthClientSecret` + +stringSince 1.2581.0 + +**Vertex OAuth client secret.** Secret for the Desktop-app OAuth client above. Google classifies installed-app client secrets as non-confidential, so this may be set from hosted config. + +*** + +#### `inferenceVertexOAuthScopes` + +stringSince 1.2581.0 + +**Vertex OAuth scopes.** Override the Google OAuth scopes (space-separated). Leave blank for the default. + +*** + +#### `inferenceVertexOAuthLoginHint` + +stringSince 1.12603.0 + +**Vertex OAuth login hint.** Pre-fill Google's account chooser and forward to your federated IdP. \{username} expands to the OS login name. + +*** + +#### `inferenceVertexWorkforceAudience` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.10628.0 + +**Workforce Identity audience.** Workforce-pool provider audience. When set, sign-in uses your own IdP plus a GCP STS exchange instead of a Google identity. + +*** + +#### `inferenceVertexWorkforceUserProject` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.10628.0 + +**Workforce Identity billing project.** GCP project for STS billing and quota. Defaults to the Vertex project ID above. + +*** + +#### `inferenceVertexWorkforceAuthFlow` + +enumSince 1.25927.0 + +**Workforce Identity sign-in flow.** How the IdP sign-in runs: system browser (default) or the OS Microsoft Entra broker. + +One of: `browser`, `broker` + +> **More detail** > > * **`browser`** (default) — opens the system browser for an authorization-code (PKCE) sign-in on a loopback redirect URI. See the **IdP setup** notes on `inferenceGatewayOidc` for redirect-URI registration; the same rules apply here. > * **`broker`** — signs in through the OS identity broker (Web Account Manager on Windows, Company Portal on macOS). Requires the workforce-pool IdP to be **Microsoft Entra ID** — the `issuer` on `inferenceVertexWorkforceOidc` must be `https://login.microsoftonline.com/{tenant-id}/v2.0`. The broker satisfies Conditional Access policies that require a compliant/managed device or token protection, and needs no loopback redirect. The Entra app registration must include the broker redirect URIs `ms-appx-web://Microsoft.AAD.BrokerPlugin/{client-id}` (Windows) and `msauth.com.anthropic.claudefordesktop://auth` (macOS) under the **Mobile and desktop applications** platform. Not supported on Linux. > > The GCP STS token-exchange step is unchanged in either flow; only how the Entra id\_token is acquired differs. -> **inferenceVertexWorkforceOidc details** +*** + +#### `inferenceVertexWorkforceOidc` + +object + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.10628.0 + +**Workforce Identity IdP (OIDC).** Your organization’s OIDC IdP. The app runs an authorization-code-with-PKCE flow against this issuer and exchanges the returned ID token at GCP STS. + +> **Child attributes (9)** +> +> **clientId** `string` *required* +> +> OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). +> +> **issuer** `string` +> +> HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. +> +> **authorizationUrl** `string` > -> | Field | Type | Default | Description | -> | - | - | - | - | -> | `clientId` | `string` | — | OAuth client ID of the desktop app registration at your identity provider (public client, PKCE). | -> | `issuer` | `string` | — | HTTPS issuer with OIDC discovery. Set this, or set the authorization and token URLs instead. | -> | `authorizationUrl` | `string` | — | HTTPS authorization endpoint. Used with the token URL when no issuer is set. | -> | `tokenUrl` | `string` | — | HTTPS token endpoint. Used with the authorization URL when no issuer is set. | -> | `scopes` | `string` | — | Space-separated scopes. Defaults to openid profile email offline\_access. | -> | `redirectPort` | `integer` | — | Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. | -> | `redirectHost` | `enum` | — | Use localhost only if your IdP’s registered redirect URI specifies it. One of: `127.0.0.1`, `localhost`. | -> | `omitOfflineAccess` | `boolean` | — | Only enable if your IdP rejects the offline\_access scope on this client. Without it the app prompts for sign-in each time the token expires. | -> | `additionalRedirectReferrerHosts` | `string` | — | Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. | +> HTTPS authorization endpoint. Used with the token URL when no issuer is set. +> +> **tokenUrl** `string` +> +> HTTPS token endpoint. Used with the authorization URL when no issuer is set. +> +> **scopes** `string` +> +> Space-separated scopes. Defaults to openid profile email offline\_access. +> +> **redirectPort** `integer` +> +> Fixed loopback port for the sign-in redirect. Leave unset to use a free port each time. +> +> **redirectHost** `enum` +> +> Use localhost only if your IdP’s registered redirect URI specifies it. +> +> One of: `127.0.0.1`, `localhost` +> +> **omitOfflineAccess** `boolean` +> +> Only enable if your IdP rejects the offline\_access scope on this client. Without it the app prompts for sign-in each time the token expires. +> +> **additionalRedirectReferrerHosts** `string` +> +> Space-separated hostnames also accepted as the referrer of the sign-in callback. Only needed when the IdP completes sign-in from a different host. +> +> > **More detail** +> > +> > Only needed when the IdP completes sign-in from a host other than the authorization URL’s. When a callback is rejected for a referrer mismatch, the rejected host is named in the app log — add that hostname here. + +*** + +#### `inferenceVertexCredentialsFile` + +string + +Consent required (A value that a bootstrap server or a self-hosted session host delivers applies only after the user approves it, unless machine-scoped device management set that server's address. For a bootstrap server, the trustBootstrapDelivery key overrides that default. A value set in an MDM profile, the local configuration file or the Enterprise Admin Console needs no approval.) + +Since 1.2581.0 + +**GCP credentials file path.** Absolute path to service-account JSON. Leave blank to fall back to ADC. + +*** If none of `inferenceVertexCredentialsFile`, the OAuth client keys, the Workforce Identity keys, or `inferenceCredentialHelper` is set, the Google client library falls back to the standard Application Default Credentials search path on the device (`~/.config/gcloud/application_default_credentials.json`, then the environment's metadata server). diff --git a/content/en/about-claude/model-deprecations.md b/content/en/about-claude/model-deprecations.md index 53a5dea591..cb4a1818ff 100644 --- a/content/en/about-claude/model-deprecations.md +++ b/content/en/about-claude/model-deprecations.md @@ -21,7 +21,7 @@ Anthropic uses the following terms to describe the model lifecycle: Deprecated models are likely to be less reliable than active models. Move workloads to active models to maintain the highest level of support and reliability. -The dates on this page apply to Anthropic-operated platforms: the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). Partner-operated platforms (Amazon Bedrock and Google Cloud) set their own retirement schedules, so a model's lifecycle status and dates can differ. See the [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#supported-models), [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#api-model-ids), and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai#api-model-ids) model tables. +The dates on this page apply to Anthropic-operated platforms: the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). Partner-operated platforms, Amazon Bedrock and Claude Models on Google Cloud (Google managed), set their own retirement schedules, so a model's lifecycle status and dates can differ. See the [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#supported-models), [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#api-model-ids), and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#api-model-ids) model tables. ## Migrating to replacements diff --git a/content/en/about-claude/models/model-ids-and-versions.md b/content/en/about-claude/models/model-ids-and-versions.md index fed2defc55..3467a3101d 100644 --- a/content/en/about-claude/models/model-ids-and-versions.md +++ b/content/en/about-claude/models/model-ids-and-versions.md @@ -32,7 +32,7 @@ For example: `anthropic.claude-sonnet-4-6`, `anthropic.claude-sonnet-5`, `anthro Claude Opus 4.6 is the last Bedrock model ID to include the `-v1` suffix (`anthropic.claude-opus-4-6-v1`). Anthropic dropped the suffix starting with Claude Sonnet 4.6. -On Google Cloud, the format matches the Claude API. +On Claude Models on Google Cloud (Google managed), the format matches the Claude API. ### Before the 4.6 generation @@ -52,7 +52,7 @@ anthropic.claude-{name}-{major}-{minor}-{YYYYMMDD}-v1:0 For example: `anthropic.claude-sonnet-4-5-20250929-v1:0` -On Google Cloud, the date is separated with `@`: +On Claude Models on Google Cloud (Google managed), the date is separated with `@`: ```text wrap claude-{name}-{major}-{minor}@{YYYYMMDD} @@ -80,4 +80,4 @@ Occasionally, infrastructure updates produce minor differences in observable beh ## Current model IDs -For the full list of current model IDs and their Amazon Bedrock and Google Cloud equivalents, see [Models overview](https://platform.claude.com/docs/en/models/overview). +For the full list of current model IDs and their Amazon Bedrock and Claude Models on Google Cloud (Google managed) equivalents, see [Models overview](https://platform.claude.com/docs/en/models/overview). diff --git a/content/en/about-claude/models/optimizing-for-cost-and-intelligence.md b/content/en/about-claude/models/optimizing-for-cost-and-intelligence.md index cd3d397026..c25538e3a1 100644 --- a/content/en/about-claude/models/optimizing-for-cost-and-intelligence.md +++ b/content/en/about-claude/models/optimizing-for-cost-and-intelligence.md @@ -104,7 +104,7 @@ To decide, count the gaps between consecutive requests in a conversation, and fi | Pauses run for minutes | Claude Fable 5.1 | 5-minute cache kept warm, instead of the 1-hour duration | | Pauses run toward an hour | Claude Fable 5.1 | 1-hour duration | -On Claude Haiku 5.5, use the "Any" rows. Keep-alive requests were not measured on it. By list prices, not by measurement, each one costs twice as much relative to the input price as on Claude Opus 5.5 and Claude Sonnet 5.5: Claude Haiku 5.5 reads the cache at the standard 0.1x, those two at 0.05x. +On Claude Haiku 5.5, use the "Any" rows: it reads the cache at the standard 0.1x the input price, twice the 0.05x of Claude Opus 5.5 and Claude Sonnet 5.5, so by list prices each keep-alive request costs twice as much relative to the input price. A `max_tokens: 0` request refreshed its cache in a separate test (reference 16). **Why, row by row.** @@ -140,7 +140,7 @@ The following chart adds the 5-minute cache kept warm by keep-alive requests, on * The 1-in-20 rule leaves a margin over the break-even of about 1 turn in 30. At 1 turn in 20 the 5-minute and the 1-hour setting cost about the same on Claude Sonnet 5.5, within run-to-run variation; at 1 turn in 10 the 5-minute setting cost 54% more (reference 16). * On models other than Claude Sonnet 5.5 and Claude Opus 5.5, prices put the break-even in the same range: every current model uses the same cache-write multipliers, and every model but Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5.5, and Claude Sonnet 5.5 the same read price. -* The Claude Opus 5.5 and Claude Sonnet 5.5 keep-alive figures come from requests sent with `max_tokens: 1`. Whether a `max_tokens: 0` request refreshes an existing cache entry was not measured on Claude Opus 5.5 (reference 16). +* The Claude Opus 5.5 and Claude Sonnet 5.5 keep-alive figures come from requests sent with `max_tokens: 1`. A `max_tokens: 0` request also refreshed an existing cache entry on Claude Fable 5.1, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 (reference 16). To keep the cache warm: @@ -186,26 +186,22 @@ On the code that produced these measurements, the skill put one breakpoint on th Keep per-request text in the newest user turn, after the last cache breakpoint, and make every cache-invalidating change at a natural break, such as the first request after a compaction. The cache is a byte-exact prefix match over the request in order (tools, then system prompt, then messages), so a change anywhere invalidates everything after it. -The stakes are highest on Claude Fable 5.1 and Claude Mythos 5.1, where a break re-writes the prefix at 1.25x the input price instead of reading it at 0.025x. The following table gives what one broken turn costs on a 100,000-token prefix, computed from list prices with the 5-minute cache, not measured: +When something must change mid-conversation, send it in the form that keeps the cache, where the model supports it. In Anthropic's test on Claude Fable 5.1, Claude Opus 5.5, and Claude Sonnet 5.5, on a cached conversation of about 100,000 tokens, editing the system prompt cost about 25 to 50 times what the same text cost as a mid-conversation system message. Changing effort at the top level cost 20 to 40 times what it cost per message[18](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs): -| Model | One broken turn | The read instead | Compared with the read | -| -------------------------------------- | --------------- | ---------------- | ---------------------- | -| Claude Fable 5.1 and Claude Mythos 5.1 | $1.25 USD | $0.025 USD | 50 times | -| Claude Opus 5.5 | $0.50 USD | $0.02 USD | 25 times | -| Claude Sonnet 5.5 | $0.25 USD | $0.01 USD | 25 times | + + ![Bar chart: system prompt edit up to $1.26 USD, top-level effort change up to $1.02 USD, either in a message up to $0.026 USD](https://platform.claude.com/docs/images/cost-intel/cache-break-cost.svg) + -On the other current models it costs 12.5 times the read. +The stakes are highest on Claude Fable 5.1 and Claude Mythos 5.1, where a break re-writes the prefix at 1.25x the input price instead of reading it at 0.025x. On Claude Haiku 5.5 a system prompt edit costs 12.5 times an unchanged request. The edit re-wrote the whole conversation. By default, newer accounts get a 400 error instead[18](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs). The top-level effort change, in a conversation that held the model's first reply with its thinking, re-wrote all but the system prompt. These figures are from the Messages API. **What to do.** -* Put nothing that changes per request, such as a timestamp or a queue position, ahead of the stable prefix: it turns every request into a full cache write. In a measurement on an earlier model, a 25-token status line at the front of the system prompt made a run of a small agent that triages bug reports ([Trim input and context tokens](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#trim-input-and-context-tokens)) cost more than running with caching off[18](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs). -* The [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#what-invalidates-the-cache) page lists the changes that invalidate the cache, such as a change to [`effort`](https://platform.claude.com/docs/en/build-with-claude/effort), the thinking configuration, the system prompt, or a tool definition. Changing the output format invalidates the cache for that conversation (see [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#prompt-modification-and-token-costs)). -* On the most recent models, change instructions with a [mid-conversation system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), a `{"role": "system"}` message appended to `messages`, instead of editing the top-level `system` field: the cached prefix stays intact. Check that page for which models support it. A per-message effort change leaves the cached prefix intact too, but on fewer models: [Change effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#changing-effort-mid-conversation) lists them. +* Put nothing that changes per request, such as a timestamp or a queue position, ahead of the stable prefix: it turns every request into a full cache write. In Anthropic's test, a 25-token status line at the front of the system prompt made each request write the whole conversation; moved to the end of the newest user turn, it left the cache read intact[18](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs). +* The [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#what-invalidates-the-cache) page lists the changes that invalidate the cache, such as a change to [`effort`](https://platform.claude.com/docs/en/build-with-claude/effort), the thinking configuration, the [`speed`](https://platform.claude.com/docs/en/build-with-claude/fast-mode) setting, the system prompt, or a tool definition. Changing the output format invalidates the cache for that conversation (see [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#prompt-modification-and-token-costs)). +* Check which models support each form: [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), and [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#changing-effort-mid-conversation), which is in beta. * After a cache-invalidating change, confirm cache reads have not dropped; if they have, [cache diagnostics](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics) shows where the prefix diverged. -Anthropic measured the timing of a change on an earlier model, on the triage agent's long sessions[18](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs). In that measurement, sessions cost more when an effort change and an added tool were made mid-session, or on the request that triggered the compaction, than when the same two changes were made on the first request after compaction. Accuracy was within run-to-run noise in every case. - -The sessions with no changes cost more than the sessions changed after compaction, but not because of caching. They ran at the default effort throughout and two compacted a second time, while the others started at low effort (reference 18): +On an earlier model, Anthropic measured when to make such a change, on the triage agent's long sessions[18](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs). An effort change and an added tool cost more mid-session, or on the request that triggered the compaction, than on the first request after compaction. Accuracy was within run-to-run noise. The sessions with no changes cost more than those changed after compaction for another reason: they ran at the default effort throughout, and two of them compacted a second time, while the others started at low effort: ![Bar chart, cost per triage session: $0.81 USD no changes, $0.95 USD mid-session, $0.92 USD at compaction, $0.75 USD after](https://platform.claude.com/docs/images/cost-intel/compaction-timing.svg) @@ -1012,7 +1008,7 @@ Except where a reference says otherwise, measurements are Anthropic-internal run * **5-minute and 1-hour settings, Claude Sonnet 5 and Claude Opus 5.5:** In the 5% cell the 5-minute and 1-hour settings tied on Claude Sonnet 5, because that draw's pauses fell on small prefixes; on Claude Opus 5.5 they nearly tied. On Claude Sonnet 5, at its cache-read price of $0.20 USD per million tokens, a session cost $0.60 USD, $0.69 USD, and $0.99 USD on the 5-minute setting with no pauses, 5%, and 10% of turns paused, and $0.70 USD, $0.70 USD, and $0.71 USD on the 1-hour setting. * **Keep-alive requests, Claude Sonnet 5 and Claude Opus 5:** Anthropic measured keep-alive requests that refresh the 5-minute cache on Claude Sonnet 5 and Claude Opus 5 on August 23, 2026, and on Claude Opus 5.5 in the runs above, always sent with `max_tokens: 1`. On Claude Sonnet 5 they cost 7.7% less than the 1-hour setting with 5% of turns paused and about the same with 10%; on Claude Opus 5 no difference was measurable at either share; on both they cost more with a pause of 6 minutes or more before every turn. So on those two models the setting to use is the 1-hour duration, not keep-alive requests. * **Keep-alive requests, Claude Opus 5.5:** On Claude Opus 5.5 keep-alive requests cost 8% to 18% less than the 1-hour setting with 5% and 10% of turns paused (8% to 13% less at its default effort, `medium`, and 10% to 18% less at `high`; about 10% to 15% once between-session noise is removed by re-billing each keep-alive session's own tokens at 1-hour cache prices), and more with a pause before every turn: 4% to 6% more at 6 minutes, 9% to 10% at 20 minutes, and 56% to 58% at 45 minutes. - * **Requests with `max_tokens: 0`, Claude Opus 5.5:** Anthropic's pre-launch API tests on Claude Opus 5.5 show that a `max_tokens: 0` request writes the cache and that the next request reads it; whether such a request refreshes an existing entry was not measured on Opus 5.5. + * **Requests with `max_tokens: 0`:** Measured October 20, 2026, on Claude Fable 5.1, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5, three times per model, on a 10,000-token system prompt with the 5-minute cache. A `max_tokens: 0` request sent 4 minutes after the cache write returned no output, read the whole entry, and wrote nothing. A request 4 minutes later, 8 minutes after the write, still read the whole entry. Without the `max_tokens: 0` request, the request at 8 minutes read nothing and wrote the prefix again, all 12 times. * **5-minute and 1-hour settings, Claude Sonnet 5.5:** With 5% of turns paused the 5-minute setting cost 5% more than the 1-hour setting on average (2% less to 12% more across the three runs), which is within run-to-run variation: that draw's pauses fell on small prefixes, as on Claude Sonnet 5, and re-billing each 5-minute session's own tokens at 1-hour cache prices gives about 1% more. With 10% paused it cost 54% more (36% to 73% more). With no pauses, the 5-minute setting cost 19% less than the 1-hour setting on average (3% to 32% less across the three runs; the 1-hour setting's higher write price predicts about 20%), and 21% to 24% less in every run with 2-minute pauses. * **Keep-alive requests, Claude Sonnet 5.5:** Keep-alive requests cost 16% less than the 1-hour setting on average with 5% of turns paused (13% to 20% less across the three runs) and 8% less with 10% (3% to 10% less), and cost more with a pause of 6 minutes or more before every turn. With 5% and 10% of turns paused, the pauses lasted 6 to 32 minutes on Claude Sonnet 5.5 and on Claude Opus 5.5. Re-billing each keep-alive session's own tokens at 1-hour cache prices, as for Claude Opus 5.5 above, gives 15% to 16% less at 5% paused and about 10% less at 10%, and with a pause before every turn 7% more at 6 minutes, 9% to 10% more at 20 minutes, and 66% to 73% more at 45 minutes. The 6-minute figures leave out run 3, in which 2 of that session's 39 keep-alive requests timed out: the cache expired before those two turns, the session wrote 214,000 tokens to the cache against 80,000 to 85,000 in runs 1 and 2, and it cost 38% more than run 3's 1-hour session. * **Keep-alive requests, Claude Sonnet 5.5, by run:** Comparing each run's keep-alive session with the same run's 1-hour session instead, keep-alive cost from about the same to 10% more at 6 minutes (runs 1 and 2; 4% more on their average), from about the same to 16% more at 20 minutes, and 64% to 80% more at 45 minutes. @@ -1025,8 +1021,11 @@ Except where a reference says otherwise, measurements are Anthropic-internal run 17. **Cache-read share in production:** Aggregated first-party Claude API usage for the 14 days ending August 23, 2026, direct API product only, Anthropic-internal organizations excluded, no organization identified. An organization-day counts as an agent loop when its requests carry tool definitions and tool results, its prompts hold 9 or more prior tool calls on average, caching was used, and it made at least 10 such requests (the API has no conversation identifier, so this stands in for conversation length): 303,003 organization-days across 106,487 organizations, median cache-read share 84.2% of all input tokens, upper quartile 91.7%. Use-case labels (the organization's declared use case, or otherwise its classified one) cover 74% of those organization-days and 99% of their tokens; about 72% of coding organization-days read 80% or more. The top decile of organization-days reads 95.9% or more for coding and 94.2% to 94.8% for support, research, data, and other agents. The request-level split at 25 or more prior tool calls comes from a six-hour sample: coding 92% read, 7% write, under 1% uncached. -18. **Compaction timing and status-line measurements:** +18. **Cache-break, compaction timing, and status-line measurements:** + * **October 2026 test, one change to a long conversation:** Measured October 20, 2026, on Claude Fable 5.1, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5, on the Messages API with no tools, adaptive thinking, each model's default effort, the 5-minute cache, a cache breakpoint on the system prompt, and [automatic caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#automatic-caching). The conversation held about 101,000 tokens: a 20,000-token system prompt, 13 user turns of filler text, the model's own reply to the first turn with its thinking block, and one-word replies to the rest. Once one request had cached the conversation, a second added one short turn, and each measured request sent that longer conversation with one change. Two conversations per model gave the same result. + * **October 2026 test, tokens read and written:** With no change, and with a per-message effort change, the request read all 101,000 tokens and wrote none. With a 25-token mid-conversation system message, or a 25-token status line at the end of the newest user turn, it read them all and wrote only the new text. A top-level effort change (to `low` on Claude Fable 5.1 and Claude Sonnet 5.5, to `high` on Claude Opus 5.5 and Claude Haiku 5.5) read the 20,000-token system prompt and wrote 81,000 tokens. The same 25 tokens at the front or the end of the system prompt read nothing and wrote all 101,000. The request after a mid-conversation system message, a top-level effort change, or 25 tokens added to the end of the system prompt read the new prefix; a new status line at the front wrote everything again. A further test on October 21, 2026, on the same four models with conversations of 5,000 or 100,000 tokens and one-word replies, sent a beta header for the first time mid-conversation, as a first per-message effort change may: that request read everything the request before it had cached, all 54 times. A system message sent with no beta header did the same, all 15 times. + * **October 2026 test, how priced:** The chart gives the prompt side of one request, from its `usage` fields at list prices. The chart's values, in the order system prompt edit, system message, top-level effort change, and per-message effort change: Claude Fable 5.1 $1.26 USD, $0.026 USD, $1.02 USD, and $0.025 USD; Claude Opus 5.5 $0.50 USD, $0.020 USD, $0.41 USD, and $0.020 USD; Claude Sonnet 5.5 $0.25 USD, $0.010 USD, $0.20 USD, and $0.010 USD. The unchanged request repeated an earlier request byte for byte; a new turn of about 25 tokens adds under $0.001 USD. On Claude Haiku 5.5, whose requests were over 100,000 prompt tokens and so at its [long context prices](https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing): $0.063 USD for the system prompt edit, $0.052 USD for the effort change, and $0.005 USD for the read. The requests ran on an Anthropic-internal organization whose usage is metered the same way as a customer organization's, and on which the API does not enforce the [prefix check](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#prefix-check) by default, so its system prompt edits were accepted. On accounts created on or after August 31, 2026, 00:00 UTC, a request to one of these four models that sends earlier thinking blocks back gets a 400 error by default if it changes `system`, `tools`, or a message before one of them. * **What was measured:** The triage agent's long variant from [Trim input and context tokens](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#trim-input-and-context-tokens), run August 24, 2026, on Claude Sonnet 5 with the 5-minute cache, cost from the usage fields at list prices, five sessions per arm: a no-change arm at the default effort throughout ($0.81 USD per session), and two arms that start at low effort and make the same two cache-breaking changes, a switch to the default effort and one added tool, either mid-session at requests 12 and 17 ($0.95 USD) or together on the first request after the first compaction ($0.75 USD). * **Fourth arm:** A fourth arm of six sessions, run August 25, 2026, made the same two changes on the request that triggered the first compaction ($0.92 USD per session): that request's summarization pass wrote the 81,000-token context to the cache instead of reading it, so that pass cost $0.21 USD against $0.04 USD for the same pass in the boundary arm. * **Compaction:** Sessions first compacted at request 21 to 25 (16 of the 21 sessions at request 22), once the prompt passed the 80,000-token compaction trigger, and two no-change sessions compacted a second time near the end. The boundary arm's lower total than the no-change arm reflects its low-effort requests before the change and those second compactions rather than caching: the two arms' re-write costs differ by under $0.01 USD. diff --git a/content/en/about-claude/pricing.md b/content/en/about-claude/pricing.md index c961197087..0960a7fd87 100644 --- a/content/en/about-claude/pricing.md +++ b/content/en/about-claude/pricing.md @@ -12,29 +12,29 @@ For the most current pricing information, visit [claude.com/pricing](https://cla The following table shows pricing for all Claude models: -| Model | Base input tokens | 5m cache writes | 1h cache writes | Cache hits and refreshes | Output tokens | -| :----------------------------------------------------------------------------------------------------------------------------------- | :-------------------- | :-------------- | :-------------- | :----------------------- | :--------------------- | -| Claude Fable 5.1 | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok1 | $50 / MTok | -| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok1 | $50 / MTok | -| Claude Fable 5 | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok | -| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok | -| Claude Opus 5.5 | $4 / MTok | $5 / MTok | $8 / MTok | $0.20 / MTok2 | $20 / MTok | -| Claude Opus 5 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | -| Claude Opus 4.8 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | -| Claude Opus 4.7 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | -| Claude Opus 4.6 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | -| Claude Opus 4.5 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | -| Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $15 / MTok | $18.75 / MTok | $30 / MTok | $1.50 / MTok | $75 / MTok | -| Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $15 / MTok | $18.75 / MTok | $30 / MTok | $1.50 / MTok | $75 / MTok | -| Claude Sonnet 5.5 | $2 / MTok | $2.50 / MTok | $4 / MTok | $0.10 / MTok2 | $10 / MTok | -| Claude Sonnet 5 | $2 / MTok3 | $2.50 / MTok | $4 / MTok | $0.20 / MTok | $10 / MTok3 | -| Claude Sonnet 4.6 | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | -| Claude Sonnet 4.5 | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | -| Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | -| Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.10 / MTok | $0.125 / MTok | $0.20 / MTok | $0.01 / MTok | $0.50 / MTok | -| Claude Haiku 5.5 (for prompts over 100,000 tokens) | $0.50 / MTok | $0.625 / MTok | $1 / MTok | $0.05 / MTok | $2.50 / MTok | -| Claude Haiku 4.5 | $1 / MTok | $1.25 / MTok | $2 / MTok | $0.10 / MTok | $5 / MTok | -| Claude Haiku 3.5 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.80 / MTok | $1 / MTok | $1.60 / MTok | $0.08 / MTok | $4 / MTok | +| Model | Base input tokens | 5m cache writes | 1h cache writes | Cache hits and refreshes | Output tokens | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- | :-------------- | :-------------- | :----------------------- | :--------------------- | +| Claude Fable 5.1 | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok1 | $50 / MTok | +| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok1 | $50 / MTok | +| Claude Fable 5 | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok | +| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok | +| Claude Opus 5.5 | $4 / MTok | $5 / MTok | $8 / MTok | $0.20 / MTok2 | $20 / MTok | +| Claude Opus 5 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | +| Claude Opus 4.8 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | +| Claude Opus 4.7 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | +| Claude Opus 4.6 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | +| Claude Opus 4.5 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | +| Claude Opus 4.1 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $15 / MTok | $18.75 / MTok | $30 / MTok | $1.50 / MTok | $75 / MTok | +| Claude Opus 4 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $15 / MTok | $18.75 / MTok | $30 / MTok | $1.50 / MTok | $75 / MTok | +| Claude Sonnet 5.5 | $2 / MTok | $2.50 / MTok | $4 / MTok | $0.10 / MTok2 | $10 / MTok | +| Claude Sonnet 5 | $2 / MTok3 | $2.50 / MTok | $4 / MTok | $0.20 / MTok | $10 / MTok3 | +| Claude Sonnet 4.6 | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | +| Claude Sonnet 4.5 | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | +| Claude Sonnet 4 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | +| Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.10 / MTok | $0.125 / MTok | $0.20 / MTok | $0.01 / MTok | $0.50 / MTok | +| Claude Haiku 5.5 (for prompts over 100,000 tokens) | $0.50 / MTok | $0.625 / MTok | $1 / MTok | $0.05 / MTok | $2.50 / MTok | +| Claude Haiku 4.5 | $1 / MTok | $1.25 / MTok | $2 / MTok | $0.10 / MTok | $5 / MTok | +| Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.80 / MTok | $1 / MTok | $1.60 / MTok | $0.08 / MTok | $4 / MTok | *1 Cache hits and refreshes on Claude Fable 5.1 and Claude Mythos 5.1 are priced at 0.025x the base input price.* @@ -55,9 +55,9 @@ Claude 4.7 and later models and Claude Mythos Preview use a newer tokenizer that ## Cloud platform pricing -This section covers partner-operated cloud platforms, where the cloud provider invoices you. For Anthropic-operated cloud platforms billed through a marketplace, see [Claude Platform on AWS pricing](https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing) and [Claude in Microsoft Foundry pricing](https://platform.claude.com/docs/en/about-claude/pricing#claude-in-microsoft-foundry-pricing). +This section covers partner-operated cloud platforms, where the cloud provider invoices you. For Anthropic-operated cloud platforms billed through a marketplace, see [Claude Platform on AWS pricing](https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing), [Claude Models on Google Cloud (Anthropic managed) billing](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#billing), and [Claude in Microsoft Foundry pricing](https://platform.claude.com/docs/en/about-claude/pricing#claude-in-microsoft-foundry-pricing). -Claude models are available on [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai). For official pricing, visit: +Claude models are available on [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed). For official pricing, visit: * [Amazon Bedrock pricing](https://aws.amazon.com/bedrock/pricing/) * [Google Cloud pricing](https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models) @@ -68,7 +68,7 @@ Claude models are available on [Amazon Bedrock](https://platform.claude.com/docs Starting with Claude Sonnet 4.5, Haiku 4.5, and Opus 4.5: * **Bedrock** offers two endpoint types: global endpoints (dynamic routing for maximum availability) and regional endpoints (guaranteed data routing through specific geographic regions). - * **Google Cloud** offers global endpoints and multi-region endpoints (dynamic routing within a geographic area) for these models, and regional endpoints for Claude Sonnet 4.6 and earlier models. + * **Claude Models on Google Cloud (Google managed)** offers global endpoints and multi-region endpoints (dynamic routing within a geographic area) for these models, and regional endpoints for Claude Sonnet 4.6 and earlier models. Regional and multi-region endpoints include a 10 percent premium over global endpoints. The Claude API (first-party) is global by default; for first-party data residency options and pricing, see [Data residency pricing](https://platform.claude.com/docs/en/about-claude/pricing#data-residency-pricing). @@ -76,8 +76,8 @@ Claude models are available on [Amazon Bedrock](https://platform.claude.com/docs For implementation details and code examples: - * [Amazon Bedrock global vs regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#regions) for Opus 4.7, Haiku 4.5, and later models, or [the legacy integration](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#global-vs-regional-endpoints) for all other models on Bedrock - * [Google Cloud global, multi-region, and regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai#global-multi-region-and-regional-endpoints) + * [Amazon Bedrock global versus regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#regions) for Opus 4.7, Haiku 4.5, and later models, or the [legacy integration](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#global-vs-regional-endpoints) for all other models on Bedrock + * [Claude Models on Google Cloud (Google managed) global, multi-region, and regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#global-multi-region-and-regional-endpoints) ## Claude Platform on AWS pricing @@ -159,13 +159,13 @@ For implementation details, supported models, and code examples, see [Prompt cac For Claude 4.6 and later models, specifying US-only inference through the `inference_geo` parameter incurs a 1.1x multiplier on all token pricing categories, including input tokens, output tokens, cache writes, and cache reads. On Claude Haiku 5.5, the multiplier also applies to the higher prices for prompts over 100,000 tokens (see [Long context pricing](https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing)). Global routing (the default) uses standard pricing. -This applies to the Claude API (first-party) and Claude Platform on AWS. On Claude in Microsoft Foundry, the same 1.1x multiplier applies to deployments that use the US Data Zone Standard deployment type (see [Inference geography](https://platform.claude.com/docs/en/about-claude/pricing#foundry-inference-geography)). Partner-operated platforms (Bedrock and Google Cloud) have independent regional pricing. See [Bedrock](https://aws.amazon.com/bedrock/pricing/) and [Google Cloud](https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models) for details. Earlier models do not support the `inference_geo` parameter and always use standard pricing; requests that include the parameter on these models return a 400 error. +This applies to the Claude API (first-party), Claude Platform on AWS, and Claude Models on Google Cloud (Anthropic managed). On Claude in Microsoft Foundry, the same 1.1x multiplier applies to deployments that use the US Data Zone Standard deployment type (see [Inference geography](https://platform.claude.com/docs/en/about-claude/pricing#foundry-inference-geography)). Partner-operated platforms, Bedrock and Claude Models on Google Cloud (Google managed), have independent regional pricing. See [Bedrock pricing](https://aws.amazon.com/bedrock/pricing/) and [Google Cloud pricing](https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models) for details. Earlier models do not support the `inference_geo` parameter and always use standard pricing; requests that include the parameter on these models return a 400 error. For more information, see [Data residency](https://platform.claude.com/docs/en/manage-claude/data-residency). ### Fast mode pricing -[Fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) provides significantly faster output for Claude Opus 5.5, Claude Opus 5, and Claude Opus 4.8 at premium pricing. Fast mode for Claude Opus 5 and Claude Opus 4.8 is in research preview. Fast mode pricing applies across the full context window, including requests over 200k input tokens. Fast mode is available on the Claude API (first-party) and, for Claude Opus 5.5, on [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) for deployments hosted on Azure; it is not available on Claude Platform on AWS or partner-operated cloud platforms. +[Fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) provides significantly faster output for Claude Opus 5.5, Claude Opus 5, and Claude Opus 4.8 at premium pricing. Fast mode for Claude Opus 5 and Claude Opus 4.8 is in research preview. Fast mode pricing applies across the full context window, including requests over 200k input tokens. Fast mode is available on the Claude API (first-party) and, for Claude Opus 5.5, on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#billing) and on [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) for deployments hosted on Azure. | Model | Input | Output | | ------------------------------- | -------------- | -------------- | @@ -185,29 +185,29 @@ For more information, see [Fast mode](https://platform.claude.com/docs/en/build- The Batch API allows asynchronous processing of large volumes of requests with a 50 percent discount on both input and output tokens. -| Model | Batch input | Batch output | -| :----------------------------------------------------------------------------------------------------------------------------------- | :----------- | :------------ | -| Claude Fable 5.1 | $5 / MTok | $25 / MTok | -| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok | -| Claude Fable 5 | $5 / MTok | $25 / MTok | -| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok | -| Claude Opus 5.5 | $2 / MTok | $10 / MTok | -| Claude Opus 5 | $2.50 / MTok | $12.50 / MTok | -| Claude Opus 4.8 | $2.50 / MTok | $12.50 / MTok | -| Claude Opus 4.7 | $2.50 / MTok | $12.50 / MTok | -| Claude Opus 4.6 | $2.50 / MTok | $12.50 / MTok | -| Claude Opus 4.5 | $2.50 / MTok | $12.50 / MTok | -| Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $7.50 / MTok | $37.50 / MTok | -| Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $7.50 / MTok | $37.50 / MTok | -| Claude Sonnet 5.5 | $1 / MTok | $5 / MTok | -| Claude Sonnet 5 | $1 / MTok | $5 / MTok | -| Claude Sonnet 4.6 | $1.50 / MTok | $7.50 / MTok | -| Claude Sonnet 4.5 | $1.50 / MTok | $7.50 / MTok | -| Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $1.50 / MTok | $7.50 / MTok | -| Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.05 / MTok | $0.25 / MTok | -| Claude Haiku 5.5 (for prompts over 100,000 tokens) | $0.25 / MTok | $1.25 / MTok | -| Claude Haiku 4.5 | $0.50 / MTok | $2.50 / MTok | -| Claude Haiku 3.5 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.40 / MTok | $2 / MTok | +| Model | Batch input | Batch output | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :------------ | +| Claude Fable 5.1 | $5 / MTok | $25 / MTok | +| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok | +| Claude Fable 5 | $5 / MTok | $25 / MTok | +| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok | +| Claude Opus 5.5 | $2 / MTok | $10 / MTok | +| Claude Opus 5 | $2.50 / MTok | $12.50 / MTok | +| Claude Opus 4.8 | $2.50 / MTok | $12.50 / MTok | +| Claude Opus 4.7 | $2.50 / MTok | $12.50 / MTok | +| Claude Opus 4.6 | $2.50 / MTok | $12.50 / MTok | +| Claude Opus 4.5 | $2.50 / MTok | $12.50 / MTok | +| Claude Opus 4.1 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $7.50 / MTok | $37.50 / MTok | +| Claude Opus 4 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $7.50 / MTok | $37.50 / MTok | +| Claude Sonnet 5.5 | $1 / MTok | $5 / MTok | +| Claude Sonnet 5 | $1 / MTok | $5 / MTok | +| Claude Sonnet 4.6 | $1.50 / MTok | $7.50 / MTok | +| Claude Sonnet 4.5 | $1.50 / MTok | $7.50 / MTok | +| Claude Sonnet 4 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $1.50 / MTok | $7.50 / MTok | +| Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.05 / MTok | $0.25 / MTok | +| Claude Haiku 5.5 (for prompts over 100,000 tokens) | $0.25 / MTok | $1.25 / MTok | +| Claude Haiku 4.5 | $0.50 / MTok | $2.50 / MTok | +| Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.40 / MTok | $2 / MTok | * **MTok:** Million tokens. $5 / MTok is $5 for every million tokens. * **Limited access:** Available only to organizations verified through Anthropic’s verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). To request access, apply to the program that covers your use case. @@ -239,24 +239,24 @@ The additional tokens from tool use come from: When you use `tools`, the API also automatically includes a special system prompt for the model that enables tool use. The number of tool use tokens required for each model is listed in the following table (excluding the additional tokens listed earlier). Note that the table assumes at least 1 tool is provided. If no `tools` are provided, then a tool choice of `none` uses 0 additional system prompt tokens. -| Model | Tool use system prompt tokens: auto, none | Tool use system prompt tokens: any, tool | -| :----------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------- | :--------------------------------------- | -| Claude Opus 5.5 | 286 tokens | | -| Claude Opus 5 | 286 tokens | 406 tokens | -| Claude Opus 4.8 | 290 tokens | 410 tokens | -| Claude Opus 4.7 | 675 tokens | 804 tokens | -| Claude Opus 4.6 | 497 tokens | 589 tokens | -| Claude Opus 4.5 | 496 tokens | 588 tokens | -| Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | -| Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | -| Claude Sonnet 5.5 | 286 tokens | | -| Claude Sonnet 5 | 354 tokens | 474 tokens | -| Claude Sonnet 4.6 | 497 tokens | 589 tokens | -| Claude Sonnet 4.5 | 496 tokens | 588 tokens | -| Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | -| Claude Haiku 5.5 | 286 tokens | 406 tokens | -| Claude Haiku 4.5 | 496 tokens | 588 tokens | -| Claude Haiku 3.5 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 264 tokens | 355 tokens | +| Model | Tool use system prompt tokens: auto, none | Tool use system prompt tokens: any, tool | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------- | :--------------------------------------- | +| Claude Opus 5.5 | 286 tokens | | +| Claude Opus 5 | 286 tokens | 406 tokens | +| Claude Opus 4.8 | 290 tokens | 410 tokens | +| Claude Opus 4.7 | 675 tokens | 804 tokens | +| Claude Opus 4.6 | 497 tokens | 589 tokens | +| Claude Opus 4.5 | 496 tokens | 588 tokens | +| Claude Opus 4.1 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | +| Claude Opus 4 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | +| Claude Sonnet 5.5 | 286 tokens | | +| Claude Sonnet 5 | 354 tokens | 474 tokens | +| Claude Sonnet 4.6 | 497 tokens | 589 tokens | +| Claude Sonnet 4.5 | 496 tokens | 588 tokens | +| Claude Sonnet 4 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | +| Claude Haiku 5.5 | 286 tokens | 406 tokens | +| Claude Haiku 4.5 | 496 tokens | 588 tokens | +| Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 264 tokens | 355 tokens | * **auto, none:** The count when tool\_choice is auto or none. * **any, tool:** The count when tool\_choice is any or tool. diff --git a/content/en/about-claude/use-case-guides/commerce-agents.md b/content/en/about-claude/use-case-guides/commerce-agents.md index 58e290f74b..f9ac4019d2 100644 --- a/content/en/about-claude/use-case-guides/commerce-agents.md +++ b/content/en/about-claude/use-case-guides/commerce-agents.md @@ -54,7 +54,7 @@ Each example includes a customer storefront and a merchant portal over fictional ## Where it runs -The Messages API and Agent SDK runtimes run against the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud's Agent Platform](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), or [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), or through your own gateway. The Claude Managed Agents path runs on the Claude API. The repository's deployment guide shows where each path selects its platform and which model ID format each expects. +The Messages API and Agent SDK runtimes run against the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), or [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), or through your own gateway. The Claude Managed Agents path runs on the Claude API. The repository's deployment guide shows where each path selects its platform and which model ID format each expects. ## Build your own with the Claude Code plugin diff --git a/content/en/about-claude/use-case-guides/content-moderation.md b/content/en/about-claude/use-case-guides/content-moderation.md index f24a90f16a..8d9101fd7d 100644 --- a/content/en/about-claude/use-case-guides/content-moderation.md +++ b/content/en/about-claude/use-case-guides/content-moderation.md @@ -210,33 +210,33 @@ Before developing a content moderation solution, first create examples of conten final AnthropicClient client = AnthropicOkHttpClient.fromEnv(); final List allowedUserComments = List.of( - "This movie was great, I really enjoyed it. The main actor really killed it!", - "I hate Mondays.", - "It is a great time to invest in gold!"); + "This movie was great, I really enjoyed it. The main actor really killed it!", + "I hate Mondays.", + "It is a great time to invest in gold!"); final List disallowedUserComments = List.of( - "Delete this post now or you better hide. I am coming after you and your family.", - "Stay away from the 5G cellphones!! They are using 5G to control you.", - "Congratulations! You have won a $1,000 gift card. Click here to claim your prize!"); + "Delete this post now or you better hide. I am coming after you and your family.", + "Stay away from the 5G cellphones!! They are using 5G to control you.", + "Congratulations! You have won a $1,000 gift card. Click here to claim your prize!"); // Sample user comments to test the content moderation final List userComments = - Stream.concat(allowedUserComments.stream(), disallowedUserComments.stream()).toList(); + Stream.concat(allowedUserComments.stream(), disallowedUserComments.stream()).toList(); // Categories considered unsafe for content moderation final List unsafeCategories = List.of( - "Child Exploitation", - "Conspiracy Theories", - "Hate", - "Indiscriminate Weapons", - "Intellectual Property", - "Non-Violent Crimes", - "Privacy", - "Self-Harm", - "Sex Crimes", - "Sexual Content", - "Specialized Advice", - "Violent Crimes"); + "Child Exploitation", + "Conspiracy Theories", + "Hate", + "Indiscriminate Weapons", + "Intellectual Property", + "Non-Violent Crimes", + "Privacy", + "Self-Harm", + "Sex Crimes", + "Sexual Content", + "Specialized Advice", + "Violent Crimes"); ``` ```php PHP @@ -367,7 +367,7 @@ When selecting a model, it’s important to consider the size of your data. If c ### Build a strong prompt -To use Claude for content moderation, Claude must have information about the moderation requirements of your application. Start by writing a prompt that allows you to define your moderation needs: +To use Claude for content moderation, Claude must interpret the moderation requirements of your application correctly. Start by writing a prompt that allows you to define your moderation needs: ```python Python @@ -693,21 +693,21 @@ To use Claude for content moderation, Claude must have information about the mod "explanation": [Optional. Only include if there is a violation.] } Do not include markdown formatting or code fences in your response.""" - .formatted(message, unsafeCategoryStr); + .formatted(message, unsafeCategoryStr); // Send the request to Claude for content moderation Message response = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs - .maxTokens(200) - .addUserMessage(assessmentPrompt) - .build()); + .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs + .maxTokens(200) + .addUserMessage(assessmentPrompt) + .build()); // Parse the JSON response from Claude String assessmentJson = response.content().stream() - .flatMap(contentBlock -> contentBlock.text().stream()) - .findFirst() - .orElseThrow() - .text(); + .flatMap(contentBlock -> contentBlock.text().stream()) + .findFirst() + .orElseThrow() + .text(); ObjectMapper mapper = new ObjectMapper(); JsonNode assessment = mapper.readTree(assessmentJson); @@ -716,11 +716,11 @@ To use Claude for content moderation, Claude must have information about the mod // If there's a violation, get the categories and explanation; otherwise, use empty defaults List violatedCategories = containsViolation && assessment.has("categories") - ? mapper.convertValue(assessment.get("categories"), new TypeReference>() {}) - : List.of(); + ? mapper.convertValue(assessment.get("categories"), new TypeReference>() {}) + : List.of(); String explanation = containsViolation && assessment.hasNonNull("explanation") - ? assessment.get("explanation").asText() - : null; + ? assessment.get("explanation").asText() + : null; return new ModerationResult(containsViolation, violatedCategories, explanation); } @@ -1237,21 +1237,21 @@ One additional consideration is that instead of treating content moderation as a "explanation": } Do not include markdown formatting or code fences in your response.""" - .formatted(message, unsafeCategoryStr); + .formatted(message, unsafeCategoryStr); // Send the request to Claude for risk assessment Message response = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs - .maxTokens(200) - .addUserMessage(assessmentPrompt) - .build()); + .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs + .maxTokens(200) + .addUserMessage(assessmentPrompt) + .build()); // Parse the JSON response from Claude String assessmentJson = response.content().stream() - .flatMap(contentBlock -> contentBlock.text().stream()) - .findFirst() - .orElseThrow() - .text(); + .flatMap(contentBlock -> contentBlock.text().stream()) + .findFirst() + .orElseThrow() + .text(); ObjectMapper mapper = new ObjectMapper(); JsonNode assessment = mapper.readTree(assessmentJson); @@ -1259,11 +1259,11 @@ One additional consideration is that instead of treating content moderation as a int riskLevel = assessment.required("risk_level").asInt(); JsonNode categoriesNode = assessment.required("categories"); List violatedCategories = categoriesNode.isNull() - ? List.of() - : mapper.convertValue(categoriesNode, new TypeReference>() {}); + ? List.of() + : mapper.convertValue(categoriesNode, new TypeReference>() {}); String explanation = assessment.hasNonNull("explanation") - ? assessment.get("explanation").asText() - : null; + ? assessment.get("explanation").asText() + : null; return new RiskAssessment(riskLevel, violatedCategories, explanation); } @@ -1883,49 +1883,49 @@ In addition to listing the unsafe categories in the prompt, further improvements record CategoryDefinition(String category, String definition) {} final List unsafeCategoryDefinitions = List.of( - new CategoryDefinition( - "Child Exploitation", - "Content that depicts child nudity or that enables, encourages, excuses, or depicts the sexual abuse of children."), - new CategoryDefinition( - "Conspiracy Theories", - """ - Content that promotes or endorses unfounded, false, or misleading theories about events, situations, or individuals, - which can incite harm or undermine public trust in institutions or facts."""), - new CategoryDefinition( - "Hate", - """ - Content that is hateful toward people on the basis of their protected characteristics - (race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity and serious disease), - or content that perpetuates negative stereotypes."""), - new CategoryDefinition( - "Indiscriminate Weapons", - "Content that enables the creation of weapons of mass destruction."), - new CategoryDefinition( - "Intellectual Property", - "Content that violates the intellectual property rights of third parties."), - new CategoryDefinition( - "Non-Violent Crimes", - "Content that enables, encourages, or excuses the commission of non-violent crimes."), - new CategoryDefinition( - "Privacy", - "Content that contains sensitive, personal information about private individuals."), - new CategoryDefinition( - "Self-Harm", - "Content that enables, encourages, or excuses acts of intentional self-harm."), - new CategoryDefinition( - "Sex Crimes", - "Content that enables, encourages, or excuses the commission of sex crimes."), - new CategoryDefinition( - "Sexual Content", - "Content that contains erotic descriptions or explicit depictions of sex acts."), - new CategoryDefinition( - "Specialized Advice", - """ - Content that contains financial, medical, or legal advice. - Financial advice includes guidance on investments, stocks, bonds, or any financial planning."""), - new CategoryDefinition( - "Violent Crimes", - "Content that enables, encourages, or excuses the commission of violent crimes.")); + new CategoryDefinition( + "Child Exploitation", + "Content that depicts child nudity or that enables, encourages, excuses, or depicts the sexual abuse of children."), + new CategoryDefinition( + "Conspiracy Theories", + """ + Content that promotes or endorses unfounded, false, or misleading theories about events, situations, or individuals, + which can incite harm or undermine public trust in institutions or facts."""), + new CategoryDefinition( + "Hate", + """ + Content that is hateful toward people on the basis of their protected characteristics + (race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity and serious disease), + or content that perpetuates negative stereotypes."""), + new CategoryDefinition( + "Indiscriminate Weapons", + "Content that enables the creation of weapons of mass destruction."), + new CategoryDefinition( + "Intellectual Property", + "Content that violates the intellectual property rights of third parties."), + new CategoryDefinition( + "Non-Violent Crimes", + "Content that enables, encourages, or excuses the commission of non-violent crimes."), + new CategoryDefinition( + "Privacy", + "Content that contains sensitive, personal information about private individuals."), + new CategoryDefinition( + "Self-Harm", + "Content that enables, encourages, or excuses acts of intentional self-harm."), + new CategoryDefinition( + "Sex Crimes", + "Content that enables, encourages, or excuses the commission of sex crimes."), + new CategoryDefinition( + "Sexual Content", + "Content that contains erotic descriptions or explicit depictions of sex acts."), + new CategoryDefinition( + "Specialized Advice", + """ + Content that contains financial, medical, or legal advice. + Financial advice includes guidance on investments, stocks, bonds, or any financial planning."""), + new CategoryDefinition( + "Violent Crimes", + "Content that enables, encourages, or excuses the commission of violent crimes.")); record ModerationDecision(boolean violation, List violatedCategories, String explanation) {} @@ -1934,9 +1934,9 @@ In addition to listing the unsafe categories in the prompt, further improvements throws JsonProcessingException { // Format unsafe categories string, with each category and its definition on a new line String unsafeCategoryStr = unsafeCategoryDefinitions.stream() - .map(categoryDefinition -> - categoryDefinition.category() + ": " + categoryDefinition.definition()) - .collect(Collectors.joining("\n")); + .map(categoryDefinition -> + categoryDefinition.category() + ": " + categoryDefinition.definition()) + .collect(Collectors.joining("\n")); // Construct the prompt for Claude, including the message and unsafe categories String assessmentPrompt = """ @@ -1959,21 +1959,21 @@ In addition to listing the unsafe categories in the prompt, further improvements "explanation": [Optional. Only include if there is a violation.] } Do not include markdown formatting or code fences in your response.""" - .formatted(message, unsafeCategoryStr); + .formatted(message, unsafeCategoryStr); // Send the request to Claude for content moderation Message response = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs - .maxTokens(200) - .addUserMessage(assessmentPrompt) - .build()); + .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs + .maxTokens(200) + .addUserMessage(assessmentPrompt) + .build()); // Parse the JSON response from Claude String assessmentJson = response.content().stream() - .flatMap(contentBlock -> contentBlock.text().stream()) - .findFirst() - .orElseThrow() - .text(); + .flatMap(contentBlock -> contentBlock.text().stream()) + .findFirst() + .orElseThrow() + .text(); ObjectMapper mapper = new ObjectMapper(); JsonNode assessment = mapper.readTree(assessmentJson); @@ -1982,11 +1982,11 @@ In addition to listing the unsafe categories in the prompt, further improvements // If there's a violation, get the categories and explanation; otherwise, use empty defaults List violatedCategories = containsViolation && assessment.has("categories") - ? mapper.convertValue(assessment.get("categories"), new TypeReference>() {}) - : List.of(); + ? mapper.convertValue(assessment.get("categories"), new TypeReference>() {}) + : List.of(); String explanation = containsViolation && assessment.hasNonNull("explanation") - ? assessment.get("explanation").asText() - : null; + ? assessment.get("explanation").asText() + : null; return new ModerationDecision(containsViolation, violatedCategories, explanation); } @@ -2235,7 +2235,7 @@ To reduce costs in situations where real-time moderation isn't necessary, consid # Send the request to Claude for content moderation response = client.messages.create( model="claude-haiku-4-5-20251001", # Using the Haiku model for lower costs - max_tokens=2048, # Increased max token count to handle batches + max_tokens=2048, # Increased token limit to handle batches messages=[{"role": "user", "content": assessment_prompt}], ) @@ -2310,7 +2310,7 @@ To reduce costs in situations where real-time moderation isn't necessary, consid // Send the request to Claude for content moderation const response = await client.messages.create({ model: "claude-haiku-4-5-20251001", // Using the Haiku model for lower costs - max_tokens: 2048, // Increased max token count to handle batches + max_tokens: 2048, // Increased token limit to handle batches messages: [{ role: "user", content: assessmentPrompt }] }); @@ -2383,7 +2383,7 @@ To reduce costs in situations where real-time moderation isn't necessary, consid new() { Model = Model.ClaudeHaiku4_5_20251001, // Using the Haiku model for lower costs - MaxTokens = 2048, // Increased max token count to handle batches + MaxTokens = 2048, // Increased token limit to handle batches Messages = [new UserMessageParam { Content = assessmentPrompt }], } ); @@ -2470,7 +2470,7 @@ To reduce costs in situations where real-time moderation isn't necessary, consid // Send the request to Claude for content moderation response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeHaiku4_5_20251001, // Using the Haiku model for lower costs - MaxTokens: 2048, // Increased max token count to handle batches + MaxTokens: 2048, // Increased token limit to handle batches Messages: []anthropic.MessageParam{ anthropic.NewUserMessage(anthropic.NewTextBlock(assessmentPrompt)), }, @@ -2520,8 +2520,8 @@ To reduce costs in situations where real-time moderation isn't necessary, consid // Format messages string, with each message wrapped in XML-like tags and given an ID String messagesStr = IntStream.range(0, messages.size()) - .mapToObj(idx -> "%s".formatted(idx, messages.get(idx))) - .collect(Collectors.joining("\n")); + .mapToObj(idx -> "%s".formatted(idx, messages.get(idx))) + .collect(Collectors.joining("\n")); // Construct the prompt for Claude, including the messages and unsafe categories String assessmentPrompt = """ @@ -2552,21 +2552,21 @@ To reduce costs in situations where real-time moderation isn't necessary, consid - Remember to analyze every message for a violation. - Select any number of violations that reasonably apply. - Do not include markdown formatting or code fences in your response.""" - .formatted(messagesStr, unsafeCategoryStr); + .formatted(messagesStr, unsafeCategoryStr); // Send the request to Claude for content moderation Message response = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs - .maxTokens(2048) // Increased max token count to handle batches - .addUserMessage(assessmentPrompt) - .build()); + .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs + .maxTokens(2048) // Increased token limit to handle batches + .addUserMessage(assessmentPrompt) + .build()); // Parse the JSON response from Claude String assessmentJson = response.content().stream() - .flatMap(contentBlock -> contentBlock.text().stream()) - .findFirst() - .orElseThrow() - .text(); + .flatMap(contentBlock -> contentBlock.text().stream()) + .findFirst() + .orElseThrow() + .text(); return new ObjectMapper().readTree(assessmentJson); } @@ -2577,15 +2577,15 @@ To reduce costs in situations where real-time moderation isn't necessary, consid ObjectMapper mapper = new ObjectMapper(); for (JsonNode violation : response.required("violations")) { List violatedCategories = - mapper.convertValue(violation.required("categories"), new TypeReference>() {}); + mapper.convertValue(violation.required("categories"), new TypeReference>() {}); IO.println(""" - Comment: %s - Violated Categories: %s - Explanation: %s - """.formatted( - userComments.get(violation.required("id").asInt()), - String.join(", ", violatedCategories), - violation.required("explanation").asText())); + Comment: %s + Violated Categories: %s + Explanation: %s + """.formatted( + userComments.get(violation.required("id").asInt()), + String.join(", ", violatedCategories), + violation.required("explanation").asText())); } } ``` @@ -2636,7 +2636,7 @@ To reduce costs in situations where real-time moderation isn't necessary, consid // Send the request to Claude for content moderation $response = $client->messages->create( model: 'claude-haiku-4-5-20251001', // Using the Haiku model for lower costs - maxTokens: 2048, // Increased max token count to handle batches + maxTokens: 2048, // Increased token limit to handle batches messages: [['role' => 'user', 'content' => $assessmentPrompt]], ); @@ -2703,7 +2703,7 @@ To reduce costs in situations where real-time moderation isn't necessary, consid # Send the request to Claude for content moderation response = CLIENT.messages.create( model: Anthropic::Model::CLAUDE_HAIKU_4_5_20251001, # Using the Haiku model for lower costs - max_tokens: 2048, # Increased max token count to handle batches + max_tokens: 2048, # Increased token limit to handle batches messages: [{role: :user, content: assessment_prompt}] ) diff --git a/content/en/about-claude/use-case-guides/customer-support-chat.md b/content/en/about-claude/use-case-guides/customer-support-chat.md index 7c3cf62be7..40fa8dccc8 100644 --- a/content/en/about-claude/use-case-guides/customer-support-chat.md +++ b/content/en/about-claude/use-case-guides/customer-support-chat.md @@ -384,7 +384,7 @@ Claude is capable of taking actions and retrieving information dynamically using For this example, start with one tool for calculating the quote. - As a reminder, this tool does not perform the actual calculation; it just signals to the application that a tool should be used with whatever arguments specified. + As a reminder, this tool does not perform the actual calculation; it just signals to the application that a tool should be used with whatever arguments Claude specifies. Add the model name, the tool definition, and a stub implementation to `config.py`: @@ -733,7 +733,7 @@ The class should have two main methods: one that calls the API to generate a mes "encoding/json" "fmt" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) // ChatBot wraps the Anthropic client and the conversation history. The @@ -848,12 +848,12 @@ The class should have two main methods: one that calls the API to generate a mes Message generateMessage(List messages, long maxTokens) { return anthropic.messages().create(MessageCreateParams.builder() - .model(MODEL) - .system(IDENTITY) - .maxTokens(maxTokens) - .messages(messages) - .tools(TOOLS) - .build()); + .model(MODEL) + .system(IDENTITY) + .maxTokens(maxTokens) + .messages(messages) + .tools(TOOLS) + .build()); } String processUserInput(String userInput) { @@ -866,31 +866,31 @@ The class should have two main methods: one that calls the API to generate a mes if (lastBlock.isToolUse()) { ToolUseBlock toolUse = lastBlock.asToolUse(); Map toolInput = - (Map) toolUse._input().asObject().orElseThrow(); + (Map) toolUse._input().asObject().orElseThrow(); String result = handleToolUse(toolUse.name(), toolInput); messages.add(MessageParam.ofAssistantOfContentBlockParams( - content.stream().map(ContentBlock::toParam).toList())); + content.stream().map(ContentBlock::toParam).toList())); messages.add(MessageParam.ofUserOfContentBlockParams(List.of(ContentBlockParam.ofToolResult( - ToolResultBlockParam.builder() - .toolUseId(toolUse.id()) - .content(result) - .build())))); + ToolResultBlockParam.builder() + .toolUseId(toolUse.id()) + .content(result) + .build())))); Message followUpResponse = generateMessage(messages, 2048); ContentBlock followUpBlock = followUpResponse.content().stream() - .filter(ContentBlock::isText) - .findFirst() - .orElseThrow(() -> new IllegalStateException("An error occurred: Unexpected response type")); + .filter(ContentBlock::isText) + .findFirst() + .orElseThrow(() -> new IllegalStateException("An error occurred: Unexpected response type")); String responseText = followUpBlock.asText().text(); messages.add(MessageParam.ofAssistant(responseText)); return responseText; } else { ContentBlock textBlock = content.stream() - .filter(ContentBlock::isText) - .findFirst() - .orElseThrow(() -> new IllegalStateException("An error occurred: Unexpected response type")); + .filter(ContentBlock::isText) + .findFirst() + .orElseThrow(() -> new IllegalStateException("An error occurred: Unexpected response type")); String responseText = textBlock.asText().text(); messages.add(MessageParam.ofAssistant(responseText)); return responseText; @@ -901,11 +901,11 @@ The class should have two main methods: one that calls the API to generate a mes return switch (funcName) { case "get_quote" -> { double premium = getQuote( - funcParams.get("make").asStringOrThrow(), - funcParams.get("model").asStringOrThrow(), - ((Number) funcParams.get("year").asNumber().orElseThrow()).longValue(), - ((Number) funcParams.get("mileage").asNumber().orElseThrow()).longValue(), - ((Number) funcParams.get("driver_age").asNumber().orElseThrow()).longValue()); + funcParams.get("make").asStringOrThrow(), + funcParams.get("model").asStringOrThrow(), + ((Number) funcParams.get("year").asNumber().orElseThrow()).longValue(), + ((Number) funcParams.get("mileage").asNumber().orElseThrow()).longValue(), + ((Number) funcParams.get("driver_age").asNumber().orElseThrow()).longValue()); yield "Quote generated: $%.2f per month".formatted(premium); } default -> throw new IllegalArgumentException("An unexpected tool was used"); diff --git a/content/en/about-claude/use-case-guides/legal-summarization.md b/content/en/about-claude/use-case-guides/legal-summarization.md index 5bb0655066..fcbe93faae 100644 --- a/content/en/about-claude/use-case-guides/legal-summarization.md +++ b/content/en/about-claude/use-case-guides/legal-summarization.md @@ -88,12 +88,12 @@ For instance, when summarizing a sublease agreement, you might want to extract t ```java Java List detailsToExtract = List.of( - "Parties involved (sublessor, sublessee, and original lessor)", - "Property details (address, description, and permitted use)", - "Term and rent (start date, end date, monthly rent, and security deposit)", - "Responsibilities (utilities, maintenance, and repairs)", - "Consent and notices (landlord's consent, and notice requirements)", - "Special provisions (furniture, parking, and subletting restrictions)"); + "Parties involved (sublessor, sublessee, and original lessor)", + "Property details (address, description, and permitted use)", + "Term and rent (start date, end date, monthly rent, and security deposit)", + "Responsibilities (utilities, maintenance, and repairs)", + "Consent and notices (landlord's consent, and notice requirements)", + "Special provisions (furniture, parking, and subletting restrictions)"); ``` ```php PHP @@ -277,7 +277,7 @@ Here is a demonstration of this process on a sample PDF: return text; } - // Download the sample sublease agreement from the summarization cookbook + // Download the sample sublease agreement from the Claude Cookbook's summarization recipe const response = await fetch( "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/summarization/data/Sample%20Sublease%20Agreement.pdf" ); @@ -306,7 +306,7 @@ Here is a demonstration of this process on a sample PDF: return text; } - // Download the sample sublease agreement from the summarization cookbook + // Download the sample sublease agreement from the Claude Cookbook's summarization recipe using var httpClient = new HttpClient(); var pdfData = await httpClient.GetByteArrayAsync( "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/summarization/data/Sample%20Sublease%20Agreement.pdf" @@ -356,7 +356,7 @@ Here is a demonstration of this process on a sample PDF: // extractDocumentText downloads the sample sublease agreement and extracts its text. func extractDocumentText() { - // Download the sample sublease agreement from the summarization cookbook + // Download the sample sublease agreement from the Claude Cookbook's summarization recipe response, err := http.Get("https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/summarization/data/Sample%20Sublease%20Agreement.pdf") if err != nil { log.Fatal(err) @@ -402,10 +402,10 @@ Here is a demonstration of this process on a sample PDF: } void extractDocumentText() throws IOException, InterruptedException { - // Download the sample sublease agreement from the summarization cookbook + // Download the sample sublease agreement from the Claude Cookbook's summarization recipe HttpRequest request = HttpRequest.newBuilder(URI.create( - "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/summarization/data/Sample%20Sublease%20Agreement.pdf")) - .build(); + "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/summarization/data/Sample%20Sublease%20Agreement.pdf")) + .build(); byte[] pdfData; try (HttpClient httpClient = HttpClient.newHttpClient()) { pdfData = httpClient.send(request, HttpResponse.BodyHandlers.ofByteArray()).body(); @@ -430,7 +430,7 @@ Here is a demonstration of this process on a sample PDF: return preg_replace('/\s+/', ' ', $text); }; - // Download the sample sublease agreement from the summarization cookbook + // Download the sample sublease agreement from the Claude Cookbook's summarization recipe $pdfData = file_get_contents( 'https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/summarization/data/Sample%20Sublease%20Agreement.pdf' ); @@ -455,7 +455,7 @@ Here is a demonstration of this process on a sample PDF: text.gsub(/\s+/, " ") end - # Download the sample sublease agreement from the summarization cookbook + # Download the sample sublease agreement from the Claude Cookbook's summarization recipe pdf_data = Net::HTTP.get( URI("https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/summarization/data/Sample%20Sublease%20Agreement.pdf") ) @@ -701,41 +701,41 @@ Here’s an example of how to create a prompt that ensures the generated summari // Prompt the model to summarize the sublease agreement String prompt = """ - Summarize the following sublease agreement. Focus on these key aspects: + Summarize the following sublease agreement. Focus on these key aspects: - %s + %s - Provide the summary in bullet points nested within the XML header for each section. For example: + Provide the summary in bullet points nested within the XML header for each section. For example: - - - Sublessor: [Name] - // Add more details as needed - + + - Sublessor: [Name] + // Add more details as needed + - If any information is not explicitly stated in the document, note it as "Not specified". Do not preamble. + If any information is not explicitly stated in the document, note it as "Not specified". Do not preamble. - Sublease agreement text: - %s - """ - .formatted(detailsToExtractStr, text); + Sublease agreement text: + %s + """ + .formatted(detailsToExtractStr, text); Message response = client.messages().create(MessageCreateParams.builder() - .model(model) - .maxTokens(maxTokens) - .system("You are a legal analyst specializing in real estate law, known for highly accurate and detailed summaries of sublease agreements.") - .addUserMessage(prompt) - .build()); + .model(model) + .maxTokens(maxTokens) + .system("You are a legal analyst specializing in real estate law, known for highly accurate and detailed summaries of sublease agreements.") + .addUserMessage(prompt) + .build()); return response.content().stream() - .flatMap(block -> block.text().stream()) - .findFirst() - .orElseThrow() - .text(); + .flatMap(block -> block.text().stream()) + .findFirst() + .orElseThrow() + .text(); } void printSubleaseSummary() { String subleaseSummary = summarizeDocument( - documentText, detailsToExtract, Model.CLAUDE_OPUS_5_5, 16000); + documentText, detailsToExtract, Model.CLAUDE_OPUS_5_5, 16000); IO.println(subleaseSummary); } ``` @@ -831,7 +831,7 @@ Here’s an example of how to create a prompt that ensures the generated summari ``` -This code implements a `summarize_document` (typescript, go, java: `summarizeDocument`; php: `$summarizeDocument`; csharp: `SummarizeDocument`) function that uses Claude to summarize the contents of a sublease agreement. The function accepts a text string and a list of details to extract as inputs. In this example, the code calls the function with the `document_text` (typescript, go, java, csharp: `documentText`; php: `$documentText`) and `details_to_extract` (typescript, go, java, csharp: `detailsToExtract`; php: `$detailsToExtract`) variables that were defined in the previous code snippets. +This code implements a `summarize_document()` (typescript, go, java: `summarizeDocument()`; php: `$summarizeDocument()`; csharp: `SummarizeDocument()`) function that uses Claude to summarize the contents of a sublease agreement. The function accepts a text string and a list of details to extract as inputs. In this example, the code calls the function with the `document_text` (typescript, go, java, csharp: `documentText`; php: `$documentText`) and `details_to_extract` (typescript, go, java, csharp: `detailsToExtract`; php: `$detailsToExtract`) variables that were defined in the previous code snippets. Within the function, a prompt is generated for Claude, including the document to be summarized, the details to extract, and specific instructions for summarizing the document. The prompt instructs Claude to respond with a summary of each detail to extract nested within XML headers. @@ -1157,8 +1157,8 @@ Here's an example of how to perform meta-summarization: ```java Java List chunkText(String text, int chunkSize) { return IntStream.iterate(0, start -> start < text.length(), start -> start + chunkSize) - .mapToObj(start -> text.substring(start, Math.min(start + chunkSize, text.length()))) - .toList(); + .mapToObj(start -> text.substring(start, Math.min(start + chunkSize, text.length()))) + .toList(); } String summarizeLongDocument(String text, List detailsToExtract, Model model, long maxTokens) { @@ -1167,49 +1167,49 @@ Here's an example of how to perform meta-summarization: // Iterate over chunks and summarize each one String chunkSummaries = chunkText(text, 20000).stream() - .map(chunk -> summarizeDocument(chunk, detailsToExtract, model, maxTokens)) - .collect(Collectors.joining()); + .map(chunk -> summarizeDocument(chunk, detailsToExtract, model, maxTokens)) + .collect(Collectors.joining()); String finalSummaryPrompt = """ - You are looking at the chunked summaries of multiple documents that are all related. - Combine the following summaries of the document from different truthful sources into a coherent overall summary: + You are looking at the chunked summaries of multiple documents that are all related. + Combine the following summaries of the document from different truthful sources into a coherent overall summary: - - %s - + + %s + - Focus on these key aspects: - %s + Focus on these key aspects: + %s - Provide the summary in bullet points nested within the XML header for each section. For example: + Provide the summary in bullet points nested within the XML header for each section. For example: - - - Sublessor: [Name] - // Add more details as needed - + + - Sublessor: [Name] + // Add more details as needed + - If any information is not explicitly stated in the document, note it as "Not specified". Do not preamble. - """ - .formatted(chunkSummaries, detailsToExtractStr); + If any information is not explicitly stated in the document, note it as "Not specified". Do not preamble. + """ + .formatted(chunkSummaries, detailsToExtractStr); Message response = client.messages().create(MessageCreateParams.builder() - .model(model) - .maxTokens(maxTokens) - .system("You are a legal expert that summarizes notes on one document.") - .addUserMessage(finalSummaryPrompt) - .build()); + .model(model) + .maxTokens(maxTokens) + .system("You are a legal expert that summarizes notes on one document.") + .addUserMessage(finalSummaryPrompt) + .build()); return response.content().stream() - .flatMap(block -> block.text().stream()) - .findFirst() - .orElseThrow() - .text(); + .flatMap(block -> block.text().stream()) + .findFirst() + .orElseThrow() + .text(); } void printLongSummary() { String longSummary = summarizeLongDocument( - documentText, detailsToExtract, Model.CLAUDE_OPUS_5_5, 16000); + documentText, detailsToExtract, Model.CLAUDE_OPUS_5_5, 16000); IO.println(longSummary); } ``` @@ -1323,11 +1323,11 @@ Here's an example of how to perform meta-summarization: ``` -The `summarize_long_document` (typescript, go, java: `summarizeLongDocument`; php: `$summarizeLongDocument`; csharp: `SummarizeLongDocument`) function builds upon the earlier `summarize_document` (typescript, go, java: `summarizeDocument`; php: `$summarizeDocument`; csharp: `SummarizeDocument`) function by splitting the document into smaller chunks and summarizing each chunk individually. +The `summarize_long_document()` (typescript, go, java: `summarizeLongDocument()`; php: `$summarizeLongDocument()`; csharp: `SummarizeLongDocument()`) function builds upon the earlier `summarize_document()` (typescript, go, java: `summarizeDocument()`; php: `$summarizeDocument()`; csharp: `SummarizeDocument()`) function by splitting the document into smaller chunks and summarizing each chunk individually. -The code achieves this by applying the `summarize_document` (typescript, go, java: `summarizeDocument`; php: `$summarizeDocument`; csharp: `SummarizeDocument`) function to each chunk of 20,000 characters within the original document. The individual summaries are then combined, and a final summary is created from these chunk summaries. +The code achieves this by applying the `summarize_document()` (typescript, go, java: `summarizeDocument()`; php: `$summarizeDocument()`; csharp: `SummarizeDocument()`) function to each chunk of 20,000 characters within the original document. The individual summaries are then combined, and a final summary is created from these chunk summaries. -Note that the `summarize_long_document` (typescript, go, java: `summarizeLongDocument`; php: `$summarizeLongDocument`; csharp: `SummarizeLongDocument`) function isn't strictly necessary for the example PDF, as the entire document fits within Claude's context window. However, it becomes essential for documents exceeding Claude's context window or when summarizing multiple related documents together. Regardless, this meta-summarization technique often captures additional important details in the final summary that were missed in the earlier single-summary approach. +Note that the `summarize_long_document()` (typescript, go, java: `summarizeLongDocument()`; php: `$summarizeLongDocument()`; csharp: `SummarizeLongDocument()`) function isn't strictly necessary for the example PDF, as the entire document fits within Claude's context window. However, it becomes essential for documents exceeding Claude's context window or when summarizing multiple related documents together. Regardless, this meta-summarization technique often captures additional important details in the final summary that were missed in the earlier single-summary approach. ### Use summary indexed documents to explore a large collection of documents diff --git a/content/en/about-claude/use-case-guides/ticket-routing.md b/content/en/about-claude/use-case-guides/ticket-routing.md index f45a567c64..546d4ed2b2 100644 --- a/content/en/about-claude/use-case-guides/ticket-routing.md +++ b/content/en/about-claude/use-case-guides/ticket-routing.md @@ -905,7 +905,9 @@ Build the deployment structure. Start by defining the function signature for wra Message message = client.messages().create(MessageCreateParams.builder() .model(DEFAULT_MODEL) .maxTokens(2048L) - .outputConfig(OutputConfig.builder().effort(OutputConfig.Effort.LOW).build()) + .outputConfig(OutputConfig.builder() + .effort(OutputConfig.Effort.LOW) + .build()) .addUserMessage(classificationPrompt) .build()); String reasoningAndIntent = message.content().stream() @@ -1012,7 +1014,7 @@ Build the deployment structure. Start by defining the function signature for wra This code: * Creates a client instance using your API key. -* Defines a `classify_support_request` (typescript, go, java, php: `classifySupportRequest`; csharp: `ClassifySupportRequest`) function that takes a `ticket_contents` (typescript, csharp, go, java: `ticketContents`; php: `$ticketContents`) string. +* Defines a `classify_support_request()` (typescript, go, java, php: `classifySupportRequest()`; csharp: `ClassifySupportRequest()`) function that takes a `ticket_contents` (typescript, csharp, go, java: `ticketContents`; php: `$ticketContents`) string. * Sends the `ticket_contents` (typescript, csharp, go, java: `ticketContents`; php: `$ticketContents`) to Claude for classification using the `classification_prompt` (typescript, csharp, go, java: `classificationPrompt`; php: `$classificationPrompt`). * Returns the model's reasoning and intent extracted from the response. @@ -1273,7 +1275,9 @@ To assess this, first modify the script so that it compares the predicted intent Message message = client.messages().create(MessageCreateParams.builder() .model(DEFAULT_MODEL) .maxTokens(2048L) - .outputConfig(OutputConfig.builder().effort(OutputConfig.Effort.LOW).build()) + .outputConfig(OutputConfig.builder() + .effort(OutputConfig.Effort.LOW) + .build()) .addUserMessage(classificationPrompt) .build()); // Get the usage statistics for the API call for how many input and output tokens were used. @@ -1397,7 +1401,7 @@ To assess this, first modify the script so that it compares the predicted intent Here is a breakdown of the edits: -* The `classify_support_request` (typescript, go, java, php: `classifySupportRequest`; csharp: `ClassifySupportRequest`) function now takes the `actual_intent` (typescript, csharp, go, java: `actualIntent`; php: `$actualIntent`) from the test cases and compares it against Claude’s intent classification to assess whether they match. +* The `classify_support_request()` (typescript, go, java, php: `classifySupportRequest()`; csharp: `ClassifySupportRequest()`) function now takes the `actual_intent` (typescript, csharp, go, java: `actualIntent`; php: `$actualIntent`) from the test cases and compares it against Claude’s intent classification to assess whether they match. * The function extracts usage statistics for the API call to calculate cost based on input and output tokens used. ### Run your evaluation diff --git a/content/en/agents-and-tools/agent-skills/claude-api-skill.md b/content/en/agents-and-tools/agent-skills/claude-api-skill.md index 592e8b7950..0c4f8e285d 100644 --- a/content/en/agents-and-tools/agent-skills/claude-api-skill.md +++ b/content/en/agents-and-tools/agent-skills/claude-api-skill.md @@ -36,8 +36,8 @@ When triggered, the skill equips Claude with: * **Onboarding flow:** An interview-driven walkthrough for setting up a new Managed Agent, available through the `/claude-api managed-agents-onboard` subcommand * **Security guide check:** A read-only check of an agent's settings against [Secure your Managed Agents deployment](https://platform.claude.com/docs/en/managed-agents/secure-deployment), available through the `/claude-api managed-agents-secure` subcommand of the skill bundled with Claude Code * **Language-specific Managed Agents docs:** Creating persistent agents, starting sessions, streaming events, and handling tool confirmations for Python, TypeScript, C#, Go, Java, PHP, Ruby, and cURL -* **Client patterns:** Lossless stream reconnect, `processed_at` queued/processed gate, interrupt handling, file-mount gotchas, and credential handling -* **Deployment constraints:** Managed Agents is available on the Claude API and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) only (not on Amazon Bedrock, Google Cloud, or Microsoft Foundry). The skill routes other deployments to the Messages API and tool use instead. +* **Client patterns:** Lossless stream reconnect, `processed_at` queued/processed gate, interrupt handling, file-mount pitfalls, and credential handling +* **Deployment constraints:** Which platforms support Managed Agents, and the Messages API with tool use as the alternative on platforms that don't ## When the skill activates diff --git a/content/en/agents-and-tools/agent-skills/overview.md b/content/en/agents-and-tools/agent-skills/overview.md index 87c593d2e0..ded99e8784 100644 --- a/content/en/agents-and-tools/agent-skills/overview.md +++ b/content/en/agents-and-tools/agent-skills/overview.md @@ -302,7 +302,7 @@ claude.ai does not support centralized admin management or org-wide distribution The exact runtime environment available to your Skill depends on the product surface where you use it. * **claude.ai:** - * **Varying network access:** Depending on user/admin settings, Skills might have full, partial, or no network access. For more details, see the [Create and Edit Files](https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude#h_6b7e833898) support article. + * **Varying network access:** Depending on user/admin settings, Skills might have full, partial, or no network access. For more details, see the [Create and edit files with Claude](https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude#h_6b7e833898) support article. * **Claude API:** diff --git a/content/en/agents-and-tools/agent-skills/quickstart.md b/content/en/agents-and-tools/agent-skills/quickstart.md index 4ee2ea029b..a5dce32a28 100644 --- a/content/en/agents-and-tools/agent-skills/quickstart.md +++ b/content/en/agents-and-tools/agent-skills/quickstart.md @@ -86,7 +86,9 @@ First, check what Skills are available. Use the Skills API to list all Anthropic ```java Java // List Anthropic-managed Skills SkillListPage skills = client.skills().list( - SkillListParams.builder().source("anthropic").build() + SkillListParams.builder() + .source("anthropic") + .build() ); for (Skill skill : skills.data()) { diff --git a/content/en/agents-and-tools/mcp-connector.md b/content/en/agents-and-tools/mcp-connector.md index 312eb839e7..efc7ab3c3f 100644 --- a/content/en/agents-and-tools/mcp-connector.md +++ b/content/en/agents-and-tools/mcp-connector.md @@ -1266,7 +1266,7 @@ Install both the Anthropic SDK and the MCP SDK: The helpers live in the `mcp` subpackage of the Go SDK, which builds on the [MCP Go SDK](https://github.com/modelcontextprotocol/go-sdk): ```bash - go get github.com/anthropics/anthropic-sdk-go/mcp + go get github.com/anthropics/anthropic-sdk-go/v2/mcp ``` @@ -1345,7 +1345,7 @@ Import the helpers for your language: ```go Go import ( - "github.com/anthropics/anthropic-sdk-go/mcp" + "github.com/anthropics/anthropic-sdk-go/v2/mcp" ) ``` @@ -1480,7 +1480,7 @@ Convert MCP tools for use with the SDK's [tool runner](https://platform.claude.c // ... // ... - "github.com/anthropics/anthropic-sdk-go/mcp" + "github.com/anthropics/anthropic-sdk-go/v2/mcp" mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp" ) @@ -1544,7 +1544,7 @@ Convert MCP tools for use with the SDK's [tool runner](https://platform.claude.c // Connect to an MCP server StdioClientTransport transport = new StdioClientTransport( - ServerParameters.builder("mcp-server").build(), McpJsonDefaults.getMapper()); + ServerParameters.builder("mcp-server").build(), McpJsonDefaults.getMapper()); try (McpSyncClient mcpClient = McpClient.sync(transport) .clientInfo(new McpSchema.Implementation("my-client", "1.0.0")) @@ -1556,13 +1556,13 @@ Convert MCP tools for use with the SDK's [tool runner](https://platform.claude.c List betaTools = BetaMcp.mcpTools(mcpClient.listTools().tools(), mcpClient); MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024L) - .addUserMessage("What tools do you have available?") - .addTools(betaTools) - .build(); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024L) + .addUserMessage("What tools do you have available?") + .addTools(betaTools) + .build(); - // The runner yields one message per assistant turn; the last is the final response + // The runner yields one message for each assistant turn; the last is the final response BetaToolRunner runner = anthropic.beta().messages().toolRunner(params); BetaMessage finalMessage = null; for (BetaMessage message : runner) { @@ -1692,13 +1692,13 @@ Convert MCP prompt messages into Claude API message format: ```java Java McpSchema.GetPromptResult prompt = mcpClient.getPrompt( - new McpSchema.GetPromptRequest("my-prompt", Map.of())); + new McpSchema.GetPromptRequest("my-prompt", Map.of())); BetaMessage response = anthropic.beta().messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024L) - .messages(BetaMcp.mcpMessages(prompt.messages())) - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024L) + .messages(BetaMcp.mcpMessages(prompt.messages())) + .build()); IO.println(response); ``` @@ -1821,7 +1821,7 @@ Convert MCP resources into content blocks to include in messages, or into file o var fileResource = await mcpClient.ReadResourceAsync("file:///path/to/data.json"); var (filename, data, mediaType) = BetaMcp.ResourceToFile(fileResource); - // Build the file part explicitly so the resource's filename and MIME type + // Build the file part explicitly so the resource's file name and MIME type // carry through to the upload. var file = new BinaryContent { Stream = new MemoryStream(data), FileName = filename }; if (mediaType is not null) @@ -1885,37 +1885,39 @@ Convert MCP resources into content blocks to include in messages, or into file o ```java Java // As a content block in a message McpSchema.ReadResourceResult resource = mcpClient.readResource( - new McpSchema.ReadResourceRequest("file:///path/to/doc.txt")); + new McpSchema.ReadResourceRequest("file:///path/to/doc.txt")); List content = - new ArrayList<>(BetaMcp.mcpResourceContents(resource)); + new ArrayList<>(BetaMcp.mcpResourceContents(resource)); content.add(BetaContentBlockParam.ofText( - BetaTextBlockParam.builder().text("Summarize this document").build())); + BetaTextBlockParam.builder() + .text("Summarize this document") + .build())); BetaMessage response = anthropic.beta().messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024L) - .addUserMessageOfContentBlockParams(content) - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024L) + .addUserMessageOfContentBlockParams(content) + .build()); IO.println(response); // As a file upload McpSchema.ReadResourceResult fileResource = mcpClient.readResource( - new McpSchema.ReadResourceRequest("file:///path/to/data.json")); + new McpSchema.ReadResourceRequest("file:///path/to/data.json")); McpResourceFile resourceFile = BetaMcp.mcpResourceFiles(fileResource).getFirst(); - // Build the file part explicitly so the resource's filename and MIME type + // Build the file part explicitly so the resource's file name and MIME type // carry through to the upload. MultipartField.Builder fileField = MultipartField.builder() - .value(new ByteArrayInputStream(resourceFile.content())) - .filename(resourceFile.filename()); + .value(new ByteArrayInputStream(resourceFile.content())) + .filename(resourceFile.filename()); resourceFile.mimeType().ifPresent(fileField::contentType); var uploaded = anthropic.files().upload(FileUploadParams.builder() - .file(fileField.build()) - .build()); + .file(fileField.build()) + .build()); IO.println(uploaded.id()); ``` diff --git a/content/en/agents-and-tools/mcp-tunnels/quickstart.md b/content/en/agents-and-tools/mcp-tunnels/quickstart.md index b2e8cdc9c5..f2a185589d 100644 --- a/content/en/agents-and-tools/mcp-tunnels/quickstart.md +++ b/content/en/agents-and-tools/mcp-tunnels/quickstart.md @@ -8,7 +8,7 @@ description: Connect Claude to a private MCP server using a local Docker Compose MCP tunnels are in research preview. [Request access](https://claude.com/form/mcp-tunnels) to try them. -This quickstart shows you how to set up a tunnel so that Claude can call a private MCP server through it. It uses Docker Compose with [manual](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/concepts#credential-provisioning) credential provisioning, which is the shortest path for local testing. For production deployments, see [Deploy with Helm](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/deploy-helm) or [Deploy with Docker Compose](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/deploy-compose). +This quickstart takes you from creating a tunnel to Claude calling a private MCP server through it. It uses Docker Compose with [manual](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/concepts#credential-provisioning) credential provisioning, which is the shortest path for local testing. For production deployments, see [Deploy with Helm](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/deploy-helm) or [Deploy with Docker Compose](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/deploy-compose). ## What you'll build diff --git a/content/en/agents-and-tools/tool-use/advisor-tool.md b/content/en/agents-and-tools/tool-use/advisor-tool.md index f0525e3067..ace3179948 100644 --- a/content/en/agents-and-tools/tool-use/advisor-tool.md +++ b/content/en/agents-and-tools/tool-use/advisor-tool.md @@ -224,7 +224,7 @@ The advisor is a weaker fit for single-turn Q\&A (nothing to plan), pure pass-th 'content' => 'Build a concurrent worker pool in Go with graceful shutdown.', ], ], - model: 'claude-sonnet-5', + model: Model::CLAUDE_SONNET_5, tools: [ [ 'type' => 'advisor_20260301', @@ -600,7 +600,9 @@ Pass the full assistant content, including `advisor_tool_result` blocks, back to List tools = List.of( BetaToolUnion.ofAdvisorTool20260301( - BetaAdvisorTool20260301.builder().model(Model.CLAUDE_OPUS_5_5).build())); + BetaAdvisorTool20260301.builder() + .model(Model.CLAUDE_OPUS_5_5) + .build())); List messages = new ArrayList<>(); messages.add(BetaMessageParam.ofUser( @@ -743,7 +745,7 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod def run_your_tools(content): - # Replace with your tool dispatch. Returns one tool_result block per tool_use block. + # Replace with your tool dispatch. Returns one tool_result block for each tool_use block. return [ { "type": "tool_result", @@ -783,7 +785,9 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod if response.stop_reason == "pause_turn": continue # server tool pending; re-send to let the API complete it if response.stop_reason != "tool_use": - break # end_turn, or a stop such as max_tokens that needs handling (see below) + # end_turn, or a stop such as max_tokens that needs handling + # (explained after this example) + break results = run_your_tools(response.content) # list of tool_result blocks if results: @@ -806,7 +810,7 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod function runYourTools( content: Anthropic.Beta.Messages.BetaContentBlock[] ): Anthropic.Beta.Messages.BetaToolResultBlockParam[] { - // Replace with your tool dispatch. Returns one tool_result block per tool_use block. + // Replace with your tool dispatch. Returns one tool_result block for each tool_use block. return content .filter((block) => block.type === "tool_use") .map((block) => ({ @@ -842,7 +846,9 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod continue; // server tool pending; re-send to let the API complete it } if (response.stop_reason !== "tool_use") { - break; // end_turn, or a stop such as max_tokens that needs handling (see below) + // end_turn, or a stop such as max_tokens that needs handling + // (explained after this example) + break; } const results = runYourTools(response.content); // list of tool_result blocks @@ -869,7 +875,7 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod + "now before committing to an approach."; const int MaxTurns = 10; // agent loop cap - // Replace with your tool dispatch. Returns one tool_result block per tool_use block. + // Replace with your tool dispatch. Returns one tool_result block for each tool_use block. List RunYourTools(IReadOnlyList content) { List results = []; @@ -922,7 +928,9 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod } if (response.StopReason != BetaStopReason.ToolUse) { - break; // end_turn, or a stop such as max_tokens that needs handling (see below) + // end_turn, or a stop such as max_tokens that needs handling + // (explained after this example) + break; } var results = RunYourTools(response.Content); // list of tool_result blocks @@ -947,7 +955,7 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod maxTurns = 10 // agent loop cap ) - // Replace with your tool dispatch. Returns one tool_result block per tool_use block. + // Replace with your tool dispatch. Returns one tool_result block for each tool_use block. func runYourTools(content []anthropic.BetaContentBlockUnion) []anthropic.BetaContentBlockParamUnion { var results []anthropic.BetaContentBlockParamUnion for _, block := range content { @@ -998,15 +1006,14 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod continue // server tool pending; re-send to let the API complete it } if response.StopReason != anthropic.BetaStopReasonToolUse { - break // end_turn, or a stop such as max_tokens that needs handling (see below) + // end_turn, or a stop such as max_tokens that needs handling + // (explained after this example) + break } results := runYourTools(response.Content) // list of tool_result blocks if len(results) > 0 { - messages = append(messages, anthropic.BetaMessageParam{ - Role: anthropic.BetaMessageParamRoleUser, - Content: results, - }) + messages = append(messages, anthropic.NewBetaUserMessage(results...)) } // Skip this if your system prompt already tells the model to call sparingly. if turn == nudgeTurn-1 && !advisorCalled { @@ -1036,7 +1043,7 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod + "now before committing to an approach."; static final int MAX_TURNS = 10; // agent loop cap - // Replace with your tool dispatch. Returns one tool_result block per tool_use block. + // Replace with your tool dispatch. Returns one tool_result block for each tool_use block. List runYourTools(List content) { List results = new ArrayList<>(); for (BetaContentBlock block : content) { @@ -1056,7 +1063,9 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod List tools = List.of( BetaToolUnion.ofAdvisorTool20260301( - BetaAdvisorTool20260301.builder().model(Model.CLAUDE_OPUS_5_5).build()) + BetaAdvisorTool20260301.builder() + .model(Model.CLAUDE_OPUS_5_5) + .build()) // ... your other tools ); String task = "Build a concurrent worker pool in Go with graceful shutdown."; @@ -1082,7 +1091,9 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod continue; // server tool pending; re-send to let the API complete it } if (!BetaStopReason.TOOL_USE.equals(stopReason)) { - break; // end_turn, or a stop such as max_tokens that needs handling (see below) + // end_turn, or a stop such as max_tokens that needs handling + // (explained after this example) + break; } List results = runYourTools(response.content()); // list of tool_result blocks @@ -1101,12 +1112,12 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod $client = new Client(); const NUDGE_TURN = 2; // inject before this assistant turn if no advisor call yet - const NUDGE_TEXT = "You have not consulted the advisor yet. If the task has a non-obvious " + const NUDGE_TEXT = 'You have not consulted the advisor yet. If the task has a non-obvious ' . "design decision or a failure mode you haven't ruled out, call advisor " - . "now before committing to an approach."; + . 'now before committing to an approach.'; const MAX_TURNS = 10; // agent loop cap - // Replace with your tool dispatch. Returns one tool_result block per tool_use block. + // Replace with your tool dispatch. Returns one tool_result block for each tool_use block. function runYourTools(array $content): array { $results = []; @@ -1148,7 +1159,9 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod continue; // server tool pending; re-send to let the API complete it } if ($response->stopReason !== 'tool_use') { - break; // end_turn, or a stop such as max_tokens that needs handling (see below) + // end_turn, or a stop such as max_tokens that needs handling + // (explained after this example) + break; } $results = runYourTools($response->content); // list of tool_result blocks @@ -1172,7 +1185,7 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod "now before committing to an approach." MAX_TURNS = 10 # agent loop cap - # Replace with your tool dispatch. Returns one tool_result block per tool_use block. + # Replace with your tool dispatch. Returns one tool_result block for each tool_use block. def run_your_tools(content) content.filter_map do |block| next unless block.type == :tool_use @@ -1201,7 +1214,9 @@ With the default `NUDGE_TURN` of 2, the reminder typically arrives after the mod block.type == :server_tool_use && block.name == :advisor end next if response.stop_reason == :pause_turn # server tool pending; re-send to let the API complete it - break unless response.stop_reason == :tool_use # end_turn, or a stop such as max_tokens that needs handling (see below) + # end_turn, or a stop such as max_tokens that needs handling + # (explained after this example) + break unless response.stop_reason == :tool_use results = run_your_tools(response.content) # list of tool_result blocks messages << { role: "user", content: results } unless results.empty? @@ -1227,7 +1242,7 @@ The advisor sub-inference does not stream. The executor's stream pauses while th The `server_tool_use` block with `name: "advisor"` signals that an advisor call is starting. The pause starts when that block closes (`content_block_stop`). During the pause, the stream is quiet except for standard SSE `ping` keepalives emitted roughly every 30 seconds. Short advisor calls might show no pings. -When the advisor finishes, the `advisor_tool_result` arrives fully formed in a single `content_block_start` event (no deltas). Executor output then resumes streaming. +When the advisor call completes, the `advisor_tool_result` arrives fully formed in a single `content_block_start` event (no deltas). Executor output then resumes streaming. A `message_delta` event follows with the updated `usage.iterations` array reflecting the advisor's token counts. @@ -1812,7 +1827,7 @@ If you request an invalid pair, the API returns a `400 invalid_request_error` na ### Platform availability -The advisor tool is available in beta on the Claude API and on [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws). It is not currently available on Amazon Bedrock, Google Cloud, or Microsoft Foundry. +The advisor tool is available in beta on the Claude API, on [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). It is not currently available on Amazon Bedrock, Claude Models on Google Cloud (Google managed), or Microsoft Foundry. ## Advisor on Claude Managed Agents diff --git a/content/en/agents-and-tools/tool-use/bash-tool.md b/content/en/agents-and-tools/tool-use/bash-tool.md index f92a36d34c..2642556acc 100644 --- a/content/en/agents-and-tools/tool-use/bash-tool.md +++ b/content/en/agents-and-tools/tool-use/bash-tool.md @@ -146,12 +146,13 @@ The current version of the tool is `bash_20250124`. For model support, beta head ``` ```php PHP + use Anthropic\Messages\Model; use Anthropic\Messages\ToolBash20250124; $client = new Client(); $response = $client->messages->create( - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, tools: [new ToolBash20250124()], messages: [ @@ -306,7 +307,7 @@ Claude determines which command to run. Your application owns everything else: t def execute_command(self, command): """Run a command in the session and return its output.""" - sentinel = f"__CLAUDE_BASH_DONE_{uuid.uuid4().hex}__" # unique per call + sentinel = f"__CLAUDE_BASH_DONE_{uuid.uuid4().hex}__" # unique for each call self.process.stdin.write(f"{command}\necho {sentinel}\n") self.process.stdin.flush() @@ -352,7 +353,7 @@ Claude determines which command to run. Your application owns everything else: t // Run a command in the session and return its output. executeCommand(command: string): Promise { - const sentinel = `__CLAUDE_BASH_DONE_${randomUUID()}__`; // unique per call + const sentinel = `__CLAUDE_BASH_DONE_${randomUUID()}__`; // unique for each call const output: string[] = []; const result = new Promise((resolve) => { const onLine = (line: string): void => { @@ -416,7 +417,7 @@ Claude determines which command to run. Your application owns everything else: t // Run a command in the session and return its output. public string ExecuteCommand(string command) { - var sentinel = $"__CLAUDE_BASH_DONE_{Guid.NewGuid():N}__"; // unique per call + var sentinel = $"__CLAUDE_BASH_DONE_{Guid.NewGuid():N}__"; // unique for each call Process.StandardInput.Write($"{command}\necho {sentinel}\n"); Process.StandardInput.Flush(); @@ -483,7 +484,7 @@ Claude determines which command to run. Your application owns everything else: t func (s *BashSession) ExecuteCommand(command string) string { buf := make([]byte, 16) rand.Read(buf) - sentinel := fmt.Sprintf("__CLAUDE_BASH_DONE_%s__", hex.EncodeToString(buf)) // unique per call + sentinel := fmt.Sprintf("__CLAUDE_BASH_DONE_%s__", hex.EncodeToString(buf)) // unique for each call fmt.Fprintf(s.stdin, "%s\necho %s\n", command, sentinel) var output strings.Builder @@ -547,7 +548,7 @@ Claude determines which command to run. Your application owns everything else: t // Run a command in the session and return its output. String executeCommand(String command) throws IOException { - String sentinel = "__CLAUDE_BASH_DONE_" + UUID.randomUUID() + "__"; // unique per call + String sentinel = "__CLAUDE_BASH_DONE_" + UUID.randomUUID() + "__"; // unique for each call stdin.write(command + "\necho " + sentinel + "\n"); stdin.flush(); @@ -604,7 +605,7 @@ Claude determines which command to run. Your application owns everything else: t // Run a command in the session and return its output. public function executeCommand(string $command): string { - $sentinel = '__CLAUDE_BASH_DONE_' . bin2hex(random_bytes(16)) . '__'; // unique per call + $sentinel = '__CLAUDE_BASH_DONE_' . bin2hex(random_bytes(16)) . '__'; // unique for each call fwrite($this->stdin, "{$command}\necho {$sentinel}\n"); fflush($this->stdin); @@ -627,8 +628,8 @@ Claude determines which command to run. Your application owns everything else: t } $session = new BashSession(); - echo $session->executeCommand("cd /tmp && pwd"); - echo $session->executeCommand("pwd"); // still /tmp: the session kept its state + echo $session->executeCommand('cd /tmp && pwd'); + echo $session->executeCommand('pwd'); // still /tmp: the session kept its state ``` ```ruby Ruby @@ -645,7 +646,7 @@ Claude determines which command to run. Your application owns everything else: t # Run a command in the session and return its output. def execute_command(command) - sentinel = "__CLAUDE_BASH_DONE_#{SecureRandom.hex(16)}__" # unique per call + sentinel = "__CLAUDE_BASH_DONE_#{SecureRandom.hex(16)}__" # unique for each call @stdin.write("#{command}\necho #{sentinel}\n") @stdin.flush @@ -697,7 +698,7 @@ Claude determines which command to run. Your application owns everything else: t command = content.input.get("command") result = bash_session.execute_command(command) - # One tool_result per tool_use block, all returned in the next user message + # One tool_result for each tool_use block, all returned in the next user message tool_results.append( {"type": "tool_result", "tool_use_id": content.id, "content": result} ) @@ -715,7 +716,7 @@ Claude determines which command to run. Your application owns everything else: t result = await bashSession.executeCommand(block.input.command ?? ""); } - // One tool_result per tool_use block, all returned in the next user message + // One tool_result for each tool_use block, all returned in the next user message toolResults.push({ type: "tool_result", tool_use_id: block.id, content: result }); } } @@ -739,7 +740,7 @@ Claude determines which command to run. Your application owns everything else: t result = bashSession.ExecuteCommand(command); } - // One tool_result per tool_use block, all returned in the next user message + // One tool_result for each tool_use block, all returned in the next user message toolResults.Add(new ToolResultBlockParam { ToolUseID = toolUse.ID, Content = result }); } } @@ -765,7 +766,7 @@ Claude determines which command to run. Your application owns everything else: t result = bashSession.ExecuteCommand(input.Command) } - // One tool_result per tool_use block, all returned in the next user message + // One tool_result for each tool_use block, all returned in the next user message toolResults = append(toolResults, anthropic.NewToolResultBlock(block.ID, result, false)) } } @@ -784,7 +785,7 @@ Claude determines which command to run. Your application owns everything else: t result = bashSession.executeCommand(command); } - // One tool_result per tool_use block, all returned in the next user message + // One tool_result for each tool_use block, all returned in the next user message toolResults.add(Map.of("type", "tool_result", "tool_use_id", block.id(), "content", result)); } } @@ -801,7 +802,7 @@ Claude determines which command to run. Your application owns everything else: t $result = $bashSession->executeCommand($block->input['command']); } - // One tool_result per tool_use block, all returned in the next user message + // One tool_result for each tool_use block, all returned in the next user message $toolResults[] = ['type' => 'tool_result', 'tool_use_id' => $block->id, 'content' => $result]; } } @@ -820,7 +821,7 @@ Claude determines which command to run. Your application owns everything else: t bash_session.execute_command(block.input[:command]) end - # One tool_result per tool_use block, all returned in the next user message + # One tool_result for each tool_use block, all returned in the next user message tool_results << {type: "tool_result", tool_use_id: block.id, content: result} end ``` @@ -1106,12 +1107,13 @@ Claude determines which command to run. Your application owns everything else: t ``` ```php PHP + use Anthropic\Messages\Model; use Anthropic\Messages\ToolBash20250124; $client = new Client(); $response = $client->messages->create( - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, tools: [new ToolBash20250124()], messages: [ @@ -1604,7 +1606,7 @@ When a command fails or the session breaks, tell Claude what occurred. Return th // readable output before each fgets() so the loop can check the deadline. function executeWithTimeout(BashSession $session, string $command, int $timeout = 30): string { - $sentinel = '__CLAUDE_BASH_DONE_' . bin2hex(random_bytes(16)) . '__'; // unique per call + $sentinel = '__CLAUDE_BASH_DONE_' . bin2hex(random_bytes(16)) . '__'; // unique for each call fwrite($session->stdin, "{$command}\necho {$sentinel}\n"); fflush($session->stdin); diff --git a/content/en/agents-and-tools/tool-use/browser-use-sdk.md b/content/en/agents-and-tools/tool-use/browser-use-sdk.md index 8c92db6155..31d24c3bdc 100644 --- a/content/en/agents-and-tools/tool-use/browser-use-sdk.md +++ b/content/en/agents-and-tools/tool-use/browser-use-sdk.md @@ -702,7 +702,7 @@ A driver with request interception can also check those requests in its request ``` -A request hook like this one doesn't see WebSocket handshakes, service-worker requests, or redirect hops. Block service workers. Check WebSocket handshakes and redirect hops with a hook that sees them. The example policy refuses `ws://` and `wss://` URLs, so change `ws://` to `http://` and `wss://` to `https://` before you pass a WebSocket URL to `is_allowed` (typescript: `isAllowed`). +A request hook like this one doesn't see WebSocket handshakes, service-worker requests, or redirect hops. Block service workers. Check WebSocket handshakes and redirect hops with a hook that sees them. The example policy refuses `ws://` and `wss://` URLs, so change `ws://` to `http://` and `wss://` to `https://` before you pass a WebSocket URL to `is_allowed()` (typescript: `isAllowed()`). ### Put egress policy on the container @@ -770,7 +770,7 @@ Set up downloads this way: Return `True` (typescript: `true`) to run the call, or `False` (typescript: `false`) to refuse it. When your callable asks a person, show them the member, the page's URL, and the call's input. First, escape every character outside printable ASCII in the URL and the input, because both can carry text from the page. -This example asks about the two gated members through your own `ask_user` (typescript: `askUser`) function, and approves the rest: +This example asks about the two gated members through your own `ask_user()` (typescript: `askUser()`) function, and approves the rest: ```python Python @@ -920,7 +920,7 @@ The class takes `configs`, `confirm`, and `tool_configs` (typescript: `toolConfi ### Write a desktop driver -This driver implements five of the 17 tools listed under [Available actions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#available-actions). A tool you don't implement is sent to the API as disabled, as [Implement a driver](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-sdk#implement-a-driver) explains. In the example, `display` stands for your own wrapper around whatever controls the desktop, such as a VNC client or `xdotool`, and `ask_user` (typescript: `askUser`) stands for your own function that asks a person. +This driver implements five of the 17 tools listed under [Available actions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#available-actions). A tool you don't implement is sent to the API as disabled, as [Implement a driver](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-sdk#implement-a-driver) explains. In the example, `display` stands for your own wrapper around whatever controls the desktop, such as a VNC client or `xdotool`, and `ask_user()` (typescript: `askUser()`) stands for your own function that asks a person. ```python Python @@ -1157,7 +1157,7 @@ If your screenshots are a different size from the display, convert in both direc ``` -Call `to_display` (typescript: `toDisplay`) on each `coordinate` and `start_coordinate` before you act on it, and `to_screenshot` (typescript: `toScreenshot`) on the position that `cursor_position` reports. A click or scroll with no `coordinate` acts at the cursor, so it has nothing to convert. Scale a `zoom` `region` by the same factor. A `zoom` image doesn't change this: the next points Claude sends are still pixel positions in the full screenshot. +Call `to_display()` (typescript: `toDisplay()`) on each `coordinate` and `start_coordinate` before you act on it, and `to_screenshot()` (typescript: `toScreenshot()`) on the position that `cursor_position` reports. A click or scroll with no `coordinate` acts at the cursor, so it has nothing to convert. Scale a `zoom` `region` by the same factor. A `zoom` image doesn't change this: the next points Claude sends are still pixel positions in the full screenshot. The SDK never reads or resizes an image. The API rejects an image over the model's limits, which ends the run. Scale each screenshot and `zoom` image in the driver. See [Size screenshots to fit image limits](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions). On a long run, one request can hold more than 20 images, and the API then holds each one to a stricter limit. See [Manage screenshot history](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#manage-screenshot-history). @@ -1193,7 +1193,7 @@ Before you run a driver against anything but a throwaway machine, take these fiv The SDK applies step 2 through the callable you pass. The other steps are up to your driver and your deployment. The precautions under [Security considerations for the computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#security-considerations) apply as well. -The following `confirm` asks a person before any keyboard input, through your own `ask_user` (typescript: `askUser`) function, and approves every other call. `context.member` (typescript: `ctx.member`) is the tool's name. To have a person approve clicks too, set `ASK_FIRST` to `KEYBOARD | CLICKS` (typescript: `new Set([...KEYBOARD, ...CLICKS])`). +The following `confirm` asks a person before any keyboard input, through your own `ask_user()` (typescript: `askUser()`) function, and approves every other call. `context.member` (typescript: `ctx.member`) is the tool's name. To have a person approve clicks too, set `ASK_FIRST` to `KEYBOARD | CLICKS` (typescript: `new Set([...KEYBOARD, ...CLICKS])`). ```python Python diff --git a/content/en/agents-and-tools/tool-use/browser-use-tool.md b/content/en/agents-and-tools/tool-use/browser-use-tool.md index ab700b24ea..f2f04fbcbe 100644 --- a/content/en/agents-and-tools/tool-use/browser-use-tool.md +++ b/content/en/agents-and-tools/tool-use/browser-use-tool.md @@ -20,7 +20,7 @@ featureMetadata: - claude-haiku-5-5 supportedPlatforms: Claude API: ga - Google Cloud: ga + Claude Models on Google Cloud (Google managed): ga --- @@ -37,7 +37,7 @@ With browser use, Claude reads and acts on live webpages, so everything a page s ## Quick start -The browser use tool is available on the Claude API and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai): add one entry of type `browser_toolset_20260801`, with no `name`, to the `tools` array of a [Messages API](https://platform.claude.com/docs/en/api/messages/create) request. +The browser use tool is available on the Claude API and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed): add one entry of type `browser_toolset_20260801`, with no `name`, to the `tools` array of a [Messages API](https://platform.claude.com/docs/en/api/messages/create) request. ```bash cURL @@ -173,7 +173,7 @@ The browser use tool is available on the Claude API and [Google Cloud](https://p messages: [ ['role' => 'user', 'content' => 'Open example.com/docs and tell me how to get started.'], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, tools: [ ['type' => 'browser_toolset_20260801'], ], @@ -562,13 +562,13 @@ Here's a skeleton of that loop's tool-call step in two parts. First, stub member ToolResultBlockParam.Content captureScreenshot() { ImageBlockParam image = ImageBlockParam.builder() - .source(Base64ImageSource.builder() - .mediaType(Base64ImageSource.MediaType.IMAGE_PNG) - .data(PLACEHOLDER_PNG) - .build()) - .build(); + .source(Base64ImageSource.builder() + .mediaType(Base64ImageSource.MediaType.IMAGE_PNG) + .data(PLACEHOLDER_PNG) + .build()) + .build(); return ToolResultBlockParam.Content.ofBlocks( - List.of(ToolResultBlockParam.Content.Block.ofImage(image))); + List.of(ToolResultBlockParam.Content.Block.ofImage(image))); } String navigate(String url) { @@ -577,8 +577,8 @@ Here's a skeleton of that loop's tool-call step in two parts. First, stub member String readPage() { return """ - link "Docs" [ref_1] - button "Search" [ref_2]"""; + link "Docs" [ref_1] + button "Search" [ref_2]"""; } String clickRef(String ref) { @@ -604,7 +604,7 @@ Here's a skeleton of that loop's tool-call step in two parts. First, stub member case "left_click" -> { // target is {"type": "ref", "ref": "ref_1"} or {"type": "coordinate", "x": 640, "y": 380} Map target = - (Map) input.get("target").asObject().get(); + (Map) input.get("target").asObject().get(); if (target.get("type").asStringOrThrow().equals("ref")) { yield clickRef(target.get("ref").asStringOrThrow()); } @@ -901,7 +901,7 @@ The second part runs a batch in order, dispatches each block to those handlers, } // processToolCalls runs the browser actions in Claude's response in order and - // builds one tool_result per tool_use block. After the first failure it skips + // builds one tool_result for each tool_use block. After the first failure it skips // the rest: Claude planned them assuming the earlier actions succeeded. func processToolCalls(response *anthropic.Message) []anthropic.ContentBlockParamUnion { var toolResults []anthropic.ContentBlockParamUnion @@ -941,13 +941,13 @@ The second part runs a batch in order, dispatches each block to those handlers, /** Every result answering a browser toolset member echoes toolset_name. */ ToolResultBlockParam.Builder browserResult(ToolUseBlock toolUse) { return ToolResultBlockParam.builder() - .toolUseId(toolUse.id()) - .toolsetName("browser"); + .toolUseId(toolUse.id()) + .toolsetName("browser"); } /** * Run the browser actions in Claude's response in order and build one - * tool_result per tool_use block. After the first failure, skip the rest: + * tool_result for each tool_use block. After the first failure, skip the rest: * Claude planned them assuming the earlier actions succeeded. */ List processToolCalls(Message response) { @@ -961,18 +961,26 @@ The second part runs a batch in order, dispatches each block to those handlers, ToolUseBlock toolUse = block.asToolUse(); ToolResultBlockParam result; if (failed) { - result = browserResult(toolUse).content(HALT_TEXT).isError(true).build(); + result = browserResult(toolUse) + .content(HALT_TEXT) + .isError(true) + .build(); } else { try { Map input = - (Map) toolUse._input().asObject().get(); + (Map) toolUse._input().asObject().get(); ToolResultBlockParam.Content output = handleBrowserAction(toolUse.name(), input); // A real executor also adds a browser_state block to navigation and // tab-management results; see "Track tabs with browser_state" on this page. - result = browserResult(toolUse).content(output).build(); + result = browserResult(toolUse) + .content(output) + .build(); } catch (RuntimeException e) { failed = true; - result = browserResult(toolUse).content("Error: " + e.getMessage()).isError(true).build(); + result = browserResult(toolUse) + .content("Error: " + e.getMessage()) + .isError(true) + .build(); } } toolResults.add(ContentBlockParam.ofToolResult(result)); @@ -1016,7 +1024,7 @@ The second part runs a batch in order, dispatches each block to those handlers, NOT_EXECUTED = "Not executed: an earlier action in this turn failed." # Run the browser actions in Claude's response in order and build one - # tool_result per tool_use block. After the first failure, skip the rest: + # tool_result for each tool_use block. After the first failure, skip the rest: # Claude planned them assuming the earlier actions succeeded. def process_tool_calls(response) tool_results = [] @@ -1553,7 +1561,7 @@ The API validates the toolset entry and every member `tool_use` and `tool_result ## Limitations -* **Platform availability:** Browser use is available on the Claude API and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai). +* **Platform availability:** Browser use is available on the Claude API and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed). * **Whole-input streaming only:** When you stream, each member's `input` arrives as one complete `input_json_delta` ([Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets)). * **Element references are best-effort:** Highly dynamic pages (virtualized lists, canvas-rendered interfaces, pages that re-render on scroll) might not expose stable references, and Claude falls back to screenshots and coordinate clicks there. * **`read_console` and `read_network` depend on your browser automation:** They report only what it can capture, and only from the moment it attached to a tab. diff --git a/content/en/agents-and-tools/tool-use/build-a-tool-using-agent.md b/content/en/agents-and-tools/tool-use/build-a-tool-using-agent.md index 80361b4f51..c44ee53f1c 100644 --- a/content/en/agents-and-tools/tool-use/build-a-tool-using-agent.md +++ b/content/en/agents-and-tools/tool-use/build-a-tool-using-agent.md @@ -68,7 +68,7 @@ The request sends a `tools` array alongside the user message. When Claude determ } ] - # Send the user's request along with the tool definition. Claude decides + # Send the user's request along with the tool definition. Claude determines # whether to call the tool based on the request and the tool description. response = client.messages.create( model="claude-opus-5-5", @@ -87,18 +87,18 @@ The request sends a `tools` array alongside the user message. When Claude determ # and the content array contains a tool_use block alongside any text. print(f"stop_reason: {response.stop_reason}") - # Find the tool_use block. A response may contain text blocks before the + # Find the tool_use block. A response might contain text blocks before the # tool_use block, so scan the content array rather than assuming position. tool_use = next(block for block in response.content if block.type == "tool_use") print(f"Tool: {tool_use.name}") print(f"Input: {tool_use.input}") - # Execute the tool. In a real system this would call your calendar API. + # Run the tool. In a real system this would call your calendar API. # Here the result is hardcoded to keep the example self-contained. result = {"event_id": "evt_123", "status": "created"} # Send the result back. The tool_result block goes in a user message and - # its tool_use_id must match the id from the tool_use block above. The + # its tool_use_id must match the ID from the earlier tool_use block. The # assistant's previous response is included so Claude has the full history. followup = client.messages.create( model="claude-opus-5-5", @@ -124,7 +124,7 @@ The request sends a `tools` array alongside the user message. When Claude determ ], ) - # With the tool result in hand, Claude produces a final natural-language + # With the tool result, Claude produces a final natural-language # answer and stop_reason becomes "end_turn". print(f"stop_reason: {followup.stop_reason}") final_text = next(block for block in followup.content if block.type == "text") @@ -170,7 +170,7 @@ The request sends a `tools` array alongside the user message. When Claude determ } ]; - // Send the user's request along with the tool definition. Claude decides + // Send the user's request along with the tool definition. Claude determines // whether to call the tool based on the request and the tool description. const response = await client.messages.create({ model: "claude-opus-5-5", @@ -190,18 +190,18 @@ The request sends a `tools` array alongside the user message. When Claude determ // and the content array contains a tool_use block alongside any text. console.log(`stop_reason: ${response.stop_reason}`); - // Find the tool_use block. A response may contain text blocks before the + // Find the tool_use block. A response might contain text blocks before the // tool_use block, so scan the content array rather than assuming position. const toolUse = response.content.find((block) => block.type === "tool_use")!; console.log(`Tool: ${toolUse.name}`); console.log(`Input: ${JSON.stringify(toolUse.input)}`); - // Execute the tool. In a real system this would call your calendar API. + // Run the tool. In a real system this would call your calendar API. // Here the result is hardcoded to keep the example self-contained. const result = { event_id: "evt_123", status: "created" }; // Send the result back. The tool_result block goes in a user message and - // its tool_use_id must match the id from the tool_use block above. The + // its tool_use_id must match the ID from the earlier tool_use block. The // assistant's previous response is included so Claude has the full history. const followup = await client.messages.create({ model: "claude-opus-5-5", @@ -228,7 +228,7 @@ The request sends a `tools` array alongside the user message. When Claude determ ] }); - // With the tool result in hand, Claude produces a final natural-language + // With the tool result, Claude produces a final natural-language // answer and stop_reason becomes "end_turn". console.log(`stop_reason: ${followup.stop_reason}`); for (const block of followup.content) { @@ -289,14 +289,14 @@ The request sends a `tools` array alongside the user message. When Claude determ }), ]; - // Ask for at most one tool call per turn so the single-turn flow below - // stays predictable. + // Ask for at most one tool call in each turn so the single-turn flow + // that follows stays predictable. var toolChoice = new ToolChoice(new ToolChoiceAuto { DisableParallelToolUse = true }); const string userPrompt = "Schedule a 30-minute sync with alice@example.com and bob@example.com on Monday, March 30, 2026 at 10am."; - // Send the user's request along with the tool definition. Claude decides + // Send the user's request along with the tool definition. Claude determines // whether to call the tool based on the request and the tool description. var response = await client.Messages.Create(new MessageCreateParams { @@ -311,7 +311,7 @@ The request sends a `tools` array alongside the user message. When Claude determ // and the content array contains a tool_use block alongside any text. Console.WriteLine($"stop_reason: {response.StopReason?.Raw()}"); - // Find the tool_use block. A response may contain text blocks before the + // Find the tool_use block. A response might contain text blocks before the // tool_use block, so scan the content array rather than assuming position. ToolUseBlock? toolUse = null; foreach (var block in response.Content) @@ -325,12 +325,12 @@ The request sends a `tools` array alongside the user message. When Claude determ Console.WriteLine($"Tool: {toolUse!.Name}"); Console.WriteLine($"Input: {JsonSerializer.Serialize(toolUse.Input)}"); - // Execute the tool. In a real system this would call your calendar API. + // Run the tool. In a real system this would call your calendar API. // Here the result is hardcoded to keep the example self-contained. var result = """{"event_id": "evt_123", "status": "created"}"""; // Send the result back. The tool_result block goes in a user message and - // its tool_use_id must match the id from the tool_use block above. The + // its tool_use_id must match the ID from the earlier tool_use block. The // assistant's previous response is included so Claude has the full history. List toolResults = [ @@ -355,7 +355,7 @@ The request sends a `tools` array alongside the user message. When Claude determ ], }); - // With the tool result in hand, Claude produces a final natural-language + // With the tool result, Claude produces a final natural-language // answer and stop_reason becomes "end_turn". Console.WriteLine($"stop_reason: {followup.StopReason?.Raw()}"); foreach (var block in followup.Content) @@ -377,7 +377,7 @@ The request sends a `tools` array alongside the user message. When Claude determ "fmt" "log" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) func main() { @@ -415,8 +415,8 @@ The request sends a `tools` array alongside the user message. When Claude determ }}, } - // Ask for at most one tool call per turn so the single-turn flow below - // stays predictable. + // Ask for at most one tool call in each turn so the single-turn flow + // that follows stays predictable. toolChoice := anthropic.ToolChoiceUnionParam{ OfAuto: &anthropic.ToolChoiceAutoParam{DisableParallelToolUse: anthropic.Bool(true)}, } @@ -425,7 +425,7 @@ The request sends a `tools` array alongside the user message. When Claude determ "Schedule a 30-minute sync with alice@example.com and bob@example.com on Monday, March 30, 2026 at 10am.", )) - // Send the user's request along with the tool definition. Claude decides + // Send the user's request along with the tool definition. Claude determines // whether to call the tool based on the request and the tool description. response, err := client.Messages.New(ctx, anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5_5, @@ -442,7 +442,7 @@ The request sends a `tools` array alongside the user message. When Claude determ // and the content array contains a tool_use block alongside any text. fmt.Printf("stop_reason: %s\n", response.StopReason) - // Find the tool_use block. A response may contain text blocks before the + // Find the tool_use block. A response might contain text blocks before the // tool_use block, so scan the content array rather than assuming position. var toolUse anthropic.ContentBlockUnion for _, block := range response.Content { @@ -454,12 +454,12 @@ The request sends a `tools` array alongside the user message. When Claude determ fmt.Printf("Tool: %s\n", toolUse.Name) fmt.Printf("Input: %s\n", string(toolUse.Input)) - // Execute the tool. In a real system this would call your calendar API. + // Run the tool. In a real system this would call your calendar API. // Here the result is hardcoded to keep the example self-contained. result := `{"event_id": "evt_123", "status": "created"}` // Send the result back. The tool_result block goes in a user message and - // its tool_use_id must match the id from the tool_use block above. The + // its tool_use_id must match the ID from the earlier tool_use block. The // assistant's previous response is included so Claude has the full history. var assistantContent []anthropic.ContentBlockParamUnion for _, block := range response.Content { @@ -481,7 +481,7 @@ The request sends a `tools` array alongside the user message. When Claude determ log.Fatal(err) } - // With the tool result in hand, Claude produces a final natural-language + // With the tool result, Claude produces a final natural-language // answer and stop_reason becomes "end_turn". fmt.Printf("stop_reason: %s\n", followup.StopReason) for _, block := range followup.Content { @@ -542,8 +542,8 @@ The request sends a `tools` array alongside the user message. When Claude determ .build()) .build(); - // Ask for at most one tool call per turn so the single-turn flow below - // stays predictable. + // Ask for at most one tool call in each turn so the single-turn flow + // that follows stays predictable. ToolChoiceAuto toolChoice = ToolChoiceAuto.builder() .disableParallelToolUse(true) .build(); @@ -551,7 +551,7 @@ The request sends a `tools` array alongside the user message. When Claude determ String userPrompt = "Schedule a 30-minute sync with alice@example.com and bob@example.com on Monday, March 30, 2026 at 10am."; - // Send the user's request along with the tool definition. Claude decides + // Send the user's request along with the tool definition. Claude determines // whether to call the tool based on the request and the tool description. Message response = client.messages().create(MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5_5) @@ -565,7 +565,7 @@ The request sends a `tools` array alongside the user message. When Claude determ // and the content array contains a tool_use block alongside any text. IO.println("stop_reason: " + response.stopReason().orElse(null)); - // Find the tool_use block. A response may contain text blocks before the + // Find the tool_use block. A response might contain text blocks before the // tool_use block, so scan the content array rather than assuming position. ToolUseBlock toolUse = response.content().stream() .flatMap(block -> block.toolUse().stream()) @@ -574,12 +574,12 @@ The request sends a `tools` array alongside the user message. When Claude determ IO.println("Tool: " + toolUse.name()); IO.println("Input: " + toolUse._input()); - // Execute the tool. In a real system this would call your calendar API. + // Run the tool. In a real system this would call your calendar API. // Here the result is hardcoded to keep the example self-contained. String result = "{\"event_id\": \"evt_123\", \"status\": \"created\"}"; // Send the result back. The tool_result block goes in a user message and - // its tool_use_id must match the id from the tool_use block above. The + // its tool_use_id must match the ID from the earlier tool_use block. The // assistant's previous response is included so Claude has the full history. Message followup = client.messages().create(MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5_5) @@ -595,7 +595,7 @@ The request sends a `tools` array alongside the user message. When Claude determ .build()))) .build()); - // With the tool result in hand, Claude produces a final natural-language + // With the tool result, Claude produces a final natural-language // answer and stop_reason becomes "end_turn". IO.println("stop_reason: " + followup.stopReason().orElse(null)); followup.content().stream() @@ -651,11 +651,11 @@ The request sends a `tools` array alongside the user message. When Claude determ 'content' => 'Schedule a 30-minute sync with alice@example.com and bob@example.com on Monday, March 30, 2026 at 10am.', ]; - // Ask for at most one tool call per turn so the single-turn flow below - // stays predictable. + // Ask for at most one tool call in each turn so the single-turn flow + // that follows stays predictable. $toolChoice = ToolChoiceAuto::with(disableParallelToolUse: true); - // Send the user's request along with the tool definition. Claude decides + // Send the user's request along with the tool definition. Claude determines // whether to call the tool based on the request and the tool description. $response = $client->messages->create( model: 'claude-opus-5-5', @@ -669,7 +669,7 @@ The request sends a `tools` array alongside the user message. When Claude determ // and the content array contains a tool_use block alongside any text. printf("stop_reason: %s\n", $response->stopReason); - // Find the tool_use block. A response may contain text blocks before the + // Find the tool_use block. A response might contain text blocks before the // tool_use block, so scan the content array rather than assuming position. $toolUse = null; foreach ($response->content as $block) { @@ -681,12 +681,12 @@ The request sends a `tools` array alongside the user message. When Claude determ printf("Tool: %s\n", $toolUse->name); printf("Input: %s\n", json_encode($toolUse->input)); - // Execute the tool. In a real system this would call your calendar API. + // Run the tool. In a real system this would call your calendar API. // Here the result is hardcoded to keep the example self-contained. $result = ['event_id' => 'evt_123', 'status' => 'created']; // Send the result back. The tool_result block goes in a user message and - // its tool_use_id must match the id from the tool_use block above. The + // its tool_use_id must match the ID from the earlier tool_use block. The // assistant's previous response is included so Claude has the full history. $followup = $client->messages->create( model: 'claude-opus-5-5', @@ -709,7 +709,7 @@ The request sends a `tools` array alongside the user message. When Claude determ ], ); - // With the tool result in hand, Claude produces a final natural-language + // With the tool result, Claude produces a final natural-language // answer and stop_reason becomes "end_turn". printf("stop_reason: %s\n", $followup->stopReason); foreach ($followup->content as $block) { @@ -763,11 +763,11 @@ The request sends a `tools` array alongside the user message. When Claude determ content: "Schedule a 30-minute sync with alice@example.com and bob@example.com on Monday, March 30, 2026 at 10am." } - # Ask for at most one tool call per turn so the single-turn flow below - # stays predictable. + # Ask for at most one tool call in each turn so the single-turn flow + # that follows stays predictable. tool_choice = {type: "auto", disable_parallel_tool_use: true} - # Send the user's request along with the tool definition. Claude decides + # Send the user's request along with the tool definition. Claude determines # whether to call the tool based on the request and the tool description. response = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5_5, @@ -781,18 +781,18 @@ The request sends a `tools` array alongside the user message. When Claude determ # and the content array contains a tool_use block alongside any text. puts "stop_reason: #{response.stop_reason}" - # Find the tool_use block. A response may contain text blocks before the + # Find the tool_use block. A response might contain text blocks before the # tool_use block, so scan the content array rather than assuming position. tool_use = response.content.find { |block| block.type == :tool_use } puts "Tool: #{tool_use.name}" puts "Input: #{tool_use.input}" - # Execute the tool. In a real system this would call your calendar API. + # Run the tool. In a real system this would call your calendar API. # Here the result is hardcoded to keep the example self-contained. result = {event_id: "evt_123", status: "created"} # Send the result back. The tool_result block goes in a user message and - # its tool_use_id must match the id from the tool_use block above. The + # its tool_use_id must match the ID from the earlier tool_use block. The # assistant's previous response is included so Claude has the full history. followup = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5_5, @@ -815,7 +815,7 @@ The request sends a `tools` array alongside the user message. When Claude determ ] ) - # With the tool result in hand, Claude produces a final natural-language + # With the tool result, Claude produces a final natural-language # answer and stop_reason becomes "end_turn". puts "stop_reason: #{followup.stop_reason}" followup.content.each do |block| @@ -1172,7 +1172,7 @@ The other change is conversation history. Instead of rebuilding the `messages` a "fmt" "log" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) func runTool(name string, input map[string]any) string { @@ -1965,7 +1965,7 @@ When Claude has multiple independent tool calls to make, it might return several "fmt" "log" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) func runTool(name string, input map[string]any) string { @@ -2813,7 +2813,7 @@ Tools fail. A calendar API might reject an event with too many attendees, or a d "log" "strings" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) func runTool(name string, input map[string]any) (string, error) { @@ -3327,7 +3327,7 @@ The SDK provides a helper that turns an ordinary function into a runnable tool a ```python Python - # Ring 5: The Tool Runner SDK abstraction. + # Ring 5: The tool runner SDK abstraction. import json @@ -3389,7 +3389,7 @@ The SDK provides a helper that turns an ordinary function into a runnable tool a ``` ```typescript TypeScript - // Ring 5: The Tool Runner SDK abstraction. + // Ring 5: The tool runner SDK abstraction. import Anthropic from "@anthropic-ai/sdk"; import { betaZodTool } from "@anthropic-ai/sdk/helpers/beta/zod"; @@ -3458,7 +3458,7 @@ The SDK provides a helper that turns an ordinary function into a runnable tool a ``` ```csharp C# - // Ring 5: The Tool Runner SDK abstraction. + // Ring 5: The tool runner SDK abstraction. using System; using System.Collections.Generic; @@ -3577,7 +3577,7 @@ The SDK provides a helper that turns an ordinary function into a runnable tool a ``` ```go Go - // Ring 5: The Tool Runner SDK abstraction. + // Ring 5: The tool runner SDK abstraction. package main @@ -3586,8 +3586,8 @@ The SDK provides a helper that turns an ordinary function into a runnable tool a "fmt" "log" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/toolrunner" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/toolrunner" ) // The input structs define each tool's schema. The tool runner generates the @@ -3682,7 +3682,7 @@ The SDK provides a helper that turns an ordinary function into a runnable tool a ``` ```java Java - // Ring 5: The Tool Runner SDK abstraction. + // Ring 5: The tool runner SDK abstraction. import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; @@ -3738,15 +3738,15 @@ The SDK provides a helper that turns an ordinary function into a runnable tool a // The runner calls the API, runs requested tools, and feeds results back // until Claude produces a final answer. BetaToolRunner runner = client.beta() - .messages() - .toolRunner(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addBeta("structured-outputs-2025-11-13") - .addUserMessage("Check what I have on Monday, March 30, 2026, then schedule a one-hour planning session that day that avoids any conflicts.") - .addTool(CreateCalendarEvent.class) - .addTool(ListCalendarEvents.class) - .build()); + .messages() + .toolRunner(MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addBeta("structured-outputs-2025-11-13") + .addUserMessage("Check what I have on Monday, March 30, 2026, then schedule a one-hour planning session that day that avoids any conflicts.") + .addTool(CreateCalendarEvent.class) + .addTool(ListCalendarEvents.class) + .build()); BetaMessage finalMessage = null; for (BetaMessage message : runner) { @@ -3762,7 +3762,7 @@ The SDK provides a helper that turns an ordinary function into a runnable tool a ```php PHP @@ -42,7 +42,7 @@ The computer use tool is an Anthropic-defined [client toolset](https://platform. For tasks that stay inside webpages, the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) is the closer fit: its member tools read and act on the page itself, and it doesn't need a full desktop environment. - Computer use is available on the Claude API and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) as the `computer_toolset_20260801` toolset; see [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) for the supported models. + Computer use is available on the Claude API and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) as the `computer_toolset_20260801` toolset; see [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) for the supported models. Existing `computer_20251124` integrations keep working on the models listed for it under [Earlier tool versions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#earlier-tool-versions), and earlier tool versions remain available in beta for models and platforms that don't support the toolset. See [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124) to upgrade, or [Earlier tool versions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#earlier-tool-versions) for the beta headers. @@ -232,7 +232,7 @@ Add the computer use toolset to the `tools` array of a [Messages API](https://pl messages: [ ['role' => 'user', 'content' => 'Save a picture of a cat to my desktop.'], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, tools: [ ['type' => 'computer_toolset_20260801'], [ @@ -617,11 +617,11 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool List samplingLoop(Model model, List messages, int maxIterations) { for (int i = 0; i < maxIterations; i++) { Message response = client.messages().create(MessageCreateParams.builder() - .model(model) - .maxTokens(4096) - .messages(messages) - .addTool(COMPUTER_TOOLSET) - .build()); + .model(model) + .maxTokens(4096) + .messages(messages) + .addTool(COMPUTER_TOOLSET) + .build()); // Add Claude's response to the conversation history messages.add(response.toParam()); @@ -891,7 +891,7 @@ For tasks that stay inside webpages, you can also [declare the browser use tool ### Build a custom computer use environment -The [reference implementation](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo) is meant to help you get started with computer use. It includes all of the components needed to have Claude use a computer. However, you can build your own environment for computer use to suit your needs. You'll need: +The [reference implementation](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo) is meant to help you get started with computer use. It includes all of the components needed to have Claude use a computer. However, you can build your own environment for computer use to suit your needs. You need: * A virtualized or containerized environment suitable for computer use with Claude * An implementation of the computer use tool's actions @@ -1122,13 +1122,13 @@ The computer use tool is implemented as a schema-less tool. When using this tool ToolResultBlockParam.Content captureScreenshot() { ImageBlockParam image = ImageBlockParam.builder() - .source(Base64ImageSource.builder() - .mediaType(Base64ImageSource.MediaType.IMAGE_PNG) - .data(PLACEHOLDER_PNG) - .build()) - .build(); + .source(Base64ImageSource.builder() + .mediaType(Base64ImageSource.MediaType.IMAGE_PNG) + .data(PLACEHOLDER_PNG) + .build()) + .build(); return ToolResultBlockParam.Content.ofBlocks( - List.of(ToolResultBlockParam.Content.Block.ofImage(image))); + List.of(ToolResultBlockParam.Content.Block.ofImage(image))); } String clickAt(long x, long y) { @@ -1419,7 +1419,7 @@ The computer use tool is implemented as a schema-less tool. When using this tool } // processToolCalls runs the computer actions in Claude's response in order and - // builds one tool_result per tool_use block. After the first failure it skips + // builds one tool_result for each tool_use block. After the first failure it skips // the rest: Claude planned them assuming the earlier actions succeeded. func processToolCalls(response *anthropic.Message) []anthropic.ContentBlockParamUnion { var toolResults []anthropic.ContentBlockParamUnion @@ -1460,13 +1460,13 @@ The computer use tool is implemented as a schema-less tool. When using this tool /** Every result answering a computer toolset member echoes toolset_name. */ ToolResultBlockParam.Builder computerResult(ToolUseBlock toolUse) { return ToolResultBlockParam.builder() - .toolUseId(toolUse.id()) - .toolsetName("computer"); + .toolUseId(toolUse.id()) + .toolsetName("computer"); } /** * Run the computer actions in Claude's response in order and build one - * tool_result per tool_use block. After the first failure, skip the rest: + * tool_result for each tool_use block. After the first failure, skip the rest: * Claude planned them assuming the earlier actions succeeded. */ List processToolCalls(Message response) { @@ -1480,17 +1480,25 @@ The computer use tool is implemented as a schema-less tool. When using this tool ToolUseBlock toolUse = block.asToolUse(); ToolResultBlockParam result; if (failed) { - result = computerResult(toolUse).content(HALT_TEXT).isError(true).build(); + result = computerResult(toolUse) + .content(HALT_TEXT) + .isError(true) + .build(); } else { try { Map input = - (Map) toolUse._input().asObject().get(); + (Map) toolUse._input().asObject().get(); // A string, or the image block that screenshot returns ToolResultBlockParam.Content output = handleComputerAction(toolUse.name(), input); - result = computerResult(toolUse).content(output).build(); + result = computerResult(toolUse) + .content(output) + .build(); } catch (RuntimeException e) { failed = true; - result = computerResult(toolUse).content("Error: " + e.getMessage()).isError(true).build(); + result = computerResult(toolUse) + .content("Error: " + e.getMessage()) + .isError(true) + .build(); } } toolResults.add(ContentBlockParam.ofToolResult(result)); @@ -1534,7 +1542,7 @@ The computer use tool is implemented as a schema-less tool. When using this tool NOT_EXECUTED = "Not executed: an earlier computer action in this turn failed." # Run the computer actions in Claude's response in order and build one - # tool_result per tool_use block. After the first failure, skip the rest: + # tool_result for each tool_use block. After the first failure, skip the rest: # Claude planned them assuming the earlier actions succeeded. def process_tool_calls(response) tool_results = [] @@ -1816,7 +1824,7 @@ Long agent loops accumulate screenshots quickly (roughly 1,000–1,800 input tok To keep [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) effective while bounding context: -* Place one `cache_control` breakpoint after the system prompt and tool definitions, and up to three more on the last `tool_result` block of each of the most recent turns, advancing them each turn. Within a [batch action](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions), markers on several blocks act as a single breakpoint but each still counts toward the limit of four, so use one for each turn. +* Place one `cache_control` breakpoint after the system prompt and tool definitions, and up to three more on the last `tool_result` block of each of the most recent turns, advancing them each turn. Within a [batch action](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions), markers on several blocks act as a single breakpoint, but each still counts toward the limit of four, so use at most one in any turn. * Prune old screenshots in *batches*, not one each turn. Dropping a screenshot every turn changes the prefix every turn and invalidates the cache. A reasonable default is to keep the last three screenshots and prune every 25 turns, so the prefix stays byte-identical between prune events; if your screenshots exceed 2000 px on either side, choose an interval that keeps each request at 20 or fewer images. * On Claude Fable 5.1, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5, avoid pruning on the client: removing an earlier screenshot [invalidates every later thinking block](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-in-conversation) in every request that still carries those turns. Resize screenshots to 2000 px or less per side instead, and use server-side [tool result clearing](https://platform.claude.com/docs/en/build-with-claude/context-editing#tool-result-clearing) to drop old ones from the context. If you must prune, keep [`prefix_mismatch_behavior: "drop_block"`](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-thinking-controls) set from then on; after each prune, Claude continues without the thinking produced since the pruned screenshot, on that request and every later one. On Claude Sonnet 5.5, `block_binding` works only with `thinking: {"type": "adaptive"}`. With `between_tools`, keep the history append-only, or strip the thinking blocks from the edited turn on. On Claude Haiku 5.5, `block_binding` works only with `thinking: {"type": "adaptive"}`; with `thinking: {"type": "disabled"}`, keep the history append-only, or strip the thinking blocks from the edited turn on. @@ -2105,7 +2113,7 @@ If clicks miss their targets, the cause is usually one of the following: ## Migrate from `computer_20251124` -Upgrading from `computer_20251124` to the toolset is optional: the models listed for `computer_20251124` under [Earlier tool versions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#earlier-tool-versions) keep accepting it with its beta header, so an existing integration keeps working until you change it. Claude 5.5 and later models are the exception on the Claude API and Google Cloud: there they accept only the toolset. Upgrade an integration before you move it to one of them. On Amazon Bedrock, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 accept `computer_20251124`. To upgrade, make the following changes together: +Upgrading from `computer_20251124` to the toolset is optional: the models listed for `computer_20251124` under [Earlier tool versions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#earlier-tool-versions) keep accepting it with its beta header, so an existing integration keeps working until you change it. Claude 5.5 and later models are the exception on the Claude API and Claude Models on Google Cloud (Google managed): there they accept only the toolset. Upgrade an integration before you move it to one of them. On Amazon Bedrock, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 accept `computer_20251124`. To upgrade, make the following changes together: 1. **Remove the beta header.** Drop `anthropic-beta: computer-use-2025-11-24` from your requests. With the SDK, remove `betas` (csharp, go: `Betas`; java: `.addBeta()`) and call the Messages API through the standard client rather than the beta namespace. 2. **Change the `tools` entry.** Set `type` to `computer_toolset_20260801` and delete `name`, `display_width_px`, `display_height_px`, `display_number`, and `enable_zoom`. The toolset rejects each of these fields. @@ -2165,10 +2173,10 @@ The following pair shows a `tool_use` block before and after the change. The act Two earlier versions of the computer use tool remain available in beta for existing integrations, for models that don't support the toolset, and on platforms where the toolset isn't currently available. Each requires its [beta header](https://platform.claude.com/docs/en/api/beta-headers) on every request, and their parameters are documented in the [beta Messages API reference](https://platform.claude.com/docs/en/api/beta/messages/create). With the SDK, pass the header through `betas` (csharp, go: `Betas`; java: `.addBeta()`) and use the beta namespace; only the computer use tool needs the header, not the bash or text editor tools in the same request. -| Tool version | Beta header | Use with | Parameters | -| ------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `computer_20251124` | `computer-use-2025-11-24` | Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Sonnet 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 4.6, and Claude Opus 4.5; on Amazon Bedrock, also Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 | [API reference](https://platform.claude.com/docs/en/api/beta/messages/create) | -| `computer_20250124` | `computer-use-2025-01-24` | Claude Sonnet 4.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Haiku 4.5, Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), and Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | [API reference](https://platform.claude.com/docs/en/api/beta/messages/create) | +| Tool version | Beta header | Use with | Parameters | +| ------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `computer_20251124` | `computer-use-2025-11-24` | Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Sonnet 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 4.6, and Claude Opus 4.5; on Amazon Bedrock, also Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 | [API reference](https://platform.claude.com/docs/en/api/beta/messages/create) | +| `computer_20250124` | `computer-use-2025-01-24` | Claude Sonnet 4.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Haiku 4.5, Claude Opus 4.1 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Sonnet 4 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)), and Claude Opus 4 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | [API reference](https://platform.claude.com/docs/en/api/beta/messages/create) | *** diff --git a/content/en/agents-and-tools/tool-use/define-tools.md b/content/en/agents-and-tools/tool-use/define-tools.md index 896458b3da..faba526e7d 100644 --- a/content/en/agents-and-tools/tool-use/define-tools.md +++ b/content/en/agents-and-tools/tool-use/define-tools.md @@ -452,7 +452,7 @@ Add an optional `input_examples` field to your tool definition with an array of messages: [ ['role' => 'user', 'content' => "What's the weather like in San Francisco?"] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, tools: [ [ 'name' => 'get_weather', @@ -782,7 +782,7 @@ On models that support it, the highlighted lines are the only difference from a messages: [ ['role' => 'user', 'content' => "What's the weather like in San Francisco?"] ], - model: 'claude-opus-5', + model: Model::CLAUDE_OPUS_5, toolChoice: ['type' => 'tool', 'name' => 'get_weather'], tools: [ [ diff --git a/content/en/agents-and-tools/tool-use/fine-grained-tool-streaming.md b/content/en/agents-and-tools/tool-use/fine-grained-tool-streaming.md index 8c1c309eeb..33921dd2a4 100644 --- a/content/en/agents-and-tools/tool-use/fine-grained-tool-streaming.md +++ b/content/en/agents-and-tools/tool-use/fine-grained-tool-streaming.md @@ -16,7 +16,7 @@ Fine-grained tool streaming delivers a tool's input to your client as Claude gen ## How to use fine-grained tool streaming -All models support fine-grained tool streaming on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). To use it, set `eager_input_streaming` to `true` on any user-defined tool where you want fine-grained streaming enabled, and enable streaming on your request. +All models support fine-grained tool streaming on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). To use it, set `eager_input_streaming` to `true` on any user-defined tool where you want fine-grained streaming enabled, and enable streaming on your request. The `eager_input_streaming` field is optional. Setting it to `true` turns on fine-grained streaming for that tool, and omitting it gives you standard buffered streaming, in which the API buffers and validates each parameter value before streaming it back. The exception is a request that still sends the legacy `fine-grained-tool-streaming-2025-05-14` beta header, which turns fine-grained streaming on for tools that leave the field unset. The per-tool field replaces that header, and an explicit `false` keeps buffered streaming for a tool even when a request still sends it. The legacy header cannot be combined with a [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) or [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolset entry: the API rejects a request that sends both, so remove the header and set `eager_input_streaming` on the user-defined tools that need it. See [Tool reference](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference) for the field definition. @@ -474,7 +474,7 @@ Each input fragment arrives the moment Claude writes it, and the fragments join Complete tool input: {"filename": "poem.txt", "lines_of_text": ["The Wanderer's Journey", ...]} ``` -Without `eager_input_streaming`, the API buffers and validates each parameter value before streaming it back, so nothing prints for a large parameter until Claude has finished generating it. With it, fragments start arriving as soon as Claude begins the parameter, and they are typically longer, with fewer mid-word breaks. +Without `eager_input_streaming`, the API buffers and validates each parameter value before streaming it back, so nothing prints for a large parameter until Claude has finished generating it. With it, fragments arrive from the moment Claude starts the parameter, and they are typically longer, with fewer mid-word breaks. ## Accumulating tool input deltas @@ -490,7 +490,7 @@ The accumulation contract: 2. For each `content_block_delta` with `type: "input_json_delta"`, append: `input_json += event.delta.partial_json`. 3. On `content_block_stop`, parse the accumulated string. -Guard the parse, as the following example does. A response can also stop at `max_tokens` midway through a parameter. Check the [stop reason](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons) and decide whether to retry the request with a higher `max_tokens` or repair the partial input. +Guard the parse, as the following SDK example does. A response can also stop at `max_tokens` midway through a parameter. Check the [stop reason](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons) and decide whether to retry the request with a higher `max_tokens` or repair the partial input. The type mismatch between the initial `input: {}` (object) and `partial_json` (string) is by design. The empty object marks the slot in the content array. The delta strings build the real value. @@ -724,23 +724,23 @@ The type mismatch between the initial `input: {}` (object) and `partial_json` (s ObjectMapper objectMapper = new ObjectMapper(); Tool weatherTool = Tool.builder() - .name("get_weather") - .description("Get current weather for a city") - .eagerInputStreaming(true) - .inputSchema(Tool.InputSchema.builder() - .properties(Tool.InputSchema.Properties.builder() - .putAdditionalProperty("city", JsonValue.from(Map.of("type", "string"))) - .build()) - .addRequired("city") - .build()) - .build(); + .name("get_weather") + .description("Get current weather for a city") + .eagerInputStreaming(true) + .inputSchema(Tool.InputSchema.builder() + .properties(Tool.InputSchema.Properties.builder() + .putAdditionalProperty("city", JsonValue.from(Map.of("type", "string"))) + .build()) + .addRequired("city") + .build()) + .build(); MessageCreateParams createParams = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addTool(weatherTool) - .addUserMessage("Weather in Paris?") - .build(); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addTool(weatherTool) + .addUserMessage("Weather in Paris?") + .build(); // Content block index -> accumulated tool input JSON Map toolInputs = new HashMap<>(); @@ -830,7 +830,7 @@ The type mismatch between the initial `input: {}` (object) and `partial_json` (s $accumulated = $toolInputs[$event->index]; try { $parsed = json_decode($accumulated, associative: true, flags: JSON_THROW_ON_ERROR); - echo "Tool input: " . json_encode($parsed) . "\n"; + echo 'Tool input: ' . json_encode($parsed) . "\n"; } catch (\JsonException $e) { // The accumulated string is not guaranteed to be valid JSON. // See "Handling invalid JSON in tool responses" on this page. diff --git a/content/en/agents-and-tools/tool-use/memory-tool.md b/content/en/agents-and-tools/tool-use/memory-tool.md index 32942cf45b..c12d13f5a6 100644 --- a/content/en/agents-and-tools/tool-use/memory-tool.md +++ b/content/en/agents-and-tools/tool-use/memory-tool.md @@ -223,17 +223,17 @@ Using the memory tool takes two steps: ```java Java import com.anthropic.models.messages.MemoryTool20250818; // ... - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(2048L) - .addTool(MemoryTool20250818.builder().build()) - .addUserMessage("Help me respond to this customer service ticket.") - .build(); + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(2048L) + .addTool(MemoryTool20250818.builder().build()) + .addUserMessage("Help me respond to this customer service ticket.") + .build(); - Message message = client.messages().create(params); - IO.println(message); + Message message = client.messages().create(params); + IO.println(message); ``` ```php PHP @@ -248,7 +248,7 @@ Using the memory tool takes two steps: 'content' => 'Help me respond to this customer service ticket.', ], ], - tools: [new MemoryTool20250818], + tools: [new MemoryTool20250818()], ); echo $message; @@ -378,7 +378,7 @@ Four SDKs provide memory tool helpers that handle the tool interface and the loo "sort" "strings" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) // An in-memory store that maps memory file paths to their contents. @@ -512,28 +512,28 @@ Four SDKs provide memory tool helpers that handle the tool interface and the loo import java.nio.file.Path; void main() { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - // Your BetaMemoryToolHandler implementation of the six memory commands - BetaMemoryToolHandler handler = new FileSystemMemoryToolHandler(Path.of("memories")); - - MessageCreateParams createParams = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024L) - .addTool(BetaMemoryTool20250818.builder().build()) - .addUserMessage("Remember that customer Acme Corp prefers email follow-ups.") - .build(); - - ToolRunnerCreateParams runnerParams = ToolRunnerCreateParams.builder() - .betaMemoryToolHandler(handler) - .initialMessageParams(createParams) - .maxIterations(10) - .build(); - - BetaToolRunner runner = client.beta().messages().toolRunner(runnerParams); - for (BetaMessage message : runner) { - IO.println(message); - } + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + // Your BetaMemoryToolHandler implementation of the six memory commands + BetaMemoryToolHandler handler = new FileSystemMemoryToolHandler(Path.of("memories")); + + MessageCreateParams createParams = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024L) + .addTool(BetaMemoryTool20250818.builder().build()) + .addUserMessage("Remember that customer Acme Corp prefers email follow-ups.") + .build(); + + ToolRunnerCreateParams runnerParams = ToolRunnerCreateParams.builder() + .betaMemoryToolHandler(handler) + .initialMessageParams(createParams) + .maxIterations(10) + .build(); + + BetaToolRunner runner = client.beta().messages().toolRunner(runnerParams); + for (BetaMessage message : runner) { + IO.println(message); + } } ``` @@ -552,7 +552,7 @@ Four SDKs provide memory tool helpers that handle the tool interface and the loo $store = []; $memory = new BetaRunnableTool( - definition: new BetaMemoryTool20250818, + definition: new BetaMemoryTool20250818(), run: function (array $input) use (&$store): string { $path = $input['path'] ?? ''; switch ($input['command']) { @@ -588,7 +588,7 @@ Four SDKs provide memory tool helpers that handle the tool interface and the loo } $lines = explode("\n", $store[$path]); if ($input['insert_line'] < 0 || $input['insert_line'] > count($lines)) { - return "Error: Invalid `insert_line` parameter: {$input['insert_line']}. It should be within the range of lines of the file: [0, " . count($lines) . "]"; + return "Error: Invalid `insert_line` parameter: {$input['insert_line']}. It should be within the range of lines of the file: [0, " . count($lines) . ']'; } array_splice($lines, $input['insert_line'], 0, [preg_replace('/\n\z/', '', $input['insert_text'])]); $store[$path] = implode("\n", $lines); diff --git a/content/en/agents-and-tools/tool-use/overview.md b/content/en/agents-and-tools/tool-use/overview.md index 0583fd92cf..e13f472cda 100644 --- a/content/en/agents-and-tools/tool-use/overview.md +++ b/content/en/agents-and-tools/tool-use/overview.md @@ -177,7 +177,7 @@ Here's that round trip in full for a client tool. The first request defines a `g model="claude-opus-5-5", max_tokens=1024, tools=tools, - # Ask for at most one tool call per turn. + # Ask for at most one tool call in each turn. tool_choice={"type": "auto", "disable_parallel_tool_use": True}, messages=messages, ) @@ -233,7 +233,7 @@ Here's that round trip in full for a client tool. The first request defines a `g model: "claude-opus-5-5", max_tokens: 1024, tools, - // Ask for at most one tool call per turn. + // Ask for at most one tool call in each turn. tool_choice: { type: "auto", disable_parallel_tool_use: true }, messages }); @@ -286,7 +286,7 @@ Here's that round trip in full for a client tool. The first request defines a `g }), ]; - // Ask for at most one tool call per turn. + // Ask for at most one tool call in each turn. var toolChoice = new ToolChoice(new ToolChoiceAuto { DisableParallelToolUse = true }); const string userPrompt = "What's the weather in San Francisco?"; @@ -364,7 +364,7 @@ Here's that round trip in full for a client tool. The first request defines a `g }, }}, } - // Ask for at most one tool call per turn. + // Ask for at most one tool call in each turn. toolChoice := anthropic.ToolChoiceUnionParam{ OfAuto: &anthropic.ToolChoiceAutoParam{DisableParallelToolUse: anthropic.Bool(true)}, } @@ -449,7 +449,7 @@ Here's that round trip in full for a client tool. The first request defines a `g .build()) .build(); - // Ask for at most one tool call per turn. + // Ask for at most one tool call in each turn. ToolChoiceAuto toolChoice = ToolChoiceAuto.builder() .disableParallelToolUse(true) .build(); @@ -516,7 +516,7 @@ Here's that round trip in full for a client tool. The first request defines a `g ]; $userMessage = ['role' => 'user', 'content' => "What's the weather in San Francisco?"]; - // Ask for at most one tool call per turn. + // Ask for at most one tool call in each turn. $toolChoice = ToolChoiceAuto::with(disableParallelToolUse: true); // Claude replies with a tool_use block naming the tool and its arguments. @@ -590,7 +590,7 @@ Here's that round trip in full for a client tool. The first request defines a `g model: Anthropic::Model::CLAUDE_OPUS_5_5, max_tokens: 1024, tools: tools, - # Ask for at most one tool call per turn. + # Ask for at most one tool call in each turn. tool_choice: {type: "auto", disable_parallel_tool_use: true}, messages: messages ) @@ -762,24 +762,24 @@ The additional tokens from tool use come from: When you use `tools`, the API also automatically includes a special system prompt for the model that enables tool use. The number of tool use tokens required for each model is listed in the following table (excluding the additional tokens listed earlier). Note that the table assumes at least 1 tool is provided. If no `tools` are provided, then a tool choice of `none` uses 0 additional system prompt tokens. -| Model | Tool use system prompt tokens: auto, none | Tool use system prompt tokens: any, tool | -| :----------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------- | :--------------------------------------- | -| Claude Opus 5.5 | 286 tokens | | -| Claude Opus 5 | 286 tokens | 406 tokens | -| Claude Opus 4.8 | 290 tokens | 410 tokens | -| Claude Opus 4.7 | 675 tokens | 804 tokens | -| Claude Opus 4.6 | 497 tokens | 589 tokens | -| Claude Opus 4.5 | 496 tokens | 588 tokens | -| Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | -| Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | -| Claude Sonnet 5.5 | 286 tokens | | -| Claude Sonnet 5 | 354 tokens | 474 tokens | -| Claude Sonnet 4.6 | 497 tokens | 589 tokens | -| Claude Sonnet 4.5 | 496 tokens | 588 tokens | -| Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | -| Claude Haiku 5.5 | 286 tokens | 406 tokens | -| Claude Haiku 4.5 | 496 tokens | 588 tokens | -| Claude Haiku 3.5 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 264 tokens | 355 tokens | +| Model | Tool use system prompt tokens: auto, none | Tool use system prompt tokens: any, tool | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------- | :--------------------------------------- | +| Claude Opus 5.5 | 286 tokens | | +| Claude Opus 5 | 286 tokens | 406 tokens | +| Claude Opus 4.8 | 290 tokens | 410 tokens | +| Claude Opus 4.7 | 675 tokens | 804 tokens | +| Claude Opus 4.6 | 497 tokens | 589 tokens | +| Claude Opus 4.5 | 496 tokens | 588 tokens | +| Claude Opus 4.1 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | +| Claude Opus 4 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | +| Claude Sonnet 5.5 | 286 tokens | | +| Claude Sonnet 5 | 354 tokens | 474 tokens | +| Claude Sonnet 4.6 | 497 tokens | 589 tokens | +| Claude Sonnet 4.5 | 496 tokens | 588 tokens | +| Claude Sonnet 4 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens | +| Claude Haiku 5.5 | 286 tokens | 406 tokens | +| Claude Haiku 4.5 | 496 tokens | 588 tokens | +| Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 264 tokens | 355 tokens | * **auto, none:** The count when tool\_choice is auto or none. * **any, tool:** The count when tool\_choice is any or tool. diff --git a/content/en/agents-and-tools/tool-use/parallel-tool-use.md b/content/en/agents-and-tools/tool-use/parallel-tool-use.md index 9eac93daad..ea0cf84da0 100644 --- a/content/en/agents-and-tools/tool-use/parallel-tool-use.md +++ b/content/en/agents-and-tools/tool-use/parallel-tool-use.md @@ -365,7 +365,7 @@ The following script sends a request that should trigger parallel tool calls, ve }; var finalResponse = await client.Messages.Create(finalParameters); - var text = finalResponse.Content.Select(b => b.Value).OfType().FirstOrDefault(); + var text = finalResponse.Content.Select(block => block.Value).OfType().FirstOrDefault(); Console.WriteLine($"\nClaude's response:\n{text?.Text}"); Console.WriteLine("\n--- Verification ---"); @@ -697,7 +697,7 @@ The following script sends a request that should trigger parallel tool calls, ve echo "\nClaude's response:\n{$textBlock->text}\n"; echo "\n--- Verification ---\n"; - echo "✓ Tool results sent in single user message: " . count($toolResults) . " results\n"; + echo '✓ Tool results sent in single user message: ' . count($toolResults) . " results\n"; echo "✓ No text before tool results in content array\n"; echo "✓ Conversation formatted correctly for future parallel tool use\n"; ``` @@ -1056,7 +1056,9 @@ When the `tool_choice` type is `auto` (the default), setting `disable_parallel_t .inputSchema(schema) .build() ) - .toolChoice(ToolChoiceAuto.builder().disableParallelToolUse(true).build()) + .toolChoice(ToolChoiceAuto.builder() + .disableParallelToolUse(true) + .build()) .addUserMessage("What is the weather in San Francisco and New York?") .build(); @@ -1072,7 +1074,7 @@ When the `tool_choice` type is `auto` (the default), setting `disable_parallel_t messages: [ ['role' => 'user', 'content' => 'What is the weather in San Francisco and New York?'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, toolChoice: ['type' => 'auto', 'disableParallelToolUse' => true], tools: [ [ @@ -1337,7 +1339,9 @@ When `tool_choice` type is `any` or `tool`, setting `disable_parallel_tool_use: .inputSchema(schema) .build() ) - .toolChoice(ToolChoiceAny.builder().disableParallelToolUse(true).build()) + .toolChoice(ToolChoiceAny.builder() + .disableParallelToolUse(true) + .build()) .addUserMessage("What is the weather in San Francisco and New York?") .build(); @@ -1353,7 +1357,7 @@ When `tool_choice` type is `any` or `tool`, setting `disable_parallel_tool_use: messages: [ ['role' => 'user', 'content' => 'What is the weather in San Francisco and New York?'] ], - model: 'claude-opus-5', + model: Model::CLAUDE_OPUS_5, toolChoice: ['type' => 'any', 'disableParallelToolUse' => true], tools: [ [ diff --git a/content/en/agents-and-tools/tool-use/programmatic-tool-calling.md b/content/en/agents-and-tools/tool-use/programmatic-tool-calling.md index 866aa28f35..c25f1d98d6 100644 --- a/content/en/agents-and-tools/tool-use/programmatic-tool-calling.md +++ b/content/en/agents-and-tools/tool-use/programmatic-tool-calling.md @@ -49,40 +49,40 @@ Here's an example where Claude programmatically queries a database multiple time ```bash cURL curl https://api.anthropic.com/v1/messages \ - -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "content-type: application/json" \ - -d '{ - "model": "claude-opus-5-5", - "max_tokens": 4096, - "messages": [ - { - "role": "user", - "content": "Query sales data for the West, East, and Central regions, then tell me which region had the highest revenue" - } - ], - "tools": [ - { - "type": "code_execution_20260120", - "name": "code_execution" - }, - { - "name": "query_database", - "description": "Execute a SQL query against the sales database. Returns a list of rows as JSON objects.", - "input_schema": { - "type": "object", - "properties": { - "sql": { - "type": "string", - "description": "SQL query to execute" - } - }, - "required": ["sql"] - }, - "allowed_callers": ["code_execution_20260120"] + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -H "content-type: application/json" \ + -d '{ + "model": "claude-opus-5-5", + "max_tokens": 4096, + "messages": [ + { + "role": "user", + "content": "Query sales data for the West, East, and Central regions, then tell me which region had the highest revenue" + } + ], + "tools": [ + { + "type": "code_execution_20260120", + "name": "code_execution" + }, + { + "name": "query_database", + "description": "Execute a SQL query against the sales database. Returns a list of rows as JSON objects.", + "input_schema": { + "type": "object", + "properties": { + "sql": { + "type": "string", + "description": "SQL query to execute" } - ] - }' + }, + "required": ["sql"] + }, + "allowed_callers": ["code_execution_20260120"] + } + ] + }' ``` ```bash CLI @@ -194,7 +194,8 @@ Here's an example where Claude programmatically queries a database multiple time Model = Model.ClaudeOpus5_5, MaxTokens = 4096, Messages = [ - new UserMessageParam { + new UserMessageParam + { Content = "Query sales data for the West, East, and Central regions, then tell me which region had the highest revenue" } ], @@ -295,7 +296,7 @@ Here's an example where Claude programmatically queries a database multiple time messages: [ ['role' => 'user', 'content' => 'Query sales data for the West, East, and Central regions, then tell me which region had the highest revenue'], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, tools: [ [ 'type' => 'code_execution_20260120', @@ -367,7 +368,7 @@ The response stops with `stop_reason: "tool_use"`, a `container` ID, and a `tool When you configure a tool to be callable from code execution and Claude determines that tool is needed: -1. Claude writes Python code that invokes the tool as a function, potentially including multiple tool calls and pre/post-processing logic. +1. Claude writes Python code that calls the tool as a function. The code can include multiple tool calls and pre/post-processing logic. 2. Claude runs this code in a sandboxed container through code execution. 3. When a tool function is called, code execution pauses and the API returns a `tool_use` block. 4. You provide the tool result, and code execution continues (intermediate results are not loaded into Claude's context window). @@ -526,76 +527,76 @@ Send the full conversation history plus your tool result. Three details matter o ```bash cURL curl https://api.anthropic.com/v1/messages \ - -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "content-type: application/json" \ - -d '{ - "model": "claude-opus-5-5", - "max_tokens": 4096, - "container": "container_xyz789", - "messages": [ - { - "role": "user", - "content": "Query customer purchase history from the last quarter and identify our top 5 customers by revenue" - }, - { - "role": "assistant", - "content": [ - { - "type": "text", - "text": "I'\''ll query the purchase history and analyze the results." - }, - { - "type": "server_tool_use", - "id": "srvtoolu_abc123", - "name": "code_execution", - "input": {"code": "..."} - }, - { - "type": "tool_use", - "id": "toolu_def456", - "name": "query_database", - "input": {"sql": ""}, - "caller": { - "type": "code_execution_20260120", - "tool_id": "srvtoolu_abc123" - } - } - ] - }, - { - "role": "user", - "content": [ - { - "type": "tool_result", - "tool_use_id": "toolu_def456", - "content": "[{\"customer_id\": \"C1\", \"revenue\": 45000}, {\"customer_id\": \"C2\", \"revenue\": 38000}]" - } - ] - } - ], - "tools": [ - { - "type": "code_execution_20260120", - "name": "code_execution" - }, - { - "name": "query_database", - "description": "Execute a SQL query against the sales database. Returns a list of rows as JSON objects.", - "input_schema": { - "type": "object", - "properties": { - "sql": { - "type": "string", - "description": "SQL query to execute" - } - }, - "required": ["sql"] - }, - "allowed_callers": ["code_execution_20260120"] + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -H "content-type: application/json" \ + -d '{ + "model": "claude-opus-5-5", + "max_tokens": 4096, + "container": "container_xyz789", + "messages": [ + { + "role": "user", + "content": "Query customer purchase history from the last quarter and identify our top 5 customers by revenue" + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "I'\''ll query the purchase history and analyze the results." + }, + { + "type": "server_tool_use", + "id": "srvtoolu_abc123", + "name": "code_execution", + "input": {"code": "..."} + }, + { + "type": "tool_use", + "id": "toolu_def456", + "name": "query_database", + "input": {"sql": ""}, + "caller": { + "type": "code_execution_20260120", + "tool_id": "srvtoolu_abc123" } + } ] - }' + }, + { + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_def456", + "content": "[{\"customer_id\": \"C1\", \"revenue\": 45000}, {\"customer_id\": \"C2\", \"revenue\": 38000}]" + } + ] + } + ], + "tools": [ + { + "type": "code_execution_20260120", + "name": "code_execution" + }, + { + "name": "query_database", + "description": "Execute a SQL query against the sales database. Returns a list of rows as JSON objects.", + "input_schema": { + "type": "object", + "properties": { + "sql": { + "type": "string", + "description": "SQL query to execute" + } + }, + "required": ["sql"] + }, + "allowed_callers": ["code_execution_20260120"] + } + ] + }' ``` ```bash CLI @@ -878,40 +879,28 @@ Send the full conversation history plus your tool result. Three details matter o }, Messages: []anthropic.MessageParam{ anthropic.NewUserMessage(anthropic.NewTextBlock("Query customer purchase history from the last quarter and identify our top 5 customers by revenue")), - { - Role: anthropic.MessageParamRoleAssistant, - Content: []anthropic.ContentBlockParamUnion{ - anthropic.NewTextBlock("I'll query the purchase history and analyze the results."), - {OfServerToolUse: &anthropic.ServerToolUseBlockParam{ - ID: "srvtoolu_abc123", - Name: anthropic.ServerToolUseBlockParamNameCodeExecution, - Input: map[string]any{"code": "..."}, - }}, - {OfToolUse: &anthropic.ToolUseBlockParam{ - ID: "toolu_def456", - Name: "query_database", - Input: map[string]any{"sql": ""}, - Caller: anthropic.ServerToolUseBlockParamCallerUnion{ - OfCodeExecution20260120: &anthropic.ServerToolCaller20260120Param{ - ToolID: "srvtoolu_abc123", - }, - }, - }}, - }, - }, - { - Role: anthropic.MessageParamRoleUser, - Content: []anthropic.ContentBlockParamUnion{ - {OfToolResult: &anthropic.ToolResultBlockParam{ - ToolUseID: "toolu_def456", - Content: []anthropic.ToolResultBlockParamContentUnion{ - {OfText: &anthropic.TextBlockParam{ - Text: `[{"customer_id": "C1", "revenue": 45000}, {"customer_id": "C2", "revenue": 38000}, ...]`, - }}, + anthropic.NewAssistantMessage( + anthropic.NewTextBlock("I'll query the purchase history and analyze the results."), + anthropic.NewServerToolUseBlock("srvtoolu_abc123", map[string]any{"code": "..."}, anthropic.ServerToolUseBlockParamNameCodeExecution), + anthropic.ContentBlockParamUnion{OfToolUse: &anthropic.ToolUseBlockParam{ + ID: "toolu_def456", + Name: "query_database", + Input: map[string]any{"sql": ""}, + Caller: anthropic.ToolUseBlockParamCallerUnion{ + OfCodeExecution20260120: &anthropic.ServerToolCaller20260120Param{ + ToolID: "srvtoolu_abc123", }, + }, + }}, + ), + anthropic.NewUserMessage(anthropic.ContentBlockParamUnion{OfToolResult: &anthropic.ToolResultBlockParam{ + ToolUseID: "toolu_def456", + Content: []anthropic.ToolResultBlockParamContentUnion{ + {OfText: &anthropic.TextBlockParam{ + Text: `[{"customer_id": "C1", "revenue": 45000}, {"customer_id": "C2", "revenue": 38000}, ...]`, }}, }, - }, + }}), }, // Same tools array as the original request Tools: []anthropic.ToolUnionParam{ diff --git a/content/en/agents-and-tools/tool-use/server-tools.md b/content/en/agents-and-tools/tool-use/server-tools.md index 674ceadcc9..ff53d3eb86 100644 --- a/content/en/agents-and-tools/tool-use/server-tools.md +++ b/content/en/agents-and-tools/tool-use/server-tools.md @@ -164,7 +164,8 @@ Here's how to handle the `pause_turn` stop reason: Model = Model.ClaudeOpus5_5, MaxTokens = 1024, Messages = [ - new UserMessageParam { + new UserMessageParam + { Content = "Search for comprehensive information about quantum computing breakthroughs in 2025" } ], @@ -181,10 +182,12 @@ Here's how to handle the `pause_turn` stop reason: Model = Model.ClaudeOpus5_5, MaxTokens = 1024, Messages = [ - new UserMessageParam { + new UserMessageParam + { Content = "Search for comprehensive information about quantum computing breakthroughs in 2025" }, - new AssistantMessageParam { + new AssistantMessageParam + { Content = response.Content.Select(block => new ContentBlockParam(block.Json)).ToList() } ], @@ -841,7 +844,9 @@ The following example enables web fetch together with a user-defined `run_comman Message response = client.messages().create(MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5_5) .maxTokens(1024L) - .addTool(WebFetchTool20250910.builder().maxUses(5L).build()) + .addTool(WebFetchTool20250910.builder() + .maxUses(5L) + .build()) .addTool(runCommandTool) .addUserMessage(prompt) .build()); @@ -866,7 +871,9 @@ The following example enables web fetch together with a user-defined `run_comman Message continuation = client.messages().create(MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5_5) .maxTokens(1024L) - .addTool(WebFetchTool20250910.builder().maxUses(5L).build()) + .addTool(WebFetchTool20250910.builder() + .maxUses(5L) + .build()) .addTool(runCommandTool) .addUserMessage(prompt) .addMessage(response) @@ -1059,16 +1066,14 @@ When using domain filters: Invalid domain formats are rejected at request time with a 400 `invalid_request_error`. - In a Messages API request, request-level domain restrictions work together with any organization-level domain restrictions configured in Claude Console. Request-level `allowed_domains` must be a subset of the organization-level allowed list; entries outside it cause the API to return a validation error. A request-level allowed list that includes a domain your organization blocks is rejected with a `400` error that names the conflicting entries. + Request-level domain restrictions work together with any organization-level domain restrictions configured in the Claude Console. Request-level `allowed_domains` must be a subset of the organization-level allowed list; entries outside it cause the API to return a validation error. A request-level allowed list that includes a domain your organization blocks is rejected with a `400` error that names the conflicting entries. Unicode characters in domain names can bypass domain filters through homograph attacks: `аmazon.com` (with a Cyrillic `а`) looks identical to `amazon.com` but is a different domain. Use ASCII-only domain names in allow and block lists, and audit existing entries for non-ASCII characters. -[Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) uses the same `allowed_domains` and `blocked_domains` fields on the `web_search` and `web_fetch` entries of the agent toolset. On Managed Agents, each list holds at most 64 entries, domains listed for `web_fetch` cannot include a path, and fields specific to the Messages API tools, such as `max_uses`, `citations`, and `cache_control`, are not available. See [Domain list rules](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions#domain-list-rules) for the full rules. - -Your organization's web search settings on the [**Capabilities**](https://platform.claude.com/settings/capabilities) page of the Claude Console apply to Messages API requests and to Managed Agents sessions. In a session, the agent receives only the search results that both the organization's domain restrictions and the agent's per-tool lists allow. For a session in a cloud environment with `limited` networking, the environment's `allowed_hosts` also applies to `web_search` and `web_fetch`; see [Networking](https://platform.claude.com/docs/en/managed-agents/environments#networking). The per-tool lists restrict these tools further, within the hosts that `allowed_hosts` allows. +For domain lists and your organization's settings in Claude Managed Agents sessions, see [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions). ## Dynamic filtering with code execution diff --git a/content/en/agents-and-tools/tool-use/text-editor-tool.md b/content/en/agents-and-tools/tool-use/text-editor-tool.md index 06836d15ed..d32b50522d 100644 --- a/content/en/agents-and-tools/tool-use/text-editor-tool.md +++ b/content/en/agents-and-tools/tool-use/text-editor-tool.md @@ -159,22 +159,22 @@ You can optionally specify a `max_characters` parameter to control truncation wh import com.anthropic.models.messages.ToolTextEditor20250728; // ... void main() { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - ToolTextEditor20250728 editorTool = - ToolTextEditor20250728.builder() - .maxCharacters(10000L) - .build(); - - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addTool(editorTool) - .addUserMessage("There's a syntax error in my primes.py file. Can you help me fix it?") - .build(); - - Message message = client.messages().create(params); - IO.println(message); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + ToolTextEditor20250728 editorTool = + ToolTextEditor20250728.builder() + .maxCharacters(10000L) + .build(); + + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addTool(editorTool) + .addUserMessage("There's a syntax error in my primes.py file. Can you help me fix it?") + .build(); + + Message message = client.messages().create(params); + IO.println(message); } ``` @@ -182,7 +182,7 @@ You can optionally specify a `max_characters` parameter to control truncation wh $client = new Client(); $response = $client->messages->create( - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, tools: [ToolTextEditor20250728::with(maxCharacters: 10000)], messages: [ @@ -504,20 +504,20 @@ First, your application provides Claude with the text editor tool and a prompt t import com.anthropic.models.messages.ToolTextEditor20250728; // ... void main() { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - ToolTextEditor20250728 editorTool = - ToolTextEditor20250728.builder().build(); + ToolTextEditor20250728 editorTool = + ToolTextEditor20250728.builder().build(); - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addTool(editorTool) - .addUserMessage("There's a syntax error in my primes.py file. Can you help me fix it?") - .build(); + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addTool(editorTool) + .addUserMessage("There's a syntax error in my primes.py file. Can you help me fix it?") + .build(); - Message message = client.messages().create(params); - IO.println(message); + Message message = client.messages().create(params); + IO.println(message); } ``` @@ -525,7 +525,7 @@ First, your application provides Claude with the text editor tool and a prompt t $client = new Client(); $response = $client->messages->create( - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, tools: [new ToolTextEditor20250728()], messages: [ @@ -885,42 +885,42 @@ Your application should then read the file and return its contents to Claude: AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addTool(ToolTextEditor20250728.builder().build()) - .addUserMessage("There's a syntax error in my primes.py file. Can you help me fix it?") - .addAssistantMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofText( - TextBlockParam.builder() - .text("I'll help you fix the syntax error in your primes.py file. First, let me take a look at the file to identify the issue.") - .build() - ), - ContentBlockParam.ofToolUse( - ToolUseBlockParam.builder() - .id("toolu_01AbCdEfGhIjKlMnOpQrStU") - .name("str_replace_based_edit_tool") - .input( - ToolUseBlockParam.Input.builder() - .putAdditionalProperty("command", JsonValue.from("view")) - .putAdditionalProperty("path", JsonValue.from("primes.py")) - .build() - ) - .build() - ) + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addTool(ToolTextEditor20250728.builder().build()) + .addUserMessage("There's a syntax error in my primes.py file. Can you help me fix it?") + .addAssistantMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofText( + TextBlockParam.builder() + .text("I'll help you fix the syntax error in your primes.py file. First, let me take a look at the file to identify the issue.") + .build() + ), + ContentBlockParam.ofToolUse( + ToolUseBlockParam.builder() + .id("toolu_01AbCdEfGhIjKlMnOpQrStU") + .name("str_replace_based_edit_tool") + .input( + ToolUseBlockParam.Input.builder() + .putAdditionalProperty("command", JsonValue.from("view")) + .putAdditionalProperty("path", JsonValue.from("primes.py")) + .build() + ) + .build() + ) + ) ) - ) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofToolResult( - ToolResultBlockParam.builder() - .toolUseId("toolu_01AbCdEfGhIjKlMnOpQrStU") - .content("1: def is_prime(n):\n2: \"\"\"Check if a number is prime.\"\"\"\n3: if n <= 1:\n4: return False\n5: if n <= 3:\n6: return True\n7: if n % 2 == 0 or n % 3 == 0:\n8: return False\n9: i = 5\n10: while i * i <= n:\n11: if n % i == 0 or n % (i + 2) == 0:\n12: return False\n13: i += 6\n14: return True\n15: \n16: def get_primes(limit):\n17: \"\"\"Generate a list of prime numbers up to the given limit.\"\"\"\n18: primes = []\n19: for num in range(2, limit + 1)\n20: if is_prime(num):\n21: primes.append(num)\n22: return primes\n23: \n24: def main():\n25: \"\"\"Main function to demonstrate prime number generation.\"\"\"\n26: limit = 100\n27: prime_list = get_primes(limit)\n28: print(f\"Prime numbers up to {limit}:\")\n29: print(prime_list)\n30: print(f\"Found {len(prime_list)} prime numbers.\")\n31: \n32: if __name__ == \"__main__\":\n33: main()") - .build() - ) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofToolResult( + ToolResultBlockParam.builder() + .toolUseId("toolu_01AbCdEfGhIjKlMnOpQrStU") + .content("1: def is_prime(n):\n2: \"\"\"Check if a number is prime.\"\"\"\n3: if n <= 1:\n4: return False\n5: if n <= 3:\n6: return True\n7: if n % 2 == 0 or n % 3 == 0:\n8: return False\n9: i = 5\n10: while i * i <= n:\n11: if n % i == 0 or n % (i + 2) == 0:\n12: return False\n13: i += 6\n14: return True\n15: \n16: def get_primes(limit):\n17: \"\"\"Generate a list of prime numbers up to the given limit.\"\"\"\n18: primes = []\n19: for num in range(2, limit + 1)\n20: if is_prime(num):\n21: primes.append(num)\n22: return primes\n23: \n24: def main():\n25: \"\"\"Main function to demonstrate prime number generation.\"\"\"\n26: limit = 100\n27: prime_list = get_primes(limit)\n28: print(f\"Prime numbers up to {limit}:\")\n29: print(prime_list)\n30: print(f\"Found {len(prime_list)} prime numbers.\")\n31: \n32: if __name__ == \"__main__\":\n33: main()") + .build() + ) + ) ) - ) - .build(); + .build(); Message message = client.messages().create(params); System.out.println(message); @@ -930,7 +930,7 @@ Your application should then read the file and return its contents to Claude: $client = new Client(); $response = $client->messages->create( - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, tools: [new ToolTextEditor20250728()], messages: [ @@ -1317,52 +1317,52 @@ Your application should then make the edit and return the result: AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addTool(ToolTextEditor20250728.builder().build()) - // Previous messages would go here - .addAssistantMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofText( - TextBlockParam.builder() - .text( - "I found the syntax error in your primes.py file. In the `get_primes` function, there is a missing colon (:) at the end of the for loop line. Let me fix that for you." - ) - .build() - ), - ContentBlockParam.ofToolUse( - ToolUseBlockParam.builder() - .id("toolu_01PqRsTuVwXyZAbCdEfGh") - .name("str_replace_based_edit_tool") - .input( - ToolUseBlockParam.Input.builder() - .putAdditionalProperty("command", JsonValue.from("str_replace")) - .putAdditionalProperty("path", JsonValue.from("primes.py")) - .putAdditionalProperty( - "old_str", - JsonValue.from(" for num in range(2, limit + 1)") - ) - .putAdditionalProperty( - "new_str", - JsonValue.from(" for num in range(2, limit + 1):") - ) - .build() - ) - .build() - ) + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addTool(ToolTextEditor20250728.builder().build()) + // Previous messages would go here + .addAssistantMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofText( + TextBlockParam.builder() + .text( + "I found the syntax error in your primes.py file. In the `get_primes` function, there is a missing colon (:) at the end of the for loop line. Let me fix that for you." + ) + .build() + ), + ContentBlockParam.ofToolUse( + ToolUseBlockParam.builder() + .id("toolu_01PqRsTuVwXyZAbCdEfGh") + .name("str_replace_based_edit_tool") + .input( + ToolUseBlockParam.Input.builder() + .putAdditionalProperty("command", JsonValue.from("str_replace")) + .putAdditionalProperty("path", JsonValue.from("primes.py")) + .putAdditionalProperty( + "old_str", + JsonValue.from(" for num in range(2, limit + 1)") + ) + .putAdditionalProperty( + "new_str", + JsonValue.from(" for num in range(2, limit + 1):") + ) + .build() + ) + .build() + ) + ) ) - ) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofToolResult( - ToolResultBlockParam.builder() - .toolUseId("toolu_01PqRsTuVwXyZAbCdEfGh") - .content("Successfully replaced text at exactly one location.") - .build() - ) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofToolResult( + ToolResultBlockParam.builder() + .toolUseId("toolu_01PqRsTuVwXyZAbCdEfGh") + .content("Successfully replaced text at exactly one location.") + .build() + ) + ) ) - ) - .build(); + .build(); Message message = client.messages().create(params); System.out.println(message); @@ -1372,7 +1372,7 @@ Your application should then make the edit and return the result: $client = new Client(); $response = $client->messages->create( - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, tools: [new ToolTextEditor20250728()], messages: [ @@ -1585,18 +1585,18 @@ The tool type is `type: "text_editor_20250728"` for Claude 4 and later models. ```java Java static void handleEditorTool(Map input) { - var command = (String) input.getOrDefault("command", ""); - var filePath = (String) input.getOrDefault("path", ""); - - if (command.equals("view")) { - // Read and return file contents - } else if (command.equals("str_replace")) { - // Replace text in file - } else if (command.equals("create")) { - // Create new file - } else if (command.equals("insert")) { - // Insert text at location - } + var command = (String) input.getOrDefault("command", ""); + var filePath = (String) input.getOrDefault("path", ""); + + if (command.equals("view")) { + // Read and return file contents + } else if (command.equals("str_replace")) { + // Replace text in file + } else if (command.equals("create")) { + // Create new file + } else if (command.equals("insert")) { + // Insert text at location + } } ``` @@ -1656,7 +1656,7 @@ The tool type is `type: "text_editor_20250728"` for Claude 4 and later models. # Process tool use in Claude's response for content in response.content: if content.type == "tool_use": - # Execute the tool based on command + # Run the tool based on command result = handle_editor_tool(content) # Return result to Claude @@ -1671,7 +1671,7 @@ The tool type is `type: "text_editor_20250728"` for Claude 4 and later models. // Process tool use in Claude's response for (const block of response.content) { if (block.type === "tool_use") { - // Execute the tool based on command + // Run the tool based on command const result = handleEditorTool(block); // Return result to Claude @@ -1719,17 +1719,17 @@ The tool type is `type: "text_editor_20250728"` for Claude 4 and later models. ```java Java // Process tool use in Claude's response for (var block : response.content()) { - if (block.type().equals("tool_use")) { - // Execute the tool based on command - var result = handleEditorTool(block); + if (block.type().equals("tool_use")) { + // Run the tool based on command + var result = handleEditorTool(block); - // Return result to Claude - var toolResult = Map.of( - "type", "tool_result", - "tool_use_id", block.id(), - "content", result - ); - } + // Return result to Claude + var toolResult = Map.of( + "type", "tool_result", + "tool_use_id", block.id(), + "content", result + ); + } } ``` @@ -1737,7 +1737,7 @@ The tool type is `type: "text_editor_20250728"` for Claude 4 and later models. // Process tool use in Claude's response foreach ($response->content as $block) { if ($block->type === 'tool_use') { - // Execute the tool based on command + // Run the tool based on command $result = handle_editor_tool($block->input); // Return result to Claude @@ -1920,11 +1920,11 @@ When using the text editor tool, various errors might occur. Here is guidance on ```java Java static void backupFile(String filePath) throws IOException { - Path source = Path.of(filePath); - Path backupPath = Path.of(filePath + ".backup"); - if (Files.exists(source)) { - Files.copy(source, backupPath, StandardCopyOption.REPLACE_EXISTING); - } + Path source = Path.of(filePath); + Path backupPath = Path.of(filePath + ".backup"); + if (Files.exists(source)) { + Files.copy(source, backupPath, StandardCopyOption.REPLACE_EXISTING); + } } ``` @@ -2038,18 +2038,18 @@ When using the text editor tool, various errors might occur. Here is guidance on ```java Java static String safeReplace(String filePath, String oldText, String newText) throws IOException { - String content = Files.readString(Path.of(filePath)); + String content = Files.readString(Path.of(filePath)); - int count = content.split(Pattern.quote(oldText), -1).length - 1; - if (count == 0) { - return "Error: No match found"; - } else if (count > 1) { - return "Error: Found " + count + " matches"; - } else { - String newContent = content.replace(oldText, newText); - Files.writeString(Path.of(filePath), newContent); - return "Successfully replaced text"; - } + int count = content.split(Pattern.quote(oldText), -1).length - 1; + if (count == 0) { + return "Error: No match found"; + } else if (count > 1) { + return "Error: Found " + count + " matches"; + } else { + String newContent = content.replace(oldText, newText); + Files.writeString(Path.of(filePath), newContent); + return "Successfully replaced text"; + } } ``` @@ -2172,21 +2172,21 @@ When using the text editor tool, various errors might occur. Here is guidance on ```java Java static String verifyChanges(String filePath) { - try { - // For Python files, check for syntax errors - if (filePath.endsWith(".py")) { - Process proc = new ProcessBuilder("python3", "-m", "py_compile", filePath) - .redirectErrorStream(true) - .start(); - if (proc.waitFor() != 0) { - return "Verification failed: " + new String(proc.getInputStream().readAllBytes()); - } - return "Syntax check passed"; + try { + // For Python files, check for syntax errors + if (filePath.endsWith(".py")) { + Process proc = new ProcessBuilder("python3", "-m", "py_compile", filePath) + .redirectErrorStream(true) + .start(); + if (proc.waitFor() != 0) { + return "Verification failed: " + new String(proc.getInputStream().readAllBytes()); + } + return "Syntax check passed"; + } + return "No checks defined for this file type"; + } catch (IOException | InterruptedException e) { + return "Verification failed: " + e.getMessage(); } - return "No checks defined for this file type"; - } catch (IOException | InterruptedException e) { - return "Verification failed: " + e.getMessage(); - } } ``` diff --git a/content/en/agents-and-tools/tool-use/tool-reference.md b/content/en/agents-and-tools/tool-use/tool-reference.md index 35ba3c77e2..bb10100b9d 100644 --- a/content/en/agents-and-tools/tool-use/tool-reference.md +++ b/content/en/agents-and-tools/tool-use/tool-reference.md @@ -92,7 +92,7 @@ Every tool in the `tools` array, including user-defined tools, accepts optional | `strict` | Guarantee schema validation on tool names and inputs | All tools except `mcp_toolset`, `computer_toolset_20260801`, and `browser_toolset_20260801` | [Strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use) | | `defer_loading` | Exclude the tool from the initial system prompt; load it on demand when tool search returns a `tool_reference` for it | All tools (for `mcp_toolset`, see [tool configuration](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector#mcp-toolset-configuration)). On the computer use and browser use toolsets, set it per member inside `configs`; see [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets). | [Tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) | | `allowed_callers` | Restrict which callers can call the tool | All tools except `mcp_toolset` (on `computer_toolset_20260801` and `browser_toolset_20260801`, only `["direct"]` is accepted; see [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets)) | [Programmatic tool calling](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling#the-allowed-callers-field) | -| `input_examples` | Provide example input objects to help Claude understand how to call the tool | User-defined and Anthropic-schema client tools, except `computer_toolset_20260801` and `browser_toolset_20260801`. Not available on server tools. | [Define tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#providing-tool-use-examples) | +| `input_examples` | Provide example input objects to show Claude how to call the tool | User-defined and Anthropic-schema client tools, except `computer_toolset_20260801` and `browser_toolset_20260801`. Not available on server tools. | [Define tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#providing-tool-use-examples) | | `eager_input_streaming` | Enable fine-grained input streaming (`true`) or keep standard buffered streaming (`false`) for this tool | User-defined tools only | [Fine-grained tool streaming](https://platform.claude.com/docs/en/agents-and-tools/tool-use/fine-grained-tool-streaming) | ### `allowed_callers` values diff --git a/content/en/agents-and-tools/tool-use/tool-runner.md b/content/en/agents-and-tools/tool-use/tool-runner.md index 5b6b429695..28bdb928b2 100644 --- a/content/en/agents-and-tools/tool-use/tool-runner.md +++ b/content/en/agents-and-tools/tool-use/tool-runner.md @@ -261,8 +261,8 @@ Depending on the SDK's tool signature, a tool returns its result as a string or "fmt" "log" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/toolrunner" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/toolrunner" ) type GetWeatherInput struct { @@ -396,25 +396,25 @@ Depending on the SDK's tool signature, a tool returns its result as a string or // The lambda can use weatherService. BetaRunnableTool getWeather = BetaRunnableTool.of( - GetWeather.class, - input -> BetaToolResultBlockParam.Content.ofString( - weatherService.currentWeather(input.location, input.unit))); + GetWeather.class, + input -> BetaToolResultBlockParam.Content.ofString( + weatherService.currentWeather(input.location, input.unit))); BetaRunnableTool calculateSum = BetaRunnableTool.of( - CalculateSum.class, - input -> BetaToolResultBlockParam.Content.ofString( - String.valueOf(input.a + input.b))); + CalculateSum.class, + input -> BetaToolResultBlockParam.Content.ofString( + String.valueOf(input.a + input.b))); BetaToolRunner runner = client.beta() - .messages() - .toolRunner(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addBeta("structured-outputs-2025-11-13") - .addUserMessage("What's the weather like in Paris? Also, what's 15 + 27?") - .addTool(getWeather) - .addTool(calculateSum) - .build()); + .messages() + .toolRunner(MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addBeta("structured-outputs-2025-11-13") + .addUserMessage("What's the weather like in Paris? Also, what's 15 + 27?") + .addTool(getWeather) + .addTool(calculateSum) + .build()); for (BetaMessage message : runner) { IO.println(message); @@ -587,7 +587,7 @@ Depending on the SDK's tool signature, a tool returns its result as a string or The tool runner is an iterable that yields messages from Claude. On each iteration, the runner checks whether Claude requested a tool use. If so, it runs the tool and sends the result back to Claude automatically, then yields the next message from Claude to continue your loop. -You can end the loop at any iteration with a `break` statement. The runner loops until Claude returns a message without a tool use, or until it reaches `max_iterations` (csharp, java, php: `maxIterations`; go: `MaxIterations`) if you set it. +You can end the loop at any iteration with a `break` statement. The runner loops until Claude returns a message without a tool use, or until it reaches `max_iterations` (csharp, php: `maxIterations`; java: `.maxIterations()`; go: `MaxIterations`) if you set it. If you don't need intermediate messages, you can get the final message directly: @@ -706,15 +706,15 @@ If you don't need intermediate messages, you can get the final message directly: AnthropicClient client = AnthropicOkHttpClient.fromEnv(); BetaToolRunner runner = client.beta() - .messages() - .toolRunner(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addBeta("structured-outputs-2025-11-13") - .addUserMessage("What's the weather like in Paris? Also, what's 15 + 27?") - .addTool(getWeather) - .addTool(calculateSum) - .build()); + .messages() + .toolRunner(MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addBeta("structured-outputs-2025-11-13") + .addUserMessage("What's the weather like in Paris? Also, what's 15 + 27?") + .addTool(getWeather) + .addTool(calculateSum) + .build()); BetaMessage finalMessage = null; for (BetaMessage message : runner) { @@ -814,7 +814,7 @@ By default, the runner manages conversation state for you: after each tool-call You take over by modifying the runner's messages from inside the loop body. The exact method depends on the SDK. See the per-language tabs that follow. -When you take over for an iteration, the runner does not append the assistant message or tool results from that turn. You become responsible for keeping the conversation valid: append the assistant message and a tool result yourself (if you want the turn to count), modify state conditionally so the loop can still exit when there are no tool calls, and pass `max_iterations` (csharp, java, php: `maxIterations`; go: `MaxIterations`) to bound the loop. The SDK supports `max_iterations` (csharp, java, php: `maxIterations`; go: `MaxIterations`). +When you take over for an iteration, the runner does not append the assistant message or tool results from that turn. You become responsible for keeping the conversation valid: append the assistant message and a tool result yourself (if you want the turn to count), modify state conditionally so the loop can still exit when there are no tool calls, and pass `max_iterations` (csharp, php: `maxIterations`; java: `.maxIterations()`; go: `MaxIterations`) to bound the loop. The SDK supports `max_iterations` (csharp, php: `maxIterations`; java: `.maxIterations()`; go: `MaxIterations`) in all seven languages. @@ -985,17 +985,17 @@ When you take over for an iteration, the runner does not append the assistant me ```java BetaToolRunner runner = client.beta() - .messages() - .toolRunner(ToolRunnerCreateParams.builder() - .initialMessageParams(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addBeta("structured-outputs-2025-11-13") - .addUserMessage("Give me a detailed weather report for every major US city.") - .addTool(getWeather) - .build()) - .maxIterations(10L) - .build()); + .messages() + .toolRunner(ToolRunnerCreateParams.builder() + .initialMessageParams(MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addBeta("structured-outputs-2025-11-13") + .addUserMessage("Give me a detailed weather report for every major US city.") + .addTool(getWeather) + .build()) + .maxIterations(10L) + .build()); long ceiling = 8192; @@ -1012,7 +1012,9 @@ When you take over for an iteration, the runner does not append the assistant me // Calling setNextParams() flags this turn as user-managed: the runner // does NOT auto-append the truncated message, so the next iteration // re-sends the same conversation prefix with the larger budget. - runner.setNextParams(runner.params().toBuilder().maxTokens(doubled).build()); + runner.setNextParams(runner.params().toBuilder() + .maxTokens(doubled) + .build()); } // No mutation on a normal turn: the runner auto-appends and continues. } @@ -1470,11 +1472,11 @@ You can modify tool results before they're sent back to Claude. This is useful f BetaRunnableTool searchDocuments = BetaRunnableTool.of(SearchDocuments.class, input -> { String largeResult = "..."; // a long document worth caching return BetaToolResultBlockParam.Content.ofBlocks(List.of( - BetaToolResultBlockParam.Content.Block.ofText( - BetaTextBlockParam.builder() - .text(largeResult) - .cacheControl(BetaCacheControlEphemeral.builder().build()) - .build()))); + BetaToolResultBlockParam.Content.Block.ofText( + BetaTextBlockParam.builder() + .text(largeResult) + .cacheControl(BetaCacheControlEphemeral.builder().build()) + .build()))); }); ``` @@ -1712,14 +1714,14 @@ Enable streaming to process each turn's response incrementally. Each iteration y AnthropicClient client = AnthropicOkHttpClient.fromEnv(); BetaToolRunner runner = client.beta() - .messages() - .toolRunner(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addBeta("structured-outputs-2025-11-13") - .addUserMessage("What is 15 + 27?") - .addTool(calculateSum) - .build()); + .messages() + .toolRunner(MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addBeta("structured-outputs-2025-11-13") + .addUserMessage("What is 15 + 27?") + .addTool(calculateSum) + .build()); for (StreamResponse stream : runner.streaming()) { try (stream) { diff --git a/content/en/agents-and-tools/tool-use/tool-search-tool.md b/content/en/agents-and-tools/tool-use/tool-search-tool.md index f63442c636..5a05c62be2 100644 --- a/content/en/agents-and-tools/tool-use/tool-search-tool.md +++ b/content/en/agents-and-tools/tool-use/tool-search-tool.md @@ -431,7 +431,7 @@ The following example includes the tool search tool and two deferred tools: messages: [ ['role' => 'user', 'content' => 'What is the weather in San Francisco?'], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, tools: [ [ 'type' => 'tool_search_tool_regex_20251119', diff --git a/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md b/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md index d05e23ad0b..fd1156f73f 100644 --- a/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md +++ b/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md @@ -42,7 +42,7 @@ Place `cache_control: {"type": "ephemeral"}` on the last tool in your `tools` ar For `mcp_toolset`, the `cache_control` breakpoint lands on the last tool in the set. You don't control tool order within an MCP toolset, so place the breakpoint on the `mcp_toolset` entry itself and the API applies it to the final expanded tool. -The [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolset entries follow the same rule: place `cache_control` on the toolset entry itself, and the breakpoint lands after the toolset's definition. It isn't accepted inside a member's `configs` entry, because the toolset's members load as one definition. Within a [batch action](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions), a `cache_control` marker on any of the turn's member `tool_use` or `tool_result` blocks is accepted and takes effect at the end of that batch, so several markers in one batch act as a single breakpoint. Each marker still counts toward the request's limit of [four breakpoints](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#when-to-use-multiple-breakpoints), so use one for each turn. +The [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolset entries follow the same rule: place `cache_control` on the toolset entry itself, and the breakpoint lands after the toolset's definition. It isn't accepted inside a member's `configs` entry, because the toolset's members load as one definition. Within a [batch action](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions), a `cache_control` marker on any of the turn's member `tool_use` or `tool_result` blocks is accepted and takes effect at the end of that batch, so several markers in one batch act as a single breakpoint. Each marker still counts toward the request's limit of [four breakpoints](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#when-to-use-multiple-breakpoints), so use at most one in any turn. ## defer\_loading and cache preservation diff --git a/content/en/agents-and-tools/tool-use/web-fetch-tool.md b/content/en/agents-and-tools/tool-use/web-fetch-tool.md index f4bcbb749a..537f2c8f01 100644 --- a/content/en/agents-and-tools/tool-use/web-fetch-tool.md +++ b/content/en/agents-and-tools/tool-use/web-fetch-tool.md @@ -12,10 +12,10 @@ The web fetch tool allows Claude to retrieve full content from specified webpage The latest web fetch tool version (`web_fetch_20260318`) supports **dynamic filtering**: Claude can write and execute code to filter fetched content before it reaches the context window, keeping only relevant information and discarding the rest. This reduces token consumption while maintaining response quality. Dynamic filtering is available with Claude 4.6 and later models and [Claude Mythos Preview](https://anthropic.com/glasswing). `web_fetch_20260318` also adds [response inclusion](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#response-inclusion) control for agentic workflows. The previous versions (`web_fetch_20260309` for dynamic filtering and [cache bypass](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#cache-bypass), `web_fetch_20260209` for dynamic filtering only, `web_fetch_20250910` for basic fetch) remain available. -Web fetch (with and without dynamic filtering) is available on the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). On Microsoft Foundry, deployments [hosted on Azure](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#additional-features-not-supported-when-hosted-on-azure) support only the basic web fetch tool (`web_fetch_20250910`, without dynamic filtering). Deployments hosted on Anthropic support all versions. Web fetch is not currently available on Amazon Bedrock or Google Cloud. +Web fetch (with and without dynamic filtering) is available on the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). On Microsoft Foundry, deployments [hosted on Azure](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#additional-features-not-supported-when-hosted-on-azure) support only the basic web fetch tool (`web_fetch_20250910`, without dynamic filtering). Deployments hosted on Anthropic support all versions. - For [Claude Mythos Preview](https://anthropic.com/glasswing), web fetch is available on the Claude API and Microsoft Foundry. It is not currently available for Mythos Preview on Amazon Bedrock or Google Cloud. + For [Claude Mythos Preview](https://anthropic.com/glasswing), web fetch is available on the Claude API and Microsoft Foundry. @@ -245,9 +245,11 @@ To enable dynamic filtering, use `web_fetch_20260209` or any later version. The ## How to use web fetch - An organization admin can turn off web fetch for your organization on the [**Capabilities**](https://platform.claude.com/settings/capabilities) page of the Claude Console. With web fetch off, a Messages API request that includes the tool fails with a 400 `invalid_request_error` that says web fetch is not enabled, and `web_fetch` calls in a [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) session return an error result to the agent while the session continues. With web fetch on, the admin can also set allowed or blocked domains for web fetch on the same page. For how the organization's domain lists apply, see [Domain filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#domain-filtering) for Messages API requests and [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions) for Managed Agents sessions. + An organization admin can turn off web fetch for your organization on the [**Capabilities**](https://platform.claude.com/settings/capabilities) page of the Claude Console. With web fetch off, a Messages API request that includes the tool fails with a 400 `invalid_request_error` that says web fetch is not enabled. With web fetch on, the admin can also set allowed or blocked domains for web fetch on the same page. For how those lists apply to a request, see [Domain filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#domain-filtering). +For how your organization's web fetch settings apply in Claude Managed Agents sessions, see [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions). + Provide the web fetch tool in your API request: @@ -458,7 +460,7 @@ The `max_uses` parameter limits the number of web fetches performed. Failed fetc For domain filtering with `allowed_domains` and `blocked_domains`, see [Server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#domain-filtering). -On [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview), set these fields on the `web_fetch` entry of the agent toolset, where each listed domain must be a plain hostname with no path; see [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions). +On [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview), set these fields on the `web_fetch` entry of the agent toolset; see [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions). ### Content limits @@ -881,7 +883,9 @@ When both the web search and web fetch tools are enabled, and the user names a s .build()) .addTool(WebFetchTool20250910.builder() .maxUses(5L) - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build()) .build(); diff --git a/content/en/agents-and-tools/tool-use/web-search-tool.md b/content/en/agents-and-tools/tool-use/web-search-tool.md index 01b785a9c8..779789ec3f 100644 --- a/content/en/agents-and-tools/tool-use/web-search-tool.md +++ b/content/en/agents-and-tools/tool-use/web-search-tool.md @@ -21,7 +21,7 @@ Three versions of the web search tool are available: The examples on this page use `web_search_20250305` for basic search and `web_search_20260318` for dynamic filtering. - For [Claude Mythos Preview](https://anthropic.com/glasswing), web search is supported on the Claude API, Google Cloud, and Microsoft Foundry. Web search is not available for Mythos Preview on Amazon Bedrock or [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws). + For [Claude Mythos Preview](https://anthropic.com/glasswing), web search is supported on the Claude API, Claude Models on Google Cloud (Google managed), and Microsoft Foundry. For web search's Zero Data Retention eligibility and the related `allowed_callers` configuration, see [Server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#zdr-and-allowed-callers). @@ -65,7 +65,7 @@ Dynamic filtering runs web search from inside [code execution](https://platform. To call web search directly, without dynamic filtering, set `allowed_callers: ["direct"]`. Models that don't support programmatic tool calling require this setting. Without it, the API returns a 400 error that tells you to set it. - The web search tool (with and without dynamic filtering) is available on the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). On Microsoft Foundry, deployments [hosted on Azure](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#additional-features-not-supported-when-hosted-on-azure) support only the basic web search tool (`web_search_20250305`, without dynamic filtering). Deployments hosted on Anthropic support all versions. On Google Cloud, only the basic web search tool (without dynamic filtering) is available. Web search is not available on Amazon Bedrock. + The web search tool (with and without dynamic filtering) is available on the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). On Microsoft Foundry, deployments [hosted on Azure](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#additional-features-not-supported-when-hosted-on-azure) support only the basic web search tool (`web_search_20250305`, without dynamic filtering). Deployments hosted on Anthropic support all versions. On Claude Models on Google Cloud (Google managed), only the basic web search tool (without dynamic filtering) is available. The following examples use `web_search_20260318`: @@ -236,10 +236,10 @@ The following examples use `web_search_20260318`: ## How to use web search - Web search is enabled for your organization unless an administrator has disabled it in the [Claude Console](https://platform.claude.com/settings/capabilities), where they can also restrict which domains it searches. If it's disabled, a Messages API request that includes the tool fails with a 400 `invalid_request_error` that says web search is not enabled, rather than an [error code](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#errors) inside a search result. With web search off, `web_search` calls in a [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) session return an error result to the agent, and the session continues. + Web search is enabled for your organization unless an administrator has disabled it in the [Claude Console](https://platform.claude.com/settings/capabilities), where they can also restrict which domains it searches. If it's disabled, a Messages API request that includes the tool fails with a 400 `invalid_request_error` that says web search is not enabled, rather than an [error code](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#errors) inside a search result. -Your organization's web search settings in the Claude Console apply to Messages API requests and to Managed Agents sessions. In a session, the agent receives only the search results that both the organization's domain restrictions and the agent's per-tool lists allow; see [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions). For a session in a cloud environment with `limited` networking, the environment's `allowed_hosts` also applies to `web_search` and `web_fetch`; see [Networking](https://platform.claude.com/docs/en/managed-agents/environments#networking). The per-tool lists restrict these tools further, within the hosts that `allowed_hosts` allows. +For how your organization's web search settings apply in Claude Managed Agents sessions, see [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions). Provide the web search tool in your API request: @@ -462,7 +462,7 @@ The `user_location` parameter allows you to localize search results based on a u * `country`: The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code (the API rejects an unsupported code with a 400 error) * `timezone`: The [IANA time zone ID](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) -On Claude Managed Agents, the `web_search` entry of the agent toolset accepts a `user_location` object with the same fields. The API rejects an unsupported `country` code with a 400 error when you create or update the agent, or when you create or update a session that supplies the setting. See the [web tool settings](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions#settings). +On Claude Managed Agents, the `web_search` entry of the agent toolset also accepts `user_location`; see the [web tool settings](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions#settings). ### Response inclusion diff --git a/content/en/api/beta-headers.md b/content/en/api/beta-headers.md index 2335abbdc7..0abc1fa8b5 100644 --- a/content/en/api/beta-headers.md +++ b/content/en/api/beta-headers.md @@ -114,11 +114,11 @@ The following example sends a request with the [context editing](https://platfor AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello, Claude") - .addBeta(AnthropicBeta.CONTEXT_MANAGEMENT_2025_06_27) - .build(); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello, Claude") + .addBeta(AnthropicBeta.CONTEXT_MANAGEMENT_2025_06_27) + .build(); BetaMessage message = client.beta().messages().create(params); System.out.println(message.content()); @@ -130,7 +130,7 @@ The following example sends a request with the [context editing](https://platfor $message = $client->beta->messages->create( maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, betas: ['context-management-2025-06-27'], ); @@ -180,7 +180,7 @@ With the SDK, list each feature (for example, `betas=["feature1", "feature2"]` ( ### Beta features on other platforms -Beta names are the same on every platform that accepts them, but not every platform accepts every beta. [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) take beta names in the `anthropic-beta` header, as the Claude API does. To send several betas, put their names in one header, separated by commas: Google Cloud reads only one `anthropic-beta` header and ignores the rest, so betas in the others don't take effect. +Beta names are the same on every platform that accepts them, but not every platform accepts every beta. [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) take beta names in the `anthropic-beta` header, as the Claude API does. To send several betas, put their names in one header, separated by commas: Claude Models on Google Cloud (Google managed) reads only one `anthropic-beta` header and ignores the rest, so betas in the others don't take effect. On Amazon Bedrock, where beta names go depends on the API you call: diff --git a/content/en/api/beta.md b/content/en/api/beta.md index 9ed19be5c6..a85871ff29 100644 --- a/content/en/api/beta.md +++ b/content/en/api/beta.md @@ -96761,7 +96761,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -97014,7 +97014,7 @@ Changes take effect within about an hour. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -98721,7 +98721,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. - `next_page: string or null` @@ -109184,7 +109184,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -109200,7 +109200,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -109573,7 +109573,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -109589,7 +109589,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -109791,10 +109791,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -109980,7 +109983,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -109996,7 +109999,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -110425,7 +110428,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -110441,7 +110444,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -111020,7 +111023,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -111036,7 +111039,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -111355,7 +111358,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -111371,7 +111374,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -111684,7 +111687,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -111700,7 +111703,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -113854,9 +113857,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -114124,9 +114127,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/beta/organization.md b/content/en/api/beta/organization.md index a50606e276..4cebd0df8e 100644 --- a/content/en/api/beta/organization.md +++ b/content/en/api/beta/organization.md @@ -9635,7 +9635,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -9888,7 +9888,7 @@ Changes take effect within about an hour. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -11595,7 +11595,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. - `next_page: string or null` @@ -22058,7 +22058,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -22074,7 +22074,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -22447,7 +22447,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -22463,7 +22463,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -22665,10 +22665,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -22854,7 +22857,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -22870,7 +22873,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -23299,7 +23302,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -23315,7 +23318,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -23894,7 +23897,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -23910,7 +23913,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -24229,7 +24232,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -24245,7 +24248,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -24558,7 +24561,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -24574,7 +24577,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -26728,9 +26731,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -26998,9 +27001,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/beta/organization/plugin_marketplaces.md b/content/en/api/beta/organization/plugin_marketplaces.md index d0c2785d70..ff4e9e14fc 100644 --- a/content/en/api/beta/organization/plugin_marketplaces.md +++ b/content/en/api/beta/organization/plugin_marketplaces.md @@ -865,9 +865,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -1135,9 +1135,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/beta/organization/plugin_marketplaces/validate_archive.md b/content/en/api/beta/organization/plugin_marketplaces/validate_archive.md index 30f662527d..535456a15e 100644 --- a/content/en/api/beta/organization/plugin_marketplaces/validate_archive.md +++ b/content/en/api/beta/organization/plugin_marketplaces/validate_archive.md @@ -15,9 +15,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/beta/organization/plugin_marketplaces/validate_repository.md b/content/en/api/beta/organization/plugin_marketplaces/validate_repository.md index 7dd83d69a6..5d71986da5 100644 --- a/content/en/api/beta/organization/plugin_marketplaces/validate_repository.md +++ b/content/en/api/beta/organization/plugin_marketplaces/validate_repository.md @@ -15,9 +15,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/beta/organization/plugins.md b/content/en/api/beta/organization/plugins.md index eb9ad89834..5c15b4844b 100644 --- a/content/en/api/beta/organization/plugins.md +++ b/content/en/api/beta/organization/plugins.md @@ -217,7 +217,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -233,7 +233,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -606,7 +606,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -622,7 +622,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -824,10 +824,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -1013,7 +1016,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -1029,7 +1032,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -1458,7 +1461,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -1474,7 +1477,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -1908,7 +1911,7 @@ curl https://api.anthropic.com/v1/organizations/plugins/$PLUGIN_ID \ - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -1924,7 +1927,7 @@ curl https://api.anthropic.com/v1/organizations/plugins/$PLUGIN_ID \ - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -2110,7 +2113,7 @@ curl https://api.anthropic.com/v1/organizations/plugins/$PLUGIN_ID \ - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -2126,7 +2129,7 @@ curl https://api.anthropic.com/v1/organizations/plugins/$PLUGIN_ID \ - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -2423,7 +2426,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -2439,7 +2442,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -2758,7 +2761,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -2774,7 +2777,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -3087,7 +3090,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -3103,7 +3106,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` diff --git a/content/en/api/beta/organization/plugins/create.md b/content/en/api/beta/organization/plugins/create.md index 49f1192343..d1790562f1 100644 --- a/content/en/api/beta/organization/plugins/create.md +++ b/content/en/api/beta/organization/plugins/create.md @@ -215,7 +215,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -231,7 +231,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` diff --git a/content/en/api/beta/organization/plugins/list.md b/content/en/api/beta/organization/plugins/list.md index 611fb76db5..33e31a304e 100644 --- a/content/en/api/beta/organization/plugins/list.md +++ b/content/en/api/beta/organization/plugins/list.md @@ -239,7 +239,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -255,7 +255,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` diff --git a/content/en/api/beta/organization/plugins/retrieve.md b/content/en/api/beta/organization/plugins/retrieve.md index 2db4c587bd..7d3c5e6151 100644 --- a/content/en/api/beta/organization/plugins/retrieve.md +++ b/content/en/api/beta/organization/plugins/retrieve.md @@ -185,7 +185,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -201,7 +201,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` diff --git a/content/en/api/beta/organization/plugins/update.md b/content/en/api/beta/organization/plugins/update.md index 59d0edfa92..b5ee244a58 100644 --- a/content/en/api/beta/organization/plugins/update.md +++ b/content/en/api/beta/organization/plugins/update.md @@ -16,10 +16,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -205,7 +208,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -221,7 +224,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` diff --git a/content/en/api/beta/organization/plugins/versions.md b/content/en/api/beta/organization/plugins/versions.md index b55b1cc6c6..2e85e3ff7c 100644 --- a/content/en/api/beta/organization/plugins/versions.md +++ b/content/en/api/beta/organization/plugins/versions.md @@ -212,7 +212,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -228,7 +228,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -547,7 +547,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -563,7 +563,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -876,7 +876,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -892,7 +892,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -1223,7 +1223,7 @@ curl https://api.anthropic.com/v1/organizations/plugins/$PLUGIN_ID/versions/$VER - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -1239,7 +1239,7 @@ curl https://api.anthropic.com/v1/organizations/plugins/$PLUGIN_ID/versions/$VER - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` diff --git a/content/en/api/beta/organization/plugins/versions/create.md b/content/en/api/beta/organization/plugins/versions/create.md index 0ac802e498..33e3aadd18 100644 --- a/content/en/api/beta/organization/plugins/versions/create.md +++ b/content/en/api/beta/organization/plugins/versions/create.md @@ -210,7 +210,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -226,7 +226,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` diff --git a/content/en/api/beta/organization/plugins/versions/list.md b/content/en/api/beta/organization/plugins/versions/list.md index 44fdd685cd..32c594b9be 100644 --- a/content/en/api/beta/organization/plugins/versions/list.md +++ b/content/en/api/beta/organization/plugins/versions/list.md @@ -202,7 +202,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -218,7 +218,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` diff --git a/content/en/api/beta/organization/plugins/versions/retrieve.md b/content/en/api/beta/organization/plugins/versions/retrieve.md index 363c5c0985..8bc7ccac62 100644 --- a/content/en/api/beta/organization/plugins/versions/retrieve.md +++ b/content/en/api/beta/organization/plugins/versions/retrieve.md @@ -189,7 +189,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn" or null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -205,7 +205,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` diff --git a/content/en/api/beta/organization/rate_limits.md b/content/en/api/beta/organization/rate_limits.md index 3cdbb96c7a..f7f27c1a87 100644 --- a/content/en/api/beta/organization/rate_limits.md +++ b/content/en/api/beta/organization/rate_limits.md @@ -171,7 +171,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. - `next_page: string or null` @@ -323,7 +323,7 @@ curl https://api.anthropic.com/v1/organizations/rate_limits \ - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. ### Beta Organization Rate Limit Batch Group diff --git a/content/en/api/beta/organization/rate_limits/list.md b/content/en/api/beta/organization/rate_limits/list.md index 54c2e866e0..10707cc305 100644 --- a/content/en/api/beta/organization/rate_limits/list.md +++ b/content/en/api/beta/organization/rate_limits/list.md @@ -169,7 +169,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. - `next_page: string or null` diff --git a/content/en/api/beta/organization/spend_limits/list.md b/content/en/api/beta/organization/spend_limits/list.md index 458a0dca5b..b347bb28e0 100644 --- a/content/en/api/beta/organization/spend_limits/list.md +++ b/content/en/api/beta/organization/spend_limits/list.md @@ -9,10 +9,12 @@ url: https://platform.claude.com/docs/en/api/beta/organization/spend_limits/list List the organization's spend limits. -Limits are grouped by scope type, in the order `organization`, `seat_tier`, -`rbac_group`, `organization_service`, `user`; within a type they come in a -fixed order that is not creation order. Supported for Claude Enterprise -organizations only, not for Claude Console organizations. +A Claude Console organization's limits, including any read-only `usage_tier` +limit, come newest first. Listing them is in an early access preview. To +request access, contact your Anthropic account team. A Claude Enterprise +organization's limits are grouped by scope type, in the order `organization`, +`seat_tier`, `rbac_group`, `organization_service`, `user`; within a type they +come in a fixed order that is not creation order. ## Query parameters @@ -26,9 +28,9 @@ organizations only, not for Claude Console organizations. Opaque cursor from a previous response's `next_page` field. -- `scope_type: optional array of "organization" or "organization_service" or "rbac_group" or 3 more` +- `scope_type: optional array of "organization" or "organization_service" or "rbac_group" or 4 more` - Return only limits with these scope types. Omit for all. + Return only limits with these scope types. Omit for all. A scope type that doesn't apply to the organization gets a 400 error. maxItems: 100 @@ -40,10 +42,16 @@ organizations only, not for Claude Console organizations. - `"seat_tier"` + - `"usage_tier"` + - `"user"` - `"workspace"` +- `workspace_id: optional string` + + Return only the limits whose `scope.workspace_id` is this workspace (`wrkspc_...`). Claude Console organizations only; other organizations get a 400 error. + ## Headers - `"anthropic-version": optional string` @@ -292,9 +300,9 @@ organizations only, not for Claude Console organizations. ```bash curl https://api.anthropic.com/v1/organizations/spend_limits \ - -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-version: 2026-10-21' \ -H 'anthropic-beta: spend-limit-reads-2026-09-26' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" + -H "Authorization: Bearer $ANTHROPIC_API_KEY" ``` ### Response (200) diff --git a/content/en/api/beta/organization/workspaces.md b/content/en/api/beta/organization/workspaces.md index 9933a13aab..892734dd1b 100644 --- a/content/en/api/beta/organization/workspaces.md +++ b/content/en/api/beta/organization/workspaces.md @@ -1468,7 +1468,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -1721,7 +1721,7 @@ Changes take effect within about an hour. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` diff --git a/content/en/api/beta/organization/workspaces/rate_limits.md b/content/en/api/beta/organization/workspaces/rate_limits.md index 165760b27b..e4c57951a5 100644 --- a/content/en/api/beta/organization/workspaces/rate_limits.md +++ b/content/en/api/beta/organization/workspaces/rate_limits.md @@ -201,7 +201,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -454,7 +454,7 @@ Changes take effect within about an hour. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -639,7 +639,7 @@ curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/rate_li - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` diff --git a/content/en/api/beta/organization/workspaces/rate_limits/list.md b/content/en/api/beta/organization/workspaces/rate_limits/list.md index 7303336274..e5a4e38342 100644 --- a/content/en/api/beta/organization/workspaces/rate_limits/list.md +++ b/content/en/api/beta/organization/workspaces/rate_limits/list.md @@ -199,7 +199,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` diff --git a/content/en/api/beta/organization/workspaces/rate_limits/update.md b/content/en/api/beta/organization/workspaces/rate_limits/update.md index 86ab8d6782..a99259fd08 100644 --- a/content/en/api/beta/organization/workspaces/rate_limits/update.md +++ b/content/en/api/beta/organization/workspaces/rate_limits/update.md @@ -201,7 +201,7 @@ Changes take effect within about an hour. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` diff --git a/content/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions.md b/content/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions.md new file mode 100644 index 0000000000..b23832d6c6 --- /dev/null +++ b/content/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions.md @@ -0,0 +1,244 @@ +--- +title: IAM permissions for Claude Models on Google Cloud (Anthropic managed) +url: https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions +description: Look up Google Cloud IAM permissions, predefined roles, and audit log types for Claude Models on Google Cloud (Anthropic managed). +--- + +Claude Models on Google Cloud (Anthropic managed) uses Google Cloud IAM for access control. Every API route needs one permission from the `claude.googleapis.com` service. If the caller doesn't hold that permission, Google Cloud returns an HTTP 403 error. Three predefined roles bundle the permissions. For setup and authentication, see [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). + +## Service details + +The following table describes the Google Cloud service for Claude Models on Google Cloud (Anthropic managed). + +| Attribute | Value | +| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Service** | `claude.googleapis.com` | +| **Where permissions are checked** | A workspace or the Anthropic organization | +| **Audit log types** | Data Access, Admin Activity
To turn on Data Access logs, see [Monitoring and logging](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#monitoring-and-logging). | + +Grant roles on the Google Cloud project. For how projects, organizations, and workspaces relate, see [Workspaces](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#workspaces). + +Permissions on this page are in the short form `resource.verb`, such as `messages.create`. + +## Predefined roles + +The following table lists the predefined roles for Claude Models on Google Cloud (Anthropic managed). + +| Role | Display name | Permissions | +| --------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `roles/claude.viewer` | Claude Viewer | Every `get` and `list` permission on workspace resources. | +| `roles/claude.user` | Claude User | Everything in `roles/claude.viewer`, plus every other permission on workspace resources.
For example, `messages.create`, `messages.countTokens`, and `environments.processWork`. | +| `roles/claude.admin` | Claude Admin | Everything in `roles/claude.user`, plus the permissions checked on your Anthropic organization.
For example, `externalKeys.*` and `usageAnalytics.list`. | + +In the following tables, **Admin**, **User**, and **Viewer** stand for these three roles. + +## Permissions + +The following tables list 68 permissions across 111 routes. + +The `get` and `list` permissions are the read-only ones. + +Unless a section says otherwise, each route's audit log type is Data Access. + +`roles/claude.viewer` can't send messages or count tokens. Sending a message needs `messages.create`. Counting tokens needs `messages.countTokens`. + +Some routes in the following tables might not be available to your organization. To check which features are available, see [Feature support](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#feature-support). + +### Messages + +| Permission | Roles | Routes authorized | +| ---------------------- | ----------- | -------------------------------- | +| `messages.create` | Admin, User | `POST /v1/messages` | +| `messages.countTokens` | Admin, User | `POST /v1/messages/count_tokens` | + +### Message batches + +| Permission | Roles | Routes authorized | +| ----------------------- | ------------------- | -------------------------------------------------------------------------------------------------------- | +| `messageBatches.create` | Admin, User | `POST /v1/messages/batches` | +| `messageBatches.get` | Admin, User, Viewer | `GET /v1/messages/batches/{message_batch_id}`
`GET /v1/messages/batches/{message_batch_id}/results` | +| `messageBatches.list` | Admin, User, Viewer | `GET /v1/messages/batches` | +| `messageBatches.delete` | Admin, User | `DELETE /v1/messages/batches/{message_batch_id}` | +| `messageBatches.cancel` | Admin, User | `POST /v1/messages/batches/{message_batch_id}/cancel` | + +`roles/claude.viewer` can read batch results. `messageBatches.get` authorizes both reading a batch's metadata and downloading its results. + +### Models + +| Permission | Roles | Routes authorized | +| ------------- | ------------------- | --------------------------- | +| `models.get` | Admin, User, Viewer | `GET /v1/models/{model_id}` | +| `models.list` | Admin, User, Viewer | `GET /v1/models` | + +### Files + +| Permission | Roles | Routes authorized | +| -------------- | ------------------- | ---------------------------------------------------------------- | +| `files.create` | Admin, User | `POST /v1/files` | +| `files.get` | Admin, User, Viewer | `GET /v1/files/{file_id}`
`GET /v1/files/{file_id}/content` | +| `files.list` | Admin, User, Viewer | `GET /v1/files` | +| `files.delete` | Admin, User | `DELETE /v1/files/{file_id}` | + +`roles/claude.viewer` can download files. `files.get` authorizes both reading a file's metadata and downloading its content. + +### Skills + +| Permission | Roles | Routes authorized | +| --------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `skills.create` | Admin, User | `POST /v1/skills` | +| `skills.get` | Admin, User, Viewer | `GET /v1/skills/{skill_id}`
`GET /v1/skills/{skill_id}/versions`
`GET /v1/skills/{skill_id}/versions/{version}`
`GET /v1/skills/{skill_id}/versions/{version}/content` | +| `skills.list` | Admin, User, Viewer | `GET /v1/skills` | +| `skills.update` | Admin, User | `POST /v1/skills/{skill_id}/versions`
`DELETE /v1/skills/{skill_id}/versions/{version}` | +| `skills.delete` | Admin, User | `DELETE /v1/skills/{skill_id}` | + +Creating or deleting a skill version needs `skills.update`, not `skills.create` or `skills.delete`. + +### Agents + +| Permission | Roles | Routes authorized | +| ---------------- | ------------------- | --------------------------------------------------------------------- | +| `agents.create` | Admin, User | `POST /v1/agents` | +| `agents.get` | Admin, User, Viewer | `GET /v1/agents/{agent_id}`
`GET /v1/agents/{agent_id}/versions` | +| `agents.list` | Admin, User, Viewer | `GET /v1/agents` | +| `agents.update` | Admin, User | `POST /v1/agents/{agent_id}` | +| `agents.archive` | Admin, User | `POST /v1/agents/{agent_id}/archive` | + +You can archive an agent but not delete it. + +### Sessions + +| Permission | Roles | Routes authorized | +| ------------------ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sessions.create` | Admin, User | `POST /v1/sessions` | +| `sessions.get` | Admin, User, Viewer | `GET /v1/sessions/{session_id}`
`GET /v1/sessions/{session_id}/events`
`GET /v1/sessions/{session_id}/events/stream`
`GET /v1/sessions/{session_id}/resources`
`GET /v1/sessions/{session_id}/resources/{resource_id}`
`GET /v1/sessions/{session_id}/threads`
`GET /v1/sessions/{session_id}/threads/{thread_id}`
`GET /v1/sessions/{session_id}/threads/{thread_id}/events`
`GET /v1/sessions/{session_id}/threads/{thread_id}/stream` | +| `sessions.list` | Admin, User, Viewer | `GET /v1/sessions` | +| `sessions.update` | Admin, User | `POST /v1/sessions/{session_id}`
`POST /v1/sessions/{session_id}/events`
`POST /v1/sessions/{session_id}/resources`
`POST /v1/sessions/{session_id}/resources/{resource_id}`
`DELETE /v1/sessions/{session_id}/resources/{resource_id}` | +| `sessions.archive` | Admin, User | `POST /v1/sessions/{session_id}/archive`
`POST /v1/sessions/{session_id}/threads/{thread_id}/archive` | +| `sessions.delete` | Admin, User | `DELETE /v1/sessions/{session_id}` | + +`sessions.get` authorizes reading the session, its event history and event stream, its resources, and its threads. As a result, `roles/claude.viewer` can read every session's full event history. + +Other session operations need the following permissions: + +* Sending events: `sessions.update` +* Adding, changing, or removing session resources: `sessions.update` +* Archiving a thread: `sessions.archive` + +### Environments + +| Permission | Roles | Routes authorized | +| -------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `environments.create` | Admin, User | `POST /v1/environments` | +| `environments.get` | Admin, User, Viewer | `GET /v1/environments/{environment_id}`
`GET /v1/environments/{environment_id}/work`
`GET /v1/environments/{environment_id}/work/stats`
`GET /v1/environments/{environment_id}/work/{work_id}` | +| `environments.list` | Admin, User, Viewer | `GET /v1/environments` | +| `environments.update` | Admin, User | `POST /v1/environments/{environment_id}` | +| `environments.archive` | Admin, User | `POST /v1/environments/{environment_id}/archive` | +| `environments.delete` | Admin, User | `DELETE /v1/environments/{environment_id}` | +| `environments.processWork` | Admin, User | `GET /v1/environments/{environment_id}/work/poll`
`POST /v1/environments/{environment_id}/work/{work_id}`
`POST /v1/environments/{environment_id}/work/{work_id}/ack`
`POST /v1/environments/{environment_id}/work/{work_id}/heartbeat`
`POST /v1/environments/{environment_id}/work/{work_id}/stop` | + +`roles/claude.user` and `roles/claude.admin` include every permission that a [self-hosted sandbox](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes) worker needs. `environments.processWork` authorizes these worker actions: + +* Polling for work +* Acknowledging work items +* Sending heartbeats for work items +* Stopping work items +* Updating work items + +This permission is separate from `environments.update`. Reading the work queue and its statistics needs only `environments.get`. + +Besides `environments.processWork`, a worker needs other permissions to run a session, such as `sessions.get` to read the session and its events, `sessions.update` to send tool results, and `skills.get` to download the agent's skills. + +### Vaults + +Google Cloud records these routes in Admin Activity audit logs, except the route for `vaults.verify`, whose audit log type is Data Access. + +| Permission | Roles | Routes authorized | +| ---------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `vaults.create` | Admin, User | `POST /v1/vaults` | +| `vaults.get` | Admin, User, Viewer | `GET /v1/vaults/{vault_id}`
`GET /v1/vaults/{vault_id}/credentials`
`GET /v1/vaults/{vault_id}/credentials/{credential_id}` | +| `vaults.list` | Admin, User, Viewer | `GET /v1/vaults` | +| `vaults.update` | Admin, User | `POST /v1/vaults/{vault_id}`
`POST /v1/vaults/{vault_id}/credentials`
`POST /v1/vaults/{vault_id}/credentials/{credential_id}`
`DELETE /v1/vaults/{vault_id}/credentials/{credential_id}` | +| `vaults.archive` | Admin, User | `POST /v1/vaults/{vault_id}/archive`
`POST /v1/vaults/{vault_id}/credentials/{credential_id}/archive` | +| `vaults.delete` | Admin, User | `DELETE /v1/vaults/{vault_id}` | +| `vaults.verify` | Admin, User | `POST /v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate` | + +Credential operations need the following permissions: + +* Creating, changing, or deleting a credential: `vaults.update` +* Archiving a credential: `vaults.archive` +* Reading a credential: `vaults.get` +* Checking a stored MCP OAuth credential: `vaults.verify` + +With `vaults.get`, `roles/claude.viewer` can list a vault's credentials. Claude Models on Google Cloud (Anthropic managed) never returns a credential's secret fields. To learn more, see [Authenticate with vaults](https://platform.claude.com/docs/en/managed-agents/vaults). + +### Memory stores + +| Permission | Roles | Routes authorized | +| ---------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `memoryStores.create` | Admin, User | `POST /v1/memory_stores` | +| `memoryStores.get` | Admin, User, Viewer | `GET /v1/memory_stores/{memory_store_id}`
`GET /v1/memory_stores/{memory_store_id}/memories`
`GET /v1/memory_stores/{memory_store_id}/memories/{memory_id}`
`GET /v1/memory_stores/{memory_store_id}/memory_versions`
`GET /v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}` | +| `memoryStores.list` | Admin, User, Viewer | `GET /v1/memory_stores` | +| `memoryStores.update` | Admin, User | `POST /v1/memory_stores/{memory_store_id}`
`POST /v1/memory_stores/{memory_store_id}/memories`
`POST /v1/memory_stores/{memory_store_id}/memories/{memory_id}`
`DELETE /v1/memory_stores/{memory_store_id}/memories/{memory_id}`
`POST /v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact` | +| `memoryStores.archive` | Admin, User | `POST /v1/memory_stores/{memory_store_id}/archive` | +| `memoryStores.delete` | Admin, User | `DELETE /v1/memory_stores/{memory_store_id}` | + +Memory store operations need the following permissions: + +* Reading the store, its memories, or its version history: `memoryStores.get` +* Creating, changing, or deleting a memory: `memoryStores.update` +* Redacting a memory version: `memoryStores.update` + +### Deployments + +| Permission | Roles | Routes authorized | +| --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `deployments.create` | Admin, User | `POST /v1/deployments` | +| `deployments.get` | Admin, User, Viewer | `GET /v1/deployment_runs`
`GET /v1/deployment_runs/{deployment_run_id}`
`GET /v1/deployments/{deployment_id}` | +| `deployments.list` | Admin, User, Viewer | `GET /v1/deployments` | +| `deployments.update` | Admin, User | `POST /v1/deployments/{deployment_id}` | +| `deployments.archive` | Admin, User | `POST /v1/deployments/{deployment_id}/archive` | +| `deployments.run` | Admin, User | `POST /v1/deployments/{deployment_id}/run` | +| `deployments.pause` | Admin, User | `POST /v1/deployments/{deployment_id}/pause` | +| `deployments.unpause` | Admin, User | `POST /v1/deployments/{deployment_id}/unpause` | + +Reading deployment runs needs `deployments.get`. + +### Dreams + +| Permission | Roles | Routes authorized | +| ---------------- | ------------------- | ------------------------------------ | +| `dreams.create` | Admin, User | `POST /v1/dreams` | +| `dreams.get` | Admin, User, Viewer | `GET /v1/dreams/{dream_id}` | +| `dreams.list` | Admin, User, Viewer | `GET /v1/dreams` | +| `dreams.archive` | Admin, User | `POST /v1/dreams/{dream_id}/archive` | +| `dreams.cancel` | Admin, User | `POST /v1/dreams/{dream_id}/cancel` | + +Dreams is a research preview feature. To request access, see [Dreams](https://platform.claude.com/docs/en/managed-agents/dreams). + +### Encryption keys + +Google Cloud records these routes in Admin Activity audit logs. + +| Permission | Roles | Routes authorized | +| --------------------- | ----- | ---------------------------------------------------------- | +| `externalKeys.create` | Admin | `POST /v1/organizations/external_keys` | +| `externalKeys.get` | Admin | `GET /v1/organizations/external_keys/{external_key_id}` | +| `externalKeys.list` | Admin | `GET /v1/organizations/external_keys` | +| `externalKeys.update` | Admin | `POST /v1/organizations/external_keys/{external_key_id}` | +| `externalKeys.delete` | Admin | `DELETE /v1/organizations/external_keys/{external_key_id}` | + +These permissions manage your organization's encryption key registrations. Of the three predefined roles, only `roles/claude.admin` includes them. + +### Usage reports + +| Permission | Roles | Routes authorized | +| --------------------- | ----- | --------------------------------------------- | +| `usageAnalytics.list` | Admin | `GET /v1/organizations/usage_report/messages` | + +Of the three predefined roles, only `roles/claude.admin` includes `usageAnalytics.list`. + +## See also + +* [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) +* [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) +* [Monitoring and logging](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#monitoring-and-logging) diff --git a/content/en/api/cli/beta.md b/content/en/api/cli/beta.md index 4731cd18bb..5a107f3e24 100644 --- a/content/en/api/cli/beta.md +++ b/content/en/api/cli/beta.md @@ -65222,7 +65222,7 @@ the remaining entries. - `models: array of string` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -65420,7 +65420,7 @@ Changes take effect within about an hour. - `models: array of string` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -66423,7 +66423,7 @@ the remaining entries. - `models: array of string` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. - `next_page: string` @@ -72971,7 +72971,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn"` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -72987,7 +72987,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -73238,7 +73238,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn"` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -73254,7 +73254,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -73448,10 +73448,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -73525,7 +73528,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn"` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -73541,7 +73544,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -73847,7 +73850,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn"` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -73863,7 +73866,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -74210,7 +74213,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn"` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -74226,7 +74229,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -74430,7 +74433,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn"` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -74446,7 +74449,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -74643,7 +74646,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" or "pass" or "unknown" or "warn"` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -74659,7 +74662,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" or "errored" or "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -75849,9 +75852,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -76004,9 +76007,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/compliance.md b/content/en/api/compliance.md index 11fc328a24..eb0fe5c09a 100644 --- a/content/en/api/compliance.md +++ b/content/en/api/compliance.md @@ -81963,6 +81963,10 @@ compliance activities that can be filtered by various criteria. format: date-time + - `incoming_organization_id: optional string or null` + + The organization proposed to join the parent organization, e.g. "org_01HX...". Not set on events recorded before this field existed. + - `organization_id: optional string or null` Organization ID this activity is associated with @@ -85641,6 +85645,10 @@ compliance activities that can be filtered by various criteria. format: date-time + - `incoming_organization_id: optional string or null` + + The organization proposed to join the parent organization, e.g. "org_01HX...". Not set on events recorded before this field existed. + - `organization_id: optional string or null` Organization ID this activity is associated with diff --git a/content/en/api/compliance/activities.md b/content/en/api/compliance/activities.md index 070cd9b17a..3096b80bf9 100644 --- a/content/en/api/compliance/activities.md +++ b/content/en/api/compliance/activities.md @@ -81961,6 +81961,10 @@ compliance activities that can be filtered by various criteria. format: date-time + - `incoming_organization_id: optional string or null` + + The organization proposed to join the parent organization, e.g. "org_01HX...". Not set on events recorded before this field existed. + - `organization_id: optional string or null` Organization ID this activity is associated with @@ -85639,6 +85643,10 @@ compliance activities that can be filtered by various criteria. format: date-time + - `incoming_organization_id: optional string or null` + + The organization proposed to join the parent organization, e.g. "org_01HX...". Not set on events recorded before this field existed. + - `organization_id: optional string or null` Organization ID this activity is associated with @@ -221882,6 +221890,10 @@ curl https://api.anthropic.com/v1/compliance/activities \ format: date-time + - `incoming_organization_id: optional string or null` + + The organization proposed to join the parent organization, e.g. "org_01HX...". Not set on events recorded before this field existed. + - `organization_id: optional string or null` Organization ID this activity is associated with @@ -225560,6 +225572,10 @@ curl https://api.anthropic.com/v1/compliance/activities \ format: date-time + - `incoming_organization_id: optional string or null` + + The organization proposed to join the parent organization, e.g. "org_01HX...". Not set on events recorded before this field existed. + - `organization_id: optional string or null` Organization ID this activity is associated with diff --git a/content/en/api/compliance/activities/list.md b/content/en/api/compliance/activities/list.md index 2730c70e27..d2c071da53 100644 --- a/content/en/api/compliance/activities/list.md +++ b/content/en/api/compliance/activities/list.md @@ -81959,6 +81959,10 @@ compliance activities that can be filtered by various criteria. format: date-time + - `incoming_organization_id: optional string or null` + + The organization proposed to join the parent organization, e.g. "org_01HX...". Not set on events recorded before this field existed. + - `organization_id: optional string or null` Organization ID this activity is associated with @@ -85637,6 +85641,10 @@ compliance activities that can be filtered by various criteria. format: date-time + - `incoming_organization_id: optional string or null` + + The organization proposed to join the parent organization, e.g. "org_01HX...". Not set on events recorded before this field existed. + - `organization_id: optional string or null` Organization ID this activity is associated with diff --git a/content/en/api/csharp/beta.md b/content/en/api/csharp/beta.md index 656fc2c1c2..6176af94aa 100644 --- a/content/en/api/csharp/beta.md +++ b/content/en/api/csharp/beta.md @@ -93944,7 +93944,7 @@ the remaining entries. - `required IReadOnlyList? Models` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `required string RateLimitID` @@ -94176,7 +94176,7 @@ Changes take effect within about an hour. - `required IReadOnlyList? Models` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `required string RateLimitID` @@ -95817,7 +95817,7 @@ the remaining entries. - `required IReadOnlyList? Models` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. #### Example @@ -103096,7 +103096,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Assessment? Assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `Fail("fail")` @@ -103112,7 +103112,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Status Status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `Completed("completed")` @@ -103482,7 +103482,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Assessment? Assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `Fail("fail")` @@ -103498,7 +103498,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Status Status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `Completed("completed")` @@ -103698,10 +103698,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -103881,7 +103884,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Assessment? Assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `Fail("fail")` @@ -103897,7 +103900,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Status Status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `Completed("completed")` @@ -104320,7 +104323,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Assessment? Assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `Fail("fail")` @@ -104336,7 +104339,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Status Status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `Completed("completed")` @@ -104906,7 +104909,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Assessment? Assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `Fail("fail")` @@ -104922,7 +104925,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Status Status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `Completed("completed")` @@ -105243,7 +105246,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Assessment? Assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `Fail("fail")` @@ -105259,7 +105262,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Status Status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `Completed("completed")` @@ -105566,7 +105569,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Assessment? Assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `Fail("fail")` @@ -105582,7 +105585,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `required Status Status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `Completed("completed")` @@ -107725,9 +107728,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -107995,9 +107998,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/errors.md b/content/en/api/errors.md index e34fb4ff25..f8cec9875e 100644 --- a/content/en/api/errors.md +++ b/content/en/api/errors.md @@ -36,7 +36,7 @@ The API follows a predictable HTTP error code format: In rare cases, if your organization has a sharp increase in usage, you might see 429 errors because of acceleration limits on the API. To avoid hitting acceleration limits, increase your traffic gradually and maintain consistent usage patterns. -The official SDK automatically retries transient failures (such as connection errors, rate limits, and 5xx server errors) with exponential backoff, twice by default, honoring the `retry-after` header when present. The SDK client accepts `max_retries` (typescript, java, php: `maxRetries`; csharp: `MaxRetries`; go: `option.WithMaxRetries`) to configure or disable this behavior. +The official SDK automatically retries transient failures (such as connection errors, rate limits, and 5xx server errors) with exponential backoff, twice by default, honoring the `retry-after` header when present. The SDK client accepts `max_retries` (typescript, php: `maxRetries`; java: `.maxRetries()`; csharp: `MaxRetries`; go: `option.WithMaxRetries()`) to configure or disable this behavior. When receiving a [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) response over server-sent events (SSE), an error can occur after the API returns a 200 response. In that case, error handling doesn't follow these standard mechanisms. See [Error events](https://platform.claude.com/docs/en/build-with-claude/streaming#error-events) for the shape of mid-stream errors. @@ -82,7 +82,7 @@ Every API response includes a unique `request-id` header. This header contains a On [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), responses include two request IDs: the AWS request ID (`x-amzn-requestid`, primary, indexed in CloudTrail) and the Anthropic request ID (`request-id`, secondary). Use the AWS request ID for CloudTrail lookups and the Anthropic request ID for Anthropic support tickets. -The Python and TypeScript SDKs expose the request ID as a `_request_id` property on top-level response objects. The C#, Go, Java, and PHP SDKs expose it through their raw-response accessors, and the Ruby SDK through [middleware](https://platform.claude.com/docs/en/cli-sdks-libraries/middleware). In every SDK except Ruby, use `with_raw_response` (typescript: `.withResponse()`; java: `.withRawResponse()`; csharp: `WithRawResponse`; go: `option.WithResponseInto`; php: `->raw`) to read any other [response header](https://platform.claude.com/docs/en/api/overview#response-headers), such as `anthropic-organization-id` and [`anthropic-workspace-id`](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response). In Ruby, use the same middleware. On Claude Platform on AWS, use the raw-response accessor to read the AWS request ID (`x-amzn-requestid`) as well: +The Python and TypeScript SDKs expose the request ID as a `_request_id` property on top-level response objects. The C#, Go, Java, and PHP SDKs expose it through their raw-response accessors, and the Ruby SDK through [middleware](https://platform.claude.com/docs/en/cli-sdks-libraries/middleware). In every SDK except Ruby, use `with_raw_response` (typescript: `.withResponse()`; java: `.withRawResponse()`; csharp: `WithRawResponse`; go: `option.WithResponseInto()`; php: `->raw`) to read any other [response header](https://platform.claude.com/docs/en/api/overview#response-headers), such as `anthropic-organization-id` and [`anthropic-workspace-id`](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response). In Ruby, use the same middleware. On Claude Platform on AWS, use the raw-response accessor to read the AWS request ID (`x-amzn-requestid`) as well: ```bash cURL @@ -383,10 +383,10 @@ If you don't need to process events incrementally, the SDK can consume the strea Message message = accumulator.message(); message.content().stream() - .filter(ContentBlock::isText) - .findFirst() - .flatMap(ContentBlock::text) - .ifPresent(textBlock -> IO.println(textBlock.text())); + .filter(ContentBlock::isText) + .findFirst() + .flatMap(ContentBlock::text) + .ifPresent(textBlock -> IO.println(textBlock.text())); } ``` @@ -530,7 +530,7 @@ tool_choice: type "tool" and "any" are not supported for this model. ### Computer use tool version not supported -On the Claude API and Google Cloud, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 support [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) only as the `computer_toolset_20260801` toolset. On those platforms, sending any of these models a `tools` entry of the earlier `computer_20251124` or `computer_20250124` type, with that tool's beta header, returns a 400 `invalid_request_error`. The message names the rejected type, then lists the tool types the model does accept after `Did you mean one of`. For Claude Opus 5.5, it begins: +On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 support [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) only as the `computer_toolset_20260801` toolset. On those platforms, sending any of these models a `tools` entry of the earlier `computer_20251124` or `computer_20250124` type, with that tool's beta header, returns a 400 `invalid_request_error`. The message names the rejected type, then lists the tool types the model does accept after `Did you mean one of`. For Claude Opus 5.5, it begins: ```text wrap 'claude-opus-5-5' does not support tool types: computer_20251124. diff --git a/content/en/api/go/beta.md b/content/en/api/go/beta.md index eda35b3836..9c2a6c1481 100644 --- a/content/en/api/go/beta.md +++ b/content/en/api/go/beta.md @@ -96503,7 +96503,7 @@ the remaining entries. - `Models []string` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `RateLimitID string` @@ -96767,7 +96767,7 @@ Changes take effect within about an hour. - `Models []string` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `RateLimitID string` @@ -98588,7 +98588,7 @@ the remaining entries. - `Models []string` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. #### Example @@ -106469,7 +106469,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Assessment BetaPluginContentScanAssessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `const BetaPluginContentScanAssessmentFail BetaPluginContentScanAssessment = "fail"` @@ -106485,7 +106485,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status BetaPluginContentScanStatus` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `const BetaPluginContentScanStatusCompleted BetaPluginContentScanStatus = "completed"` @@ -106874,7 +106874,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Assessment BetaPluginContentScanAssessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `const BetaPluginContentScanAssessmentFail BetaPluginContentScanAssessment = "fail"` @@ -106890,7 +106890,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status BetaPluginContentScanStatus` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `const BetaPluginContentScanStatusCompleted BetaPluginContentScanStatus = "completed"` @@ -107114,10 +107114,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -107299,7 +107302,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Assessment BetaPluginContentScanAssessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `const BetaPluginContentScanAssessmentFail BetaPluginContentScanAssessment = "fail"` @@ -107315,7 +107318,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status BetaPluginContentScanStatus` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `const BetaPluginContentScanStatusCompleted BetaPluginContentScanStatus = "completed"` @@ -107762,7 +107765,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Assessment BetaPluginContentScanAssessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `const BetaPluginContentScanAssessmentFail BetaPluginContentScanAssessment = "fail"` @@ -107778,7 +107781,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status BetaPluginContentScanStatus` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `const BetaPluginContentScanStatusCompleted BetaPluginContentScanStatus = "completed"` @@ -108386,7 +108389,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Assessment BetaPluginContentScanAssessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `const BetaPluginContentScanAssessmentFail BetaPluginContentScanAssessment = "fail"` @@ -108402,7 +108405,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status BetaPluginContentScanStatus` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `const BetaPluginContentScanStatusCompleted BetaPluginContentScanStatus = "completed"` @@ -108741,7 +108744,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Assessment BetaPluginContentScanAssessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `const BetaPluginContentScanAssessmentFail BetaPluginContentScanAssessment = "fail"` @@ -108757,7 +108760,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status BetaPluginContentScanStatus` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `const BetaPluginContentScanStatusCompleted BetaPluginContentScanStatus = "completed"` @@ -109084,7 +109087,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Assessment BetaPluginContentScanAssessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `const BetaPluginContentScanAssessmentFail BetaPluginContentScanAssessment = "fail"` @@ -109100,7 +109103,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status BetaPluginContentScanStatus` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `const BetaPluginContentScanStatusCompleted BetaPluginContentScanStatus = "completed"` @@ -111422,9 +111425,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -111705,9 +111708,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/java/beta.md b/content/en/api/java/beta.md index 64426f8cf4..5936bab4dd 100644 --- a/content/en/api/java/beta.md +++ b/content/en/api/java/beta.md @@ -94744,7 +94744,7 @@ the remaining entries. - `Optional> models` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `String rateLimitId` @@ -94982,7 +94982,7 @@ Changes take effect within about an hour. - `Optional> models` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `String rateLimitId` @@ -96705,7 +96705,7 @@ the remaining entries. - `Optional> models` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. #### Example @@ -104228,7 +104228,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Optional assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `FAIL("fail")` @@ -104244,7 +104244,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `COMPLETED("completed")` @@ -104619,7 +104619,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Optional assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `FAIL("fail")` @@ -104635,7 +104635,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `COMPLETED("completed")` @@ -104843,10 +104843,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -105026,7 +105029,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Optional assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `FAIL("fail")` @@ -105042,7 +105045,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `COMPLETED("completed")` @@ -105473,7 +105476,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Optional assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `FAIL("fail")` @@ -105489,7 +105492,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `COMPLETED("completed")` @@ -106073,7 +106076,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Optional assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `FAIL("fail")` @@ -106089,7 +106092,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `COMPLETED("completed")` @@ -106415,7 +106418,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Optional assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `FAIL("fail")` @@ -106431,7 +106434,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `COMPLETED("completed")` @@ -106744,7 +106747,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Optional assessment` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `FAIL("fail")` @@ -106760,7 +106763,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `Status status` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `COMPLETED("completed")` @@ -108966,9 +108969,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -109244,9 +109247,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/migration-2026-10-21.md b/content/en/api/migration-2026-10-21.md index 927ad1912b..34088757aa 100644 --- a/content/en/api/migration-2026-10-21.md +++ b/content/en/api/migration-2026-10-21.md @@ -385,7 +385,7 @@ In earlier versions, `MessageParam` was one type for all roles. Each role now ha function send(UserMessageParam|AssistantMessageParam|SystemMessageParam $message): void {} ``` - * `MessageParam::fromArray()` and `(new MessageParam)->withContent()` throw "Call to undefined method". Call them on the role's class, which sets `role` itself. + * `MessageParam::fromArray()` and `(new MessageParam())->withContent()` throw "Call to undefined method". Call them on the role's class, which sets `role` itself. * `withRole()` takes only the string now: PHP throws a `TypeError` for a `Role` case. To give a message another role, build that role's class. * `clearAt` and `outputConfig` exist only on `BetaSystemMessageParam`, and `BetaMessageParam::with()` drops them for the other two roles. The `BetaMessageParam\ClearAt` enum is now `BetaSystemMessageParam\ClearAt`. * `MessageParam\Content` is now `MessageContentParam`, and `BetaMessageParam\Content` is now `BetaMessageContentParam`. Their PHPStan types take the new name too: `ContentShape` is now `MessageContentParamShape`. @@ -616,7 +616,7 @@ This affects the C#, Go, Java, PHP, and Ruby SDKs and one CLI flag. In earlier v ### Client-side compaction is removed from the tool runner -This affects the TypeScript and Ruby SDKs. Client-side compaction in the tool runner has been removed in favor of server-side compaction, which summarizes the conversation inside the API instead of with an extra request from the client. +This affects the TypeScript and Ruby SDKs. Client-side compaction in the tool runner is removed in favor of server-side compaction, which summarizes the conversation inside the API instead of with an extra request from the client. @@ -674,133 +674,7 @@ The trigger threshold must be at least 50,000 tokens. See [compaction](https://p ### Text Completions is removed -The legacy Text Completions API is removed from the TypeScript, Go, Java, and Ruby SDKs and from the CLI. Newer models and features don't support it. Use the [Messages API](https://platform.claude.com/docs/en/api/messages) instead. - - - - The `ant completions create` command is gone. - - ```bash - # Before - ant completions create \ - --model "$MODEL" \ - --max-tokens-to-sample 1024 \ - --prompt $'\n\nHuman: Hello, Claude\n\nAssistant:' - - # After - ant messages create \ - --model "$MODEL" \ - --max-tokens 1024 \ - --message '{role: user, content: "Hello, Claude"}' - ``` - - The reply text moves from the `completion` field to `content.0.text`, so a script that passed `--transform completion` passes `--transform content.0.text` instead. - - `ant messages create` also takes `--stream`, but its events have another shape: the text arrives in `delta.text` of `content_block_delta` events, so `--transform content.0.text` does not apply to a stream. - - - - `client.completions` is gone, along with the `Completions` resource class and the `Completion`, `CompletionCreateParams`, `CompletionCreateParamsNonStreaming`, and `CompletionCreateParamsStreaming` types. `AnthropicBedrock` no longer has a `completions` property either. The `HUMAN_PROMPT` and `AI_PROMPT` constants, which only Text Completions prompts used, are gone too, both as exports and as static properties of the client. - - ```typescript - // Before - const completion = await client.completions.create({ - model, - max_tokens_to_sample: 1024, - prompt: "\n\nHuman: Hello, Claude\n\nAssistant:" - }); - console.log(completion.completion); - - // After - const message = await client.messages.create({ - model, - max_tokens: 1024, - messages: [{ role: "user", content: "Hello, Claude" }] - }); - console.log(message.content); - ``` - - `client.completions.create({ ..., stream: true })` becomes `client.messages.create({ ..., stream: true })` or `client.messages.stream({ ... })`. - - - - `client.Completions` is gone, along with `CompletionService`, `NewCompletionService`, `CompletionNewParams`, and `Completion`. `aws.Client` no longer has a `Completions` field either. `bedrock.DefaultEndpoints` no longer lists `/v1/complete`. - - ```go - // Before - completion, err := client.Completions.New(ctx, anthropic.CompletionNewParams{ - Model: model, - MaxTokensToSample: 1024, - Prompt: "\n\nHuman: Hello, Claude\n\nAssistant:", - }) - fmt.Println(completion.Completion) - - // After - message, err := client.Messages.New(ctx, anthropic.MessageNewParams{ - Model: model, - MaxTokens: 1024, - Messages: []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, Claude")), - }, - }) - fmt.Println(message.Content[0].Text) - ``` - - `client.Completions.NewStreaming` becomes `client.Messages.NewStreaming`. - - - - `client.completions()` is gone from `AnthropicClient` and `AnthropicClientAsync`, along with `CompletionService`, `CompletionServiceAsync`, and the `com.anthropic.models.completions` package (`CompletionCreateParams` and `Completion`). - - ```java - // Before - CompletionCreateParams params = CompletionCreateParams.builder() - .model(model) - .maxTokensToSample(1024) - .prompt("\n\nHuman: Hello, Claude\n\nAssistant:") - .build(); - - System.out.println(client.completions().create(params).completion()); - - // After - MessageCreateParams params = MessageCreateParams.builder() - .model(model) - .maxTokens(1024) - .addUserMessage("Hello, Claude") - .build(); - - client.messages().create(params).content().stream() - .flatMap(contentBlock -> contentBlock.text().stream()) - .forEach(textBlock -> System.out.println(textBlock.text())); - ``` - - `client.completions().createStreaming` becomes `client.messages().createStreaming`. - - - - `client.completions` is gone, along with `Anthropic::Resources::Completions`, `Anthropic::CompletionCreateParams`, and `Anthropic::Completion`. `Anthropic::BedrockClient` no longer has a `completions` reader either. On `Anthropic::BedrockMantleClient` and `Anthropic::GoogleCloudClient`, where `completions` raised `NotImplementedError`, the method no longer exists. - - ```ruby - # Before - completion = client.completions.create( - model: model, - max_tokens_to_sample: 1024, - prompt: "\n\nHuman: Hello, Claude\n\nAssistant:" - ) - puts(completion.completion) - - # After - message = client.messages.create( - model: model, - max_tokens: 1024, - messages: [{role: "user", content: "Hello, Claude"}] - ) - puts(message.content) - ``` - - `client.completions.create_streaming` becomes `client.messages.stream`. - - +The legacy Text Completions API is removed from the TypeScript, Go, Java, and Ruby SDKs and from the CLI. Newer models and features don't support it. Use the [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) instead. ### `betas` is removed from the non-beta Models methods @@ -881,13 +755,17 @@ The non-beta Models methods no longer take `betas` (csharp, go: `Betas`; java: ` import com.anthropic.models.models.ModelListPage; import com.anthropic.models.models.ModelListParams; - ModelListPage page = client.models().list(ModelListParams.builder().addBeta(beta).build()); + ModelListPage page = client.models().list(ModelListParams.builder() + .addBeta(beta) + .build()); // After import com.anthropic.models.beta.models.ModelListPage; import com.anthropic.models.beta.models.ModelListParams; - ModelListPage page = client.beta().models().list(ModelListParams.builder().addBeta(beta).build()); + ModelListPage page = client.beta().models().list(ModelListParams.builder() + .addBeta(beta) + .build()); ``` @@ -922,7 +800,7 @@ The non-beta Models methods no longer take `betas` (csharp, go: `Betas`; java: ` ### API keys are sent as `Authorization: Bearer` -The SDK and the CLI send your API key as `Authorization: Bearer ` instead of in the `X-Api-Key` header, so change any proxy or gateway that reads or sets `X-Api-Key` to use `Authorization`, or [send the key in `X-Api-Key` yourself](https://platform.claude.com/docs/en/api/migration-2026-10-21#sdk-proxy-x-api-key). The Claude API accepts a key in either header, so a program that talks to the API directly needs no change. +The SDK and the CLI send your API key as `Authorization: Bearer ` instead of in the `X-Api-Key` header, so change any proxy or gateway that reads or sets `X-Api-Key` to use `Authorization`, or [send the key in `X-Api-Key` yourself](https://platform.claude.com/docs/en/api/migration-2026-10-21#sdk-proxy-x-api-key). Also change code in your own program that reads `X-Api-Key`, such as middleware, a log filter, or a test stub. The Claude API accepts a key in either header. ```text wrap # Before @@ -949,8 +827,6 @@ Authorization: Bearer `Authorization` is the header the `authToken` option already uses. This applies to the `apiKey` option, the `ANTHROPIC_API_KEY` environment variable, and `apiKey` and `ANTHROPIC_AWS_API_KEY` in `@anthropic-ai/aws-sdk`. `apiKey` in `@anthropic-ai/foundry-sdk` still goes out as `X-Api-Key`, and `apiKey` in `@anthropic-ai/bedrock-sdk` was already a bearer token. - - Middleware or a custom `fetch` that reads the key from the `x-api-key` request header needs to read `authorization` instead, where the key follows `Bearer `. @@ -967,8 +843,6 @@ Authorization: Bearer `Authorization` is the header `authToken` already uses. This applies to `apiKey` on the `AnthropicOkHttpClient`, `AnthropicOkHttpClientAsync`, and `AnthropicBackend` builders, the `ANTHROPIC_API_KEY` environment variable, and the `anthropic.apiKey` system property. `apiKey` on the `FoundryBackend` builder still goes out as `x-api-key`. `apiKey` on the `AwsBackend`, `BedrockBackend`, and `BedrockMantleBackend` builders was already a bearer token. - - An interceptor now sees the key in `Authorization` instead of `X-Api-Key`. @@ -1185,7 +1059,7 @@ An API key and an authentication token now share a header, so an SDK client hold // Before: sent the API key and ignored `credentials` const client = new Anthropic({ apiKey, credentials }); - // After: the line above throws a TypeError + // After: the previous line throws a TypeError const client = new Anthropic({ credentials }); ``` @@ -1206,7 +1080,7 @@ An API key and an authentication token now share a header, so an SDK client hold // Before: sent both, each in its own header AnthropicClient client = new() { ApiKey = apiKey, AuthToken = token }; - // After: the line above throws an ArgumentException + // After: the previous line throws an ArgumentException AnthropicClient client = new() { AuthToken = token }; ``` @@ -1232,7 +1106,7 @@ An API key and an authentication token now share a header, so an SDK client hold option.WithProfile("work"), ) - // After: every request of the client above fails, so pass the one you want + // After: every request the previous client makes fails, so pass the one you want client := anthropic.NewClient(option.WithAPIKey(apiKey)) ``` @@ -1426,10 +1300,14 @@ These changes each affect one SDK or the CLI. ```java // Before - request.toBuilder().putHeader("anthropic-version", version).build(); + request.toBuilder() + .putHeader("anthropic-version", version) + .build(); // After - request.toBuilder().replaceHeaders("anthropic-version", version).build(); + request.toBuilder() + .replaceHeaders("anthropic-version", version) + .build(); ``` @@ -1454,7 +1332,7 @@ These changes each affect one SDK or the CLI. ### The license is Apache 2.0 -Starting with these versions, the SDK and the CLI are licensed under the Apache License, Version 2.0. Earlier versions remain under the MIT License. No code changes are needed. If you track the licenses of your dependencies, update their entries. +Starting with the versions under [Switch to 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21#upgrade), the SDK and the CLI are licensed under the Apache License, Version 2.0. Earlier versions remain under the MIT License. No code changes are needed. If you track the licenses of your dependencies, update their entries. * **TypeScript:** The platform packages (`@anthropic-ai/bedrock-sdk`, `@anthropic-ai/vertex-sdk`, `@anthropic-ai/foundry-sdk`, `@anthropic-ai/aws-sdk`, and `@anthropic-ai/google-cloud-sdk`) change license in their own 1.0.0 releases. * **C#:** The other packages (`Anthropic.Bedrock`, `Anthropic.Vertex`, `Anthropic.Foundry`, `Anthropic.Aws`, `Anthropic.GoogleCloud`, and `Anthropic.Mcp`) change license in their own 1.0.0 releases. diff --git a/content/en/api/organization.md b/content/en/api/organization.md index fd41a4d9de..8d85afa907 100644 --- a/content/en/api/organization.md +++ b/content/en/api/organization.md @@ -7215,7 +7215,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -7468,7 +7468,7 @@ Changes take effect within about an hour. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -8625,7 +8625,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. - `next_page: string or null` diff --git a/content/en/api/organization/rate_limits.md b/content/en/api/organization/rate_limits.md index 7084c1d76f..75a685a9df 100644 --- a/content/en/api/organization/rate_limits.md +++ b/content/en/api/organization/rate_limits.md @@ -171,7 +171,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. - `next_page: string or null` @@ -323,7 +323,7 @@ curl https://api.anthropic.com/v1/organizations/rate_limits \ - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. ### Organization Rate Limit Batch Group diff --git a/content/en/api/organization/rate_limits/list.md b/content/en/api/organization/rate_limits/list.md index 279d4c3b0e..b9471702dc 100644 --- a/content/en/api/organization/rate_limits/list.md +++ b/content/en/api/organization/rate_limits/list.md @@ -169,7 +169,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. - `next_page: string or null` diff --git a/content/en/api/organization/workspaces.md b/content/en/api/organization/workspaces.md index 232cf6cb05..0d61eb6698 100644 --- a/content/en/api/organization/workspaces.md +++ b/content/en/api/organization/workspaces.md @@ -1358,7 +1358,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -1611,7 +1611,7 @@ Changes take effect within about an hour. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` diff --git a/content/en/api/organization/workspaces/rate_limits.md b/content/en/api/organization/workspaces/rate_limits.md index 854e24f2c8..9a2bb52ae8 100644 --- a/content/en/api/organization/workspaces/rate_limits.md +++ b/content/en/api/organization/workspaces/rate_limits.md @@ -201,7 +201,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -454,7 +454,7 @@ Changes take effect within about an hour. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -639,7 +639,7 @@ curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/rate_li - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` diff --git a/content/en/api/organization/workspaces/rate_limits/list.md b/content/en/api/organization/workspaces/rate_limits/list.md index 62622f5edc..40de29f478 100644 --- a/content/en/api/organization/workspaces/rate_limits/list.md +++ b/content/en/api/organization/workspaces/rate_limits/list.md @@ -199,7 +199,7 @@ the remaining entries. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` diff --git a/content/en/api/organization/workspaces/rate_limits/update.md b/content/en/api/organization/workspaces/rate_limits/update.md index 1e257d1f29..79f13f03c2 100644 --- a/content/en/api/organization/workspaces/rate_limits/update.md +++ b/content/en/api/organization/workspaces/rate_limits/update.md @@ -201,7 +201,7 @@ Changes take effect within about an hour. - `models: array of string or null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` diff --git a/content/en/api/overview.md b/content/en/api/overview.md index 71af519699..0751a21ae9 100644 --- a/content/en/api/overview.md +++ b/content/en/api/overview.md @@ -12,7 +12,7 @@ The Claude API is a RESTful API at `https://api.anthropic.com` that provides pro ## Prerequisites -To use the Claude API, you'll need: +To use the Claude API, you need: * A [Claude Console account](https://platform.claude.com/) * An [API key](https://platform.claude.com/settings/keys) from the Console, or a configured [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) rule @@ -87,18 +87,19 @@ Claude is available through the direct Claude API and through cloud platforms. C Access Claude through AWS, Google Cloud, or Microsoft Azure: * **Integrated** with cloud provider billing and IAM -* **Feature availability varies by platform:** Anthropic-operated platforms include [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry); partner-operated platforms include Amazon Bedrock and Google Cloud. See each platform's page for feature availability and timing. +* **Feature availability varies by platform:** Anthropic-operated platforms include [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry); partner-operated platforms include Amazon Bedrock and Claude Models on Google Cloud (Google managed). See each platform's page for feature availability and timing. * **Best for:** Existing cloud commitments, specific compliance requirements, consolidated cloud billing -| Platform | Provider | Documentation | -| ---------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | -| Agent Platform | Google Cloud | [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | -| Amazon Bedrock | AWS | [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | -| Claude Platform on AWS | AWS (Anthropic-operated) | [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | -| Microsoft Foundry | Microsoft Azure (Anthropic-operated) | [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | +| Platform | Provider | Documentation | +| ------------------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Claude Models on Google Cloud (Google managed) | Google Cloud | [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | +| Amazon Bedrock | AWS | [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | +| Claude Platform on AWS | AWS (Anthropic-operated) | [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Claude Models on Google Cloud (Anthropic managed) | Google Cloud (Anthropic-operated) | [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | +| Microsoft Foundry | Microsoft Azure (Anthropic-operated) | [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | - Claude Managed Agents is available through the direct Claude API and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws). For feature availability across platforms, see the [Features overview](https://platform.claude.com/docs/en/build-with-claude/overview). + Claude Managed Agents is available through the direct Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). For feature availability across platforms, see the [Features overview](https://platform.claude.com/docs/en/build-with-claude/overview). ## Request and response format @@ -115,7 +116,7 @@ Access Claude through AWS, Google Cloud, or Microsoft Azure: If you exceed these limits, you'll receive a 413 `request_too_large` error. - Partner-operated platforms have their own request size limits: Bedrock limits requests to 20 MB, and Google Cloud limits requests to 30 MB. Claude Platform on AWS uses the same limits as the direct Claude API. Consult your platform's documentation for current values. + Partner-operated platforms have their own request size limits: Bedrock limits requests to 20 MB, and Claude Models on Google Cloud (Google managed) limits requests to 30 MB. Claude Platform on AWS uses the same limits as the direct Claude API. Consult your platform's documentation for current values. ### Response headers diff --git a/content/en/api/php/beta.md b/content/en/api/php/beta.md index f7a7722d63..6d61fabba9 100644 --- a/content/en/api/php/beta.md +++ b/content/en/api/php/beta.md @@ -26904,7 +26904,7 @@ the remaining entries. - `?list models` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `string rateLimitID` @@ -27019,7 +27019,7 @@ Changes take effect within about an hour. - `?list models` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `string rateLimitID` @@ -28008,7 +28008,7 @@ the remaining entries. - `?list models` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. #### Example @@ -32769,10 +32769,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -34603,9 +34606,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -34741,9 +34744,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/python/beta.md b/content/en/api/python/beta.md index b007cfbe3d..b4028510a7 100644 --- a/content/en/api/python/beta.md +++ b/content/en/api/python/beta.md @@ -96576,7 +96576,7 @@ the remaining entries. - `models: Optional[List[str]]` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: str` @@ -96827,7 +96827,7 @@ Changes take effect within about an hour. - `models: Optional[List[str]]` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: str` @@ -98539,7 +98539,7 @@ the remaining entries. - `models: Optional[List[str]]` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. #### Example @@ -106081,7 +106081,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: Optional[Literal["fail", "pass", "unknown", "warn"]]` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -106097,7 +106097,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: Literal["completed", "errored", "processing"]` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -106474,7 +106474,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: Optional[Literal["fail", "pass", "unknown", "warn"]]` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -106490,7 +106490,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: Literal["completed", "errored", "processing"]` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -106702,10 +106702,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -106887,7 +106890,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: Optional[Literal["fail", "pass", "unknown", "warn"]]` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -106903,7 +106906,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: Literal["completed", "errored", "processing"]` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -107337,7 +107340,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: Optional[Literal["fail", "pass", "unknown", "warn"]]` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -107353,7 +107356,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: Literal["completed", "errored", "processing"]` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -107940,7 +107943,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: Optional[Literal["fail", "pass", "unknown", "warn"]]` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -107956,7 +107959,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: Literal["completed", "errored", "processing"]` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -108280,7 +108283,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: Optional[Literal["fail", "pass", "unknown", "warn"]]` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -108296,7 +108299,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: Literal["completed", "errored", "processing"]` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -108612,7 +108615,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: Optional[Literal["fail", "pass", "unknown", "warn"]]` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -108628,7 +108631,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: Literal["completed", "errored", "processing"]` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -110848,9 +110851,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -111123,9 +111126,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/rate-limits.md b/content/en/api/rate-limits.md index 8a9099bfba..952416a8f2 100644 --- a/content/en/api/rate-limits.md +++ b/content/en/api/rate-limits.md @@ -136,48 +136,48 @@ Each row in the following tables has its own RPM, ITPM, and OTPM limits. Some ro - | Model | Maximum requests per minute (RPM) | Maximum input tokens per minute (ITPM) | Maximum output tokens per minute (OTPM) | - | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -------------------------------------- | --------------------------------------- | - | Claude Fable 5.x1 | 1,000 | 500,000 | 100,000 | - | Claude Opus 5.5 | 1,000 | 2,000,000 | 400,000 | - | Claude Opus 5 | 1,000 | 2,000,000 | 400,000 | - | Claude Opus 4.x2 | 1,000 | 2,000,000 | 400,000 | - | Claude Sonnet 5.5 | 1,000 | 2,000,000 | 400,000 | - | Claude Sonnet 5 | 1,000 | 2,000,000 | 400,000 | - | Claude Sonnet 4.x3 | 1,000 | 2,000,000 | 400,000 | - | Claude Haiku 5.5 | 1,000 | 2,000,000 | 400,000 | - | Claude Haiku 4.5 | 1,000 | 2,000,000 | 400,000 | - | Claude Haiku 3.5 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 1,000 | 100,0004 | 20,000 | + | Model | Maximum requests per minute (RPM) | Maximum input tokens per minute (ITPM) | Maximum output tokens per minute (OTPM) | + | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -------------------------------------- | --------------------------------------- | + | Claude Fable 5.x1 | 1,000 | 500,000 | 100,000 | + | Claude Opus 5.5 | 1,000 | 2,000,000 | 400,000 | + | Claude Opus 5 | 1,000 | 2,000,000 | 400,000 | + | Claude Opus 4.x2 | 1,000 | 2,000,000 | 400,000 | + | Claude Sonnet 5.5 | 1,000 | 2,000,000 | 400,000 | + | Claude Sonnet 5 | 1,000 | 2,000,000 | 400,000 | + | Claude Sonnet 4.x3 | 1,000 | 2,000,000 | 400,000 | + | Claude Haiku 5.5 | 1,000 | 2,000,000 | 400,000 | + | Claude Haiku 4.5 | 1,000 | 2,000,000 | 400,000 | + | Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 1,000 | 100,0004 | 20,000 | - | Model | Maximum requests per minute (RPM) | Maximum input tokens per minute (ITPM) | Maximum output tokens per minute (OTPM) | - | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -------------------------------------- | --------------------------------------- | - | Claude Fable 5.x1 | 2,000 | 1,500,000 | 300,000 | - | Claude Opus 5.5 | 5,000 | 5,000,000 | 1,000,000 | - | Claude Opus 5 | 5,000 | 5,000,000 | 1,000,000 | - | Claude Opus 4.x2 | 5,000 | 5,000,000 | 1,000,000 | - | Claude Sonnet 5.5 | 5,000 | 5,000,000 | 1,000,000 | - | Claude Sonnet 5 | 5,000 | 5,000,000 | 1,000,000 | - | Claude Sonnet 4.x3 | 5,000 | 5,000,000 | 1,000,000 | - | Claude Haiku 5.5 | 5,000 | 5,000,000 | 1,000,000 | - | Claude Haiku 4.5 | 5,000 | 5,000,000 | 1,000,000 | - | Claude Haiku 3.5 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 2,000 | 200,0004 | 40,000 | + | Model | Maximum requests per minute (RPM) | Maximum input tokens per minute (ITPM) | Maximum output tokens per minute (OTPM) | + | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -------------------------------------- | --------------------------------------- | + | Claude Fable 5.x1 | 2,000 | 1,500,000 | 300,000 | + | Claude Opus 5.5 | 5,000 | 5,000,000 | 1,000,000 | + | Claude Opus 5 | 5,000 | 5,000,000 | 1,000,000 | + | Claude Opus 4.x2 | 5,000 | 5,000,000 | 1,000,000 | + | Claude Sonnet 5.5 | 5,000 | 5,000,000 | 1,000,000 | + | Claude Sonnet 5 | 5,000 | 5,000,000 | 1,000,000 | + | Claude Sonnet 4.x3 | 5,000 | 5,000,000 | 1,000,000 | + | Claude Haiku 5.5 | 5,000 | 5,000,000 | 1,000,000 | + | Claude Haiku 4.5 | 5,000 | 5,000,000 | 1,000,000 | + | Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 2,000 | 200,0004 | 40,000 | - | Model | Maximum requests per minute (RPM) | Maximum input tokens per minute (ITPM) | Maximum output tokens per minute (OTPM) | - | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -------------------------------------- | --------------------------------------- | - | Claude Fable 5.x1 | 4,000 | 4,000,000 | 800,000 | - | Claude Opus 5.5 | 10,000 | 10,000,000 | 2,000,000 | - | Claude Opus 5 | 10,000 | 10,000,000 | 2,000,000 | - | Claude Opus 4.x2 | 10,000 | 10,000,000 | 2,000,000 | - | Claude Sonnet 5.5 | 10,000 | 10,000,000 | 2,000,000 | - | Claude Sonnet 5 | 10,000 | 10,000,000 | 2,000,000 | - | Claude Sonnet 4.x3 | 10,000 | 10,000,000 | 2,000,000 | - | Claude Haiku 5.5 | 10,000 | 10,000,000 | 2,000,000 | - | Claude Haiku 4.5 | 10,000 | 10,000,000 | 2,000,000 | - | Claude Haiku 3.5 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 4,000 | 400,0004 | 80,000 | + | Model | Maximum requests per minute (RPM) | Maximum input tokens per minute (ITPM) | Maximum output tokens per minute (OTPM) | + | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -------------------------------------- | --------------------------------------- | + | Claude Fable 5.x1 | 4,000 | 4,000,000 | 800,000 | + | Claude Opus 5.5 | 10,000 | 10,000,000 | 2,000,000 | + | Claude Opus 5 | 10,000 | 10,000,000 | 2,000,000 | + | Claude Opus 4.x2 | 10,000 | 10,000,000 | 2,000,000 | + | Claude Sonnet 5.5 | 10,000 | 10,000,000 | 2,000,000 | + | Claude Sonnet 5 | 10,000 | 10,000,000 | 2,000,000 | + | Claude Sonnet 4.x3 | 10,000 | 10,000,000 | 2,000,000 | + | Claude Haiku 5.5 | 10,000 | 10,000,000 | 2,000,000 | + | Claude Haiku 4.5 | 10,000 | 10,000,000 | 2,000,000 | + | Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 4,000 | 400,0004 | 80,000 | diff --git a/content/en/api/ruby/beta.md b/content/en/api/ruby/beta.md index 0676d7f8ee..7957e6bc03 100644 --- a/content/en/api/ruby/beta.md +++ b/content/en/api/ruby/beta.md @@ -99271,7 +99271,7 @@ the remaining entries. - `models: Array[String]` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: String` @@ -99498,7 +99498,7 @@ Changes take effect within about an hour. - `models: Array[String]` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: String` @@ -101120,7 +101120,7 @@ the remaining entries. - `models: Array[String]` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. #### Example @@ -108253,7 +108253,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: :fail | :pass | :unknown | :warn` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `:fail` @@ -108269,7 +108269,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: :completed | :errored | :processing` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `:completed` @@ -108631,7 +108631,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: :fail | :pass | :unknown | :warn` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `:fail` @@ -108647,7 +108647,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: :completed | :errored | :processing` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `:completed` @@ -108846,10 +108846,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -109029,7 +109032,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: :fail | :pass | :unknown | :warn` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `:fail` @@ -109045,7 +109048,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: :completed | :errored | :processing` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `:completed` @@ -109466,7 +109469,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: :fail | :pass | :unknown | :warn` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `:fail` @@ -109482,7 +109485,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: :completed | :errored | :processing` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `:completed` @@ -110048,7 +110051,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: :fail | :pass | :unknown | :warn` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `:fail` @@ -110064,7 +110067,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: :completed | :errored | :processing` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `:completed` @@ -110376,7 +110379,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: :fail | :pass | :unknown | :warn` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `:fail` @@ -110392,7 +110395,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: :completed | :errored | :processing` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `:completed` @@ -110696,7 +110699,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: :fail | :pass | :unknown | :warn` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `:fail` @@ -110712,7 +110715,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: :completed | :errored | :processing` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `:completed` @@ -112827,9 +112830,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -113095,9 +113098,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/service-tiers.md b/content/en/api/service-tiers.md index 9b2add588d..2bfb766185 100644 --- a/content/en/api/service-tiers.md +++ b/content/en/api/service-tiers.md @@ -81,7 +81,7 @@ You can control which service tiers can be used for a request by setting the `se messages: - role: user content: Hello, Claude! - service_tier: auto # Automatically use Priority Tier when available, fallback to standard + service_tier: auto # Automatically use Priority Tier when available, fall back to standard YAML ``` @@ -92,7 +92,7 @@ You can control which service tiers can be used for a request by setting the `se model="claude-opus-4-8", max_tokens=1024, messages=[{"role": "user", "content": "Hello, Claude!"}], - service_tier="auto", # Automatically use Priority Tier when available, fallback to standard + service_tier="auto", # Automatically use Priority Tier when available, fall back to standard ) print(message.usage.service_tier) ``` @@ -104,7 +104,7 @@ You can control which service tiers can be used for a request by setting the `se model: "claude-opus-4-8", max_tokens: 1024, messages: [{ role: "user", content: "Hello, Claude!" }], - service_tier: "auto" // Automatically use Priority Tier when available, fallback to standard + service_tier: "auto" // Automatically use Priority Tier when available, fall back to standard }); console.log(message.usage.service_tier); ``` @@ -117,7 +117,7 @@ You can control which service tiers can be used for a request by setting the `se Model = Model.ClaudeOpus4_8, MaxTokens = 1024, Messages = [new UserMessageParam { Content = "Hello, Claude!" }], - ServiceTier = ServiceTier.Auto, // Automatically use Priority Tier when available, fallback to standard + ServiceTier = ServiceTier.Auto, // Automatically use Priority Tier when available, fall back to standard }); Console.WriteLine(message.Usage.ServiceTier); ``` @@ -131,7 +131,7 @@ You can control which service tiers can be used for a request by setting the `se Messages: []anthropic.MessageParam{ anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, Claude!")), }, - // Automatically use Priority Tier when available, fallback to standard + // Automatically use Priority Tier when available, fall back to standard ServiceTier: anthropic.MessageNewParamsServiceTierAuto, }) if err != nil { @@ -147,7 +147,7 @@ You can control which service tiers can be used for a request by setting the `se .model(Model.CLAUDE_OPUS_4_8) .maxTokens(1024L) .addUserMessage("Hello, Claude!") - // Automatically use Priority Tier when available, fallback to standard + // Automatically use Priority Tier when available, fall back to standard .serviceTier(MessageCreateParams.ServiceTier.AUTO) .build(); @@ -159,10 +159,10 @@ You can control which service tiers can be used for a request by setting the `se $client = new Client(); $message = $client->messages->create( - model: 'claude-opus-4-8', + model: Model::CLAUDE_OPUS_4_8, maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude!']], - serviceTier: 'auto', // Automatically use Priority Tier when available, fallback to standard + serviceTier: 'auto', // Automatically use Priority Tier when available, fall back to standard ); echo $message->usage->serviceTier; ``` @@ -174,7 +174,7 @@ You can control which service tiers can be used for a request by setting the `se model: Anthropic::Model::CLAUDE_OPUS_4_8, max_tokens: 1024, messages: [{ role: "user", content: "Hello, Claude!" }], - service_tier: :auto # Automatically use Priority Tier when available, fallback to standard + service_tier: :auto # Automatically use Priority Tier when available, fall back to standard ) puts(message.usage.service_tier) ``` diff --git a/content/en/api/typescript/beta.md b/content/en/api/typescript/beta.md index 42e10cf25e..86c1ccae8b 100644 --- a/content/en/api/typescript/beta.md +++ b/content/en/api/typescript/beta.md @@ -96588,7 +96588,7 @@ the remaining entries. - `models: Array | null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -96840,7 +96840,7 @@ Changes take effect within about an hour. - `models: Array | null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models this workspace has access to, so it can differ between workspaces. - `rate_limit_id: string` @@ -98548,7 +98548,7 @@ the remaining entries. - `models: Array | null` - Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. + Model names this entry's limits apply to, including aliases. `null` when `group.type` is not `"model_group"`. The list covers the models your organization has access to, so it can differ between organizations. #### Example @@ -106070,7 +106070,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" | "pass" | "unknown" | "warn" | null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -106086,7 +106086,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" | "errored" | "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -106464,7 +106464,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" | "pass" | "unknown" | "warn" | null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -106480,7 +106480,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" | "errored" | "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -106689,10 +106689,13 @@ Pass the version as `served_version_id`: an earlier one to roll back, a later on start serving a version that was stored without being served, or the one already served to pin it without changing what is served. No new version is created. -When the organization has content scanning enabled, a version whose scan is still -running is refused with a 409 (`error_code` `scan_pending`; retry once the scan -finishes) and one whose scan failed, errored or reached no verdict with a 400 -(`scan_failed`; a `warn` is accepted). When the Plugin is in the organization's +When the organization has content scanning enabled, a version whose +`content_scan.status` is `processing` is refused with a 409 (`error_code` +`scan_pending`; retry once the scan finishes). A version whose `content_scan.status` +is `errored`, or whose `content_scan.assessment` is `fail` or `unknown`, is refused +with a 400 (`error_code` `scan_failed`); a `warn` is accepted. If the scan outcome +cannot be read at that moment, the request fails with a retryable 503 instead. +When the Plugin is in the organization's library marketplace, a version other than the one served is also refused with a 409 when one of its skills has a name that an organization skill (one an administrator uploaded for the whole organization in claude.ai) has since taken: `error_code` @@ -106876,7 +106879,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" | "pass" | "unknown" | "warn" | null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -106892,7 +106895,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" | "errored" | "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -107326,7 +107329,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" | "pass" | "unknown" | "warn" | null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -107342,7 +107345,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" | "errored" | "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -107929,7 +107932,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" | "pass" | "unknown" | "warn" | null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -107945,7 +107948,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" | "errored" | "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -108269,7 +108272,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" | "pass" | "unknown" | "warn" | null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -108285,7 +108288,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" | "errored" | "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -108602,7 +108605,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `assessment: "fail" | "pass" | "unknown" | "warn" | null` - The scan's verdict; set only when `status` is `completed`. + The scan's verdict; set only when `status` is `completed`. A `warn` can mean a `fail` that was allowed in claude.ai. - `"fail"` @@ -108618,7 +108621,7 @@ Every request must include the beta header `anthropic-beta: ce-plugins-2026-09-0 - `status: "completed" | "errored" | "processing"` - `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run or its outcome cannot be read. + `processing` while a scan runs, `completed` when it ran to completion, `errored` when it could not run. Once a scan of the version has completed, `content_scan` describes the newest completed scan, even while a later scan runs. While the scan outcome cannot be read, `status` is `errored` instead. - `"completed"` @@ -110840,9 +110843,9 @@ To check a `.zip` of the marketplace directory instead, use Validate Plugin Mark The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. A repository that is missing, private, or has no such branch or commit is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. @@ -111115,9 +111118,9 @@ To check a public GitHub repository instead, use Validate Plugin Marketplace Rep The report says whether `marketplace.json` is well-formed, which plugins a synchronization would skip and why, and which plugins would synchronize only in part, with some files left out. An archive that cannot be read as a marketplace is reported, not refused: the response is a report with `valid: false`. Plugin sources outside the marketplace -are fetched anonymously from GitHub, so a private one is reported as not found; a -source on any other host is not fetched here, and the report notes that it will be -checked when the marketplace actually synchronizes. +are fetched anonymously from GitHub, so a private one is reported as not found or as +needing a GitHub sign-in; a source on any other host is not fetched here, and the +report notes that it will be checked when the marketplace actually synchronizes. Nothing is recorded on the Compliance API activity feed. diff --git a/content/en/api/versioning.md b/content/en/api/versioning.md index 690f9dc761..9d541b3eec 100644 --- a/content/en/api/versioning.md +++ b/content/en/api/versioning.md @@ -26,7 +26,7 @@ Anthropic recommends using the latest API version whenever possible. * [Migrating to API version 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21) shows how to upgrade. - * Available on the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai). On [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), it's available for Claude 4.7 and later models. For other models on Bedrock, see the [migration guide](https://platform.claude.com/docs/en/api/migration-2026-10-21#upgrade). + * Available on the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed). On [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), it's available for Claude 4.7 and later models. For other models on Bedrock, see the [migration guide for API version 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21#upgrade). * Messages API: diff --git a/content/en/build-with-claude/batch-processing.md b/content/en/build-with-claude/batch-processing.md index 6b250fedc9..191e3d3b05 100644 --- a/content/en/build-with-claude/batch-processing.md +++ b/content/en/build-with-claude/batch-processing.md @@ -82,29 +82,29 @@ A small number of Messages API parameters are **not** supported in batch request The Batches API offers significant cost savings. All usage is charged at 50 percent of the standard API prices. -| Model | Batch input | Batch output | -| :----------------------------------------------------------------------------------------------------------------------------------- | :----------- | :------------ | -| Claude Fable 5.1 | $5 / MTok | $25 / MTok | -| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok | -| Claude Fable 5 | $5 / MTok | $25 / MTok | -| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok | -| Claude Opus 5.5 | $2 / MTok | $10 / MTok | -| Claude Opus 5 | $2.50 / MTok | $12.50 / MTok | -| Claude Opus 4.8 | $2.50 / MTok | $12.50 / MTok | -| Claude Opus 4.7 | $2.50 / MTok | $12.50 / MTok | -| Claude Opus 4.6 | $2.50 / MTok | $12.50 / MTok | -| Claude Opus 4.5 | $2.50 / MTok | $12.50 / MTok | -| Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $7.50 / MTok | $37.50 / MTok | -| Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $7.50 / MTok | $37.50 / MTok | -| Claude Sonnet 5.5 | $1 / MTok | $5 / MTok | -| Claude Sonnet 5 | $1 / MTok | $5 / MTok | -| Claude Sonnet 4.6 | $1.50 / MTok | $7.50 / MTok | -| Claude Sonnet 4.5 | $1.50 / MTok | $7.50 / MTok | -| Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $1.50 / MTok | $7.50 / MTok | -| Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.05 / MTok | $0.25 / MTok | -| Claude Haiku 5.5 (for prompts over 100,000 tokens) | $0.25 / MTok | $1.25 / MTok | -| Claude Haiku 4.5 | $0.50 / MTok | $2.50 / MTok | -| Claude Haiku 3.5 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.40 / MTok | $2 / MTok | +| Model | Batch input | Batch output | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :------------ | +| Claude Fable 5.1 | $5 / MTok | $25 / MTok | +| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok | +| Claude Fable 5 | $5 / MTok | $25 / MTok | +| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok | +| Claude Opus 5.5 | $2 / MTok | $10 / MTok | +| Claude Opus 5 | $2.50 / MTok | $12.50 / MTok | +| Claude Opus 4.8 | $2.50 / MTok | $12.50 / MTok | +| Claude Opus 4.7 | $2.50 / MTok | $12.50 / MTok | +| Claude Opus 4.6 | $2.50 / MTok | $12.50 / MTok | +| Claude Opus 4.5 | $2.50 / MTok | $12.50 / MTok | +| Claude Opus 4.1 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $7.50 / MTok | $37.50 / MTok | +| Claude Opus 4 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $7.50 / MTok | $37.50 / MTok | +| Claude Sonnet 5.5 | $1 / MTok | $5 / MTok | +| Claude Sonnet 5 | $1 / MTok | $5 / MTok | +| Claude Sonnet 4.6 | $1.50 / MTok | $7.50 / MTok | +| Claude Sonnet 4.5 | $1.50 / MTok | $7.50 / MTok | +| Claude Sonnet 4 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $1.50 / MTok | $7.50 / MTok | +| Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.05 / MTok | $0.25 / MTok | +| Claude Haiku 5.5 (for prompts over 100,000 tokens) | $0.25 / MTok | $1.25 / MTok | +| Claude Haiku 4.5 | $0.50 / MTok | $2.50 / MTok | +| Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.40 / MTok | $2 / MTok | * **MTok:** Million tokens. $5 / MTok is $5 for every million tokens. * **Limited access:** Available only to organizations verified through Anthropic’s verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). To request access, apply to the program that covers your use case. @@ -317,31 +317,31 @@ You can [create a batch](https://platform.claude.com/docs/en/api/messages/batche AnthropicClient client = AnthropicOkHttpClient.fromEnv(); BatchCreateParams params = BatchCreateParams.builder() - .addRequest( - BatchCreateParams.Request.builder() - .customId("my-first-request") - .params( - BatchCreateParams.Request.Params.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello, world") - .build() - ) - .build() - ) - .addRequest( - BatchCreateParams.Request.builder() - .customId("my-second-request") - .params( - BatchCreateParams.Request.Params.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hi again, friend") - .build() - ) - .build() - ) - .build(); + .addRequest( + BatchCreateParams.Request.builder() + .customId("my-first-request") + .params( + BatchCreateParams.Request.Params.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello, world") + .build() + ) + .build() + ) + .addRequest( + BatchCreateParams.Request.builder() + .customId("my-second-request") + .params( + BatchCreateParams.Request.Params.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hi again, friend") + .build() + ) + .build() + ) + .build(); MessageBatch messageBatch = client.messages().batches().create(params); @@ -459,8 +459,7 @@ To poll a Message Batch, you'll need its `id`, which is provided in the response ```bash CLI # Check the status; repeat until processing_status is "ended" - ant messages:batches retrieve \ - --message-batch-id "$MESSAGE_BATCH_ID" + ant messages:batches retrieve --message-batch-id "$MESSAGE_BATCH_ID" ``` ```python Python @@ -560,14 +559,14 @@ To poll a Message Batch, you'll need its `id`, which is provided in the response ```php PHP $client = new Client(); - $messageBatchId = getenv("MESSAGE_BATCH_ID"); + $messageBatchId = getenv('MESSAGE_BATCH_ID'); $messageBatch = null; while (true) { $messageBatch = $client->messages->batches->retrieve( messageBatchID: $messageBatchId, ); - if ($messageBatch->processingStatus === "ended") { + if ($messageBatch->processingStatus === 'ended') { break; } @@ -670,11 +669,13 @@ You can list all Message Batches in your Workspace using the [list endpoint](htt // Automatically fetches more pages as needed for (MessageBatch messageBatch : client - .messages() - .batches() - .list(BatchListParams.builder().limit(20).build()) - .autoPager()) { - System.out.println(messageBatch); + .messages() + .batches() + .list(BatchListParams.builder() + .limit(20) + .build()) + .autoPager()) { + System.out.println(messageBatch); } ``` @@ -714,7 +715,7 @@ Results of the batch are available for download at the `results_url` property on ```bash cURL - # Streams the batch's .jsonl results, one result per line. + # Streams the batch's .jsonl results, one result on each line. # For per-result handling (retries, validation errors), use the Claude SDK. curl "https://api.anthropic.com/v1/messages/batches/msgbatch_01HkcTjaV5uDC8jWR4ZsDV8d/results" \ -H "anthropic-version: 2023-06-01" \ @@ -722,8 +723,8 @@ Results of the batch are available for download at the `results_url` property on ``` ```bash CLI - # Prints one result per line, for example `{"custom_id":"test-1","result":{"type":"succeeded",…}}`. - # For per-result handling (retries, validation errors), use the SDK + # Prints one result on each line, for example `{"custom_id":"test-1","result":{"type":"succeeded",…}}`. + # For per-result handling (retries, validation errors), use the Claude SDK # examples in the other tabs. ant messages:batches results \ --message-batch-id msgbatch_01HkcTjaV5uDC8jWR4ZsDV8d \ @@ -835,37 +836,37 @@ Results of the batch are available for download at the `results_url` property on import com.anthropic.models.messages.batches.BatchResultsParams; import com.anthropic.models.messages.batches.MessageBatchIndividualResponse; // ... - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - // Stream results file in memory-efficient chunks, processing one at a time - try ( - StreamResponse streamResponse = client - .messages() - .batches() - .resultsStreaming( - BatchResultsParams.builder() - .messageBatchId("msgbatch_01HkcTjaV5uDC8jWR4ZsDV8d") - .build() - ) - ) { - streamResponse - .stream() - .forEach(result -> { - switch (result.result().type().value()) { - case SUCCEEDED -> System.out.println("Success! " + result.customId()); - case ERRORED -> { - if (result.result().asErrored().error().error().isInvalidRequestError()) { - // Request body must be fixed before re-sending request - System.out.println("Validation error: " + result.customId()); - } else { - // Request can be retried directly - System.out.println("Server error: " + result.customId()); - } - } - case EXPIRED -> System.out.println("Request expired: " + result.customId()); - } - }); - } + // Stream results file in memory-efficient chunks, processing one at a time + try ( + StreamResponse streamResponse = client + .messages() + .batches() + .resultsStreaming( + BatchResultsParams.builder() + .messageBatchId("msgbatch_01HkcTjaV5uDC8jWR4ZsDV8d") + .build() + ) + ) { + streamResponse + .stream() + .forEach(result -> { + switch (result.result().type().value()) { + case SUCCEEDED -> System.out.println("Success! " + result.customId()); + case ERRORED -> { + if (result.result().asErrored().error().error().isInvalidRequestError()) { + // Request body must be fixed before re-sending request + System.out.println("Validation error: " + result.customId()); + } else { + // Request can be retried directly + System.out.println("Server error: " + result.customId()); + } + } + case EXPIRED -> System.out.println("Request expired: " + result.customId()); + } + }); + } ``` ```php PHP @@ -881,7 +882,7 @@ Results of the batch are available for download at the `results_url` property on echo "Success! {$result->customID}\n"; break; case $result->result instanceof MessageBatchErroredResult: - if ($result->result->error->error->type === "invalid_request_error") { + if ($result->result->error->error->type === 'invalid_request_error') { echo "Validation error: {$result->customID}\n"; } else { echo "Server error: {$result->customID}\n"; @@ -987,13 +988,13 @@ You can cancel a Message Batch that is currently processing using the [cancel en ```java Java import com.anthropic.models.messages.batches.*; // ... - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - MessageBatch messageBatch = client - .messages() - .batches() - .cancel("msgbatch_01HkcTjaV5uDC8jWR4ZsDV8d"); - System.out.println(messageBatch); + MessageBatch messageBatch = client + .messages() + .batches() + .cancel("msgbatch_01HkcTjaV5uDC8jWR4ZsDV8d"); + System.out.println(messageBatch); ``` ```php PHP @@ -1375,62 +1376,62 @@ Example of implementing prompt caching in a batch: // ... import com.anthropic.models.messages.batches.*; // ... - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - BatchCreateParams createParams = BatchCreateParams.builder() - .addRequest( - BatchCreateParams.Request.builder() - .customId("my-first-request") - .params( - BatchCreateParams.Request.Params.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .systemOfTextBlockParams( - List.of( - TextBlockParam.builder() - .text( - "You are an AI assistant tasked with analyzing literary works. Your goal is to provide insightful commentary on themes, characters, and writing style.\n" + BatchCreateParams createParams = BatchCreateParams.builder() + .addRequest( + BatchCreateParams.Request.builder() + .customId("my-first-request") + .params( + BatchCreateParams.Request.Params.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .systemOfTextBlockParams( + List.of( + TextBlockParam.builder() + .text( + "You are an AI assistant tasked with analyzing literary works. Your goal is to provide insightful commentary on themes, characters, and writing style.\n" + ) + .build(), + TextBlockParam.builder() + .text("") + .cacheControl(CacheControlEphemeral.builder().build()) + .build() + ) + ) + .addUserMessage("Analyze the major themes in Pride and Prejudice.") + .build() ) - .build(), - TextBlockParam.builder() - .text("") - .cacheControl(CacheControlEphemeral.builder().build()) .build() - ) - ) - .addUserMessage("Analyze the major themes in Pride and Prejudice.") - .build() - ) - .build() - ) - .addRequest( - BatchCreateParams.Request.builder() - .customId("my-second-request") - .params( - BatchCreateParams.Request.Params.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .systemOfTextBlockParams( - List.of( - TextBlockParam.builder() - .text( - "You are an AI assistant tasked with analyzing literary works. Your goal is to provide insightful commentary on themes, characters, and writing style.\n" + ) + .addRequest( + BatchCreateParams.Request.builder() + .customId("my-second-request") + .params( + BatchCreateParams.Request.Params.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .systemOfTextBlockParams( + List.of( + TextBlockParam.builder() + .text( + "You are an AI assistant tasked with analyzing literary works. Your goal is to provide insightful commentary on themes, characters, and writing style.\n" + ) + .build(), + TextBlockParam.builder() + .text("") + .cacheControl(CacheControlEphemeral.builder().build()) + .build() + ) + ) + .addUserMessage("Write a summary of Pride and Prejudice.") + .build() ) - .build(), - TextBlockParam.builder() - .text("") - .cacheControl(CacheControlEphemeral.builder().build()) .build() - ) - ) - .addUserMessage("Write a summary of Pride and Prejudice.") - .build() - ) - .build() - ) - .build(); - - MessageBatch messageBatch = client.messages().batches().create(createParams); + ) + .build(); + + MessageBatch messageBatch = client.messages().batches().create(createParams); ``` ```php PHP @@ -1542,7 +1543,7 @@ In this example, both requests in the batch include identical system messages an All [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools) (web search, web fetch, code execution, MCP connectors, advisor, and tool search) work in batch requests. The batch worker runs the same server-side agentic loop as the synchronous Messages API. -Because there is no open connection to maintain, the batch loop runs **more iterations per turn** than a synchronous request before it returns `stop_reason: "pause_turn"`. If a batch result comes back with `pause_turn`, the turn did not complete; you can continue it by submitting the paused assistant content in a follow-up request (batch or synchronous) exactly as shown in the [pause\_turn continuation pattern](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#the-server-side-loop-and-pause-turn). +Because there is no open connection to maintain, the batch loop can run **more iterations in a turn** than a synchronous request before it returns `stop_reason: "pause_turn"`. If a batch result comes back with `pause_turn`, the turn did not complete; you can continue it by submitting the paused assistant content in a follow-up request (batch or synchronous) exactly as shown in the [pause\_turn continuation pattern](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#the-server-side-loop-and-pause-turn). The batch worker additionally throttles `web_search` for each organization so that highly concurrent batch processing does not exhaust your organization's web-search rate limit. The batch retries throttled requests automatically; you don't need to handle this yourself, but very large web-search batches might take longer to complete. @@ -1551,7 +1552,7 @@ The batch worker additionally throttles `web_search` for each organization so th The `output-300k-2026-03-24` beta header raises the `max_tokens` cap to 300,000 for batch requests using Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5.5, Claude Sonnet 5, Claude Sonnet 4.6, or Claude Haiku 5.5. Include the header to generate outputs far longer than the standard 128k `max_tokens` limit in a single turn. - Extended output is available on the Message Batches API only, not the synchronous Messages API. It is supported on the Claude API and Claude Platform on AWS, and is not currently available on Amazon Bedrock, Google Cloud, or Microsoft Foundry. + Extended output is available on the Message Batches API only, not the synchronous Messages API. It is supported on the Claude API and Claude Platform on AWS, and is not currently available on Amazon Bedrock, Claude Models on Google Cloud (Google managed), or Microsoft Foundry. Use extended output for long-form generation such as book-length drafts and technical documentation, exhaustive structured data extraction, large code-generation scaffolds, and long reasoning chains. @@ -1715,27 +1716,27 @@ A single 300k-token generation can take over an hour to complete, so plan your b import com.anthropic.models.beta.messages.batches.*; void main() { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - BatchCreateParams params = BatchCreateParams.builder() - .addBeta("output-300k-2026-03-24") - .addRequest( - BatchCreateParams.Request.builder() - .customId("long-form-request") - .params( - BatchCreateParams.Request.Params.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(300_000L) - .addUserMessage("Write a comprehensive technical guide to building distributed systems, covering architecture patterns, consistency models, fault tolerance, and operational best practices.") - .build() + BatchCreateParams params = BatchCreateParams.builder() + .addBeta("output-300k-2026-03-24") + .addRequest( + BatchCreateParams.Request.builder() + .customId("long-form-request") + .params( + BatchCreateParams.Request.Params.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(300_000L) + .addUserMessage("Write a comprehensive technical guide to building distributed systems, covering architecture patterns, consistency models, fault tolerance, and operational best practices.") + .build() + ) + .build() ) - .build() - ) - .build(); + .build(); - BetaMessageBatch messageBatch = client.beta().messages().batches().create(params); + BetaMessageBatch messageBatch = client.beta().messages().batches().create(params); - IO.println(messageBatch); + IO.println(messageBatch); } ``` diff --git a/content/en/build-with-claude/cache-diagnostics.md b/content/en/build-with-claude/cache-diagnostics.md index 7ff955b639..dc0c404426 100644 --- a/content/en/build-with-claude/cache-diagnostics.md +++ b/content/en/build-with-claude/cache-diagnostics.md @@ -1026,7 +1026,7 @@ This matrix applies to turns where you passed a real `previous_message_id`. On t ## Limitations -* **Claude API only:** Not available on Amazon Bedrock or Google Cloud. +* **Claude API only:** Not available on Amazon Bedrock or Claude Models on Google Cloud (Google managed). * **Limited retention:** Fingerprints for `previous_message_id` lookup expire after a short period. Run diagnostic comparisons between closely spaced requests. * **Same workspace:** The previous request must have run in the same organization and workspace. To check, compare the `anthropic-workspace-id` [response header](https://platform.claude.com/docs/en/api/overview#response-headers) on the two responses. * **Comparison horizon:** For very long conversations where the only change is deep in the message list, the response might be `unavailable` rather than a precise location. diff --git a/content/en/build-with-claude/citations.md b/content/en/build-with-claude/citations.md index 14d1a10060..8926f4c583 100644 --- a/content/en/build-with-claude/citations.md +++ b/content/en/build-with-claude/citations.md @@ -11,7 +11,7 @@ featureMetadata: Claude API: ga Claude Platform on AWS: ga Amazon Bedrock: ga - Google Cloud: ga + Claude Models on Google Cloud (Google managed): ga Microsoft Foundry: ga --- @@ -217,7 +217,9 @@ The following example shows how to enable citations on a plain text document wit .source(source) .title("My Document") .context("This is a trustworthy document.") - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build(); TextBlockParam textBlockParam = TextBlockParam.builder() @@ -266,7 +268,7 @@ The following example shows how to enable citations on a plain text document wit ], ], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); echo json_encode($response, JSON_PRETTY_PRINT); @@ -596,8 +598,12 @@ The citation blocks generated in responses cannot be cached directly, but the so + " ... ".repeat(1000); // Minimum cacheable length DocumentBlockParam documentParam = DocumentBlockParam.builder() - .source(PlainTextSource.builder().data(longDocument).build()) - .citations(CitationsConfigParam.builder().enabled(true).build()) + .source(PlainTextSource.builder() + .data(longDocument) + .build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .cacheControl(CacheControlEphemeral.builder().build()) // Cache the document content .build(); @@ -651,7 +657,7 @@ The citation blocks generated in responses cannot be cached directly, but the so ], ], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); echo json_encode($response, JSON_PRETTY_PRINT); @@ -907,7 +913,9 @@ Plain text documents are automatically chunked into sentences. You can provide t .fileSource(fileId) .title("Document Title") .context("Context about the document that will not be cited from") - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build()), ContentBlockParam.ofText(TextBlockParam.builder() .text("Summarize this document.") @@ -1193,10 +1201,14 @@ PDF documents can be provided as base64-encoded data, as a URL, or by `file_id`. String pdfBase64 = Base64.getEncoder().encodeToString(pdfBytes); DocumentBlockParam documentParam = DocumentBlockParam.builder() - .source(Base64PdfSource.builder().data(pdfBase64).build()) + .source(Base64PdfSource.builder() + .data(pdfBase64) + .build()) .title("Document Title") .context("Context about the document that will not be cited from") - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build(); MessageCreateParams params = MessageCreateParams.builder() @@ -1205,7 +1217,9 @@ PDF documents can be provided as base64-encoded data, as a URL, or by `file_id`. .addUserMessageOfContentBlockParams( List.of( ContentBlockParam.ofDocument(documentParam), - ContentBlockParam.ofText(TextBlockParam.builder().text("Summarize this document.").build()) + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Summarize this document.") + .build()) ) ) .build(); @@ -1473,7 +1487,9 @@ PDF documents can be provided as base64-encoded data, as a URL, or by `file_id`. .build()) .title("Document Title") .context("Context about the document that will not be cited from") - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build(); MessageCreateParams params = MessageCreateParams.builder() @@ -1482,7 +1498,9 @@ PDF documents can be provided as base64-encoded data, as a URL, or by `file_id`. .addUserMessageOfContentBlockParams( List.of( ContentBlockParam.ofDocument(documentParam), - ContentBlockParam.ofText(TextBlockParam.builder().text("Summarize this document.").build()) + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Summarize this document.") + .build()) ) ) .build(); @@ -1723,7 +1741,9 @@ PDF documents can be provided as base64-encoded data, as a URL, or by `file_id`. .fileSource(fileId) .title("Document Title") .context("Context about the document that will not be cited from") - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build()), ContentBlockParam.ofText(TextBlockParam.builder() .text("Summarize this document.") @@ -2012,14 +2032,20 @@ Custom content documents give you control over citation granularity. No addition .source(ContentBlockSource.builder() .contentOfBlockSource( List.of( - ContentBlockSourceContent.ofText(TextBlockParam.builder().text("First chunk").build()), - ContentBlockSourceContent.ofText(TextBlockParam.builder().text("Second chunk").build()) + ContentBlockSourceContent.ofText(TextBlockParam.builder() + .text("First chunk") + .build()), + ContentBlockSourceContent.ofText(TextBlockParam.builder() + .text("Second chunk") + .build()) ) ) .build()) .title("Document Title") .context("Context about the document that will not be cited from") - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build(); MessageCreateParams params = MessageCreateParams.builder() @@ -2028,7 +2054,9 @@ Custom content documents give you control over citation granularity. No addition .addUserMessageOfContentBlockParams( List.of( ContentBlockParam.ofDocument(documentParam), - ContentBlockParam.ofText(TextBlockParam.builder().text("Summarize this document.").build()) + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Summarize this document.") + .build()) ) ) .build(); @@ -2066,7 +2094,7 @@ Custom content documents give you control over citation granularity. No addition ], ], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); echo json_encode($response, JSON_PRETTY_PRINT); diff --git a/content/en/build-with-claude/claude-in-amazon-bedrock.md b/content/en/build-with-claude/claude-in-amazon-bedrock.md index fe43864840..0e9f91ae84 100644 --- a/content/en/build-with-claude/claude-in-amazon-bedrock.md +++ b/content/en/build-with-claude/claude-in-amazon-bedrock.md @@ -94,7 +94,7 @@ Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries ```bash - go get github.com/anthropics/anthropic-sdk-go/bedrock + go get github.com/anthropics/anthropic-sdk-go/v2/bedrock ``` @@ -150,7 +150,7 @@ The SDK resolves credentials and region using the standard AWS precedence: const ```bash curl https://bedrock-mantle.us-east-1.api.aws/anthropic/v1/messages \ --aws-sigv4 "aws:amz:us-east-1:bedrock-mantle" \ - --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \ + -u "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \ -H "x-amz-security-token: $AWS_SESSION_TOKEN" \ -H "content-type: application/json" \ -H "anthropic-version: 2023-06-01" \ @@ -282,9 +282,9 @@ The SDK resolves credentials and region using the standard AWS precedence: const ); message.content().stream() - .filter(ContentBlock::isText) - .findFirst() - .ifPresent(block -> IO.println(block.asText().text())); + .filter(ContentBlock::isText) + .findFirst() + .ifPresent(block -> IO.println(block.asText().text())); } ``` @@ -325,7 +325,7 @@ The SDK resolves credentials and region using the standard AWS precedence: const - You can also create the standard client with `Anthropic` (go: `anthropic.NewClient()`; java: `AnthropicOkHttpClient.builder()`; csharp: `AnthropicClient`; php: `Anthropic\Client`; ruby: `Anthropic::Client`): set `base_url` (typescript: `baseURL`; go: `option.WithBaseURL()`; java: `.baseUrl()`; csharp: `BaseUrl`; php: `baseUrl`) to `https://bedrock-mantle.{region}.api.aws/anthropic` and pass your bearer token as `api_key` (typescript, php: `apiKey`; go: `option.WithAPIKey()`; java: `.apiKey()`; csharp: `ApiKey`). This path supports bearer-token authentication only. SigV4 signing requires `AnthropicBedrockMantle` (csharp: `AnthropicBedrockMantleClient`; go: `bedrock.NewMantleClient`; java: `BedrockMantleBackend`; php: `MantleClient`; ruby: `Anthropic::BedrockMantleClient`). + You can also create the standard client with `Anthropic` (go: `anthropic.NewClient()`; java: `AnthropicOkHttpClient.builder()`; csharp: `AnthropicClient`; php: `Anthropic\Client`; ruby: `Anthropic::Client`): set `base_url` (typescript: `baseURL`; go: `option.WithBaseURL()`; java: `.baseUrl()`; csharp: `BaseUrl`; php: `baseUrl`) to `https://bedrock-mantle.{region}.api.aws/anthropic` and pass your bearer token as `api_key` (typescript, php: `apiKey`; go: `option.WithAPIKey()`; java: `.apiKey()`; csharp: `ApiKey`). This path supports bearer-token authentication only. SigV4 signing requires `AnthropicBedrockMantle` (csharp: `AnthropicBedrockMantleClient`; go: `bedrock.NewMantleClient()`; java: `BedrockMantleBackend`; php: `MantleClient`; ruby: `Anthropic::BedrockMantleClient`). ## Supported models diff --git a/content/en/build-with-claude/claude-in-microsoft-foundry.md b/content/en/build-with-claude/claude-in-microsoft-foundry.md index 359d043364..dc8a6bcd4b 100644 --- a/content/en/build-with-claude/claude-in-microsoft-foundry.md +++ b/content/en/build-with-claude/claude-in-microsoft-foundry.md @@ -69,7 +69,7 @@ Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries ```bash - go get github.com/anthropics/anthropic-sdk-go/foundry + go get github.com/anthropics/anthropic-sdk-go/v2/foundry # For Entra ID authentication, also install the Azure Identity library go get github.com/Azure/azure-sdk-for-go/sdk/azidentity @@ -290,8 +290,8 @@ The SDK's Foundry client requires an API key and either a resource name or base "fmt" "os" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/foundry" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/foundry" ) func main() { @@ -508,8 +508,8 @@ Entra ID authentication lets you manage access with Azure RBAC, integrate with y "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/foundry" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/foundry" ) func main() { @@ -669,7 +669,7 @@ Requests that use these features against a deployment hosted on Azure return a ` ## API responses -API responses from Claude in Microsoft Foundry follow the standard [Claude API response format](https://platform.claude.com/docs/en/api/messages/create). This includes the `usage` object in response bodies, which provides detailed token consumption information for your requests. The `usage` object is consistent across all platforms (Claude API, Amazon Bedrock, Claude Platform on AWS, Foundry, and Google Cloud). +API responses from Claude in Microsoft Foundry follow the standard [Claude API response format](https://platform.claude.com/docs/en/api/messages/create). This includes the `usage` object in response bodies, which provides detailed token consumption information for your requests. The `usage` object is consistent across all platforms, including the Claude API, Amazon Bedrock, Claude Platform on AWS, Foundry, and Claude Models on Google Cloud (Google managed). For details on response headers specific to Foundry, see [Correlation request IDs](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#correlation-request-ids). diff --git a/content/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed.md b/content/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed.md new file mode 100644 index 0000000000..2b1bee8d01 --- /dev/null +++ b/content/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed.md @@ -0,0 +1,847 @@ +--- +title: Claude Models on Google Cloud (Anthropic managed) +url: https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed +description: Claude Models on Google Cloud (Anthropic managed) is the Claude API, run by Anthropic and reached through your Google Cloud project. +--- + +Google Cloud handles access and billing for Claude Models on Google Cloud (Anthropic managed). To compare the two Google Cloud offerings, or to check which one you use, see [Claude Models on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview). + +## Set up your account + +To set up your account for Claude Models on Google Cloud (Anthropic managed), you need the following: + +* Permission to purchase in Google Cloud Marketplace on your billing account +* Permission to enable services on the project +* An [IAM role that lets you open the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console), which you need for step 4 + +These steps create a new Anthropic organization for your Google Cloud project. It's separate from any Anthropic organization your company already has. That includes a Claude Enterprise organization. To move from an existing organization, see [Moving from an existing Anthropic organization](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#moving-from-an-existing-anthropic-organization). + +If you have an existing discount, contact your Anthropic or Google Cloud account representative before you start these steps. Discounts can't be applied to past usage. + + + + 1. Open [Google Cloud Marketplace](https://console.cloud.google.com/marketplace) and find the **Claude Models on Google Cloud (Anthropic managed)** listing. + 2. Click **Subscribe** and complete the purchase flow. + 3. Return to the listing and click **Manage on Console**. This opens the Claude page in the Google Cloud console. + + To return to the Claude page later, select your project in the Google Cloud console. Then go to **Agent Platform > Models > Claude Platform** and select **Anthropic managed**. + + + + Enable two services on every project that calls Claude Models on Google Cloud (Anthropic managed): + + * `claude.googleapis.com` serves the API for Claude Models on Google Cloud (Anthropic managed). This service also defines the IAM permissions. Calls fail without it. + * `anthropic-managed-claude.cloudpartnerservices.goog` is the Marketplace service that attributes the project's usage to your subscription. + + ```bash CLI + gcloud services enable claude.googleapis.com \ + anthropic-managed-claude.cloudpartnerservices.goog \ + --project=my-project-id + ``` + + Replace `my-project-id` with your project ID. + + You can also enable both from the Claude page or from **APIs & Services**. Enabling is a one-time step for each project. To check that both services are enabled, run `gcloud services list --enabled --project=my-project-id` and look for both names. + + + + 1. On the Claude page, click **Activate**. + 2. In the Anthropic setup flow, enter a contact email address. + 3. Open the setup link sent to that address. + 4. Fill in the organization's name, entity type, country, and intended use. + 5. Accept Anthropic's Commercial Terms of Service and Usage Policy. + + The contact address is used only for setup and service notices. For how people open the Claude Console after setup, see [Using the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console). + + + + When your Anthropic organization is active, the button on the Claude page changes to **Open Claude Console**. Click it. Google Cloud checks your IAM access. Then it redirects your browser to `platform.claude.com`. You're signed in to the new organization. + + While you're in the Claude Console, [find your workspace ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id) and copy it. Everyone who calls Claude Models on Google Cloud (Anthropic managed) needs it. Pass it on to your developers. + + + +To add another project, repeat these steps in that project, starting from step 2. + +### Troubleshooting account setup + +If you run into one of the following problems while you set up Claude Models on Google Cloud (Anthropic managed), apply its fix: + +* **`gcloud services enable` can't find `anthropic-managed-claude.cloudpartnerservices.goog`:** Run the command as the account that completed the Marketplace purchase, or contact your Anthropic account representative. +* **A permission error on your first API call:** Check that `claude.googleapis.com` is enabled on the project you're calling. Check that the caller has `roles/claude.user` or `roles/claude.admin` on that project. For what each role allows, see [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles). A new grant or a newly enabled service can take a moment to apply. +* **"Signed in as a different account" after following the setup link:** Click **Log out and continue**. Then use the email address you entered in step 3. +* **The button says "Finish Setup" instead of "Open Claude Console":** Your Anthropic organization exists, but its setup isn't complete. An administrator has to finish the organization details form. +* **The Usage page shows no data after your first API call:** Usage data can take a few minutes to appear in the Claude Console. + +## Manage access + +### IAM roles + +Claude Models on Google Cloud (Anthropic managed) has three predefined IAM roles. Grant roles on the project. + +| Role | Display name | What it allows | +| --------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `roles/claude.viewer` | Claude Viewer | Every `get` and `list` permission on workspace resources
This role is read-only. | +| `roles/claude.user` | Claude User | Everything `roles/claude.viewer` allows, plus creating and changing workspace resources
This includes sending messages and counting tokens. It also includes managing batches, files, skills, and Claude Managed Agents resources. | +| `roles/claude.admin` | Claude Admin | Everything `roles/claude.user` allows, plus the permissions checked on your Anthropic organization
Organization-level routes act on your Anthropic organization as a whole, not on one workspace. | + +For example, the following command lets a service account call Claude Models on Google Cloud (Anthropic managed): + +```bash CLI +gcloud projects add-iam-policy-binding my-project-id \ + --member="serviceAccount:my-app@my-project-id.iam.gserviceaccount.com" \ + --role="roles/claude.user" +``` + +For permissions, predefined roles, and audit log types, see [IAM permissions for Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions). + +Enabling `claude.googleapis.com` creates a service agent for the project. Don't remove its role grants. Removing them stops Claude Models on Google Cloud (Anthropic managed) from working in the project. + +### Using the Claude Console + +With Claude Models on Google Cloud (Anthropic managed), you can't use an email address to sign in to your Anthropic organization. Instead, click **Open Claude Console** on the [Claude page](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account) in the Google Cloud console. Google Cloud IAM controls who can open the Claude Console. Of the three predefined [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles), only `roles/claude.admin` on the project lets you open the Claude Console. + +### Workspaces + +In Claude Models on Google Cloud (Anthropic managed), setup creates your Anthropic organization with one workspace, the Default Workspace. To create more workspaces, [open the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console) and go to **Settings > Workspaces**. On the same page, you can rename or archive any workspace except the Default Workspace. Each workspace has its own [workspace ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id). Files, skills, batches, Claude Managed Agents sessions, and other workspace resources belong to the workspace whose ID you [set for the request](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution). + +You grant [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) on the project, so a role applies to every workspace in that project. When teams need separate access, give each team its own Google Cloud project. Each project has its own Anthropic organization, so repeat the [setup steps](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account) in each project, starting from step 2. + +## Before making API calls + +To call Claude Models on Google Cloud (Anthropic managed), you need the following: + +1. A Google Cloud project with an active subscription and an Anthropic organization whose setup is complete. See [Set up your account](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account). +2. The [gcloud CLI](https://cloud.google.com/sdk/docs/install) installed, for local development. +3. The `roles/claude.user` role, granted on the project to the identity that makes the calls. +4. Application Default Credentials for that identity. See [Authentication](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication). +5. Your project ID and your [workspace ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id). + +To grant the role to your own account for local development, run the following command. You need permission to change the project's IAM policy. + +```bash CLI +gcloud projects add-iam-policy-binding my-project-id \ + --member="user:you@example.com" \ + --role="roles/claude.user" +``` + +Replace `my-project-id` with your project ID. Replace `you@example.com` with your Google account's email address. To see the project gcloud is using, run `gcloud config get-value project`. For service accounts and the other roles, see [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles). + +### Find your workspace ID + +To find your workspace ID for Claude Models on Google Cloud (Anthropic managed), [open the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console) and go to **Settings > Workspaces**. The ID starts with `wrkspc_`. If you can't open the Claude Console, ask someone who can open it to send you the ID. + +Set the project and workspace as environment variables so that the SDK client and the [`ant` CLI](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart) pick them up: + +```bash CLI +export ANTHROPIC_GOOGLE_CLOUD_PROJECT="my-project-id" +export ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID="wrkspc_01AbCdEf23GhIj" +``` + +### Install an SDK + +The [SDK client](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) for Claude Models on Google Cloud (Anthropic managed) is `AnthropicGoogleCloud` (csharp: `AnthropicGoogleCloudClient`; go: `googlecloud.NewClient()`; java: `GoogleCloudBackend`; php: `Anthropic\GoogleCloud\Client`; ruby: `Anthropic::GoogleCloudClient`). The client resolves your Google credentials. It also builds the base URL from your project, location, and workspace ID. + + + The SDK client for Claude Models on Google Cloud (Anthropic managed) is in beta. + + +Install the package that provides the client: + + + + ```bash + pip install -U "anthropic[google_cloud]" + ``` + + + + ```bash + npm install @anthropic-ai/google-cloud-sdk + ``` + + + + ```bash + dotnet add package Anthropic.GoogleCloud + ``` + + + + ```bash + go get github.com/anthropics/anthropic-sdk-go/v2 + ``` + + + + ```kotlin Gradle + implementation("com.anthropic:anthropic-java:3.1.0") + implementation("com.anthropic:anthropic-java-google-cloud:3.1.0") + ``` + + ```xml Maven + + com.anthropic + anthropic-java + 3.1.0 + + + com.anthropic + anthropic-java-google-cloud + 3.1.0 + + ``` + + + + ```bash + composer require anthropic-ai/sdk google/auth + ``` + + + + ```bash + gem install anthropic googleauth + ``` + + + +To use the `ant` CLI instead, [install or update the CLI](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart#installation) to the latest version. A version without support for Claude Models on Google Cloud (Anthropic managed) ignores the `ANTHROPIC_GOOGLE_CLOUD_*` variables. It then does one of the following: + +* Sends the request to the Claude API with any other credential you've set up +* Fails with an authentication error + +## Making requests + +Claude Models on Google Cloud (Anthropic managed) serves Claude API endpoints under a base URL that names your project, a location, and your workspace: + +```text wrap +https://claude.googleapis.com/v1/projects/{project}/locations/global/workspaces/{workspace}/invoke +``` + +The [organization-level routes](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles), whose paths start with `/v1/organizations/`, use a base URL without the workspace: + +```text wrap +https://claude.googleapis.com/v1/projects/{project}/locations/global/claudeOrganization/invoke +``` + +If you don't [set the base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution), the SDK client chooses between these two for each request. + +Append the Claude API path to the base URL. For example, the [Messages API](https://platform.claude.com/docs/en/api/messages/create) is at `.../invoke/v1/messages`. Three things differ from a Claude API request: + +* **Base URL:** The project-scoped URLs shown earlier, in place of `https://api.anthropic.com`. +* **Authentication:** An `Authorization: Bearer` header with a Google access token. Don't send an `x-api-key` header. +* **Workspace:** The workspace ID is part of the URL. Don't send an `anthropic-workspace-id` header. + +Everything else is the same as on the Claude API, including the following: + +* The `anthropic-version` and `anthropic-beta` headers +* The request body +* Streaming +* The response + +Code samples elsewhere in this documentation create the Claude API client and read an API key. To run one with Claude Models on Google Cloud (Anthropic managed), replace its import and client constructor with the ones in the following examples. For a cURL sample, apply the three differences listed earlier. + +Before running these examples, complete the steps in [Before making API calls](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#before-making-api-calls). + + + ```bash cURL + curl "https://claude.googleapis.com/v1/projects/$ANTHROPIC_GOOGLE_CLOUD_PROJECT/locations/global/workspaces/$ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID/invoke/v1/messages" \ + -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ + -H "content-type: application/json" \ + -H "anthropic-version: 2023-06-01" \ + -d '{ + "model": "claude-opus-5-5", + "max_tokens": 1024, + "messages": [ + {"role": "user", "content": "Hello, Claude"} + ] + }' + ``` + + ```bash CLI + ant messages create \ + --model claude-opus-5-5 \ + --max-tokens 1024 \ + --message '{role: user, content: "Hello, Claude"}' + ``` + + ```python Python + from anthropic import AnthropicGoogleCloud + + client = AnthropicGoogleCloud() + + message = client.messages.create( + model="claude-opus-5-5", + max_tokens=1024, + messages=[{"role": "user", "content": "Hello, Claude"}], + ) + print(message) + ``` + + ```typescript TypeScript + import { AnthropicGoogleCloud } from "@anthropic-ai/google-cloud-sdk"; + + const client = new AnthropicGoogleCloud(); + + const message = await client.messages.create({ + model: "claude-opus-5-5", + max_tokens: 1024, + messages: [{ role: "user", content: "Hello, Claude" }] + }); + console.log(message); + ``` + + ```csharp C# + using Anthropic.GoogleCloud; + using Anthropic.Models.Messages; + + var client = new AnthropicGoogleCloudClient(); + + var parameters = new MessageCreateParams + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 1024, + Messages = [new UserMessageParam { Content = "Hello, Claude" }] + }; + + var message = await client.Messages.Create(parameters); + Console.WriteLine(message); + ``` + + ```go Go + import ( + "context" + "fmt" + + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/googlecloud" + ) + + func main() { + client, err := googlecloud.NewClient(context.Background(), googlecloud.ClientConfig{}) + if err != nil { + panic(err) + } + + message, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus5_5, + MaxTokens: 1024, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, Claude")), + }, + }) + if err != nil { + panic(err) + } + + fmt.Println(message) + } + ``` + + ```java Java + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.googlecloud.backends.GoogleCloudBackend; + import com.anthropic.models.messages.Message; + import com.anthropic.models.messages.MessageCreateParams; + import com.anthropic.models.messages.Model; + + void main() { + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend(GoogleCloudBackend.fromEnv()) + .build(); + + Message message = client.messages().create( + MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello, Claude") + .build() + ); + + IO.println(message); + } + ``` + + ```php PHP + use Anthropic\GoogleCloud\Client; + use Anthropic\Messages\Model; + + $client = new Client(); + + $message = $client->messages->create( + model: Model::CLAUDE_OPUS_5_5, + maxTokens: 1024, + messages: [['role' => 'user', 'content' => 'Hello, Claude']], + ); + + echo $message; + ``` + + ```ruby Ruby + require "anthropic" + + client = Anthropic::GoogleCloudClient.new + + message = client.messages.create( + model: Anthropic::Model::CLAUDE_OPUS_5_5, + max_tokens: 1024, + messages: [{ role: "user", content: "Hello, Claude" }] + ) + + puts message + ``` + + +The cURL example asks gcloud for an Application Default Credentials token. Access tokens are short-lived. Generate one for each session instead of storing it. + +### API model IDs + +Claude Models on Google Cloud (Anthropic managed) uses the same model IDs as the Claude API, for example `claude-opus-5-5`. For the models and their IDs, see [Models overview](https://platform.claude.com/docs/en/models/overview). + +In Claude Models on Google Cloud (Anthropic managed), a request for a model that isn't available to your Anthropic organization returns an error. The error message reads `Model {model} is not available for this organization's inference configuration.` + +## Project, location, and workspace resolution + +The client for Claude Models on Google Cloud (Anthropic managed) takes the settings in the following table. A value you pass when you create the client wins over the environment variable. To set the project and workspace ID explicitly, pass `project` (go: `Project`; java: `.project()`; csharp: `GoogleCloudClientOptions.Project`; cli: `--google-cloud-project`) and `workspace_id` (typescript, php: `workspaceId`; go: `WorkspaceID`; java: `.workspaceId()`; csharp: `GoogleCloudClientOptions.WorkspaceId`; cli: `--google-cloud-workspace-id`). + +| Setting | Environment variable | If unset | +| ------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Project ID | `ANTHROPIC_GOOGLE_CLOUD_PROJECT`, then `GOOGLE_CLOUD_PROJECT` | The project that Application Default Credentials reports, when the credential type carries one | +| Workspace ID | `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID` | The client raises an error unless you set the base URL. [Organization-level routes](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) don't need a workspace ID. | +| Location | `ANTHROPIC_GOOGLE_CLOUD_LOCATION` | `global` | +| Base URL | `ANTHROPIC_GOOGLE_CLOUD_BASE_URL` | Derived from the project, location, and workspace ID | + +Leave the location at `global`. The location is separate from where inference runs, so for US-only inference, set `inference_geo: "us"` on each request, as described in [Data residency](https://platform.claude.com/docs/en/manage-claude/data-residency#inference-geo). + +The `ant` CLI takes the same settings as flags: + +* **Project ID:** `--google-cloud-project` +* **Workspace ID:** `--google-cloud-workspace-id` +* **Location:** `--google-cloud-location` +* **Base URL:** `--google-cloud-base-url` + +The CLI uses Claude Models on Google Cloud (Anthropic managed) when the project, workspace ID, or location is set. Setting `GOOGLE_CLOUD_PROJECT`, the base URL, or both isn't enough. + +## Authentication + +Each request to Claude Models on Google Cloud (Anthropic managed) carries a Google OAuth 2.0 access token in an `Authorization: Bearer` header. The token has the `https://www.googleapis.com/auth/cloud-platform` scope. + +Google Cloud handles access. Its gateway at `claude.googleapis.com` does the following for each request: + +1. Checks your Google Cloud credentials. +2. Checks that the caller holds the IAM permission that the request needs. If the caller doesn't, Google Cloud returns an HTTP 403 error. +3. Forwards the request to Anthropic. Anthropic validates the request. + +To grant permissions, see [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles). + +The SDK client gets the token from [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials) (ADC). Any credential source that ADC supports works: + +* **Local development:** Run `gcloud auth application-default login`. +* **On Google Cloud:** The client automatically uses the service account attached to the workload, for example on Compute Engine, GKE, or Cloud Run. +* **A service account key file:** Set `GOOGLE_APPLICATION_CREDENTIALS` to its path. +* **Workload Identity Federation and service account impersonation:** Configure them as you would for any Google Cloud API. + +Check that ADC is working: + +```bash CLI +gcloud auth application-default print-access-token +``` + +Claude Models on Google Cloud (Anthropic managed) doesn't use API keys. In the Claude Console, you can't create API keys for the Anthropic organization that setup creates. The SDK client for Claude Models on Google Cloud (Anthropic managed) ignores these environment variables: + +* `ANTHROPIC_API_KEY` +* `ANTHROPIC_AUTH_TOKEN` +* `ANTHROPIC_BASE_URL` + +### Credential precedence + +The SDK client for Claude Models on Google Cloud (Anthropic managed) checks for credentials in the following order. The client uses the first one it finds: + +1. A token provider that you pass as `token_provider` (typescript: `bearerTokenProvider`; csharp: `GoogleCloudClientOptions.TokenProvider`; go: `TokenSource`; java: `.bearerTokenSupplier()`; php: `tokenProvider`) when you create the client. It's a function or token source that returns an access token. The client asks it for a token on every request. Caching and refreshing the token are up to you. +2. A Google credentials object that you pass as `credentials` (typescript: `googleAuth`; csharp: `GoogleCloudClientOptions.GoogleCredential`; java: `.googleCredentials()`; php: `googleCredentials`; ruby: `google_credentials`) when you create the client. The Go SDK doesn't have this option. +3. Application Default Credentials. + +Go and Java differ from the other SDKs: + +* **Go:** For option 1, the client takes an `oauth2.TokenSource`. It caches the token until the token expires. +* **Java:** Use `GoogleCloudBackend.fromEnv()` to read Application Default Credentials and the environment variables in [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution). + +The client has no environment variable of its own for the credential. Use ADC's `GOOGLE_APPLICATION_CREDENTIALS` instead. + +If your requests go through a proxy that attaches the token for you, set `skip_auth` (typescript, php: `skipAuth`; go: `SkipAuth`; java: `.skipAuth()`; csharp: `GoogleCloudClientOptions.SkipAuth`). The client then sends no `Authorization` header. You can't combine this setting with the preceding credential options. + +When the `ant` CLI uses Claude Models on Google Cloud (Anthropic managed), it always gets the token from Application Default Credentials. It takes no token provider, credentials object, or setting to skip authentication. + +Before you use `ant` with Claude Models on Google Cloud (Anthropic managed), make sure none of these is set: + +* An API key + +* An authentication token + +* `--profile` or `ANTHROPIC_PROFILE`, if it names a [configuration profile](https://platform.claude.com/docs/en/manage-claude/wif-reference#profile-configuration-file) that the CLI can authenticate with + +* Any of Anthropic's federation variables: + + * `ANTHROPIC_FEDERATION_RULE_ID` + * `ANTHROPIC_ORGANIZATION_ID` + * `ANTHROPIC_SERVICE_ACCOUNT_ID` + * `ANTHROPIC_IDENTITY_TOKEN` + * `ANTHROPIC_IDENTITY_TOKEN_FILE` + +If one is set, the CLI uses that credential instead of the Google Cloud settings from [Find your workspace ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id). If only some of the federation variables are set, the CLI stops with an error. When more than one credential is set, the CLI prints a note naming the one it uses. + +Also leave `ANTHROPIC_WORKSPACE_ID` and the `--workspace-id` flag unset. The CLI still sends that value as an `anthropic-workspace-id` header. Requests to Claude Models on Google Cloud (Anthropic managed) must not carry that header. Set the workspace with `--google-cloud-workspace-id` or `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID` instead. + +Like the SDK client, the CLI doesn't send requests for Claude Models on Google Cloud (Anthropic managed) to `--base-url` or `ANTHROPIC_BASE_URL`. + +## Feature support + +This section lists features that work on Claude Models on Google Cloud (Anthropic managed) and features that aren't supported there. It doesn't list every Claude API feature, and it doesn't say whether an unlisted feature works. + +The following features work on Claude Models on Google Cloud (Anthropic managed) as they do on the Claude API: + +* **Fast mode:** [Fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for Claude Opus 5.5. + +- **Beta features:** If a beta is limited to selected organizations on the Claude API, the Anthropic organization that setup creates needs the same access. + +- **Tools:** [Tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview), including: + + * Web search + * Web fetch + * Code execution + * The memory tool + * The advisor tool + * The MCP connector + +- **Skills and files:** [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and the [Files API](https://platform.claude.com/docs/en/build-with-claude/files). + +- **Model capabilities:** + + * [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) + * [Extended thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) + * [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) + * [Streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) + * [Structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + * [Token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) + +- **Batches and models:** The [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing) and the Models API. + +To turn the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api) on or off for the Anthropic organization that setup creates, [open the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console), go to **Settings > Compliance**, and use the **Compliance API** toggle. + +Customer-managed encryption keys (CMEK) are available with Google Cloud KMS keys. To activate CMEK for the Anthropic organization that setup creates, see [Customer-managed encryption keys](https://platform.claude.com/docs/en/manage-claude/cmek). To set up a key, follow [Configure Google Cloud KMS for CMEK](https://platform.claude.com/docs/en/manage-claude/cmek-google-cloud-kms). Then register, verify, and attach the key in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console), as the setup page's **Claude Console** tab describes. + +### Claude Managed Agents + +[Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) is available through Claude Models on Google Cloud (Anthropic managed), including the following: + +* [Agents](https://platform.claude.com/docs/en/managed-agents/agent-setup) +* [Environments](https://platform.claude.com/docs/en/managed-agents/environments) +* [Sessions](https://platform.claude.com/docs/en/managed-agents/sessions) +* [Credential vaults](https://platform.claude.com/docs/en/managed-agents/vaults) +* [Memory stores](https://platform.claude.com/docs/en/managed-agents/memory) +* [Scheduled deployments](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments) +* [Self-hosted sandboxes](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes) + +Access is checked when a session or a deployment is created, not while it runs: + +* **Running sessions keep running.** If you revoke Google Cloud access from the identity that created a session, the session doesn't stop. To stop it, send it a [`user.interrupt` event](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#integrating-events) by itself. After the session is `idle`, you can archive or delete it. +* **Scheduled deployments keep running.** A deployment doesn't re-check its creator's access on each scheduled run. To stop it, pause, update, or archive it. + +When you remove a user or rotate a service account, review the sessions and deployments that identity created. + +### Features not supported + +The following aren't supported on Claude Models on Google Cloud (Anthropic managed): + +* **API keys:** Authentication is through Google Cloud credentials only. +* **MCP tunnels:** [MCP tunnels](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/overview) aren't available on Claude Models on Google Cloud (Anthropic managed). +* **[Memory stores on self-hosted environments](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory):** Memory stores aren't supported for sessions on self-hosted environments. +* **Pre-built self-hosted sandbox workers:** The [self-hosted workers](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-workers) in the `ant` CLI and in the Python, TypeScript, and Go SDKs don't support Claude Models on Google Cloud (Anthropic managed). Instead, implement your own worker that calls the [Environments Work endpoints](https://platform.claude.com/docs/en/api/beta/environments/work) directly. For the roles and permissions your worker needs, see [IAM permissions for environments](https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions#environments). + +### Context window + +Context window sizes on Claude Models on Google Cloud (Anthropic managed) are the same as on the Claude API. For each model's limit, see [Context windows](https://platform.claude.com/docs/en/build-with-claude/context-windows). + +## Billing, rate limits, and logging + +### Rate limits + +Anthropic manages rate limits for Claude Models on Google Cloud (Anthropic managed). To request higher limits, contact your Anthropic account representative or [contact sales](https://claude.com/contact-sales). For how rate limits are measured and reported, see [Rate limits](https://platform.claude.com/docs/en/api/rate-limits). + +### Billing + +Claude Models on Google Cloud (Anthropic managed) bills through Google Cloud Marketplace. Anthropic meters your usage. It reports the usage to Google Cloud in Claude Consumption Units. One Claude Consumption Unit is $0.01 USD. The charges appear on your Google Cloud bill. Anthropic doesn't send a separate invoice. + +View usage and cost data on the **Usage** and **Cost** pages in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console). + +If you have a Google Cloud spend commitment, usage counts toward it the way other Marketplace purchases do. + +### Data retention + +Anthropic is the data processor for Claude Models on Google Cloud (Anthropic managed). Some supporting services, such as Anthropic's trust and safety systems, process data outside Google Cloud. + +Claude Models on Google Cloud (Anthropic managed) follows the same data retention policy as the Claude API. See [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention). Zero Data Retention (ZDR) is available on request. Contact your Anthropic account representative. + +A ZDR arrangement on another Anthropic organization doesn't carry over to your organization for Claude Models on Google Cloud (Anthropic managed). + +### Monitoring and logging + +[Cloud Audit Logs](https://cloud.google.com/logging/docs/audit) records API activity for Claude Models on Google Cloud (Anthropic managed) in your project. The entries appear under the `claude.googleapis.com` service. Each API route belongs to one of two log types: + +* **Data Access logs:** These cover most routes, including messages, batches, files, skills, models, and most Claude Managed Agents resources. They're off by default. +* **Admin Activity logs:** These cover the other routes, including the encryption key routes and most credential vault routes. The exception is the route for `vaults.verify`, which is Data Access. Admin Activity logs are always on. + +To keep a record of requests, turn on Data Access logs for `claude.googleapis.com` in your project's audit log settings. + +For audit log types by route, see [IAM permissions for Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions). + +#### Request IDs + +Successful responses from Claude Models on Google Cloud (Anthropic managed) carry the [`request-id`](https://platform.claude.com/docs/en/api/errors#request-id) header. + +## Moving from an existing Anthropic organization + +You can't convert an existing Anthropic organization into an organization for Claude Models on Google Cloud (Anthropic managed). That includes an organization you use with the Claude API directly. + +Plan the move as a cutover to a new organization: + +* **Create the new organization first.** Follow [Set up your account](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account). +* **Recreate access and configuration.** API keys, workspaces, and Claude Console settings don't carry over. Grant [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) on the project instead of creating API keys. To recreate your workspaces, see [Workspaces](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#workspaces). For ZDR arrangements, see [Data retention](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#data-retention). +* **Plan for stored resources.** Files, skills, batches, and Claude Managed Agents resources stay in the existing organization. +* **Update your integration.** For what changes and what stays the same, see [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests). For features that aren't supported, see [Features not supported](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#features-not-supported). +* **Cut over on your own schedule.** The two organizations are independent and can serve traffic in parallel. You can move workloads gradually. The existing organization keeps its current billing. Before you shift production traffic, check the [rate limits for Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#rate-limits). + +## Migrating from Claude Models on Google Cloud (Google managed) + +To move to Claude Models on Google Cloud (Anthropic managed), complete the following steps. Before you move workloads that rely on a ZDR arrangement, see [Data retention](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#data-retention). For what changes when you move, see [How the two Google Cloud offerings differ](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview#how-the-two-google-cloud-offerings-differ). + + + + Complete every step in [Set up your account](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account). + + + + Grant `roles/claude.user` to each identity that calls Claude Models on Google Cloud (Anthropic managed). Set your project and workspace ID as environment variables. For both, see [Before making API calls](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#before-making-api-calls). + + + + Install the package that provides the client for Claude Models on Google Cloud (Anthropic managed). See [Install an SDK](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#install-an-sdk). + + + + Change the code that imports and creates your client. Use `AnthropicGoogleCloud` (csharp: `AnthropicGoogleCloudClient`; go: `googlecloud.NewClient()`; java: `GoogleCloudBackend`; php: `Anthropic\GoogleCloud\Client`; ruby: `Anthropic::GoogleCloudClient`) in place of `AnthropicVertex` (csharp: `AnthropicVertexClient`; go: `vertex.WithGoogleAuth()`; java: `VertexBackend`; php: `Anthropic\Vertex\Client`; ruby: `Anthropic::VertexClient`). In a cURL request, change the URL, the headers, and the body. Your current code creates a client for Claude Models on Google Cloud (Google managed). For example, the following code creates that client with the global endpoint: + + + ```bash cURL + curl https://aiplatform.googleapis.com/v1/projects/MY_PROJECT_ID/locations/global/publishers/anthropic/models/claude-opus-5-5:rawPredict \ + -H "Authorization: Bearer $(gcloud auth print-access-token)" \ + -H "Content-Type: application/json" \ + -d '{ + "anthropic_version": "vertex-2023-10-16", + "messages": [{"role": "user", "content": "Hey Claude!"}], + "max_tokens": 100 + }' + ``` + + + The `ant` CLI doesn't support Claude Models on Google Cloud (Google managed). + + + ```python Python + from anthropic import AnthropicVertex + + project_id = "MY_PROJECT_ID" + region = "global" + + client = AnthropicVertex(project_id=project_id, region=region) + ``` + + ```typescript TypeScript + import { AnthropicVertex } from "@anthropic-ai/vertex-sdk"; + + const projectId = "MY_PROJECT_ID"; + const region = "global"; + + const client = new AnthropicVertex({ + projectId, + region + }); + ``` + + ```csharp C# + using Anthropic.Vertex; + + var projectId = "MY_PROJECT_ID"; + var region = "global"; + + var client = new AnthropicVertexClient(new AnthropicVertexCredentials(region, projectId)); + ``` + + ```go Go + import ( + "context" + + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/vertex" + ) + // ... + // Uses default Google Cloud credentials + client := anthropic.NewClient( + vertex.WithGoogleAuth(context.Background(), "global", "MY_PROJECT_ID"), + ) + ``` + + ```java Java + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.vertex.backends.VertexBackend; + import com.google.auth.oauth2.GoogleCredentials; + + void main() throws Exception { + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend( + VertexBackend.builder() + .googleCredentials(GoogleCredentials.getApplicationDefault()) + .region("global") + .project("MY_PROJECT_ID") + .build() + ) + .build(); + } + ``` + + ```php PHP + use Anthropic\Vertex; + + $client = Vertex\Client::fromEnvironment( + region: 'global', + projectId: 'MY_PROJECT_ID', + ); + ``` + + ```ruby Ruby + require "anthropic" + + client = Anthropic::VertexClient.new( + region: "global", + project_id: "MY_PROJECT_ID" + ) + ``` + + + The following code creates the client for Claude Models on Google Cloud (Anthropic managed): + + + ```bash cURL + curl "https://claude.googleapis.com/v1/projects/$ANTHROPIC_GOOGLE_CLOUD_PROJECT/locations/global/workspaces/$ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID/invoke/v1/messages" \ + -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ + -H "content-type: application/json" \ + -H "anthropic-version: 2023-06-01" \ + -d '{ + "model": "claude-opus-5-5", + "max_tokens": 1024, + "messages": [ + {"role": "user", "content": "Hello, Claude"} + ] + }' + ``` + + ```bash CLI + ant messages create \ + --model claude-opus-5-5 \ + --max-tokens 1024 \ + --message '{role: user, content: "Hello, Claude"}' + ``` + + ```python Python + from anthropic import AnthropicGoogleCloud + + client = AnthropicGoogleCloud() + ``` + + ```typescript TypeScript + import { AnthropicGoogleCloud } from "@anthropic-ai/google-cloud-sdk"; + + const client = new AnthropicGoogleCloud(); + ``` + + ```csharp C# + using Anthropic.GoogleCloud; + + var client = new AnthropicGoogleCloudClient(); + ``` + + ```go Go + import ( + "context" + + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/googlecloud" + ) + // ... + client, err := googlecloud.NewClient(context.Background(), googlecloud.ClientConfig{}) + if err != nil { + panic(err) + } + ``` + + ```java Java + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.googlecloud.backends.GoogleCloudBackend; + + void main() { + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend(GoogleCloudBackend.fromEnv()) + .build(); + } + ``` + + ```php PHP + use Anthropic\GoogleCloud\Client; + + $client = new Client(); + ``` + + ```ruby Ruby + require "anthropic" + + client = Anthropic::GoogleCloudClient.new + ``` + + + The new client reads your project and workspace ID from the environment variables you set in [Find your workspace ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id). You don't pass them when you create the client. Your Messages API calls stay as they are, except for the model IDs and features in the next step. + + + + * **Model IDs:** If you use a model earlier than Claude 4.6, replace the `@` before the snapshot date in its ID with a hyphen. For example, `claude-haiku-4-5@20251001` becomes `claude-haiku-4-5-20251001`. For the models and their IDs, see [API model IDs](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#api-model-ids). + * **Features:** Check [Feature support](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#feature-support) for each feature your code uses. + * **Location:** If you use a multi-region or regional endpoint today, check which location Claude Models on Google Cloud (Anthropic managed) uses. See [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution). + + + + Run the request in [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) to check that your setup works. Then run your own code. If a call fails with a permission error, see [Troubleshooting account setup](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#troubleshooting-account-setup). Before you move production traffic, check the [rate limits for Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#rate-limits). + + + +## Next steps + + + + Explore Claude's features. + + + + Look up permissions, roles, and audit log types. + + + + As safer and more capable models launch, Anthropic regularly retires older ones. See all API deprecations, along with recommended replacements. + + + + Manage your subscription and billing. + + diff --git a/content/en/build-with-claude/claude-models-on-google-cloud/google-managed.md b/content/en/build-with-claude/claude-models-on-google-cloud/google-managed.md new file mode 100644 index 0000000000..379b3637f1 --- /dev/null +++ b/content/en/build-with-claude/claude-models-on-google-cloud/google-managed.md @@ -0,0 +1,763 @@ +--- +title: Claude Models on Google Cloud (Google managed) +url: https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed +description: Google operates Claude Models on Google Cloud (Google managed) as part of Google Cloud's Agent Platform. You can call Claude with Anthropic's client SDKs. +--- + +[Claude Models on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview) compares the two Google Cloud offerings. It also shows how to tell which one you use. + +## Before making API calls + +To use Claude Models on Google Cloud (Google managed), you need: + +1. A Google Cloud project that can use Agent Platform. For setup steps, see Google Cloud's [Anthropic Claude models on Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude) page. +2. The [gcloud CLI](https://cloud.google.com/sdk/docs/install) installed, for local development. +3. For the identity making the calls, an IAM role that includes the `aiplatform.endpoints.predict` permission, such as Agent Platform User (`roles/aiplatform.user`). For details, see Google Cloud's [Agent Platform partner models](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/use-partner-models) page. +4. Google Cloud credentials for that identity. For the SDK examples, you might need to run `gcloud auth application-default login` to authenticate with Google Cloud. The cURL examples for Claude Models on Google Cloud (Google managed) get their token with `gcloud auth print-access-token`. That command uses the gcloud CLI's own login, not Application Default Credentials. For those examples, run `gcloud auth login` or `gcloud init` first. + +### Install an SDK + +Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) support Claude Models on Google Cloud (Google managed) through `AnthropicVertex` (csharp: `AnthropicVertexClient`; go: `vertex.WithGoogleAuth()`; java: `VertexBackend`; php: `Anthropic\Vertex\Client`; ruby: `Anthropic::VertexClient`). Install the package that provides it: + + + + ```bash + pip install -U "anthropic[vertex]" + ``` + + + + ```bash + npm install @anthropic-ai/vertex-sdk + ``` + + + + ```bash + dotnet add package Anthropic.Vertex + ``` + + + + ```bash + go get github.com/anthropics/anthropic-sdk-go/v2 + ``` + + + + + ```groovy Gradle + implementation("com.anthropic:anthropic-java:3.1.0") + implementation("com.anthropic:anthropic-java-vertex:3.1.0") + ``` + + ```xml Maven + + com.anthropic + anthropic-java + 3.1.0 + + + com.anthropic + anthropic-java-vertex + 3.1.0 + + ``` + + + + + ```bash + composer require anthropic-ai/sdk google/auth + ``` + + + + ```bash + # Gemfile + gem "anthropic" + gem "googleauth" + ``` + + + +The `ant` CLI doesn't support Claude Models on Google Cloud (Google managed). + +## Making requests + +Requests to Claude Models on Google Cloud (Google managed) go to an Agent Platform endpoint URL that ends in `:rawPredict`. Streaming requests use `:streamRawPredict` instead. + +A request is nearly identical to a [Messages API](https://platform.claude.com/docs/en/api/messages/create) request. It differs in two main ways: + +* **Model:** The endpoint URL names the model. In a cURL request, leave `model` out of the body. +* **Version:** In a cURL request, pass `anthropic_version` in the body, not as a header. Set it to `vertex-2023-10-16`, or to [API version `2026-10-21`](https://platform.claude.com/docs/en/api/migration-2026-10-21). + +The following examples use the global endpoint. For the other endpoint types, see [Global, multi-region, and regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#global-multi-region-and-regional-endpoints). + + + ```bash cURL + curl https://aiplatform.googleapis.com/v1/projects/MY_PROJECT_ID/locations/global/publishers/anthropic/models/claude-opus-5-5:rawPredict \ + -H "Authorization: Bearer $(gcloud auth print-access-token)" \ + -H "Content-Type: application/json" \ + -d '{ + "anthropic_version": "vertex-2023-10-16", + "messages": [{"role": "user", "content": "Hey Claude!"}], + "max_tokens": 100 + }' + ``` + + + The `ant` CLI doesn't support Claude Models on Google Cloud (Google managed). + + + ```python Python + from anthropic import AnthropicVertex + + project_id = "MY_PROJECT_ID" + region = "global" + + client = AnthropicVertex(project_id=project_id, region=region) + + message = client.messages.create( + model="claude-opus-5-5", + max_tokens=100, + messages=[ + { + "role": "user", + "content": "Hey Claude!", + } + ], + ) + print(message) + ``` + + ```typescript TypeScript + import { AnthropicVertex } from "@anthropic-ai/vertex-sdk"; + + const projectId = "MY_PROJECT_ID"; + const region = "global"; + + // Goes through the standard `google-auth-library` flow. + const client = new AnthropicVertex({ + projectId, + region + }); + + const result = await client.messages.create({ + model: "claude-opus-5-5", + max_tokens: 100, + messages: [ + { + role: "user", + content: "Hey Claude!" + } + ] + }); + console.log(JSON.stringify(result, null, 2)); + ``` + + ```csharp C# + using Anthropic.Models.Messages; + using Anthropic.Vertex; + + var projectId = "MY_PROJECT_ID"; + var region = "global"; + + var client = new AnthropicVertexClient(new AnthropicVertexCredentials(region, projectId)); + + var parameters = new MessageCreateParams + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 100, + Messages = [new UserMessageParam { Content = "Hey Claude!" }] + }; + + var message = await client.Messages.Create(parameters); + Console.WriteLine(message); + ``` + + ```go Go + import ( + "context" + "fmt" + + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/vertex" + ) + // ... + // Uses default Google Cloud credentials + client := anthropic.NewClient( + vertex.WithGoogleAuth(context.Background(), "global", "MY_PROJECT_ID"), + ) + + message, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus5_5, + MaxTokens: 100, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Hey Claude!")), + }, + }) + if err != nil { + panic(err) + } + fmt.Printf("%+v\n", message) + ``` + + ```java Java + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.models.messages.Message; + import com.anthropic.models.messages.MessageCreateParams; + import com.anthropic.models.messages.Model; + import com.anthropic.vertex.backends.VertexBackend; + import com.google.auth.oauth2.GoogleCredentials; + + void main() throws Exception { + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend( + VertexBackend.builder() + .googleCredentials(GoogleCredentials.getApplicationDefault()) + .region("global") + .project("MY_PROJECT_ID") + .build() + ) + .build(); + + Message message = client + .messages() + .create( + MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(100) + .addUserMessage("Hey Claude!") + .build() + ); + + IO.println(message); + } + ``` + + ```php PHP + messages->create( + maxTokens: 100, + messages: [ + ['role' => 'user', 'content' => 'Hey Claude!'] + ], + model: 'claude-opus-5-5', + ); + + foreach ($message->content as $block) { + if ($block instanceof TextBlock) { + echo $block->text . PHP_EOL; + } + } + ``` + + ```ruby Ruby + require "anthropic" + + client = Anthropic::VertexClient.new( + region: "global", + project_id: "MY_PROJECT_ID" + ) + + message = client.messages.create( + model: "claude-opus-5-5", + max_tokens: 100, + messages: [{role: "user", content: "Hey Claude!"}] + ) + + puts message.content.find { it.type == :text }.text + ``` + + +### API model IDs + +| Model | Agent Platform API model ID | +| :---------------------------------------------------------------------------------------------------- | :--------------------------- | +| Claude Fable 5.1 | `claude-fable-5-1` | +| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | `claude-mythos-5-1` | +| Claude Fable 5 | `claude-fable-5` | +| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | `claude-mythos-5` | +| Claude Opus 5.5 | `claude-opus-5-5` | +| Claude Opus 5 | `claude-opus-5` | +| Claude Opus 4.8 | `claude-opus-4-8` | +| Claude Opus 4.7 | `claude-opus-4-7` | +| Claude Opus 4.6 | `claude-opus-4-6` | +| Claude Opus 4.5 | `claude-opus-4-5@20251101` | +| Claude Opus 4.1 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `claude-opus-4-1@20250805` | +| Claude Opus 4 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `claude-opus-4@20250514` | +| Claude Sonnet 5.5 | `claude-sonnet-5-5` | +| Claude Sonnet 5 | `claude-sonnet-5` | +| Claude Sonnet 4.6 | `claude-sonnet-4-6` | +| Claude Sonnet 4.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `claude-sonnet-4-5@20250929` | +| Claude Sonnet 4 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `claude-sonnet-4@20250514` | +| Claude Haiku 5.5 | `claude-haiku-5-5` | +| Claude Haiku 4.5 | `claude-haiku-4-5@20251001` | +| Claude Haiku 3.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `claude-3-5-haiku@20241022` | + +Claude Models on Google Cloud (Google managed) offers different Claude models in different regions. To check which models a region offers, search "Claude" in [Model Garden](https://cloud.google.com/model-garden) or see Google Cloud's [Anthropic Claude models on Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude) page. + +Google sets the lifecycle dates for the models that Claude Models on Google Cloud (Google managed) serves. These dates can differ from the Claude API schedule. For a model's current retirement date, see Google Cloud's [Anthropic Claude models on Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude) page. For what Deprecated and Retired mean, see [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations). + + + Claude Mythos Preview is a research preview. Claude Models on Google Cloud (Google managed) offers it to invited customers. For more information, see [Project Glasswing](https://anthropic.com/glasswing). + + + + Upgrading to a newer Claude model? The [Claude API skill](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/claude-api-skill#migrating-to-a-newer-claude-model) in Claude Code applies model ID swaps and breaking parameter changes across your code base: + + Let Claude Code migrate your code for you + + ```text + /claude-api migrate this project to the latest Claude Opus model + ``` + + The skill detects which cloud platform your code targets and adjusts model ID formats and feature changes for that platform. + + +## Global, multi-region, and regional endpoints + +Claude Models on Google Cloud (Google managed) offers three endpoint types. You choose one with the region value you pass when you create the client. In a cURL request, the endpoint type sets the host and the `locations` segment of the URL. + +| Endpoint type | Region value | Host | +| ------------------------ | ------------------------------ | -------------------------------------------------------------------------- | +| **Global** (recommended) | `"global"` | `aiplatform.googleapis.com` | +| **Multi-region** | `"us"` or `"eu"` | `aiplatform.us.rep.googleapis.com`
`aiplatform.eu.rep.googleapis.com` | +| **Regional** | A region, such as `"us-east5"` | `{region}-aiplatform.googleapis.com` | + +The endpoint types differ in where they send requests: + +* **Global:** Requests go to any region with available capacity. Use it when you want maximum availability and data residency is flexible. +* **Multi-region:** Requests go to any region in the United States (`"us"`) or the European Union (`"eu"`). Use it when you need data residency within a broad geography and higher availability than a single region. +* **Regional:** Requests go only to the region you name, such as `"us-east5"` or `"europe-west1"`. Use it when you need single-region data residency or must meet strict compliance mandates. + +Multi-region and regional endpoints cost 10 percent more than global endpoints. All three endpoint types take pay-as-you-go traffic, and provisioned throughput needs a regional endpoint. + +Regional endpoints serve Claude Sonnet 4.6 and earlier models only. For newer models, use a global or multi-region endpoint. + + + The premium for multi-region and regional endpoints applies only to Claude Sonnet 4.5 (deprecated) and later models. For the models that keep their earlier pricing, see [Cloud platform pricing](https://platform.claude.com/docs/en/about-claude/pricing#cloud-platform-pricing). For regional endpoints, the premium reflects infrastructure costs for dedicated regional capacity. + + +The following examples use the `us` multi-region endpoint. The highlighted lines set the region. For a full request on the global endpoint, see [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#accessing-vertex-ai). + + + ```bash cURL + # The multi-region identifier, "us" or "eu", appears in the hostname and in the path + curl https://aiplatform.us.rep.googleapis.com/v1/projects/MY_PROJECT_ID/locations/us/publishers/anthropic/models/claude-opus-5-5:rawPredict \ + -H "Authorization: Bearer $(gcloud auth print-access-token)" \ + -H "Content-Type: application/json" \ + -d '{ + "anthropic_version": "vertex-2023-10-16", + "messages": [{"role": "user", "content": "Hey Claude!"}], + "max_tokens": 100 + }' + ``` + + + The `ant` CLI doesn't support Claude Models on Google Cloud (Google managed). + + + ```python Python + from anthropic import AnthropicVertex + + project_id = "MY_PROJECT_ID" + region = "us" # Multi-region identifier: "us" or "eu" + + client = AnthropicVertex(project_id=project_id, region=region) + ``` + + ```typescript TypeScript + import { AnthropicVertex } from "@anthropic-ai/vertex-sdk"; + + const projectId = "MY_PROJECT_ID"; + const region = "us"; // Multi-region identifier: "us" or "eu" + + const client = new AnthropicVertex({ + projectId, + region + }); + ``` + + ```csharp C# + using Anthropic.Vertex; + + var projectId = "MY_PROJECT_ID"; + var region = "us"; // Multi-region identifier: "us" or "eu" + + var client = new AnthropicVertexClient(new AnthropicVertexCredentials(region, projectId)); + ``` + + ```go Go + import ( + "context" + + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/vertex" + ) + // ... + // Multi-region identifier: "us" or "eu" + client := anthropic.NewClient( + vertex.WithGoogleAuth(context.Background(), "us", "MY_PROJECT_ID"), + ) + ``` + + ```java Java + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.vertex.backends.VertexBackend; + import com.google.auth.oauth2.GoogleCredentials; + + void main() throws Exception { + // Multi-region identifier: "us" or "eu" + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend( + VertexBackend.builder() + .googleCredentials(GoogleCredentials.getApplicationDefault()) + .region("us") + .project("MY_PROJECT_ID") + .build() + ) + .build(); + } + ``` + + ```php PHP + use Anthropic\Vertex; + + $client = Vertex\Client::fromEnvironment( + region: 'us', // Multi-region identifier: "us" or "eu" + projectId: 'MY_PROJECT_ID', + ); + ``` + + ```ruby Ruby + require "anthropic" + + client = Anthropic::VertexClient.new( + region: "us", # Multi-region identifier: "us" or "eu" + project_id: "MY_PROJECT_ID" + ) + ``` + + +## Feature support + +Features supported on Claude Models on Google Cloud (Google managed) include the following: + +* [Messages API](https://platform.claude.com/docs/en/api/messages/create) + +* [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) + +* [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) + +* [Tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview), including these tools: + + * [Bash tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) + * [Browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) + * [Computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) + * [Memory tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) + * [Text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) + * [Web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) + +* [Citations](https://platform.claude.com/docs/en/build-with-claude/citations) + +* [Structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + +[Features overview](https://platform.claude.com/docs/en/build-with-claude/overview) lists every feature and whether Claude Models on Google Cloud (Google managed) supports it. + +### Features not supported + +Claude Models on Google Cloud (Google managed) doesn't support the following: + +* **Input sources:** URL sources for images and documents, and the Files API +* **Server-side tools:** Code execution, web fetch, and advisor +* **Agent infrastructure:** Agent Skills, MCP connector, and programmatic tool calling +* **API endpoints:** Message Batches API, Models API, Admin API, Compliance API, and Usage and Cost API +* **Claude Managed Agents** +* **Server-side fallback:** The [`fallbacks` parameter](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) + +Instead of server-side fallback, use the [client-side fallback pattern](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback). + +### Context window + +Claude Models on Google Cloud (Google managed) offers a [1M-token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) for these models: + +* Claude Fable 5.1 +* Claude Fable 5 +* Claude Opus 5.5 +* Claude Opus 5 +* Claude Opus 4.8 +* Claude Opus 4.7 +* Claude Opus 4.6 +* Claude Sonnet 5.5 +* Claude Sonnet 5 +* Claude Sonnet 4.6 +* Claude Haiku 5.5 + +Other Claude models have a 200k-token context window. These include Claude Sonnet 4.5 (deprecated) and Claude Sonnet 4 (deprecated). + +Agent Platform limits request payloads to 30 MB. When you send large documents or many images, you might reach this limit before the token limit. + +## Billing, rate limits, and logging + +### Rate limits + +Google Cloud manages rate limits and quotas for Claude Models on Google Cloud (Google managed). For details, including how to request a quota increase, see Google Cloud's [Quotas for Anthropic Claude models](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude/quotas) page. + +### Billing + +Google Cloud invoices you for Claude Models on Google Cloud (Google managed). For prices, see Google Cloud's [Generative AI pricing](https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models) page. Prices also depend on the endpoint type. See [Global, multi-region, and regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#global-multi-region-and-regional-endpoints). + +### Data retention + +Google Cloud governs data handling for Claude Models on Google Cloud (Google managed). For details, see [Agent Platform and zero data retention](https://cloud.google.com/vertex-ai/generative-ai/docs/data-governance). + +### Monitoring and logging + +To log prompts and completions for Claude Models on Google Cloud (Google managed), use Agent Platform's [request-response logging service](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/request-response-logging). + +Anthropic recommends that you keep at least the last 30 days of logs. The logs help you understand your activity and investigate possible misuse. + + + Turning on this service doesn't give Google or Anthropic any access to your content. + + +## Migrating from Claude Models on Google Cloud (Anthropic managed) + +For what changes when you move, see [How the two Google Cloud offerings differ](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview#how-the-two-google-cloud-offerings-differ). To move to Claude Models on Google Cloud (Google managed), follow these steps: + + + + Check that your project and the identity that makes the calls meet the requirements in [Before making API calls](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#before-making-api-calls). + + + + Install the package that provides the client for Claude Models on Google Cloud (Google managed). See [Install an SDK](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#install-an-sdk-for-accessing-vertex-ai). + + + + Change the code that imports and creates your client. Use `AnthropicVertex` (csharp: `AnthropicVertexClient`; go: `vertex.WithGoogleAuth()`; java: `VertexBackend`; php: `Anthropic\Vertex\Client`; ruby: `Anthropic::VertexClient`) in place of `AnthropicGoogleCloud` (csharp: `AnthropicGoogleCloudClient`; go: `googlecloud.NewClient()`; java: `GoogleCloudBackend`; php: `Anthropic\GoogleCloud\Client`; ruby: `Anthropic::GoogleCloudClient`). A cURL request needs a new URL, new headers, and a new body. The following code creates the client for Claude Models on Google Cloud (Anthropic managed) that you use today: + + + ```bash cURL + curl "https://claude.googleapis.com/v1/projects/$ANTHROPIC_GOOGLE_CLOUD_PROJECT/locations/global/workspaces/$ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID/invoke/v1/messages" \ + -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ + -H "content-type: application/json" \ + -H "anthropic-version: 2023-06-01" \ + -d '{ + "model": "claude-opus-5-5", + "max_tokens": 1024, + "messages": [ + {"role": "user", "content": "Hello, Claude"} + ] + }' + ``` + + ```bash CLI + ant messages create \ + --model claude-opus-5-5 \ + --max-tokens 1024 \ + --message '{role: user, content: "Hello, Claude"}' + ``` + + ```python Python + from anthropic import AnthropicGoogleCloud + + client = AnthropicGoogleCloud() + ``` + + ```typescript TypeScript + import { AnthropicGoogleCloud } from "@anthropic-ai/google-cloud-sdk"; + + const client = new AnthropicGoogleCloud(); + ``` + + ```csharp C# + using Anthropic.GoogleCloud; + + var client = new AnthropicGoogleCloudClient(); + ``` + + ```go Go + import ( + "context" + + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/googlecloud" + ) + // ... + client, err := googlecloud.NewClient(context.Background(), googlecloud.ClientConfig{}) + if err != nil { + panic(err) + } + ``` + + ```java Java + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.googlecloud.backends.GoogleCloudBackend; + + void main() { + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend(GoogleCloudBackend.fromEnv()) + .build(); + } + ``` + + ```php PHP + use Anthropic\GoogleCloud\Client; + + $client = new Client(); + ``` + + ```ruby Ruby + require "anthropic" + + client = Anthropic::GoogleCloudClient.new + ``` + + + The following code creates the client for Claude Models on Google Cloud (Google managed). It uses the global endpoint. For the other endpoint types, see [Global, multi-region, and regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#global-multi-region-and-regional-endpoints). + + + ```bash cURL + curl https://aiplatform.googleapis.com/v1/projects/MY_PROJECT_ID/locations/global/publishers/anthropic/models/claude-opus-5-5:rawPredict \ + -H "Authorization: Bearer $(gcloud auth print-access-token)" \ + -H "Content-Type: application/json" \ + -d '{ + "anthropic_version": "vertex-2023-10-16", + "messages": [{"role": "user", "content": "Hey Claude!"}], + "max_tokens": 100 + }' + ``` + + + The `ant` CLI doesn't support Claude Models on Google Cloud (Google managed). Use cURL or an SDK instead. + + + ```python Python + from anthropic import AnthropicVertex + + project_id = "MY_PROJECT_ID" + region = "global" + + client = AnthropicVertex(project_id=project_id, region=region) + ``` + + ```typescript TypeScript + import { AnthropicVertex } from "@anthropic-ai/vertex-sdk"; + + const projectId = "MY_PROJECT_ID"; + const region = "global"; + + const client = new AnthropicVertex({ + projectId, + region + }); + ``` + + ```csharp C# + using Anthropic.Vertex; + + var projectId = "MY_PROJECT_ID"; + var region = "global"; + + var client = new AnthropicVertexClient(new AnthropicVertexCredentials(region, projectId)); + ``` + + ```go Go + import ( + "context" + + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/vertex" + ) + // ... + // Uses default Google Cloud credentials + client := anthropic.NewClient( + vertex.WithGoogleAuth(context.Background(), "global", "MY_PROJECT_ID"), + ) + ``` + + ```java Java + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.vertex.backends.VertexBackend; + import com.google.auth.oauth2.GoogleCredentials; + + void main() throws Exception { + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend( + VertexBackend.builder() + .googleCredentials(GoogleCredentials.getApplicationDefault()) + .region("global") + .project("MY_PROJECT_ID") + .build() + ) + .build(); + } + ``` + + ```php PHP + use Anthropic\Vertex; + + $client = Vertex\Client::fromEnvironment( + region: 'global', + projectId: 'MY_PROJECT_ID', + ); + ``` + + ```ruby Ruby + require "anthropic" + + client = Anthropic::VertexClient.new( + region: "global", + project_id: "MY_PROJECT_ID" + ) + ``` + + + This code passes your project ID and a region when it creates the client. Replace `MY_PROJECT_ID` with your project ID. The Messages API calls that you make with the client stay as they are. The exceptions are the model IDs and features in the next step. + + + + * **Model IDs:** If you use a model earlier than Claude 4.6, replace the hyphen before the snapshot date in its ID with `@`. For example, `claude-haiku-4-5-20251001` becomes `claude-haiku-4-5@20251001`. For the models and their IDs, see [API model IDs](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#api-model-ids). + * **Features:** Check that the features your code uses aren't listed in [Features not supported](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#features-not-supported). + + + + Run the request in [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#accessing-vertex-ai) to check that your setup works. Then run your own code. Before you move production traffic, read about [rate limits for Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#rate-limits). + + + +## Next steps + + + + Explore Claude's features. + + + + Check which Claude models each region offers, and their retirement dates. + + + + Read Google Cloud's Agent Platform documentation. + + + + Read Google Cloud's blog post about the global endpoint for Claude models. + + diff --git a/content/en/build-with-claude/claude-models-on-google-cloud/overview.md b/content/en/build-with-claude/claude-models-on-google-cloud/overview.md new file mode 100644 index 0000000000..1726769014 --- /dev/null +++ b/content/en/build-with-claude/claude-models-on-google-cloud/overview.md @@ -0,0 +1,79 @@ +--- +title: Claude Models on Google Cloud +url: https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview +description: Compare Claude Models on Google Cloud (Anthropic managed) and Claude Models on Google Cloud (Google managed), and find out which one you use. +--- + +You can use Claude through your Google Cloud project in two ways: + +* **[Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed):** Anthropic operates the [Claude API](https://platform.claude.com/docs/en/api/overview). +* **[Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed):** Google operates Claude models as part of Google Cloud's Agent Platform. + +## How the two Google Cloud offerings differ + +The following table compares Claude Models on Google Cloud (Anthropic managed) with Claude Models on Google Cloud (Google managed). + +| Aspect | [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | +| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **API surface** | Claude API endpoints
`/v1/{endpoint}` | Agent Platform prediction endpoints | +| **Request format** | Same as the Claude API
`model` in the request body
`anthropic-version` header | `model` in the URL
`anthropic_version` in the request body | +| **Streaming** | `"stream": true` in the request body | A separate `:streamRawPredict` endpoint | +| **Location** | `global`
See [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution). | A global, multi-region, or regional endpoint
See [Global, multi-region, and regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#global-multi-region-and-regional-endpoints). | +| **Model IDs for models earlier than Claude 4.6** | The Claude API ID
Example: `claude-haiku-4-5-20251001` | The Claude API ID, with `@` in place of the hyphen before the snapshot date
Example: `claude-haiku-4-5@20251001`
See [Model IDs and versioning](https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions). | +| **Services to enable on your project** | See [Set up your account](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account). | The Agent Platform API
`aiplatform.googleapis.com` | +| **Anthropic organization** | A new Anthropic organization for your project | None | +| **Billing** | Google Cloud Marketplace | Google Cloud, as Agent Platform usage | +| **Rate limits** | Managed by Anthropic | Managed by Google Cloud | + +## What both offerings share + +* **Credentials:** Both offerings use Google Cloud credentials, including Application Default Credentials. You grant access to each offering separately, through its own IAM roles. + + * [Credentials for Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication) + * [Credentials for Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#before-making-api-calls) + +* **Billing:** Charges for both offerings appear on your Google Cloud bill. + + * [Billing for Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#billing) + * [Billing for Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#billing) + +* **Model IDs:** Claude 4.6 and later models use their Claude API IDs on both offerings. See [Model IDs and versioning](https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions). + +* **SDKs:** Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) support both offerings. + +## Moving between the two offerings + +Follow the steps for whichever offering you're moving to: + +* [Steps for moving to Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#migrating-from-google-managed) +* [Steps for moving to Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#migrating-from-anthropic-managed) + +## Which offering are you using? + +The following table lists values that identify Claude Models on Google Cloud (Anthropic managed) and Claude Models on Google Cloud (Google managed). Find a value you already have. For example, look for the host in your request URLs or the SDK client in your code. The heading of that value's column is your offering. + +| What to check | [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | +| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Where your requests go** | `claude.googleapis.com`
The URL includes your workspace ID.
It ends in a Claude API path, such as `.../invoke/v1/messages`. | One of these Agent Platform hosts:
`aiplatform.googleapis.com`
`aiplatform.us.rep.googleapis.com`
`aiplatform.eu.rep.googleapis.com`
`{region}-aiplatform.googleapis.com`
The URL path contains `.../publishers/anthropic/models/{model}`.
It ends in `:rawPredict` or `:streamRawPredict`. | +| **SDK client in your code** | `AnthropicGoogleCloud` (csharp: `AnthropicGoogleCloudClient`; go: `googlecloud.NewClient()`; java: `GoogleCloudBackend`; php: `Anthropic\GoogleCloud\Client`; ruby: `Anthropic::GoogleCloudClient`)
In every SDK, the client name contains `GoogleCloud` (all lowercase in Go). | `AnthropicVertex` (csharp: `AnthropicVertexClient`; go: `vertex.WithGoogleAuth()`; java: `VertexBackend`; php: `Anthropic\Vertex\Client`; ruby: `Anthropic::VertexClient`)
In every SDK, the client name contains `Vertex` (all lowercase in Go). | +| **IAM roles that grant access** | `roles/claude.admin`
`roles/claude.user`
`roles/claude.viewer` | Agent Platform IAM roles | +| **Management console** | The Claude Console, at `platform.claude.com`
You open it from the Google Cloud console. | The Google Cloud console | +| **Where each offering appears in the Google Cloud console** | The option labeled **Anthropic managed**
See [Set up your account](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account). | Claude models in [Model Garden](https://cloud.google.com/model-garden) | + +If you call `api.anthropic.com` with an API key, you use neither offering. To move those calls to Claude Models on Google Cloud (Anthropic managed), see [Moving from an existing Anthropic organization](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#moving-from-an-existing-anthropic-organization). + +## Next steps + + + + Set up your account and make your first request. + + + + Install an SDK and make your first request. + + + + Look up permissions, roles, and audit log types. + + diff --git a/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md b/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md index 0a1540f28f..4459bb4c64 100644 --- a/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md +++ b/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md @@ -311,7 +311,7 @@ The following examples show how to generate text from Claude on Bedrock: - Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK handles automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request). + Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK examples in the other tabs handle automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request). @@ -444,24 +444,24 @@ The following examples show how to generate text from Claude on Bedrock: public class BedrockExample { - public static void main(String[] args) { - // Uses default AWS credential provider chain - AnthropicClient client = AnthropicOkHttpClient.builder() - .backend(BedrockBackend.fromEnv()) - .build(); - - Message message = client - .messages() - .create( - MessageCreateParams.builder() - .model("global.anthropic.claude-opus-4-6-v1") - .maxTokens(256) - .addUserMessage("Hello, world") - .build() - ); - - System.out.println(message.content()); - } + public static void main(String[] args) { + // Uses default AWS credential provider chain + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend(BedrockBackend.fromEnv()) + .build(); + + Message message = client + .messages() + .create( + MessageCreateParams.builder() + .model("global.anthropic.claude-opus-4-6-v1") + .maxTokens(256) + .addUserMessage("Hello, world") + .build() + ); + + System.out.println(message.content()); + } } ```
@@ -473,10 +473,10 @@ The following examples show how to generate text from Claude on Bedrock: use Anthropic\Bedrock; $client = Bedrock\Client::withCredentials( - accessKeyId: getenv("AWS_ACCESS_KEY_ID"), - secretAccessKey: getenv("AWS_SECRET_ACCESS_KEY"), + accessKeyId: getenv('AWS_ACCESS_KEY_ID'), + secretAccessKey: getenv('AWS_SECRET_ACCESS_KEY'), region: 'us-west-2', - securityToken: getenv("AWS_SESSION_TOKEN"), + securityToken: getenv('AWS_SESSION_TOKEN'), ); $message = $client->messages->create( @@ -653,25 +653,25 @@ To provide a token programmatically: // Option 1: Set AWS_BEARER_TOKEN_BEDROCK environment variable and use fromEnv() AnthropicClient client = AnthropicOkHttpClient.builder() - .backend(BedrockBackend.fromEnv()) - .build(); + .backend(BedrockBackend.fromEnv()) + .build(); // Option 2: Provide the token programmatically client = AnthropicOkHttpClient.builder() - .backend(BedrockBackend.builder() - .apiKey("your-bearer-token") - .build()) - .build(); + .backend(BedrockBackend.builder() + .apiKey("your-bearer-token") + .build()) + .build(); MessageCreateParams params = MessageCreateParams.builder() - .model("us.anthropic.claude-sonnet-4-5-20250929-v1:0") - .maxTokens(1024) - .addUserMessage("Hello!") - .build(); + .model("us.anthropic.claude-sonnet-4-5-20250929-v1:0") + .maxTokens(1024) + .addUserMessage("Hello!") + .build(); client.messages().create(params).content().stream() - .flatMap(block -> block.text().stream()) - .forEach(textBlock -> System.out.println(textBlock.text())); + .flatMap(block -> block.text().stream()) + .forEach(textBlock -> System.out.println(textBlock.text())); ``` @@ -809,7 +809,7 @@ The model IDs for Claude Opus 4.6, Sonnet 4.6, and Sonnet 4.5 (deprecated) alrea - Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK handles automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request). + Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK examples in the other tabs handle automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request). @@ -903,18 +903,18 @@ The model IDs for Claude Opus 4.6, Sonnet 4.6, and Sonnet 4.5 (deprecated) alrea // Uses default AWS credential provider chain AnthropicClient client = AnthropicOkHttpClient.builder() - .backend(BedrockBackend.fromEnv()) - .build(); + .backend(BedrockBackend.fromEnv()) + .build(); var message = client - .messages() - .create( - MessageCreateParams.builder() - .model("global.anthropic.claude-opus-4-6-v1") - .maxTokens(256) - .addUserMessage("Hello, world") - .build() - ); + .messages() + .create( + MessageCreateParams.builder() + .model("global.anthropic.claude-opus-4-6-v1") + .maxTokens(256) + .addUserMessage("Hello, world") + .build() + ); ``` @@ -960,7 +960,7 @@ To use regional endpoints, replace the `global.` prefix with a regional prefix s - Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK handles automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request). + Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK examples in the other tabs handle automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request). @@ -1055,19 +1055,19 @@ To use regional endpoints, replace the `global.` prefix with a regional prefix s // Uses default AWS credential provider chain AnthropicClient client = AnthropicOkHttpClient.builder() - .backend(BedrockBackend.fromEnv()) - .build(); + .backend(BedrockBackend.fromEnv()) + .build(); // Using US regional endpoint (CRIS) var message = client - .messages() - .create( - MessageCreateParams.builder() - .model("us.anthropic.claude-opus-4-6-v1") // Regional prefix - .maxTokens(256) - .addUserMessage("Hello, world") - .build() - ); + .messages() + .create( + MessageCreateParams.builder() + .model("us.anthropic.claude-opus-4-6-v1") // Regional prefix + .maxTokens(256) + .addUserMessage("Hello, world") + .build() + ); ``` diff --git a/content/en/build-with-claude/claude-platform-on-aws.md b/content/en/build-with-claude/claude-platform-on-aws.md index eb00ba0d26..732b90412a 100644 --- a/content/en/build-with-claude/claude-platform-on-aws.md +++ b/content/en/build-with-claude/claude-platform-on-aws.md @@ -22,20 +22,20 @@ Claude Platform on AWS follows the same data retention policy as the first-party Both offerings let you use Claude through AWS, but they differ in architecture, API surface, and feature availability. -| Aspect | Claude Platform on AWS | [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | -| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -| **Who operates the stack** | Anthropic | AWS | AWS | -| **API surface** | Claude API (`/v1/{endpoint}`) | Messages API at `/anthropic/v1/messages` | Bedrock Converse / InvokeModel | -| **Feature availability** | Typically same-day as Claude API (see [feature limitations](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported)) | Per Amazon Bedrock release schedule | Per Amazon Bedrock release schedule | -| **Agent Skills** | Available | Not available (requires code execution) | Not available | -| **Beta features** | Pass through with `anthropic-beta` headers (see [feature limitations](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported)) | The beta features Amazon Bedrock supports, through the `anthropic-beta` header | The beta features Amazon Bedrock supports, through the `anthropic_beta` field of the InvokeModel request body | -| **Authentication** | AWS IAM / SigV4 or API key | AWS IAM / SigV4 | AWS IAM / SigV4 or bearer token | -| **Billing** | AWS Marketplace | AWS (native service) | AWS (native service) | -| **Base URL** | `aws-external-anthropic.{region}.api.aws` | `bedrock-mantle.{region}.api.aws` | `bedrock-runtime.{region}.amazonaws.com` | -| **SDK client** | `AnthropicAWS` (typescript: `AnthropicAws`; csharp: `AnthropicAwsClient`; go: `anthropicaws.NewClient`; java: `AwsBackend`; php: `Anthropic\Aws\Client`; ruby: `Anthropic::AWSClient`), in beta | `AnthropicBedrockMantle` | `AnthropicBedrock` / Bedrock SDK | -| **Console** | Claude Console (`platform.claude.com`, access through the AWS Console) | Bedrock Console | Bedrock Console | -| **Rate limits and quotas** | Managed by Anthropic | Managed by AWS | Managed by AWS | -| **Inference data processor** | Anthropic | AWS | AWS | +| Aspect | Claude Platform on AWS | [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| **Who operates the stack** | Anthropic | AWS | AWS | +| **API surface** | Claude API (`/v1/{endpoint}`) | Messages API at `/anthropic/v1/messages` | Bedrock Converse / InvokeModel | +| **Feature availability** | Typically same-day as Claude API (see [feature limitations](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported)) | Follows the Amazon Bedrock release schedule | Follows the Amazon Bedrock release schedule | +| **Agent Skills** | Available | Not available (requires code execution) | Not available | +| **Beta features** | Pass through with `anthropic-beta` headers (see [feature limitations](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported)) | The beta features Amazon Bedrock supports, through the `anthropic-beta` header | The beta features Amazon Bedrock supports, through the `anthropic_beta` field of the InvokeModel request body | +| **Authentication** | AWS IAM / SigV4 or API key | AWS IAM / SigV4 | AWS IAM / SigV4 or bearer token | +| **Billing** | AWS Marketplace | AWS (native service) | AWS (native service) | +| **Base URL** | `aws-external-anthropic.{region}.api.aws` | `bedrock-mantle.{region}.api.aws` | `bedrock-runtime.{region}.amazonaws.com` | +| **SDK client** | `AnthropicAWS` (typescript: `AnthropicAws`; csharp: `AnthropicAwsClient`; go: `anthropicaws.NewClient()`; java: `AwsBackend`; php: `Anthropic\Aws\Client`; ruby: `Anthropic::AWSClient`), in beta | `AnthropicBedrockMantle` | `AnthropicBedrock` / Bedrock SDK | +| **Console** | Claude Console (`platform.claude.com`, access through the AWS Console) | Bedrock Console | Bedrock Console | +| **Rate limits and quotas** | Managed by Anthropic | Managed by AWS | Managed by AWS | +| **Inference data processor** | Anthropic | AWS | AWS | If you need AWS-operated Claude, see [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock). Claude Platform on AWS uses a separate capacity pool from both the first-party Claude API and Amazon Bedrock. You can run workloads on more than one platform and fail over between them. @@ -117,7 +117,7 @@ Plan a move from an existing organization as a cutover to a new one: Once the new organization is running, the differences are concentrated in billing and authentication, which are handled through AWS: * **Billing** moves to AWS Marketplace: usage is billed in Claude Consumption Units rather than prepaid credits (see [Billing](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#billing)), and you set spend limits on the **Billing** page (see [Spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits)). During the transition, billing stays separate: the existing organization continues to be billed as it is today. -* **Authentication and access** move to AWS: requests authenticate with AWS credentials or with API keys generated in the AWS Console, not the Claude Console (see [Authentication](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#authentication)). Organization membership is managed through AWS IAM rather than the Claude Console (see [Available pages](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#available-pages)), and the SDK provides a platform-specific client class (see [Install an SDK](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#install-an-sdk)). +* **Authentication and access** move to AWS: requests authenticate with AWS credentials or with API keys generated in the AWS Console, not the Claude Console (see [Authentication](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#authentication)). Organization membership is managed through AWS IAM rather than the Claude Console (see [Available pages](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#available-pages)), and the Claude SDK provides a platform-specific client class (see [Install an SDK](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#install-an-sdk)). * **Day-to-day API usage** works the way it does on the first-party Claude API, except where noted in the [feature limitations](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported). Before shifting production traffic, check your rate limits: new organizations are placed on the Start tier, and limit increases go through your Anthropic account representative (see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas)). For Claude Enterprise (claude.ai) organizations, which behave differently, see the [offering comparison](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#claude-platform-on-aws-vs-amazon-bedrock). @@ -239,7 +239,10 @@ Pass the generated token to the SDK the same way you'd pass an AWS Console-gener import com.anthropic.client.okhttp.AnthropicOkHttpClient; void main() { - String token = TokenGenerator.builder().region(Region.US_WEST_2).build().getToken(); + String token = TokenGenerator.builder() + .region(Region.US_WEST_2) + .build() + .getToken(); AnthropicClient client = AnthropicOkHttpClient.builder() .backend(AwsBackend.builder() @@ -268,11 +271,11 @@ The platform-specific client resolves authentication in the following order, sta ### Region resolution -The client reads `AWS_REGION` from the environment if you don't set `aws_region` (typescript, php: `awsRegion`; go: `AWSRegion`; java: `.region()`; csharp: `AwsClientOptions.AwsRegion`), falling back to `AWS_DEFAULT_REGION` for compatibility with the standard AWS SDKs. Region is required and there is no default: `AnthropicAWS` (typescript: `AnthropicAws`; csharp: `AnthropicAwsClient`; go: `anthropicaws.NewClient`; java: `AwsBackend`; php: `Anthropic\Aws\Client`; ruby: `Anthropic::AWSClient`) raises an error if neither the constructor argument nor an environment variable is set. +The client reads `AWS_REGION` from the environment if you don't set `aws_region` (typescript, php: `awsRegion`; go: `AWSRegion`; java: `.region()`; csharp: `AwsClientOptions.AwsRegion`), falling back to `AWS_DEFAULT_REGION` for compatibility with the standard AWS SDKs. Region is required and there is no default: `AnthropicAWS` (typescript: `AnthropicAws`; csharp: `AnthropicAwsClient`; go: `anthropicaws.NewClient()`; java: `AwsBackend`; php: `Anthropic\Aws\Client`; ruby: `Anthropic::AWSClient`) raises an error if neither the constructor argument nor an environment variable is set. ## Install an SDK -Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) support Claude Platform on AWS. Your SDK provides `AnthropicAWS` (typescript: `AnthropicAws`; csharp: `AnthropicAwsClient`; go: `anthropicaws.NewClient`; java: `AwsBackend`; php: `Anthropic\Aws\Client`; ruby: `Anthropic::AWSClient`), which handles SigV4 signing, region-based base URL construction, and the `anthropic-workspace-id` header. +Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) support Claude Platform on AWS. Your SDK provides `AnthropicAWS` (typescript: `AnthropicAws`; csharp: `AnthropicAwsClient`; go: `anthropicaws.NewClient()`; java: `AwsBackend`; php: `Anthropic\Aws\Client`; ruby: `Anthropic::AWSClient`), which handles SigV4 signing, region-based base URL construction, and the `anthropic-workspace-id` header. @@ -299,7 +302,7 @@ Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries ```bash - go get github.com/anthropics/anthropic-sdk-go + go get github.com/anthropics/anthropic-sdk-go/v2 ``` @@ -389,7 +392,7 @@ Before running these examples, complete the steps in [Before making API calls](h # Omit the x-amz-security-token header if you use long-term IAM user credentials curl "https://aws-external-anthropic.us-west-2.api.aws/v1/messages" \ --aws-sigv4 "aws:amz:us-west-2:aws-external-anthropic" \ - --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \ + -u "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \ -H "x-amz-security-token: $AWS_SESSION_TOKEN" \ -H "content-type: application/json" \ -H "anthropic-version: 2023-06-01" \ @@ -612,7 +615,7 @@ Set the inference geography for each request with the `inference_geo` parameter: # Omit the x-amz-security-token header if you use long-term IAM user credentials curl "https://aws-external-anthropic.us-west-2.api.aws/v1/messages" \ --aws-sigv4 "aws:amz:us-west-2:aws-external-anthropic" \ - --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \ + -u "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \ -H "x-amz-security-token: $AWS_SESSION_TOKEN" \ -H "content-type: application/json" \ -H "anthropic-version: 2023-06-01" \ @@ -805,33 +808,33 @@ Access to the Claude Console is federated through AWS IAM. See [Set up your acco 3. Click **Open Claude Console**. The AWS Console issues a JWT and redirects you to `platform.claude.com`. 4. On first sign-in, you're prompted for an email address. Enter your work email. The platform provisions your Claude Console user just-in-time. -Two Claude Console roles are available: **Admin** and **Developer**. The Admin role grants access to all Claude Console pages and settings available for Claude Platform on AWS. The Developer role grants read access to usage, cost, request log, rate limit, and workspace information. Contact your Anthropic account representative to assign the Admin or Developer role to a principal. +Two Claude Console roles are available: **Admin** and **Developer**. The Admin role grants access to all Claude Console pages and settings available for Claude Platform on AWS. The Developer role grants read access to usage, cost, rate limit, and workspace information. Contact your Anthropic account representative to assign the Admin or Developer role to a principal. ### Available pages The **Through AWS gateway** column indicates whether the page reads and writes data through the AWS gateway (and is therefore governed by [IAM actions for Claude Platform on AWS](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions)). Pages marked **No** read organization-level metadata directly from Anthropic and bypass IAM action checks. -| Page | Available | Through AWS gateway | Notes | -| --------------------- | ------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Usage** | Yes | No | View token usage by model, workspace, and dimension. Data can take a few minutes to appear after a request. | -| **Cost** | Yes | No | View cost breakdowns by model and workspace. AWS Cost Explorer shows the aggregated [Claude Consumption Unit (CCU)](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#billing) line item. | -| **Rate limits** | Yes | No | View rate limits (read-only). Tier increases go through your Anthropic account representative; see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas). | -| **Logs** | Yes | No | View per-request metadata such as time, model, workspace, token counts, and status. Log entries do not include prompts or responses. | -| **Workspaces** | Yes | Yes (except spend limits) | View per-region workspaces. With the Admin role, you can also create, rename, and archive workspaces, and set per-workspace [spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits). | -| **Encryption keys** | Yes | Yes | A section of the [Data retention](https://platform.claude.com/settings/privacy#encryption-keys) page (`platform.claude.com/settings/privacy`) in the Claude Console, shown while **Organization** is selected in the dropdown menu at the top of the page. Register AWS KMS keys there (Admin role), as described in [Set up CMEK on Claude Platform on AWS](https://platform.claude.com/docs/en/manage-claude/cmek-claude-platform-on-aws). To attach a registered key to a workspace, select the workspace from that dropdown menu, then select the key under **Encryption key**. | -| **Files** | Yes | Yes | View and manage uploaded files. | -| **Skills** | Yes | Yes | View and manage Agent Skills. | -| **Batches** | Yes | Yes | View and manage batch processing jobs. | -| **Agents** | Yes | Yes | View and manage agent definitions. | -| **Sessions** | Yes | Yes | View agent sessions and event history. | -| **Environments** | Yes | Yes | View and manage cloud sandbox configurations for sessions. | -| **Credential vaults** | Yes | Yes | View and manage credential vaults for session authentication. | -| **Memory stores** | Yes | Yes | View and manage persistent agent memory. | -| **Webhooks** | Yes | Yes | View and manage webhook endpoints. | -| **API keys** | No | N/A | Manage API keys in the AWS Console (**Claude Platform on AWS → API keys**). See [API key authentication](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#api-key-authentication). | -| **Members** | No | N/A | Not applicable. AWS IAM manages access. | -| **Billing** | Yes (limited) | No | Set an organization monthly spend limit; see [Spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits). AWS Marketplace manages invoicing. View cost breakdowns on the **Cost** page. | -| **Claude Code** | No | N/A | View Claude Code usage on the **Usage** page. | +| Page | Available | Through AWS gateway | Notes | +| --------------------- | ---------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Usage** | Yes | No | View token usage by model, workspace, and dimension. Data can take a few minutes to appear after a request. | +| **Cost** | Yes | No | View cost breakdowns by model and workspace. AWS Cost Explorer shows the aggregated [Claude Consumption Unit (CCU)](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#billing) line item. | +| **Rate limits** | Yes | No | View rate limits (read-only). Tier increases go through your Anthropic account representative; see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas). | +| **Logs** | Yes (Admin role) | No | View per-request metadata such as time, model, workspace, token counts, and status. Log entries do not include prompts or responses. | +| **Workspaces** | Yes | Yes (except spend limits) | View per-region workspaces. With the Admin role, you can also create, rename, and archive workspaces, and set per-workspace [spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits). | +| **Encryption keys** | Yes | Yes | A section of the [Data retention](https://platform.claude.com/settings/privacy#encryption-keys) page (`platform.claude.com/settings/privacy`) in the Claude Console, shown while **Organization** is selected in the dropdown menu at the top of the page. Register AWS KMS keys there (Admin role), as described in [Set up CMEK on Claude Platform on AWS](https://platform.claude.com/docs/en/manage-claude/cmek-claude-platform-on-aws). To attach a registered key to a workspace, select the workspace from that dropdown menu, then select the key under **Encryption key**. | +| **Files** | Yes | Yes | View and manage uploaded files. | +| **Skills** | Yes | Yes | View and manage Agent Skills. | +| **Batches** | Yes | Yes | View and manage batch processing jobs. | +| **Agents** | Yes | Yes | View and manage agent definitions. | +| **Sessions** | Yes | Yes | View agent sessions and event history. | +| **Environments** | Yes | Yes | View and manage cloud sandbox configurations for sessions. | +| **Credential vaults** | Yes | Yes | View and manage credential vaults for session authentication. | +| **Memory stores** | Yes | Yes | View and manage persistent agent memory. | +| **Webhooks** | Yes | Yes | View and manage webhook endpoints. | +| **API keys** | No | N/A | Manage API keys in the AWS Console (**Claude Platform on AWS → API keys**). See [API key authentication](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#api-key-authentication). | +| **Members** | No | N/A | Not applicable. AWS IAM manages access. | +| **Billing** | Yes (limited) | No | Set an organization monthly spend limit; see [Spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits). AWS Marketplace manages invoicing. View cost breakdowns on the **Cost** page. | +| **Claude Code** | No | N/A | View Claude Code usage on the **Usage** page. | ### Switching organizations @@ -888,7 +891,7 @@ Each response includes two request IDs in the response headers: # Omit the x-amz-security-token header if you use long-term IAM user credentials curl -i "https://aws-external-anthropic.us-west-2.api.aws/v1/messages" \ --aws-sigv4 "aws:amz:us-west-2:aws-external-anthropic" \ - --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \ + -u "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \ -H "x-amz-security-token: $AWS_SESSION_TOKEN" \ -H "content-type: application/json" \ -H "anthropic-version: 2023-06-01" \ @@ -1087,18 +1090,18 @@ If you currently use Claude on Bedrock, migrating to Claude Platform on AWS requ The migration delta depends on which Bedrock integration you're coming from. The following table shows both the [current Bedrock integration](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) (Messages API at `bedrock-mantle.{region}.api.aws`) and the [legacy InvokeModel integration](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy). -| Aspect | From [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | From [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | To Claude Platform on AWS | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Base URL** | `bedrock-mantle.{region}.api.aws` | `bedrock-runtime.{region}.amazonaws.com` | `aws-external-anthropic.{region}.api.aws` | -| **API format** | Messages API at `/anthropic/v1/messages` | Bedrock Converse / InvokeModel | Claude API (`/v1/{endpoint}`) | -| **Model IDs** | anthropic.claude-haiku-4-5 | anthropic.claude-haiku-4-5-20251001-v1:0(with a `us.` or `global.` inference profile prefix) | claude-haiku-4-5 | -| **SDK client** | `AnthropicBedrockMantle` | `AnthropicBedrock` / Bedrock SDK | Platform-specific client (see [Install an SDK](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#install-an-sdk)), in beta | -| **SDK package** | `anthropic[bedrock]` (typescript: `@anthropic-ai/bedrock-sdk`; csharp: `Anthropic.Bedrock`; go: `github.com/anthropics/anthropic-sdk-go/bedrock`; java: `com.anthropic:anthropic-java-bedrock`; php: `anthropic-ai/sdk`; ruby: `anthropic`) | `anthropic[bedrock]` (typescript: `@anthropic-ai/bedrock-sdk`; csharp: `Anthropic.Bedrock`; go: `github.com/anthropics/anthropic-sdk-go/bedrock`; java: `com.anthropic:anthropic-java-bedrock`; php: `anthropic-ai/sdk`; ruby: `anthropic`), or the AWS SDK | `anthropic[aws]` (typescript: `@anthropic-ai/aws-sdk`; csharp: `Anthropic.Aws`; go: `github.com/anthropics/anthropic-sdk-go/aws`; java: `com.anthropic:anthropic-java-aws`; php: `anthropic-ai/sdk`; ruby: `anthropic`) (see [Install an SDK](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#install-an-sdk)) | -| **SigV4 service name** | `bedrock-mantle` | `bedrock` | `aws-external-anthropic` | -| **Streaming format** | SSE | AWS EventStream | SSE (same as Claude API) | -| **Workspace header** | Not applicable | Not applicable | `anthropic-workspace-id`, required on inference and resource requests | -| **Region availability** | See [Amazon Bedrock regions](https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-regions.html) | See [Amazon Bedrock regions](https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-regions.html) | All AWS commercial regions | -| **Anthropic organization** | None required | None required | New organization created at sign-up. Existing organizations can't be converted (see [Moving from an existing Anthropic organization](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#moving-from-an-existing-anthropic-organization)) | +| Aspect | From [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | From [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | To Claude Platform on AWS | +| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Base URL** | `bedrock-mantle.{region}.api.aws` | `bedrock-runtime.{region}.amazonaws.com` | `aws-external-anthropic.{region}.api.aws` | +| **API format** | Messages API at `/anthropic/v1/messages` | Bedrock Converse / InvokeModel | Claude API (`/v1/{endpoint}`) | +| **Model IDs** | anthropic.claude-haiku-4-5 | anthropic.claude-haiku-4-5-20251001-v1:0 (with a `us.` or `global.` inference profile prefix) | claude-haiku-4-5 | +| **SDK client** | `AnthropicBedrockMantle` | `AnthropicBedrock` / Bedrock SDK | Platform-specific client (see [Install an SDK](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#install-an-sdk)), in beta | +| **SDK package** | `anthropic[bedrock]` (typescript: `@anthropic-ai/bedrock-sdk`; csharp: `Anthropic.Bedrock`; go: `github.com/anthropics/anthropic-sdk-go/v2/bedrock`; java: `com.anthropic:anthropic-java-bedrock`; php: `anthropic-ai/sdk`; ruby: `anthropic`) | `anthropic[bedrock]` (typescript: `@anthropic-ai/bedrock-sdk`; csharp: `Anthropic.Bedrock`; go: `github.com/anthropics/anthropic-sdk-go/v2/bedrock`; java: `com.anthropic:anthropic-java-bedrock`; php: `anthropic-ai/sdk`; ruby: `anthropic`), or the AWS SDK | `anthropic[aws]` (typescript: `@anthropic-ai/aws-sdk`; csharp: `Anthropic.Aws`; go: `github.com/anthropics/anthropic-sdk-go/v2/aws`; java: `com.anthropic:anthropic-java-aws`; php: `anthropic-ai/sdk`; ruby: `anthropic`) (see [Install an SDK](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#install-an-sdk)) | +| **SigV4 service name** | `bedrock-mantle` | `bedrock` | `aws-external-anthropic` | +| **Streaming format** | SSE | AWS EventStream | SSE (same as Claude API) | +| **Workspace header** | Not applicable | Not applicable | `anthropic-workspace-id`, required on inference and resource requests | +| **Region availability** | See [Amazon Bedrock regions](https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-regions.html) | See [Amazon Bedrock regions](https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-regions.html) | All AWS commercial regions | +| **Anthropic organization** | None required | None required | New organization created at sign-up. Existing organizations can't be converted (see [Moving from an existing Anthropic organization](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#moving-from-an-existing-anthropic-organization)) | If you're on the current Bedrock integration, the request body format is already the Messages API. The changes are the base URL, SigV4 service name, model IDs, and the added `anthropic-workspace-id` header. If you're on the legacy InvokeModel or Converse API, you'll also rewrite the request and response shapes to the Messages API format. See [Claude on Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) for the request-shape mapping. diff --git a/content/en/build-with-claude/compaction-background.md b/content/en/build-with-claude/compaction-background.md index 4b24b6103a..9cdcfef31b 100644 --- a/content/en/build-with-claude/compaction-background.md +++ b/content/en/build-with-claude/compaction-background.md @@ -23,7 +23,7 @@ featureMetadata: supportedPlatforms: Claude API: beta Claude Platform on AWS: beta - Google Cloud: beta + Claude Models on Google Cloud (Google managed): beta Microsoft Foundry: beta --- @@ -41,7 +41,7 @@ The compaction request and the block it returns are the same as in the loop. You For example, if the compaction request held messages 1 to 5 and the conversation gained messages 6 to 8 while it ran, after the swap your history is the block followed by messages 6 to 8. - ![Background compaction: while a compaction request for messages 1 to 5 runs, 6 to 8 arrive; then the block replaces 1 to 5](https://platform.claude.com/docs/images/compaction-background-timeline.svg) + ![Messages 6 to 8 join the full history while messages 1 to 5 are summarized; the arriving block then replaces messages 1 to 5](https://platform.claude.com/docs/images/compaction-background-timeline.svg) If the response has any other `stop_reason`, no summary was produced, which counts as a failure in step 2. Keep the full history; [Handle a missing summary or an error](https://platform.claude.com/docs/en/build-with-claude/compaction-on-demand#when-no-summary-comes-back) lists the causes and what to do for each. diff --git a/content/en/build-with-claude/compaction-keep-recent-turns.md b/content/en/build-with-claude/compaction-keep-recent-turns.md index 2becdc47aa..4e9fe88ceb 100644 --- a/content/en/build-with-claude/compaction-keep-recent-turns.md +++ b/content/en/build-with-claude/compaction-keep-recent-turns.md @@ -23,7 +23,7 @@ featureMetadata: supportedPlatforms: Claude API: beta Claude Platform on AWS: beta - Google Cloud: beta + Claude Models on Google Cloud (Google managed): beta Microsoft Foundry: beta --- diff --git a/content/en/build-with-claude/compaction-on-demand.md b/content/en/build-with-claude/compaction-on-demand.md index 4826b0432d..b419faa992 100644 --- a/content/en/build-with-claude/compaction-on-demand.md +++ b/content/en/build-with-claude/compaction-on-demand.md @@ -23,7 +23,7 @@ featureMetadata: supportedPlatforms: Claude API: beta Claude Platform on AWS: beta - Google Cloud: beta + Claude Models on Google Cloud (Google managed): beta Microsoft Foundry: beta --- @@ -36,7 +36,7 @@ A compaction request is separate from your conversation turns. You send the conv From then on the block takes the place of the messages it summarizes. It goes first in `messages`, the summarized messages are removed, and your next turn follows it. Claude receives the summary where those messages were. - ![On-demand compaction: a request with four messages returns one compaction block, which replaces them in the next request](https://platform.claude.com/docs/images/compaction-on-demand-swap.svg) + ![A compaction request with four messages returns one compaction block, no reply; the next request opens with it in their place](https://platform.claude.com/docs/images/compaction-on-demand-swap.svg) ## Request a summary @@ -175,10 +175,9 @@ Send the conversation as it stands with `"compaction": {"type": "summarize"}`. T history := []anthropic.BetaMessageParam{ anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("I am building a recipe app. Help me name the main entities in the data model.")), - { - Role: anthropic.BetaMessageParamRoleAssistant, + {OfAssistant: &anthropic.BetaAssistantMessageParam{ Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("Start with Recipe, Ingredient, and Step. Add a RecipeIngredient entry that holds the quantity and unit for each ingredient in a recipe.")}, - }, + }}, anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Good. Now suggest field names for Recipe.")), } diff --git a/content/en/build-with-claude/compaction-thinking-blocks.md b/content/en/build-with-claude/compaction-thinking-blocks.md index a08b16b875..676c609fc4 100644 --- a/content/en/build-with-claude/compaction-thinking-blocks.md +++ b/content/en/build-with-claude/compaction-thinking-blocks.md @@ -23,7 +23,7 @@ featureMetadata: supportedPlatforms: Claude API: beta Claude Platform on AWS: beta - Google Cloud: beta + Claude Models on Google Cloud (Google managed): beta Microsoft Foundry: beta --- diff --git a/content/en/build-with-claude/compaction-threshold.md b/content/en/build-with-claude/compaction-threshold.md index 564a4f72a0..1c948e0f02 100644 --- a/content/en/build-with-claude/compaction-threshold.md +++ b/content/en/build-with-claude/compaction-threshold.md @@ -27,7 +27,7 @@ featureMetadata: Claude API: beta Claude Platform on AWS: beta Amazon Bedrock: beta - Google Cloud: beta + Claude Models on Google Cloud (Google managed): beta Microsoft Foundry: beta --- @@ -239,7 +239,7 @@ Enable compaction by adding the `compact_20260112` strategy to `context_manageme $response = $client->beta->messages->create( maxTokens: 4096, messages: $messages, - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, betas: ['compact-2026-01-12'], contextManagement: [ 'edits' => [ @@ -459,7 +459,7 @@ Configure when compaction triggers using the `trigger` parameter: $message = $client->beta->messages->create( maxTokens: 4096, messages: $messages, - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, betas: ['compact-2026-01-12'], contextManagement: [ 'edits' => [ @@ -632,7 +632,7 @@ You can provide custom instructions through the `instructions` parameter. Custom MaxTokens: 4096, Messages: []anthropic.BetaMessageParam{ anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Help me build a Python web scraper")), - {Role: anthropic.BetaMessageParamRoleAssistant, Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("I'll help you build a web scraper...")}}, + {OfAssistant: &anthropic.BetaAssistantMessageParam{Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("I'll help you build a web scraper...")}}}, anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Add support for JavaScript-rendered pages")), }, ContextManagement: anthropic.BetaContextManagementConfigParam{ @@ -684,7 +684,7 @@ You can provide custom instructions through the `instructions` parameter. Custom ['role' => 'assistant', 'content' => "I'll help you build a web scraper..."], ['role' => 'user', 'content' => 'Add support for JavaScript-rendered pages'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, betas: ['compact-2026-01-12'], contextManagement: [ 'edits' => [ @@ -1070,7 +1070,7 @@ When enabled, the API returns a message with the `compaction` stop reason after #### Enforcing a total token budget -When a model works on long tasks with many tool-use iterations, total token consumption can grow significantly. You can combine `pause_after_compaction` with a compaction counter to estimate cumulative usage and gracefully end the task once a budget is reached. +When a model works on long tasks with many tool-use iterations, total token consumption can grow significantly. You can combine `pause_after_compaction` with a compaction counter to estimate cumulative usage and gracefully conclude the task once a budget is reached. This example appears in the SDK languages only: its value is the budget-tracking logic around the request. The raw request combines the `trigger` from [Trigger configuration](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold#trigger-configuration) with `pause_after_compaction` from [Pausing after compaction](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold#pausing-after-compaction). @@ -1180,7 +1180,7 @@ This example appears in the SDK languages only: its value is the budget-tracking compactionCount += 1; messages.Add(new BetaAssistantMessageParam { - Content = response.Content.Select(b => new BetaContentBlockParam(b.Json)).ToList() + Content = response.Content.Select(block => new BetaContentBlockParam(block.Json)).ToList() }); // Estimate total tokens consumed; prompt wrap-up if over budget @@ -1884,20 +1884,20 @@ The compaction block streams differently from text blocks. You receive a `conten try (var streamResponse = client.beta().messages().createStreaming(params)) { streamResponse.stream().forEach(event -> { event.contentBlockStart().ifPresent(startEvent -> { - startEvent.contentBlock().compaction().ifPresent(c -> + startEvent.contentBlock().compaction().ifPresent(compactionBlock -> System.out.println("Compaction started...") ); - startEvent.contentBlock().text().ifPresent(t -> + startEvent.contentBlock().text().ifPresent(textBlock -> System.out.println("Text response started...") ); }); event.contentBlockDelta().ifPresent(deltaEvent -> { - deltaEvent.delta().compaction().ifPresent(cd -> - System.out.println("Compaction complete: " + cd.content().map(String::length).orElse(0) + " chars") + deltaEvent.delta().compaction().ifPresent(compactionDelta -> + System.out.println("Compaction complete: " + compactionDelta.content().map(String::length).orElse(0) + " chars") ); - deltaEvent.delta().text().ifPresent(td -> - System.out.print(td.text()) + deltaEvent.delta().text().ifPresent(textDelta -> + System.out.print(textDelta.text()) ); }); }); @@ -1911,6 +1911,7 @@ The compaction block streams differently from text blocks. You receive a `conten use Anthropic\Beta\Messages\BetaRawContentBlockStartEvent; use Anthropic\Beta\Messages\BetaTextBlock; use Anthropic\Beta\Messages\BetaTextDelta; + use Anthropic\Messages\Model; $client = new Client(); $messages = [['role' => 'user', 'content' => 'Hello, Claude']]; @@ -1918,7 +1919,7 @@ The compaction block streams differently from text blocks. You receive a `conten $stream = $client->beta->messages->createStream( maxTokens: 4096, messages: $messages, - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, betas: ['compact-2026-01-12'], contextManagement: [ 'edits' => [ @@ -1942,7 +1943,7 @@ The compaction block streams differently from text blocks. You receive a `conten case $event instanceof BetaRawContentBlockDeltaEvent: switch (true) { case $event->delta instanceof BetaCompactionContentBlockDelta: - echo "Compaction complete: " . strlen($event->delta->content ?? '') . " chars\n"; + echo 'Compaction complete: ' . strlen($event->delta->content ?? '') . " chars\n"; break; case $event->delta instanceof BetaTextDelta: echo $event->delta->text; @@ -2203,7 +2204,7 @@ To maximize cache hit rates, add a `cache_control` breakpoint at the end of your $response = $client->beta->messages->create( maxTokens: 4096, messages: [['role' => 'user', 'content' => 'Hello, Claude']], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, betas: ['compact-2026-01-12'], system: [ [ @@ -2443,8 +2444,8 @@ The token counting endpoint (`/v1/messages/count_tokens`) applies existing `comp ] ); - echo "Current tokens: " . $countResponse->inputTokens . "\n"; - echo "Original tokens: " . $countResponse->contextManagement->originalInputTokens . "\n"; + echo 'Current tokens: ' . $countResponse->inputTokens . "\n"; + echo 'Original tokens: ' . $countResponse->contextManagement->originalInputTokens . "\n"; ``` ```ruby Ruby @@ -2591,7 +2592,7 @@ Here's a complete example of a long-running conversation with compaction: return response.Content .Select(block => block.Value) .OfType() - .Select(tb => tb.Text) + .Select(textBlock => textBlock.Text) .FirstOrDefault() ?? ""; } ``` @@ -2604,7 +2605,7 @@ Here's a complete example of a long-running conversation with compaction: "fmt" "log" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) var ( @@ -2697,7 +2698,8 @@ Here's a complete example of a long-running conversation with compaction: $client = new Client(); $messages = []; - function chat($client, &$messages, $userMessage) { + function chat($client, &$messages, $userMessage) + { $messages[] = ['role' => 'user', 'content' => $userMessage]; $response = $client->beta->messages->create( @@ -2725,9 +2727,9 @@ Here's a complete example of a long-running conversation with compaction: return ''; } - echo chat($client, $messages, "Help me build a Python web scraper") . "\n"; - echo chat($client, $messages, "Add support for JavaScript-rendered pages") . "\n"; - echo chat($client, $messages, "Now add rate limiting and error handling") . "\n"; + echo chat($client, $messages, 'Help me build a Python web scraper') . "\n"; + echo chat($client, $messages, 'Add support for JavaScript-rendered pages') . "\n"; + echo chat($client, $messages, 'Now add rate limiting and error handling') . "\n"; ``` ```ruby Ruby @@ -3027,7 +3029,7 @@ Here's an example that uses `pause_after_compaction` to preserve the prior excha return response.Content .Select(block => block.Value) .OfType() - .Select(tb => tb.Text) + .Select(textBlock => textBlock.Text) .FirstOrDefault() ?? ""; } ``` @@ -3040,7 +3042,7 @@ Here's an example that uses `pause_after_compaction` to preserve the prior excha "fmt" "log" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) var ( @@ -3078,8 +3080,12 @@ Here's an example that uses `pause_after_compaction` to preserve the prior excha // without thinking blocks; an assistant turn left empty is dropped var preserved []anthropic.BetaMessageParam for _, message := range messages[max(0, len(messages)-3):] { + if message.OfAssistant == nil { + preserved = append(preserved, message) + continue + } var content []anthropic.BetaContentBlockParamUnion - for _, block := range message.Content { + for _, block := range message.OfAssistant.Content { if block.OfThinking == nil && block.OfRedactedThinking == nil { content = append(content, block) } @@ -3087,12 +3093,11 @@ Here's an example that uses `pause_after_compaction` to preserve the prior excha if len(content) == 0 { continue } - message.Content = content - preserved = append(preserved, message) + preserved = append(preserved, anthropic.BetaMessageParam{OfAssistant: &anthropic.BetaAssistantMessageParam{Content: content}}) } messagesAfterCompaction := []anthropic.BetaMessageParam{ - {Role: anthropic.BetaMessageParamRoleAssistant, Content: []anthropic.BetaContentBlockParamUnion{compactionParam}}, + {OfAssistant: &anthropic.BetaAssistantMessageParam{Content: []anthropic.BetaContentBlockParamUnion{compactionParam}}}, } messagesAfterCompaction = append(messagesAfterCompaction, preserved...) @@ -3223,7 +3228,8 @@ Here's an example that uses `pause_after_compaction` to preserve the prior excha $client = new Client(); $messages = []; - function chat($client, &$messages, $userMessage) { + function chat($client, &$messages, $userMessage) + { $messages[] = ['role' => 'user', 'content' => $userMessage]; $response = $client->beta->messages->create( @@ -3285,9 +3291,9 @@ Here's an example that uses `pause_after_compaction` to preserve the prior excha return ''; } - echo chat($client, $messages, "Help me build a Python web scraper") . "\n"; - echo chat($client, $messages, "Add support for JavaScript-rendered pages") . "\n"; - echo chat($client, $messages, "Now add rate limiting and error handling") . "\n"; + echo chat($client, $messages, 'Help me build a Python web scraper') . "\n"; + echo chat($client, $messages, 'Add support for JavaScript-rendered pages') . "\n"; + echo chat($client, $messages, 'Now add rate limiting and error handling') . "\n"; ``` ```ruby Ruby @@ -3374,7 +3380,7 @@ Here's an example that uses `pause_after_compaction` to preserve the prior excha Learn about context window sizes and management strategies. - + Explore a practical implementation that manages long-running conversations with instant session memory compaction using background threading and prompt caching. diff --git a/content/en/build-with-claude/context-editing.md b/content/en/build-with-claude/context-editing.md index 4ae0b55c9a..81a7c8e169 100644 --- a/content/en/build-with-claude/context-editing.md +++ b/content/en/build-with-claude/context-editing.md @@ -871,7 +871,7 @@ Use thinking block clearing to manage context and prompt caching in conversation messages: [ ['role' => 'user', 'content' => 'Hello'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, betas: ['context-management-2025-06-27'], contextManagement: [ 'edits' => [ @@ -1093,7 +1093,7 @@ Keep thinking blocks from the last 3 assistant turns: messages: [ ['role' => 'user', 'content' => 'Hello'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, betas: ['context-management-2025-06-27'], contextManagement: [ 'edits' => [ @@ -1293,7 +1293,7 @@ Keep all thinking blocks (maximizes cache hits): messages: [ ['role' => 'user', 'content' => 'Hello'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, betas: ['context-management-2025-06-27'], contextManagement: [ 'edits' => [ @@ -2032,9 +2032,9 @@ The [token counting](https://platform.claude.com/docs/en/build-with-claude/token ], ); - echo "Original tokens: " . $response->contextManagement->originalInputTokens . "\n"; - echo "After clearing: " . $response->inputTokens . "\n"; - echo "Savings: " . ($response->contextManagement->originalInputTokens - $response->inputTokens) . " tokens\n"; + echo 'Original tokens: ' . $response->contextManagement->originalInputTokens . "\n"; + echo 'After clearing: ' . $response->inputTokens . "\n"; + echo 'Savings: ' . ($response->contextManagement->originalInputTokens - $response->inputTokens) . " tokens\n"; ``` ```ruby Ruby @@ -2258,7 +2258,7 @@ To use both features together, enable them in your API request: messages: [ ['role' => 'user', 'content' => 'Hello'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, betas: ['context-management-2025-06-27'], tools: [ [ diff --git a/content/en/build-with-claude/effort.md b/content/en/build-with-claude/effort.md index a34ed82fad..cc7ab94e88 100644 --- a/content/en/build-with-claude/effort.md +++ b/content/en/build-with-claude/effort.md @@ -27,7 +27,7 @@ featureMetadata: Claude API: ga Claude Platform on AWS: ga Amazon Bedrock: ga - Google Cloud: ga + Claude Models on Google Cloud (Google managed): ga Microsoft Foundry: ga --- @@ -117,7 +117,8 @@ Set `output_config.effort` on the request. The following example runs one reques Model = Model.ClaudeOpus5_5, MaxTokens = 4096, Messages = [ - new UserMessageParam { + new UserMessageParam + { Content = "Analyze the trade-offs between microservices and monolithic architectures" } ], @@ -338,7 +339,7 @@ Claude Haiku 5.5 supports all five effort levels, and `medium` is the default. E To get less thinking, lower the effort level. You can also send `thinking: {"type": "disabled"}` at `high` effort or below. At `xhigh` or `max`, it returns a 400 error, so use adaptive thinking there: omit the `thinking` field or send `thinking: {"type": "adaptive"}`. -On the Claude API and Google Cloud, Claude Haiku 5.5 also supports [changing effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) with a per-message `output_config`, which preserves the prompt cache. With `thinking: {"type": "disabled"}`, effort can't change mid-conversation: a per-message `output_config.effort` that differs from the level in effect returns a 400 error. To vary effort per turn, use adaptive thinking. +On the Claude API and Claude Models on Google Cloud (Google managed), Claude Haiku 5.5 also supports [changing effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) with a per-message `output_config`, which preserves the prompt cache. With `thinking: {"type": "disabled"}`, effort can't change mid-conversation: a per-message `output_config.effort` that differs from the level in effect returns a 400 error. To vary effort for each turn, use adaptive thinking. ## Effort with tool use @@ -372,7 +373,7 @@ You can run later turns of a conversation at a different effort level in two way ### Per-message effort (beta) -Per-message effort is in beta. On the Claude API and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), it's available on Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, and Claude Haiku 5.5. On [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), it's available on Claude Fable 5.1, Claude Mythos 5.1, and Claude Opus 5.5. It requires the [beta header](https://platform.claude.com/docs/en/api/beta-headers) `mid-conversation-output-config-2026-07-01`. With the Amazon Bedrock [InvokeModel API](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), it's available on Claude Fable 5.1 and Claude Opus 5.5, and you send that value in the `anthropic_beta` array of the request body instead. +Per-message effort is in beta. On the Claude API and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), it's available on Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, and Claude Haiku 5.5. On [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), it's available on Claude Fable 5.1, Claude Mythos 5.1, and Claude Opus 5.5. It requires the [beta header](https://platform.claude.com/docs/en/api/beta-headers) `mid-conversation-output-config-2026-07-01`. With the Amazon Bedrock [InvokeModel API](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), it's available on Claude Fable 5.1 and Claude Opus 5.5, and you send that value in the `anthropic_beta` array of the request body instead. Without the beta value, a per-message `output_config` returns a 400 error: `messages.N.output_config: Extra inputs are not permitted`, where `N` is the index of the `system` message in `messages`. With the beta value, models without per-message effort, including Claude Fable 5, return a 400 error: `output_config.effort requires a model that supports per-turn effort; this model does not`. On Amazon Bedrock, those models and Claude Opus 5 return the `Extra inputs are not permitted` error instead. On Claude Sonnet 5.5 with `thinking: {"type": "between_tools"}` and on Claude Haiku 5.5 with `thinking: {"type": "disabled"}`, effort can't change mid-conversation: a per-message `output_config.effort` that differs from the level in effect returns a 400 error. To vary effort for each turn, use adaptive thinking. @@ -529,10 +530,9 @@ The following example starts at `high`, then drops to `low` for a routine follow }, Messages: []anthropic.BetaMessageParam{ anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Plan a migration from SQLite to PostgreSQL in three short steps.")), - { - Role: anthropic.BetaMessageParamRoleAssistant, + {OfAssistant: &anthropic.BetaAssistantMessageParam{ Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")}, - }, + }}, // Effort-only system message: the new level takes effect from the next user turn. anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{ Effort: anthropic.BetaSystemMessageOutputConfigEffortLow, diff --git a/content/en/build-with-claude/extended-thinking.md b/content/en/build-with-claude/extended-thinking.md index 5077d32116..68bdee62d3 100644 --- a/content/en/build-with-claude/extended-thinking.md +++ b/content/en/build-with-claude/extended-thinking.md @@ -306,7 +306,7 @@ Two more considerations for interleaved thinking in manual mode: How platforms treat the beta header differs. The Claude API and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) accept `interleaved-thinking-2025-05-14` on any model and ignore it where unsupported. Acceptance is not the same as effect: on models that reject `type: "enabled"` (4.7 and later) or lack manual-mode interleaving (Claude Opus 4.6), the header has no manual-mode effect; adaptive thinking interleaves automatically there. -Partner-operated platforms ([Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai)) likewise accept the header on any model without returning an error, and ignore it on models that don't support interleaved thinking. +Partner-operated platforms, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), likewise accept the header on any model without returning an error, and ignore it on models that don't support interleaved thinking. ## Turn structure in manual mode diff --git a/content/en/build-with-claude/fallback-credit.md b/content/en/build-with-claude/fallback-credit.md index 32bc2035fa..3703ace891 100644 --- a/content/en/build-with-claude/fallback-credit.md +++ b/content/en/build-with-claude/fallback-credit.md @@ -14,7 +14,7 @@ You need this page only when you build the retry yourself: over raw HTTP or with - Send the request that may be refused with the `anthropic-beta: fallback-credit-2026-07-01` header. The `server-side-fallback-2026-07-01` header also grants the same fields, except on Amazon Bedrock and Google Cloud, which return a 400 error for that header. The earlier `fallback-credit-2026-06-01` header remains accepted and grants the same fields. + Send the request that may be refused with the `anthropic-beta: fallback-credit-2026-07-01` header. The `server-side-fallback-2026-07-01` header also grants the same fields, except on Amazon Bedrock and Claude Models on Google Cloud (Google managed), which return a 400 error for that header. The earlier `fallback-credit-2026-06-01` header remains accepted and grants the same fields. @@ -304,8 +304,8 @@ The following example makes a request that might be refused and redeems the cred // Prefer the continuation shape unless the claim is false if details.FallbackHasPrefillClaim || !details.JSON.FallbackHasPrefillClaim.Valid() { echoed := response.ToParam() - if len(echoed.Content) > 0 { - if text := echoed.Content[len(echoed.Content)-1].OfText; text != nil { + if blocks := echoed.OfAssistant.Content; len(blocks) > 0 { + if text := blocks[len(blocks)-1].OfText; text != nil { text.Text = strings.TrimRightFunc(text.Text, unicode.IsSpace) } } @@ -364,7 +364,9 @@ The following example makes a request that might be refused and redeems the cred if (!echoed.isEmpty() && echoed.getLast().isText()) { var lastText = echoed.removeLast().asText(); echoed.addLast(BetaContentBlockParam.ofText( - lastText.toBuilder().text(lastText.text().stripTrailing()).build())); + lastText.toBuilder() + .text(lastText.text().stripTrailing()) + .build())); } attempt.addAssistantMessageOfContentBlockParams(echoed); } @@ -504,12 +506,12 @@ The following example makes a request that might be refused and redeems the cred ## Where it works -Fallback credit is in beta on the Claude API, Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry. Refusals in [Message Batches](https://platform.claude.com/docs/en/build-with-claude/batch-processing) don't mint credit tokens, and redemption applies only to direct Messages API requests: a token passed on a batch request is accepted but ignored. A Claude Haiku 5.5 refusal carries no fallback credit, so a retry after one pays the full cost of writing the fallback model's prompt cache. +Fallback credit is in beta on the Claude API, Amazon Bedrock, Claude Platform on AWS, Claude Models on Google Cloud (Google managed), and Microsoft Foundry. Refusals in [Message Batches](https://platform.claude.com/docs/en/build-with-claude/batch-processing) don't mint credit tokens, and redemption applies only to direct Messages API requests: a token passed on a batch request is accepted but ignored. A Claude Haiku 5.5 refusal carries no fallback credit, so a retry after one pays the full cost of writing the fallback model's prompt cache. The retry model must be one of the refused model's permitted fallback targets. For Claude Fable 5.1, Claude Fable 5, and Claude Opus 5.5, those are Claude Opus 4.8 (`claude-opus-4-8`) and Claude Opus 5 (`claude-opus-5`). For Claude Opus 5, it is Claude Opus 4.8. For Claude Sonnet 5.5, it is Claude Sonnet 5 (`claude-sonnet-5`). - On the Claude API and Claude Platform on AWS, the target list is published as `allowed_fallback_models` on each model's entry in the [Models API](https://platform.claude.com/docs/en/api/beta/models/list) when the `server-side-fallback-2026-07-01` beta header is set. The list is not yet visible under the `fallback-credit-*` header alone. It is not exposed on Amazon Bedrock, Google Cloud, or Microsoft Foundry. + On the Claude API and Claude Platform on AWS, the target list is published as `allowed_fallback_models` on each model's entry in the [Models API](https://platform.claude.com/docs/en/api/beta/models/list) when the `server-side-fallback-2026-07-01` beta header is set. The list is not yet visible under the `fallback-credit-*` header alone. It is not exposed on Amazon Bedrock, Claude Models on Google Cloud (Google managed), or Microsoft Foundry. ## Checking that the credit applied @@ -569,7 +571,7 @@ The following sections cover edge cases and the complete redemption rules. Most - The field has no value only when the token has none either, so while you hold a token the field has a value, except on Amazon Bedrock, Google Cloud, and Microsoft Foundry, where it can still be absent while their support for the field rolls out. In that case, treat the retry shape as unknown rather than as `false` (python: `False`). Try the appended-assistant-message shape first, and rely on the rejection handling in [When a retry is rejected](https://platform.claude.com/docs/en/build-with-claude/fallback-credit#when-a-retry-is-rejected), which falls back to the unchanged body. + The field has no value only when the token has none either, so while you hold a token the field has a value, except on Amazon Bedrock, Claude Models on Google Cloud (Google managed), and Microsoft Foundry, where it can still be absent while their support for the field rolls out. In that case, treat the retry shape as unknown rather than as `false` (python: `False`). Try the appended-assistant-message shape first, and rely on the rejection handling in [When a retry is rejected](https://platform.claude.com/docs/en/build-with-claude/fallback-credit#when-a-retry-is-rejected), which falls back to the unchanged body. @@ -584,7 +586,7 @@ The following sections cover edge cases and the complete redemption rules. Most - The token redeems only from the organization and workspace that received the refusal, including on Microsoft Foundry. On Amazon Bedrock and Google Cloud, which do not have workspaces, the token is bound to the platform's caller identity instead. + The token redeems only from the organization and workspace that received the refusal, including on Microsoft Foundry. On Amazon Bedrock and Claude Models on Google Cloud (Google managed), which do not have workspaces, the token is bound to the platform's caller identity instead. The token expires 5 minutes after the refusal. After that, send the retry without it. The token is also stateless: the server stores nothing about it, and there is no endpoint to inspect or revoke it. diff --git a/content/en/build-with-claude/fast-mode.md b/content/en/build-with-claude/fast-mode.md index bda827e18b..ce368edb42 100644 --- a/content/en/build-with-claude/fast-mode.md +++ b/content/en/build-with-claude/fast-mode.md @@ -146,23 +146,23 @@ Fast mode works only on supported models. See [Model availability](https://platf AnthropicClient client = AnthropicOkHttpClient.fromEnv(); Message response = client.messages().create( - MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(4096L) - .speed(MessageCreateParams.Speed.FAST) - .addUserMessage("Refactor this module to use dependency injection") - .build()); + MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(4096L) + .speed(MessageCreateParams.Speed.FAST) + .addUserMessage("Refactor this module to use dependency injection") + .build()); response.content().stream() - .flatMap(block -> block.text().stream()) - .forEach(textBlock -> IO.println(textBlock.text())); + .flatMap(block -> block.text().stream()) + .forEach(textBlock -> IO.println(textBlock.text())); ``` ```php PHP $client = new Client(); $response = $client->messages->create( - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, maxTokens: 4096, speed: 'fast', messages: [ @@ -199,6 +199,8 @@ Fast mode is available on the Claude API, including [Claude Managed Agents](http Fast mode on Claude Opus 5.5 is also available on [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) for deployments hosted on Azure. It is not available for deployments [hosted on Anthropic](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#hosting-options). +Fast mode on Claude Opus 5.5 is also available on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). + ## Model availability Fast mode is available only on the following models. If you were using fast mode on an earlier model, [migrate to a model that supports fast mode](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide). @@ -248,7 +250,7 @@ To see your fast mode rate limits, go to the [Rate limits](https://platform.clau ## Checking which speed was used -The response `usage` object includes a `speed` field that indicates which speed was used, either `"fast"` or `"standard"`. Requesting `speed: "fast"` on a [model that doesn't support fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode#supported-models) returns an error, and so does exceeding fast mode's rate limits or capacity (a `429` or `529`). When a request with `speed: "fast"` succeeds, `usage.speed` is `"fast"`. Claude Opus 4.6 is an exception: instead of returning an error, a request with `speed: "fast"` and the `fast-mode-2026-02-01` beta header succeeds, but runs at standard speed. This behavior is correctly reflected in `usage.speed`, which shows `"standard"` in this situation. +The response `usage` object includes a `speed` field that indicates which speed was used, either `"fast"` or `"standard"`. Requesting `speed: "fast"` on a [model that doesn't support fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode#supported-models) returns an error, and so does exceeding fast mode's rate limits or capacity (a `429` or `529`). When a request with `speed: "fast"` succeeds, `usage.speed` is `"fast"`. Claude Opus 4.6 is an exception: instead of returning an error, a request with `speed: "fast"` and the `fast-mode-2026-02-01` beta header succeeds, but runs at standard speed. This behavior is correctly reflected in `usage.speed`, which shows `"standard"` in this situation. On Claude Models on Google Cloud (Anthropic managed), a Claude Opus 4.6 request with `speed: "fast"` returns a `400` error even with the header. ```bash cURL @@ -336,11 +338,11 @@ The response `usage` object includes a `speed` field that indicates which speed AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024L) - .speed(MessageCreateParams.Speed.FAST) - .addUserMessage("Hello") - .build(); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024L) + .speed(MessageCreateParams.Speed.FAST) + .addUserMessage("Hello") + .build(); Message response = client.messages().create(params); IO.println(response.usage().speed().orElseThrow()); // "fast" or "standard" @@ -350,7 +352,7 @@ The response `usage` object includes a `speed` field that indicates which speed $client = new Client(); $response = $client->messages->create( - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, speed: 'fast', messages: [['role' => 'user', 'content' => 'Hello']], @@ -393,17 +395,17 @@ To track fast mode usage and costs across your organization, see the [Usage and ### Automatic retries -The SDK automatically retries fast mode `429` errors up to 2 times by default (configurable with `max_retries` (typescript, java, php: `maxRetries`; csharp: `MaxRetries`; go: `option.WithMaxRetries`)), waiting for the delay in the `retry-after` header before each retry. Because fast mode uses continuous token replenishment, the `retry-after` delay is typically short and requests succeed once capacity is available. +The SDK automatically retries fast mode `429` errors up to 2 times by default (configurable with `max_retries` (typescript, php: `maxRetries`; java: `.maxRetries()`; csharp: `MaxRetries`; go: `option.WithMaxRetries()`)), waiting for the delay in the `retry-after` header before each retry. Because fast mode uses continuous token replenishment, the `retry-after` delay is typically short and requests succeed once capacity is available. ### Falling back to standard speed -If you'd prefer to fall back to standard speed rather than wait for fast mode capacity, catch the rate limit error and retry without `speed: "fast"`. Set `max_retries` (typescript, java, php: `maxRetries`; csharp: `MaxRetries`; go: `option.WithMaxRetries`) to `0` on the initial fast request to skip automatic retries and fail immediately on rate limit errors. +If you'd prefer to fall back to standard speed rather than wait for fast mode capacity, catch the rate limit error and retry without `speed: "fast"`. Set `max_retries` (typescript, php: `maxRetries`; java: `.maxRetries()`; csharp: `MaxRetries`; go: `option.WithMaxRetries()`) to `0` on the initial fast request to skip automatic retries and fail immediately on rate limit errors. Falling back from fast to standard speed results in a [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) miss. Requests at different speeds do not share cached prefixes. -Because setting `max_retries` (typescript, java, php: `maxRetries`; csharp: `MaxRetries`; go: `option.WithMaxRetries`) to `0` also disables retries for other transient errors (overloaded, internal server errors), the following examples reissue the original request with default retries for those cases. +Because setting `max_retries` (typescript, php: `maxRetries`; java: `.maxRetries()`; csharp: `MaxRetries`; go: `option.WithMaxRetries()`) to `0` also disables retries for other transient errors (overloaded, internal server errors), the following examples reissue the original request with default retries for those cases. ```python Python @@ -576,9 +578,12 @@ Because setting `max_retries` (typescript, java, php: `maxRetries`; csharp: `Max import com.anthropic.errors.InternalServerException; import com.anthropic.errors.RateLimitException; // ... - // Disable SDK auto-retry so the fallback logic below handles it + // Disable SDK auto-retry so the fallback logic that follows handles it AnthropicClient client = - AnthropicOkHttpClient.builder().fromEnv().maxRetries(0).build(); + AnthropicOkHttpClient.builder() + .fromEnv() + .maxRetries(0) + .build(); Message createMessageWithFastFallback( MessageCreateParams params, int maxAttempts) { @@ -587,8 +592,8 @@ Because setting `max_retries` (typescript, java, php: `maxRetries`; csharp: `Max } catch (RateLimitException e) { if (params.speed().isPresent()) { MessageCreateParams retryParams = params.toBuilder() - .speed(Optional.empty()) - .build(); + .speed(Optional.empty()) + .build(); return createMessageWithFastFallback(retryParams, maxAttempts); } throw e; @@ -602,16 +607,16 @@ Because setting `max_retries` (typescript, java, php: `maxRetries`; csharp: `Max void main() { Message message = createMessageWithFastFallback( - MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024L) - .addUserMessage("Hello") - .speed(MessageCreateParams.Speed.FAST) - .build(), - 3); + MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024L) + .addUserMessage("Hello") + .speed(MessageCreateParams.Speed.FAST) + .build(), + 3); message.content().stream() - .flatMap(block -> block.text().stream()) - .forEach(textBlock -> IO.println(textBlock.text())); + .flatMap(block -> block.text().stream()) + .forEach(textBlock -> IO.println(textBlock.text())); } ``` diff --git a/content/en/build-with-claude/files.md b/content/en/build-with-claude/files.md index 7f807928b1..f6dd42dbbb 100644 --- a/content/en/build-with-claude/files.md +++ b/content/en/build-with-claude/files.md @@ -607,7 +607,7 @@ The following examples read a text file and send its contents as plain text: $client = new Client(); // Read the text file - $textContent = file_get_contents("document.txt"); + $textContent = file_get_contents('document.txt'); $message = $client->messages->create( maxTokens: 1024, @@ -668,7 +668,7 @@ The following examples read a text file and send its contents as plain text: #### List files -Retrieve a list of your uploaded files. The endpoint is paginated: each request returns up to `limit` files (20 by default, and at most 1,000), and the response's `next_page` cursor fetches the next page when passed back as the `page` parameter. Files are ordered newest first. See the [List Files API reference](https://platform.claude.com/docs/en/api/files/list). The SDK returns the first page and provides [auto-pagination](https://platform.claude.com/docs/en/api/overview#pagination) helpers. The CLI example bounds the total with `--max-items`: +Retrieve a list of your uploaded files. The endpoint is paginated: each request returns up to `limit` files (20 by default, and at most 1,000), and the response's `next_page` cursor fetches the next page when passed back as the `page` parameter. Files are ordered newest first. See the [List Files API reference](https://platform.claude.com/docs/en/api/files/list). The SDK returns the first page and provides [auto-pagination](https://platform.claude.com/docs/en/api/overview#pagination) helpers. ```bash cURL @@ -678,6 +678,7 @@ Retrieve a list of your uploaded files. The endpoint is paginated: each request ``` ```bash CLI + # List commands auto-paginate, so --max-items limits the total ant files list --max-items 10 ``` diff --git a/content/en/build-with-claude/handling-stop-reasons.md b/content/en/build-with-claude/handling-stop-reasons.md index cde73a7c59..1530d2cf6f 100644 --- a/content/en/build-with-claude/handling-stop-reasons.md +++ b/content/en/build-with-claude/handling-stop-reasons.md @@ -262,7 +262,7 @@ The most common stop reason. Indicates Claude completed its response naturally. "content": [ {"type": "tool_result", "tool_use_id": "toolu_123", "content": "6912"} ], - }, # Just the tool_result, no additional text + }, # Only the tool_result, no additional text ] ``` @@ -306,7 +306,7 @@ The most common stop reason. Indicates Claude completed its response naturally. }, { role: "user", - // Just the tool_result, no additional text + // Only the tool_result, no additional text content: [{ type: "tool_result", tool_use_id: "toolu_123", content: "6912" }] } ]; @@ -354,7 +354,7 @@ The most common stop reason. Indicates Claude completed its response naturally. }, new UserMessageParam { - // Just the tool_result, no additional text + // Only the tool_result, no additional text Content = new List { new ToolResultBlockParam { ToolUseID = "toolu_123", Content = "6912" } @@ -384,7 +384,7 @@ The most common stop reason. Indicates Claude completed its response naturally. anthropic.NewAssistantMessage( anthropic.NewToolUseBlock("toolu_123", input, "calculator"), ), - // Just the tool_result, no additional text + // Only the tool_result, no additional text anthropic.NewUserMessage( anthropic.NewToolResultBlock("toolu_123", "6912", false), ), @@ -408,9 +408,14 @@ The most common stop reason. Indicates Claude completed its response naturally. MessageParam.ofAssistantOfContentBlockParams(List.of(ContentBlockParam.ofToolUse(toolUse))), MessageParam.ofUserOfContentBlockParams(List.of( ContentBlockParam.ofToolResult( - ToolResultBlockParam.builder().toolUseId("toolu_123").content("6912").build()), + ToolResultBlockParam.builder() + .toolUseId("toolu_123") + .content("6912") + .build()), // Don't add text after tool_result - ContentBlockParam.ofText(TextBlockParam.builder().text("Here's the result").build()) + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Here's the result") + .build()) )) ); @@ -418,10 +423,13 @@ The most common stop reason. Indicates Claude completed its response naturally. messages = List.of( MessageParam.ofUser("Calculate the sum of 1234 and 5678"), MessageParam.ofAssistantOfContentBlockParams(List.of(ContentBlockParam.ofToolUse(toolUse))), - // Just the tool_result, no additional text + // Only the tool_result, no additional text MessageParam.ofUserOfContentBlockParams(List.of( ContentBlockParam.ofToolResult( - ToolResultBlockParam.builder().toolUseId("toolu_123").content("6912").build()) + ToolResultBlockParam.builder() + .toolUseId("toolu_123") + .content("6912") + .build()) )) ); ``` @@ -467,7 +475,7 @@ The most common stop reason. Indicates Claude completed its response naturally. ], [ 'role' => 'user', - // Just the tool_result, no additional text + // Only the tool_result, no additional text 'content' => [ ['type' => 'tool_result', 'tool_use_id' => 'toolu_123', 'content' => '6912'], ], @@ -516,7 +524,7 @@ The most common stop reason. Indicates Claude completed its response naturally. }, { role: "user", - # Just the tool_result, no additional text + # Only the tool_result, no additional text content: [ { type: "tool_result", tool_use_id: "toolu_123", content: "6912" } ] @@ -847,7 +855,7 @@ Claude stopped because it reached the `max_tokens` limit specified in your reque $response = $client->messages->create( maxTokens: 10, messages: [['role' => 'user', 'content' => 'Explain quantum physics']], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); if ($response->stopReason === 'max_tokens') { @@ -1151,7 +1159,7 @@ Claude encountered one of your custom stop sequences. $response = $client->messages->create( maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Generate text until you say END']], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, stopSequences: ['END', 'STOP'], ); @@ -1240,7 +1248,7 @@ Claude is calling a tool that you need to run. def execute_tool(name, tool_input): - """Execute a tool and return the result.""" + """Run a tool and return the result.""" return f"Weather in {tool_input.get('location', 'unknown')}: 72°F" @@ -1252,7 +1260,7 @@ Claude is calling a tool that you need to run. ) if response.stop_reason == "tool_use": - # Extract and execute the tool + # Extract and run the tool for block in response.content: if block.type == "tool_use": result = execute_tool(block.name, block.input) @@ -1285,7 +1293,7 @@ Claude is calling a tool that you need to run. }); if (response.stop_reason === "tool_use") { - // Extract and execute the tool + // Extract and run the tool for (const block of response.content) { if (block.type === "tool_use") { const result = executeTool(block.name, block.input as Record); @@ -1324,12 +1332,12 @@ Claude is calling a tool that you need to run. if (response.StopReason == "tool_use") { - // Extract and execute the tool + // Extract and run the tool foreach (var block in response.Content) { if (block.TryPickToolUse(out var toolUse)) { - // Execute toolUse.Name with toolUse.Input and return the result to Claude + // Run toolUse.Name with toolUse.Input and return the result to Claude } } } @@ -1362,7 +1370,7 @@ Claude is calling a tool that you need to run. } if response.StopReason == "tool_use" { - // Extract and execute the tool + // Extract and run the tool for _, block := range response.Content { if toolUse, ok := block.AsAny().(anthropic.ToolUseBlock); ok { fmt.Println(toolUse.Name, toolUse.Input) @@ -1397,10 +1405,10 @@ Claude is calling a tool that you need to run. ); if (response.stopReason().map(StopReason.TOOL_USE::equals).orElse(false)) { - // Extract and execute the tool + // Extract and run the tool for (ContentBlock block : response.content()) { block.toolUse().ifPresent(toolUse -> { - // Execute toolUse.name() with toolUse.input() and return the result to Claude + // Run toolUse.name() with toolUse.input() and return the result to Claude }); } } @@ -1429,10 +1437,10 @@ Claude is calling a tool that you need to run. ); if ($response->stopReason === 'tool_use') { - // Extract and execute the tool + // Extract and run the tool foreach ($response->content as $block) { if ($block->type === 'tool_use') { - // Execute $block->name with $block->input and return the result to Claude + // Run $block->name with $block->input and return the result to Claude } } } @@ -1461,10 +1469,10 @@ Claude is calling a tool that you need to run. ) if response.stop_reason == :tool_use - # Extract and execute the tool + # Extract and run the tool response.content.each do |block| next unless block.type == :tool_use - # Execute block.name with block.input and return the result to Claude + # Run block.name with block.input and return the result to Claude end end ``` @@ -1858,7 +1866,7 @@ Claude declined to generate a response. Safety classifiers return this stop reas $response = $client->messages->create( maxTokens: 1024, messages: [['role' => 'user', 'content' => '[Unsafe request]']], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); if ($response->stopReason === 'refusal') { @@ -1886,7 +1894,7 @@ Claude declined to generate a response. Safety classifiers return this stop reas - If you encounter `refusal` stop reasons frequently while using Claude Sonnet 4.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) or Claude Opus 4.1 (the latter [retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), you can try updating your API calls to use Haiku 4.5 (`claude-haiku-4-5-20251001`), which has different usage restrictions. Learn more about [understanding Sonnet 4.5's API safety filters](https://support.claude.com/en/articles/12449294-understanding-sonnet-4-5-s-api-safety-filters). + If you encounter `refusal` stop reasons frequently while using Claude Sonnet 4.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) or Claude Opus 4.1 (the latter [retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)), you can try updating your API calls to use Haiku 4.5 (`claude-haiku-4-5-20251001`), which has different usage restrictions. Learn more about [understanding Sonnet 4.5's API safety filters](https://support.claude.com/en/articles/12449294-understanding-sonnet-4-5-s-api-safety-filters). On a refusal, the `stop_details` object identifies the policy category that triggered it. The categories and the full refusal response shape are covered in [What a refusal looks like](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#refusal-response). `stop_details` is `null` for all stop reasons other than `refusal`. @@ -2324,9 +2332,9 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools ```python Python def handle_server_tool_conversation(client, user_query, tools, max_continuations=5): """ - Handle server tool conversations that may require multiple continuations. + Handle server tool conversations that might require multiple continuations. - The server runs a sampling loop when executing server tools. If the loop + The server uses a sampling loop to run server tools. If the loop reaches its iteration limit, the API returns pause_turn. Continue the conversation by sending the response back to let Claude finish. """ @@ -2341,7 +2349,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools ) if response.stop_reason != "pause_turn": - # Claude finished processing - return the final response + # Claude finished processing: return the final response return response # pause_turn: replace the full message list to maintain alternating roles @@ -2350,7 +2358,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools {"role": "assistant", "content": response.content}, ] - # Reached max continuations - return the last response + # Reached max continuations: return the last response return response ``` @@ -2373,7 +2381,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools }); if (response.stop_reason !== "pause_turn") { - // Claude finished processing - return the final response + // Claude finished processing: return the final response return response; } @@ -2384,7 +2392,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools ]; } - // Reached max continuations - return the last response + // Reached max continuations: return the last response return response!; } ``` @@ -2411,7 +2419,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools if (response.StopReason != "pause_turn") { - // Claude finished processing - return the final response + // Claude finished processing: return the final response return response; } @@ -2426,7 +2434,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools ]; } - // Reached max continuations - return the last response + // Reached max continuations: return the last response return response; } ``` @@ -2454,7 +2462,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools } if response.StopReason != "pause_turn" { - // Claude finished processing - return the final response + // Claude finished processing: return the final response return response, nil } @@ -2469,7 +2477,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools } } - // Reached max continuations - return the last response + // Reached max continuations: return the last response return response, nil } ``` @@ -2497,13 +2505,13 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools response = client.messages().create(params.build()); if (!response.stopReason().map(StopReason.PAUSE_TURN::equals).orElse(false)) { - // Claude finished processing - return the final response + // Claude finished processing: return the final response return response; } // pause_turn: loop again and send the response back } - // Reached max continuations - return the last response + // Reached max continuations: return the last response return response; } ``` @@ -2527,7 +2535,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools ); if ($response->stopReason !== 'pause_turn') { - // Claude finished processing - return the final response + // Claude finished processing: return the final response return $response; } @@ -2538,7 +2546,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools ]; } - // Reached max continuations - return the last response + // Reached max continuations: return the last response return $response; } ``` @@ -2556,7 +2564,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools tools: tools ) - # Claude finished processing - return the final response + # Claude finished processing: return the final response return response unless response.stop_reason == :pause_turn # pause_turn: replace the full message list to maintain alternating roles @@ -2566,7 +2574,7 @@ When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools ] end - # Reached max continuations - return the last response + # Reached max continuations: return the last response response end ``` @@ -2757,7 +2765,7 @@ It's important to distinguish between `stop_reason` values and actual errors: $response = $client->messages->create( maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello!']], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); // Handle successful response with stop_reason @@ -2806,7 +2814,7 @@ When using streaming, `stop_reason` is: ```bash cURL # The message_delta event in the SSE stream carries stop_reason. - curl --no-buffer https://api.anthropic.com/v1/messages \ + curl -N https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ @@ -2932,7 +2940,7 @@ When using streaming, `stop_reason` is: $stream = $client->messages->createStream( maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello!']], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); foreach ($stream as $event) { @@ -2981,7 +2989,7 @@ When using streaming, `stop_reason` is: ) if response.stop_reason == "tool_use": - # Execute tools and continue + # Run tools and continue tool_results = execute_tools(response.content) messages.append({"role": "assistant", "content": response.content}) messages.append({"role": "user", "content": tool_results}) @@ -3007,7 +3015,7 @@ When using streaming, `stop_reason` is: }); if (response.stop_reason === "tool_use") { - // Execute tools and continue + // Run tools and continue const toolResults = executeTools(response.content); messages.push({ role: "assistant", content: response.content }); messages.push({ role: "user", content: toolResults }); @@ -3039,7 +3047,7 @@ When using streaming, `stop_reason` is: if (response.StopReason == "tool_use") { - // Execute tools and continue + // Run tools and continue var toolResults = ExecuteTools(response.Content); messages.Add(new AssistantMessageParam { @@ -3080,7 +3088,7 @@ When using streaming, `stop_reason` is: return response, nil } - // Execute tools and continue + // Run tools and continue toolResults := executeTools(response.Content) var contentParams []anthropic.ContentBlockParamUnion for _, block := range response.Content { @@ -3115,7 +3123,7 @@ When using streaming, `stop_reason` is: return response; } - // Execute tools and continue + // Run tools and continue List toolResults = executeTools(response.content()); messages.add(response.toParam()); messages.add(MessageParam.ofUserOfContentBlockParams( @@ -3142,7 +3150,7 @@ When using streaming, `stop_reason` is: return $response; } - // Execute tools and continue + // Run tools and continue $toolResults = execute_tools($response->content); $messages[] = ['role' => 'assistant', 'content' => $response->content]; $messages[] = ['role' => 'user', 'content' => $toolResults]; @@ -3165,7 +3173,7 @@ When using streaming, `stop_reason` is: # Final response return response unless response.stop_reason == :tool_use - # Execute tools and continue + # Run tools and continue tool_results = execute_tools(response.content) messages << { role: "assistant", content: response.content } messages << { role: "user", content: tool_results } diff --git a/content/en/build-with-claude/mid-conversation-effort-example.md b/content/en/build-with-claude/mid-conversation-effort-example.md index c5903901ff..8c1979b28c 100644 --- a/content/en/build-with-claude/mid-conversation-effort-example.md +++ b/content/en/build-with-claude/mid-conversation-effort-example.md @@ -132,7 +132,7 @@ The example is a single file. The constants control the effort level, the fan-ou "sync" "time" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) var client = anthropic.NewClient() @@ -199,15 +199,17 @@ The example is a single file. The constants control the effort level, the fan-ou static final Model MODEL = Model.CLAUDE_OPUS_5_5; static final boolean DOC_TEST_MODE = - !Objects.requireNonNullElse(System.getenv("DOC_TEST_MODE"), "").isEmpty(); + !Objects.requireNonNullElse(System.getenv("DOC_TEST_MODE"), "").isEmpty(); static final OutputConfig.Effort EFFORT = OutputConfig.Effort.XHIGH; static final String SYSTEM_PROMPT = - "You are a helpful general-purpose agent. Answer the user's request directly."; + "You are a helpful general-purpose agent. Answer the user's request directly."; static final int REQUEST_TIMEOUT_SECONDS = 600; static final RequestOptions REQUEST_OPTIONS = - RequestOptions.builder().timeout(Duration.ofSeconds(REQUEST_TIMEOUT_SECONDS)).build(); + RequestOptions.builder() + .timeout(Duration.ofSeconds(REQUEST_TIMEOUT_SECONDS)) + .build(); static final int BASH_TIMEOUT_SECONDS = 60; static final int TOOL_RESULT_MAX_CHARS = 8000; static final int MAX_CONCURRENT = 10; @@ -216,8 +218,8 @@ The example is a single file. The constants control the effort level, the fan-ou static final int MAX_MAIN_TURNS = DOC_TEST_MODE ? 1 : 30; static final int TURNS_BETWEEN_REFRESHERS = 10; static final Path JOURNAL_PATH = Path.of(Optional.ofNullable(System.getenv("ORCH_JOURNAL")) - .filter(path -> !path.isEmpty()) - .orElse("orchestration_journal.json")); + .filter(path -> !path.isEmpty()) + .orElse("orchestration_journal.json")); ``` ```php PHP @@ -330,15 +332,15 @@ The reminders are short on purpose. They flip the mode and point at the tool des ```java Java static final String MODE_ENTER = """ - Orchestration mode is on: optimize for the most exhaustive, correct answer rather than \ - the fastest one. Use the Workflow tool on every substantive task, sized to the problem's \ - natural decomposition rather than the maximum the tool allows. See the Workflow tool's \ - description for standing consent, granularity guidance, and quality patterns. Work solo \ - only on conversational or trivial turns."""; + Orchestration mode is on: optimize for the most exhaustive, correct answer rather than \ + the fastest one. Use the Workflow tool on every substantive task, sized to the problem's \ + natural decomposition rather than the maximum the tool allows. See the Workflow tool's \ + description for standing consent, granularity guidance, and quality patterns. Work solo \ + only on conversational or trivial turns."""; static final String MODE_REFRESH = - "Orchestration mode is still on. Use the Workflow tool; see its standing consent section."; + "Orchestration mode is still on. Use the Workflow tool; see its standing consent section."; static final String MODE_EXIT = - "Orchestration mode is off. The Workflow tool's standard opt-in rule applies again."; + "Orchestration mode is off. The Workflow tool's standard opt-in rule applies again."; ``` ```php PHP @@ -662,72 +664,72 @@ The Workflow tool carries the real behavioral contract: the opt-in rule, the sta ```java Java static final Tool WORKFLOW_TOOL = Tool.builder() - .name("Workflow") - .description(""" - Orchestrate a multiagent workflow: split a large task into independent subtasks \ - and run them as parallel agents, then collect their results. - - Opt-in: only use this tool when the user explicitly asks for a workflow, or when a \ - system message confirms that orchestration mode is on. - - Quality patterns: adversarial verification (a second wave of agents checks the first \ - wave's findings against the source), a completeness critic (one agent hunts for what \ - the others missed), and multiphase sequencing (understand, design, implement, and \ - review as separate workflow calls, reading results between phases). A useful default \ - is hybrid: scout inline first to discover the work-list, then fan out over it. - - Granularity: scope each subtask to a distinct concern, component, or question rather \ - than per line or per file section. Scale the count to what the user asked for: a \ - focused review of a module of a few hundred lines rarely needs more than about ten \ - subtasks; a broad audit of a large codebase can justify more. - - Standing consent: while a system message confirms orchestration mode is on, that \ - opt-in is standing. Author and run a workflow for every substantive task by default, \ - and lean toward verifying findings adversarially. Work solo only on conversational \ - turns or trivial mechanical edits. When a system message says the mode is off, \ - revert to the opt-in rule above.""") - .inputSchema(Tool.InputSchema.builder() - .properties(Tool.InputSchema.Properties.builder() - .putAdditionalProperty("subtasks", JsonValue.from(Map.of( - "type", "array", - "items", Map.of("type", "string"), - "description", "Independent subtask prompts to run as parallel agents"))) - .build()) - .putAdditionalProperty("required", JsonValue.from(List.of("subtasks"))) - .build()) - .build(); + .name("Workflow") + .description(""" + Orchestrate a multiagent workflow: split a large task into independent subtasks \ + and run them as parallel agents, then collect their results. + + Opt-in: only use this tool when the user explicitly asks for a workflow, or when a \ + system message confirms that orchestration mode is on. + + Quality patterns: adversarial verification (a second wave of agents checks the first \ + wave's findings against the source), a completeness critic (one agent hunts for what \ + the others missed), and multiphase sequencing (understand, design, implement, and \ + review as separate workflow calls, reading results between phases). A useful default \ + is hybrid: scout inline first to discover the work-list, then fan out over it. + + Granularity: scope each subtask to a distinct concern, component, or question rather \ + than per line or per file section. Scale the count to what the user asked for: a \ + focused review of a module of a few hundred lines rarely needs more than about ten \ + subtasks; a broad audit of a large codebase can justify more. + + Standing consent: while a system message confirms orchestration mode is on, that \ + opt-in is standing. Author and run a workflow for every substantive task by default, \ + and lean toward verifying findings adversarially. Work solo only on conversational \ + turns or trivial mechanical edits. When a system message says the mode is off, \ + revert to the opt-in rule above.""") + .inputSchema(Tool.InputSchema.builder() + .properties(Tool.InputSchema.Properties.builder() + .putAdditionalProperty("subtasks", JsonValue.from(Map.of( + "type", "array", + "items", Map.of("type", "string"), + "description", "Independent subtask prompts to run as parallel agents"))) + .build()) + .putAdditionalProperty("required", JsonValue.from(List.of("subtasks"))) + .build()) + .build(); static final ToolBash20250124 BASH_TOOL = ToolBash20250124.builder().build(); static final Tool REPORT_TOOL = Tool.builder() - .name("report_findings") - .description(""" - Report the final findings for your subtask. Call this exactly once, when you are \ - done investigating; it ends your task.""") - .inputSchema(Tool.InputSchema.builder() - .properties(Tool.InputSchema.Properties.builder() - .putAdditionalProperty("summary", JsonValue.from(Map.of( - "type", "string", - "description", "Two or three sentences of synthesis"))) - .putAdditionalProperty("findings", JsonValue.from(Map.of( - "type", "array", - "items", Map.of( - "type", "object", - "properties", Map.of( - "claim", Map.of( - "type", "string", - "description", "The finding, one sentence"), - "evidence", Map.of( - "type", "string", - "description", "How it was verified (file, line, or command output)"), - "severity", Map.of( - "type", "string", - "enum", List.of("high", "medium", "low", "info"))), - "required", List.of("claim", "evidence", "severity"))))) - .build()) - .putAdditionalProperty("required", JsonValue.from(List.of("summary", "findings"))) - .build()) - .build(); + .name("report_findings") + .description(""" + Report the final findings for your subtask. Call this exactly once, when you are \ + done investigating; it ends your task.""") + .inputSchema(Tool.InputSchema.builder() + .properties(Tool.InputSchema.Properties.builder() + .putAdditionalProperty("summary", JsonValue.from(Map.of( + "type", "string", + "description", "Two or three sentences of synthesis"))) + .putAdditionalProperty("findings", JsonValue.from(Map.of( + "type", "array", + "items", Map.of( + "type", "object", + "properties", Map.of( + "claim", Map.of( + "type", "string", + "description", "The finding, one sentence"), + "evidence", Map.of( + "type", "string", + "description", "How it was verified (file, line, or command output)"), + "severity", Map.of( + "type", "string", + "enum", List.of("high", "medium", "low", "info"))), + "required", List.of("claim", "evidence", "severity"))))) + .build()) + .putAdditionalProperty("required", JsonValue.from(List.of("summary", "findings"))) + .build()) + .build(); ``` ```php PHP @@ -1056,7 +1058,7 @@ The bash handler runs the requested command with a timeout, captures combined st return (output, process.ExitCode != 0); } - // Execute one bash tool call requested by the model. + // Run one bash tool call requested by the model. async Task<(string Output, bool IsError)> HandleBashBlock(ToolUseBlock block) { if (block.Input.GetValueOrDefault("restart").ValueKind is JsonValueKind.True) @@ -1124,7 +1126,7 @@ The bash handler runs the requested command with a timeout, captures combined st return fmt.Sprintf("(%s)\n%s", err, output), true } - // handleBashBlock executes one bash tool call requested by the model. + // handleBashBlock runs one bash tool call requested by the model. func handleBashBlock(ctx context.Context, block anthropic.ToolUseBlock) (string, bool) { var input struct { Command string `json:"command"` @@ -1157,11 +1159,11 @@ The bash handler runs the requested command with a timeout, captures combined st try { var dir = Files.createTempDirectory("orchestration-"); Files.writeString(dir.resolve("sample.py"), """ - def fib(n): - return n if n < 2 else fib(n - 1) + fib(n - 2) + def fib(n): + return n if n < 2 else fib(n - 1) + fib(n - 2) - print(fib(10)) - """); + print(fib(10)) + """); Runtime.getRuntime().addShutdownHook(new Thread(() -> { // Best-effort cleanup; the OS tmp sweeper handles leftovers. try (var paths = Files.walk(dir)) { @@ -1182,13 +1184,13 @@ The bash handler runs the requested command with a timeout, captures combined st Process process; try { process = new ProcessBuilder("bash", "-c", command) - .directory(WORK_DIR.toFile()) - .redirectErrorStream(true) - .start(); + .directory(WORK_DIR.toFile()) + .redirectErrorStream(true) + .start(); } catch (IOException error) { return new ToolOutput("(" + error + ")", true); } - // Drain stdout on another thread so a filled pipe cannot stall the timeout wait below. + // Drain stdout on another thread so a filled pipe cannot stall the timeout wait that follows. CompletableFuture outputReader = CompletableFuture.supplyAsync(() -> { try (var stdout = process.getInputStream()) { return new String(stdout.readAllBytes(), StandardCharsets.UTF_8); @@ -1206,12 +1208,12 @@ The bash handler runs the requested command with a timeout, captures combined st output = "(no output)"; } else if (output.length() > TOOL_RESULT_MAX_CHARS) { output = output.substring(0, TOOL_RESULT_MAX_CHARS) - + "\n(truncated at " + TOOL_RESULT_MAX_CHARS + " chars)"; + + "\n(truncated at " + TOOL_RESULT_MAX_CHARS + " chars)"; } int exitCode = process.exitValue(); return exitCode == 0 - ? new ToolOutput(output, false) - : new ToolOutput("(exit code " + exitCode + ")\n" + output, true); + ? new ToolOutput(output, false) + : new ToolOutput("(exit code " + exitCode + ")\n" + output, true); } // A tool call's input fields, or an empty map if the model sent something other than an object. @@ -1219,7 +1221,7 @@ The bash handler runs the requested command with a timeout, captures combined st return toolUse._input() instanceof JsonObject object ? object.values() : Map.of(); } - // Execute one bash tool call requested by the model. + // Run one bash tool call requested by the model. ToolOutput handleBashBlock(ToolUseBlock toolUse) throws InterruptedException { Map input = toolInput(toolUse); if (input.get("restart") instanceof JsonBoolean restart && restart.value()) { @@ -1289,7 +1291,7 @@ The bash handler runs the requested command with a timeout, captures combined st return [$output, $exitCode !== 0]; } - /** Execute one bash tool call requested by the model. */ + /** Run one bash tool call requested by the model. */ function handleBashBlock(ToolUseBlock $block): array { if (($block->input['restart'] ?? null) === true) { @@ -1337,7 +1339,7 @@ The bash handler runs the requested command with a timeout, captures combined st stdin.close reader = Thread.new { stdout_and_stderr.read.scrub } # Enforce the time limit with a monotonic-clock deadline so a timed-out command is - # stopped rather than left running in the background. + # ended rather than left running in the background. deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) + BASH_TIMEOUT_SECONDS until wait_thr.join(0.1) next if Process.clock_gettime(Process::CLOCK_MONOTONIC) < deadline @@ -1371,7 +1373,7 @@ The bash handler runs the requested command with a timeout, captures combined st end end - # Execute one bash tool call requested by the model. + # Run one bash tool call requested by the model. def handle_bash_block(block) input = parse_tool_input(block.input) return ["Shell restarted.", false] if input["restart"] == true @@ -1705,9 +1707,9 @@ Each workflow subtask becomes its own small agent loop with the bash tool, runni ```java Java static final String SUBAGENT_SYSTEM = """ - You are one agent in a larger parallel fan-out, assigned a single subtask. \ - Investigate it directly, using bash to check facts rather than guessing, and finish \ - by calling report_findings exactly once. Return findings, not narration."""; + You are one agent in a larger parallel fan-out, assigned a single subtask. \ + Investigate it directly, using bash to check facts rather than guessing, and finish \ + by calling report_findings exactly once. Return findings, not narration."""; // One subagent: a small nested agent loop with the bash tool plus report_findings. // Subagents inherit the main loop's effort level. @@ -1716,14 +1718,16 @@ Each workflow subtask becomes its own small agent loop with the bash tool, runni messages.add(MessageParam.ofUser(prompt)); for (int turn = 0; turn < MAX_SUBAGENT_TURNS; turn++) { MessageCreateParams params = MessageCreateParams.builder() - .model(model) - .maxTokens(64000L) - .system(SUBAGENT_SYSTEM) - .outputConfig(OutputConfig.builder().effort(EFFORT).build()) - .addTool(BASH_TOOL) - .addTool(REPORT_TOOL) - .messages(messages) - .build(); + .model(model) + .maxTokens(64000L) + .system(SUBAGENT_SYSTEM) + .outputConfig(OutputConfig.builder() + .effort(EFFORT) + .build()) + .addTool(BASH_TOOL) + .addTool(REPORT_TOOL) + .messages(messages) + .build(); MessageAccumulator accumulator = MessageAccumulator.create(); try (var stream = client.messages().createStreaming(params, REQUEST_OPTIONS)) { stream.stream().forEach(accumulator::accumulate); @@ -1736,17 +1740,17 @@ Each workflow subtask becomes its own small agent loop with the bash tool, runni } if (!StopReason.TOOL_USE.equals(stopReason)) { String text = response.content().stream() - .flatMap(block -> block.text().stream()) - .map(TextBlock::text) - .collect(Collectors.joining()); + .flatMap(block -> block.text().stream()) + .map(TextBlock::text) + .collect(Collectors.joining()); if (StopReason.MAX_TOKENS.equals(stopReason)) { text += "\n\n(warning: subagent response was truncated at max_tokens)"; } return text; } List toolUses = response.content().stream() - .flatMap(block -> block.toolUse().stream()) - .toList(); + .flatMap(block -> block.toolUse().stream()) + .toList(); List toolResults = new ArrayList<>(); String report = null; for (ToolUseBlock toolUse : toolUses) { @@ -1759,10 +1763,10 @@ Each workflow subtask becomes its own small agent loop with the bash tool, runni default -> new ToolOutput("unknown tool: " + toolUse.name(), true); }; toolResults.add(ContentBlockParam.ofToolResult(ToolResultBlockParam.builder() - .toolUseId(toolUse.id()) - .content(result.output()) - .isError(result.isError()) - .build())); + .toolUseId(toolUse.id()) + .content(result.output()) + .isError(result.isError()) + .build())); } if (report != null) { return report; @@ -2128,8 +2132,8 @@ A fan-out that spawns dozens of subagents is expensive to restart from the begin Map loadJournal() { try { return Objects.requireNonNullElseGet( - JOURNAL_MAPPER.readValue(Files.readString(JOURNAL_PATH), new TypeReference>() {}), - HashMap::new); + JOURNAL_MAPPER.readValue(Files.readString(JOURNAL_PATH), new TypeReference>() {}), + HashMap::new); } catch (IOException _) { return new HashMap<>(); } @@ -2611,16 +2615,16 @@ The fan-out accepts up to `MAX_TOTAL_SUBTASKS` prompts, runs them through the jo List normalizeSubtasks(JsonValue rawSubtasks) { List tasks = switch (rawSubtasks) { case JsonArray array -> array.values().stream() - .map(item -> item instanceof JsonString text ? text.value() : item.toString()) - .toList(); + .map(item -> item instanceof JsonString text ? text.value() : item.toString()) + .toList(); case JsonString string -> parseSubtaskString(string.value()); default -> List.of(); }; return tasks.stream() - .filter(Objects::nonNull) - .map(String::strip) - .filter(task -> !task.isEmpty()) - .toList(); + .filter(Objects::nonNull) + .map(String::strip) + .filter(task -> !task.isEmpty()) + .toList(); } List parseSubtaskString(String encoded) { @@ -2634,31 +2638,31 @@ The fan-out accepts up to `MAX_TOTAL_SUBTASKS` prompts, runs them through the jo String verifyPromptFor(String subtask, String result) { return """ - Adversarially verify the subagent result below: try to REFUTE it. Re-derive the \ - claims yourself with bash rather than trusting the result, and look for evidence \ - that contradicts them. Default to refuted if uncertain. Call report_findings with \ - summary 'refuted: ' or 'confirmed: ', citing the file:line or command \ - output that decided it. + Adversarially verify the subagent result below: try to REFUTE it. Re-derive the \ + claims yourself with bash rather than trusting the result, and look for evidence \ + that contradicts them. Default to refuted if uncertain. Call report_findings with \ + summary 'refuted: ' or 'confirmed: ', citing the file:line or command \ + output that decided it. - Subtask: %s + Subtask: %s - Result to verify: - %s""".formatted(subtask, result); + Result to verify: + %s""".formatted(subtask, result); } // invokeAll waits for every job, so each future is finished when it is read here. List runAll(ExecutorService pool, List prompts, Model model) throws InterruptedException { List> jobs = prompts.stream() - .>map(prompt -> () -> journaled(prompt, () -> runSubagent(model, prompt))) - .toList(); + .>map(prompt -> () -> journaled(prompt, () -> runSubagent(model, prompt))) + .toList(); return pool.invokeAll(jobs).stream() - .map(future -> switch (future.state()) { - case SUCCESS -> future.resultNow(); - // Isolation boundary: one bad subagent should not end the run. - case FAILED -> "(subagent failed: " + future.exceptionNow() + ")"; - case CANCELLED, RUNNING -> "(subagent failed: cancelled)"; - }) - .toList(); + .map(future -> switch (future.state()) { + case SUCCESS -> future.resultNow(); + // Isolation boundary: one bad subagent should not end the run. + case FAILED -> "(subagent failed: " + future.exceptionNow() + ")"; + case CANCELLED, RUNNING -> "(subagent failed: cancelled)"; + }) + .toList(); } // Run subtasks as parallel subagents, then run a second verification wave over @@ -2679,23 +2683,23 @@ The fan-out accepts up to `MAX_TOTAL_SUBTASKS` prompts, runs them through the jo results = runAll(pool, subtasks, model); System.err.println("[workflow] verifying " + results.size() + " results"); List verifyPrompts = IntStream.range(0, subtasks.size()) - .mapToObj(index -> verifyPromptFor(subtasks.get(index), results.get(index))) - .toList(); + .mapToObj(index -> verifyPromptFor(subtasks.get(index), results.get(index))) + .toList(); verdicts = runAll(pool, verifyPrompts, model); } String joined = IntStream.range(0, subtasks.size()) - .mapToObj(index -> """ - [agent %d: %s] - %s + .mapToObj(index -> """ + [agent %d: %s] + %s - [verify %d] - %s""".formatted(index + 1, subtasks.get(index), results.get(index), index + 1, verdicts.get(index))) - .collect(Collectors.joining("\n\n")); + [verify %d] + %s""".formatted(index + 1, subtasks.get(index), results.get(index), index + 1, verdicts.get(index))) + .collect(Collectors.joining("\n\n")); if (dropped > 0) { joined = """ - (note: %d subtasks beyond MAX_TOTAL_SUBTASKS=%d were not run; rerun them in a follow-up Workflow call) + (note: %d subtasks beyond MAX_TOTAL_SUBTASKS=%d were not run; rerun them in a follow-up Workflow call) - %s""".formatted(dropped, MAX_TOTAL_SUBTASKS, joined); + %s""".formatted(dropped, MAX_TOTAL_SUBTASKS, joined); } return new ToolOutput(joined, false); } @@ -3231,7 +3235,7 @@ The agent appends the user's message first, then any system messages that are du return due; } - // Send one user turn through the loop, executing tool calls until the model stops. + // Send one user turn through the loop, running tool calls until the model stops. async Task Turn(string userInput) { // Mid-conversation system messages follow the user turn they apply to, which keeps @@ -3330,10 +3334,9 @@ The agent appends the user's message first, then any system messages that are du // full mode text on entry, or a one-line refresher every turnsBetweenRefreshers user turns. func (agent *modeAgent) dueSystemMessages() []anthropic.MessageParam { systemMessage := func(content string) anthropic.MessageParam { - return anthropic.MessageParam{ - Role: anthropic.MessageParamRoleSystem, - Content: []anthropic.ContentBlockParamUnion{anthropic.NewTextBlock(content)}, - } + return anthropic.MessageParam{OfSystem: &anthropic.SystemMessageParam{ + Content: []anthropic.TextBlockParam{{Text: content}}, + }} } var due []anthropic.MessageParam if agent.exitPending { @@ -3354,7 +3357,7 @@ The agent appends the user's message first, then any system messages that are du return due } - // turn sends one user turn through the loop, executing tool calls until the model stops. + // turn sends one user turn through the loop, running tool calls until the model stops. func (agent *modeAgent) turn(ctx context.Context, userInput string) (string, error) { // Mid-conversation system messages follow the user turn they apply to, which keeps // the cached prefix ahead of them untouched. @@ -3474,7 +3477,7 @@ The agent appends the user's message first, then any system messages that are du return MessageParam.ofSystem(content); } - // Send one user turn through the loop, executing tool calls until the model stops. + // Send one user turn through the loop, running tool calls until the model stops. String turn(String userInput) throws InterruptedException { // Mid-conversation system messages follow the user turn they apply to, which keeps // the cached prefix ahead of them untouched. @@ -3484,14 +3487,16 @@ The agent appends the user's message first, then any system messages that are du for (int turn = 0; turn < MAX_MAIN_TURNS; turn++) { MessageCreateParams params = MessageCreateParams.builder() - .model(model) - .maxTokens(64000L) - .system(SYSTEM_PROMPT) // static for the whole session - .outputConfig(OutputConfig.builder().effort(EFFORT).build()) - .addTool(WORKFLOW_TOOL) - .addTool(BASH_TOOL) - .messages(messages) - .build(); + .model(model) + .maxTokens(64000L) + .system(SYSTEM_PROMPT) // static for the whole session + .outputConfig(OutputConfig.builder() + .effort(EFFORT) + .build()) + .addTool(WORKFLOW_TOOL) + .addTool(BASH_TOOL) + .messages(messages) + .build(); MessageAccumulator accumulator = MessageAccumulator.create(); try (var stream = client.messages().createStreaming(params, REQUEST_OPTIONS)) { stream.stream().forEach(accumulator::accumulate); @@ -3505,9 +3510,9 @@ The agent appends the user's message first, then any system messages that are du } if (!StopReason.TOOL_USE.equals(stopReason)) { String text = response.content().stream() - .flatMap(block -> block.text().stream()) - .map(TextBlock::text) - .collect(Collectors.joining()); + .flatMap(block -> block.text().stream()) + .map(TextBlock::text) + .collect(Collectors.joining()); if (StopReason.MAX_TOKENS.equals(stopReason)) { // Drop the truncated assistant message so later turns do not build on it. messages.removeLast(); @@ -3517,21 +3522,21 @@ The agent appends the user's message first, then any system messages that are du } List toolUses = response.content().stream() - .flatMap(block -> block.toolUse().stream()) - .toList(); + .flatMap(block -> block.toolUse().stream()) + .toList(); List toolResults = new ArrayList<>(); for (ToolUseBlock toolUse : toolUses) { ToolOutput result = switch (toolUse.name()) { case "Workflow" -> runWorkflow(model, - toolInput(toolUse).getOrDefault("subtasks", JsonValue.from(List.of()))); + toolInput(toolUse).getOrDefault("subtasks", JsonValue.from(List.of()))); case "bash" -> handleBashBlock(toolUse); default -> new ToolOutput("unknown tool: " + toolUse.name(), true); }; toolResults.add(ContentBlockParam.ofToolResult(ToolResultBlockParam.builder() - .toolUseId(toolUse.id()) - .content(result.output()) - .isError(result.isError()) - .build())); + .toolUseId(toolUse.id()) + .content(result.output()) + .isError(result.isError()) + .build())); } messages.add(MessageParam.ofUserOfContentBlockParams(toolResults)); } @@ -3848,8 +3853,8 @@ The agent appends the user's message first, then any system messages that are du ```java Java void main(String[] args) throws InterruptedException { String task = args.length > 0 ? args[0] : """ - Explore the current directory, then give a thorough review: what it does, \ - code-quality issues, and concrete improvements."""; + Explore the current directory, then give a thorough review: what it does, \ + code-quality issues, and concrete improvements."""; ModeAgent agent = new ModeAgent(MODEL); IO.println(agent.turn(task)); agent.setMode(false); diff --git a/content/en/build-with-claude/mid-conversation-system-messages.md b/content/en/build-with-claude/mid-conversation-system-messages.md index d5c8f5aed6..5517cacdbb 100644 --- a/content/en/build-with-claude/mid-conversation-system-messages.md +++ b/content/en/build-with-claude/mid-conversation-system-messages.md @@ -13,11 +13,11 @@ System instructions normally live in the top-level `system` field, ahead of ever Mid-conversation system messages close that gap. You append a `{"role": "system"}` message at the point in the conversation where the new instruction becomes relevant, instead of editing the top-level `system` field. The cached prefix stays the same, so the next request still reads it from cache, and the new instruction is still applied as a system instruction rather than as ordinary user text. - Mid-conversation system messages are available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai). + Mid-conversation system messages are available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed). This feature is available on Claude Fable 5.1, [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), Claude Fable 5, [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview), Claude Opus 5.5, Claude Opus 4.8, Claude Opus 5, Claude Sonnet 5.5, and Claude Haiku 5.5. No beta header is required for mid-conversation system messages. This feature is not available on Claude Sonnet 5. Use the top-level `system` field there instead. - [Mid-conversation tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes) are in beta on the same models. On the Claude API, send the `inline-tools-2026-09-15` beta header, which also covers [defining a tool inside a `tool_addition` block](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#define-tools-in-a-message-beta). [Adding an MCP server that way](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#add-an-mcp-server-mid-conversation-beta) needs a second beta header, `mcp-client-2026-09-15`, which is available on the Claude API. The `mid-conversation-tool-changes-2026-07-01` header works for changes that name a tool by reference, on the Claude API, Amazon Bedrock, and Google Cloud. + [Mid-conversation tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes) are in beta on the same models. On the Claude API, send the `inline-tools-2026-09-15` beta header, which also covers [defining a tool inside a `tool_addition` block](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#define-tools-in-a-message-beta). [Adding an MCP server that way](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#add-an-mcp-server-mid-conversation-beta) needs a second beta header, `mcp-client-2026-09-15`, which is available on the Claude API. The `mid-conversation-tool-changes-2026-07-01` header works for changes that name a tool by reference, on the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed). [Turn-scoped system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages) (`clear_at`) are in beta and require the `mid-conversation-system-clear-at-2026-08-21` beta header, on the same models and platforms as mid-conversation system messages. @@ -283,14 +283,15 @@ The following request declares `get_weather` in `tools`, then withdraws it after // Withdraw get_weather from this point onward. The block references // the tool by name instead of editing Tools, so earlier turns stay // byte-identical and the cache still hits. - { - Role: anthropic.BetaMessageParamRoleSystem, - Content: []anthropic.BetaContentBlockParamUnion{ - anthropic.NewBetaToolRemovalBlock(anthropic.BetaToolChangeToolReferenceParam{ - Name: "get_weather", - }), + anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{}, anthropic.BetaSystemMessageParamContentUnion{ + OfToolRemoval: &anthropic.BetaRequestToolRemovalBlockParam{ + Tool: anthropic.BetaRequestToolRemovalBlockToolUnionParam{ + OfToolReference: &anthropic.BetaToolChangeToolReferenceParam{ + Name: "get_weather", + }, + }, }, - }, + }), }, }) if err != nil { @@ -782,23 +783,24 @@ The following request keeps `get_weather` in `tools` and defines `db_query` afte anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("How many orders shipped yesterday?")), // Define db_query by value from this point onward. Tools and the // earlier messages stay exactly as sent, so the cache still hits. - { - Role: anthropic.BetaMessageParamRoleSystem, - Content: []anthropic.BetaContentBlockParamUnion{ - anthropic.NewBetaToolAdditionBlock(anthropic.BetaToolChangeToolDefinitionParam{ - Definition: anthropic.BetaToolUnionParam{OfTool: &anthropic.BetaToolParam{ - Name: "db_query", - Description: anthropic.String("Run a read-only SQL query against the analytics database."), - InputSchema: anthropic.BetaToolInputSchemaParam{ - Properties: map[string]any{ - "sql": map[string]any{"type": "string"}, + anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{}, anthropic.BetaSystemMessageParamContentUnion{ + OfToolAddition: &anthropic.BetaRequestToolAdditionBlockParam{ + Tool: anthropic.BetaRequestToolAdditionBlockToolUnionParam{ + OfToolDefinition: &anthropic.BetaToolChangeToolDefinitionParam{ + Definition: anthropic.BetaToolUnionParam{OfTool: &anthropic.BetaToolParam{ + Name: "db_query", + Description: anthropic.String("Run a read-only SQL query against the analytics database."), + InputSchema: anthropic.BetaToolInputSchemaParam{ + Properties: map[string]any{ + "sql": map[string]any{"type": "string"}, + }, + Required: []string{"sql"}, }, - Required: []string{"sql"}, - }, - }}, - }), + }}, + }, + }, }, - }, + }), }, }) if err != nil { @@ -1366,16 +1368,17 @@ The following request keeps `get_weather` in `tools`, lists the calendar server anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("What's on my calendar tomorrow?")), // Make the calendar server's tools available from this point onward. // The block names the server; it never holds a URL or token. - { - Role: anthropic.BetaMessageParamRoleSystem, - Content: []anthropic.BetaContentBlockParamUnion{ - anthropic.NewBetaToolAdditionBlock(anthropic.BetaToolChangeToolDefinitionParam{ - Definition: anthropic.BetaToolUnionParam{OfMCPToolset: &anthropic.BetaMCPToolsetParam{ - MCPServerName: "calendar", - }}, - }), + anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{}, anthropic.BetaSystemMessageParamContentUnion{ + OfToolAddition: &anthropic.BetaRequestToolAdditionBlockParam{ + Tool: anthropic.BetaRequestToolAdditionBlockToolUnionParam{ + OfToolDefinition: &anthropic.BetaToolChangeToolDefinitionParam{ + Definition: anthropic.BetaToolUnionParam{OfMCPToolset: &anthropic.BetaMCPToolsetParam{ + MCPServerName: "calendar", + }}, + }, + }, }, - }, + }), }, }) if err != nil { @@ -1634,7 +1637,7 @@ Add a message with `"role": "system"` to the `messages` array. Use a plain strin You can still set the top-level `system` field for instructions that should apply to the entire conversation. Reserve mid-conversation system messages for instructions that only become relevant later, or that you want to add without invalidating the cached prefix. -A `role: "system"` message can also carry `output_config.effort` to change the [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level partway through a conversation. This is in beta on Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, and Claude Haiku 5.5 on the Claude API and Google Cloud, and requires the `mid-conversation-output-config-2026-07-01` beta header. On Amazon Bedrock, it's in beta on Claude Fable 5.1, Claude Mythos 5.1, and Claude Opus 5.5, with the same beta value. Claude Opus 5 doesn't support it on Amazon Bedrock. See [Per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta). +A `role: "system"` message can also carry `output_config.effort` to change the [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level partway through a conversation. This is in beta on Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, and Claude Haiku 5.5 on the Claude API and Claude Models on Google Cloud (Google managed), and requires the `mid-conversation-output-config-2026-07-01` beta header. On Amazon Bedrock, it's in beta on Claude Fable 5.1, Claude Mythos 5.1, and Claude Opus 5.5, with the same beta value. Claude Opus 5 doesn't support it on Amazon Bedrock. See [Per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta). ```bash cURL @@ -1821,12 +1824,11 @@ A `role: "system"` message can also carry `output_config.effort` to change the [ // pass the team's strict typing policy. Appending the instruction // here keeps earlier turns byte-identical, so the prefix cached by // the previous request is still read from cache. - { - Role: anthropic.MessageParamRoleSystem, - Content: []anthropic.ContentBlockParamUnion{ - anthropic.NewTextBlock("From now on, every suggestion must include explicit type annotations."), + {OfSystem: &anthropic.SystemMessageParam{ + Content: []anthropic.TextBlockParam{ + {Text: "From now on, every suggestion must include explicit type annotations."}, }, - }, + }}, }, }) if err != nil { @@ -2092,7 +2094,7 @@ messages.3: output_config is not permitted on a turn-scoped system message (clea messages.3.content.0: cache_control is not permitted on a turn-scoped system message (clear_at: 'next_user_message') ``` -The first is the error returned without the beta header. On Google Cloud and [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), send the beta value in the `anthropic-beta` header, as on the Claude API (see [Beta headers](https://platform.claude.com/docs/en/api/beta-headers)). With the Amazon Bedrock [InvokeModel API](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), put it in the `anthropic_beta` array of the request body instead. +The first is the error returned without the beta header. On Claude Models on Google Cloud (Google managed) and [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), send the beta value in the `anthropic-beta` header, as on the Claude API (see [Beta headers](https://platform.claude.com/docs/en/api/beta-headers)). With the Amazon Bedrock [InvokeModel API](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), put it in the `anthropic_beta` array of the request body instead. Through the SDK, set `clear_at` (csharp, go: `ClearAt`; java: `.clearAt()`; php: `clearAt`) on the `role: "system"` entry in `messages` and send the beta header. The following example appends a turn-scoped reminder after the user turn; on the next request, once a later user message exists, the reminder stays in the array but no longer renders: @@ -2224,11 +2226,10 @@ Through the SDK, set `clear_at` (csharp, go: `ClearAt`; java: `.clearAt()`; php: Messages: []anthropic.BetaMessageParam{ anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Draft a short status update on the database migration for the team channel.")), // Turn-scoped reminder: renders for this turn, then clears once a later user message exists. - { - Role: anthropic.BetaMessageParamRoleSystem, - ClearAt: anthropic.BetaMessageParamClearAtNextUserMessage, - Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("The reader is on call: keep this reply under 50 words.")}, - }, + {OfSystem: &anthropic.BetaSystemMessageParam{ + ClearAt: anthropic.BetaSystemMessageParamClearAtNextUserMessage, + Content: []anthropic.BetaSystemMessageParamContentUnion{{OfText: &anthropic.BetaTextBlockParam{Text: "The reader is on call: keep this reply under 50 words."}}}, + }}, }, Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaMidConversationSystemClearAt2026_08_21}, }) diff --git a/content/en/build-with-claude/multilingual-support.md b/content/en/build-with-claude/multilingual-support.md index 7d53453d95..dd38e720cd 100644 --- a/content/en/build-with-claude/multilingual-support.md +++ b/content/en/build-with-claude/multilingual-support.md @@ -150,7 +150,7 @@ Claude infers the response language from the conversation, but for production ap messages: [ ['role' => 'user', 'content' => 'How do I reset my password?'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, system: 'Always respond in French, regardless of the language the user writes in.', ); diff --git a/content/en/build-with-claude/overview.md b/content/en/build-with-claude/overview.md index 5ed860fae8..f90f4a4c42 100644 --- a/content/en/build-with-claude/overview.md +++ b/content/en/build-with-claude/overview.md @@ -26,7 +26,7 @@ The Availability column in each of the following tables lists the platforms that | **Deprecated** | Feature is still functional but no longer recommended. A migration path and removal timeline are provided. | | **Retired** | Feature is no longer available. | -**Platform labels:** Claude API (Anthropic first-party) · [Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) (AWS-operated) · [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) (Anthropic-operated on AWS) · [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) (Google-operated) · [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) (Anthropic-operated on Azure) +**Platform labels:** Claude API (Anthropic first-party) · [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) (AWS-operated) · [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) (Anthropic-operated on AWS) · [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) (Google-operated) · [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) (Anthropic-operated on Azure) ## Model capabilities diff --git a/content/en/build-with-claude/pdf-support.md b/content/en/build-with-claude/pdf-support.md index f5a62d62c6..1be8c95e6a 100644 --- a/content/en/build-with-claude/pdf-support.md +++ b/content/en/build-with-claude/pdf-support.md @@ -11,7 +11,7 @@ featureMetadata: Claude API: ga Claude Platform on AWS: ga Amazon Bedrock: ga - Google Cloud: ga + Claude Models on Google Cloud (Google managed): ga Microsoft Foundry: ga --- @@ -99,7 +99,7 @@ Start with a simple example using the Messages API. You can provide PDFs to Clau 3. By a `file_id` from the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) - On Amazon Bedrock and Google Cloud, only base64-encoded sources are currently available. On Microsoft Foundry, the Files API is not supported for deployments hosted on Azure. + On Amazon Bedrock and Claude Models on Google Cloud (Google managed), only base64-encoded sources are currently available. On Microsoft Foundry, the Files API is not supported for deployments hosted on Azure. #### Option 1: URL-based PDF document @@ -262,30 +262,30 @@ The simplest approach is to reference a PDF directly from a URL: // Create document block with URL DocumentBlockParam documentParam = DocumentBlockParam.builder() - .source( - UrlPdfSource.builder() - .url( - "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf" - ) - .build() - ) - .build(); + .source( + UrlPdfSource.builder() + .url( + "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf" + ) + .build() + ) + .build(); // Create a message with document and text content blocks MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofDocument(documentParam), - ContentBlockParam.ofText( - TextBlockParam.builder() - .text("What are the key findings in this document?") - .build() - ) + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofDocument(documentParam), + ContentBlockParam.ofText( + TextBlockParam.builder() + .text("What are the key findings in this document?") + .build() + ) + ) ) - ) - .build(); + .build(); Message message = client.messages().create(params); System.out.println(message.content()); @@ -383,23 +383,23 @@ If you need to send PDFs from your local system or when a URL isn't available: # Create a JSON request file using the pdf_base64.txt content jq -n --rawfile PDF_BASE64 pdf_base64.txt '{ - "model": "claude-opus-5-5", - "max_tokens": 1024, - "messages": [{ - "role": "user", - "content": [{ - "type": "document", - "source": { - "type": "base64", - "media_type": "application/pdf", - "data": $PDF_BASE64 - } - }, - { - "type": "text", - "text": "What are the key findings in this document?" - }] + "model": "claude-opus-5-5", + "max_tokens": 1024, + "messages": [{ + "role": "user", + "content": [{ + "type": "document", + "source": { + "type": "base64", + "media_type": "application/pdf", + "data": $PDF_BASE64 + } + }, + { + "type": "text", + "text": "What are the key findings in this document?" }] + }] }' > request.json # Send the API request using the JSON file @@ -588,13 +588,18 @@ If you need to send PDFs from your local system or when a URL isn't available: // Method 1: Download and encode a remote PDF String pdfUrl = - "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"; - HttpClient httpClient = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.NORMAL).build(); - HttpRequest request = HttpRequest.newBuilder().uri(URI.create(pdfUrl)).GET().build(); + "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"; + HttpClient httpClient = HttpClient.newBuilder() + .followRedirects(HttpClient.Redirect.NORMAL) + .build(); + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create(pdfUrl)) + .GET() + .build(); HttpResponse response = httpClient.send( - request, - HttpResponse.BodyHandlers.ofByteArray() + request, + HttpResponse.BodyHandlers.ofByteArray() ); String pdfBase64 = Base64.getEncoder().encodeToString(response.body()); @@ -604,24 +609,26 @@ If you need to send PDFs from your local system or when a URL isn't available: // Create document block with base64 data DocumentBlockParam documentParam = DocumentBlockParam.builder() - .source(Base64PdfSource.builder().data(pdfBase64).build()) - .build(); + .source(Base64PdfSource.builder() + .data(pdfBase64) + .build()) + .build(); // Create a message with document and text content blocks MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofDocument(documentParam), - ContentBlockParam.ofText( - TextBlockParam.builder() - .text("What are the key findings in this document?") - .build() - ) + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofDocument(documentParam), + ContentBlockParam.ofText( + TextBlockParam.builder() + .text("What are the key findings in this document?") + .build() + ) + ) ) - ) - .build(); + .build(); Message message = client.messages().create(params); System.out.println(message.content()); @@ -671,7 +678,7 @@ If you need to send PDFs from your local system or when a URL isn't available: # First, load and encode the PDF pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf" pdf_bytes = URI.open(pdf_url, "rb") { |f| f.read } - pdf_data = [pdf_bytes].pack("m0") # Base64-encode without newlines + pdf_data = [pdf_bytes].pack("m0") # Encode as base64 without newlines # Alternative: Load from a local file # pdf_data = [File.binread("document.pdf")].pack("m0") @@ -908,26 +915,30 @@ For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use // Upload the PDF file FileMetadata file = client - .files() - .upload(FileUploadParams.builder().file(Path.of("/path/to/document.pdf")).build()); + .files() + .upload(FileUploadParams.builder() + .file(Path.of("/path/to/document.pdf")) + .build()); // Use the uploaded file in a message MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofDocument( - DocumentBlockParam.builder().fileSource(file.id()).build() - ), - ContentBlockParam.ofText( - TextBlockParam.builder() - .text("What are the key findings in this document?") - .build() - ) + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofDocument( + DocumentBlockParam.builder() + .fileSource(file.id()) + .build() + ), + ContentBlockParam.ofText( + TextBlockParam.builder() + .text("What are the key findings in this document?") + .build() + ) + ) ) - ) - .build(); + .build(); Message message = client.messages().create(params); System.out.println(message.content()); @@ -1259,37 +1270,44 @@ Cache PDFs with [prompt caching](https://platform.claude.com/docs/en/build-with- // Download and encode the PDF String pdfUrl = - "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"; - HttpClient httpClient = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.NORMAL).build(); - HttpRequest request = HttpRequest.newBuilder().uri(URI.create(pdfUrl)).GET().build(); + "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"; + HttpClient httpClient = HttpClient.newBuilder() + .followRedirects(HttpClient.Redirect.NORMAL) + .build(); + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create(pdfUrl)) + .GET() + .build(); HttpResponse response = httpClient.send( - request, - HttpResponse.BodyHandlers.ofByteArray() + request, + HttpResponse.BodyHandlers.ofByteArray() ); String pdfBase64 = Base64.getEncoder().encodeToString(response.body()); MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofDocument( - DocumentBlockParam.builder() - .source(Base64PdfSource.builder().data(pdfBase64).build()) - .cacheControl(CacheControlEphemeral.builder().build()) - .build() - ), - ContentBlockParam.ofText( - TextBlockParam.builder() - .text( - "Which model has the highest human preference win rates across each use-case?" - ) - .build() - ) + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofDocument( + DocumentBlockParam.builder() + .source(Base64PdfSource.builder() + .data(pdfBase64) + .build()) + .cacheControl(CacheControlEphemeral.builder().build()) + .build() + ), + ContentBlockParam.ofText( + TextBlockParam.builder() + .text( + "Which model has the highest human preference win rates across each use-case?" + ) + .build() + ) + ) ) - ) - .build(); + .build(); Message message = client.messages().create(params); System.out.println(message); @@ -1336,7 +1354,7 @@ Cache PDFs with [prompt caching](https://platform.claude.com/docs/en/build-with- # Load and encode the PDF pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf" pdf_bytes = URI.open(pdf_url, "rb") { |f| f.read } - pdf_data = [pdf_bytes].pack("m0") # Base64-encode without newlines + pdf_data = [pdf_bytes].pack("m0") # Encode as base64 without newlines anthropic = Anthropic::Client.new @@ -1378,51 +1396,51 @@ Use the [Message Batches API](https://platform.claude.com/docs/en/build-with-cla curl -sL "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf" | base64 | tr -d '\n' > pdf_base64.txt # Create a JSON request file using the pdf_base64.txt content jq -n --rawfile PDF_BASE64 pdf_base64.txt '{ - "requests": [ - { - "custom_id": "my-first-request", - "params": { - "model": "claude-opus-5-5", - "max_tokens": 1024, - "messages": [{ - "role": "user", - "content": [{ - "type": "document", - "source": { - "type": "base64", - "media_type": "application/pdf", - "data": $PDF_BASE64 - } - }, - { - "type": "text", - "text": "Which model has the highest human preference win rates across each use-case?" - }] - }] - } - }, - { - "custom_id": "my-second-request", - "params": { - "model": "claude-opus-5-5", - "max_tokens": 1024, - "messages": [{ - "role": "user", - "content": [{ - "type": "document", - "source": { - "type": "base64", - "media_type": "application/pdf", - "data": $PDF_BASE64 - } - }, - { - "type": "text", - "text": "Extract 5 key insights from this document." - }] - }] - } - }] + "requests": [ + { + "custom_id": "my-first-request", + "params": { + "model": "claude-opus-5-5", + "max_tokens": 1024, + "messages": [{ + "role": "user", + "content": [{ + "type": "document", + "source": { + "type": "base64", + "media_type": "application/pdf", + "data": $PDF_BASE64 + } + }, + { + "type": "text", + "text": "Which model has the highest human preference win rates across each use-case?" + }] + }] + } + }, + { + "custom_id": "my-second-request", + "params": { + "model": "claude-opus-5-5", + "max_tokens": 1024, + "messages": [{ + "role": "user", + "content": [{ + "type": "document", + "source": { + "type": "base64", + "media_type": "application/pdf", + "data": $PDF_BASE64 + } + }, + { + "type": "text", + "text": "Extract 5 key insights from this document." + }] + }] + } + }] }' > request.json # Then make the API call using the JSON file @@ -1737,70 +1755,79 @@ Use the [Message Batches API](https://platform.claude.com/docs/en/build-with-cla // Download and encode the PDF String pdfUrl = - "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"; - HttpClient httpClient = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.NORMAL).build(); - HttpRequest request = HttpRequest.newBuilder().uri(URI.create(pdfUrl)).GET().build(); + "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"; + HttpClient httpClient = HttpClient.newBuilder() + .followRedirects(HttpClient.Redirect.NORMAL) + .build(); + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create(pdfUrl)) + .GET() + .build(); HttpResponse response = httpClient.send( - request, - HttpResponse.BodyHandlers.ofByteArray() + request, + HttpResponse.BodyHandlers.ofByteArray() ); String pdfBase64 = Base64.getEncoder().encodeToString(response.body()); BatchCreateParams params = BatchCreateParams.builder() - .addRequest( - BatchCreateParams.Request.builder() - .customId("my-first-request") - .params( - BatchCreateParams.Request.Params.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofDocument( - DocumentBlockParam.builder() - .source(Base64PdfSource.builder().data(pdfBase64).build()) - .build() - ), - ContentBlockParam.ofText( - TextBlockParam.builder() - .text( - "Which model has the highest human preference win rates across each use-case?" - ) - .build() - ) + .addRequest( + BatchCreateParams.Request.builder() + .customId("my-first-request") + .params( + BatchCreateParams.Request.Params.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofDocument( + DocumentBlockParam.builder() + .source(Base64PdfSource.builder() + .data(pdfBase64) + .build()) + .build() + ), + ContentBlockParam.ofText( + TextBlockParam.builder() + .text( + "Which model has the highest human preference win rates across each use-case?" + ) + .build() + ) + ) + ) + .build() ) - ) - .build() - ) - .build() - ) - .addRequest( - BatchCreateParams.Request.builder() - .customId("my-second-request") - .params( - BatchCreateParams.Request.Params.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofDocument( - DocumentBlockParam.builder() - .source(Base64PdfSource.builder().data(pdfBase64).build()) - .build() - ), - ContentBlockParam.ofText( - TextBlockParam.builder() - .text("Extract 5 key insights from this document.") - .build() - ) + .build() + ) + .addRequest( + BatchCreateParams.Request.builder() + .customId("my-second-request") + .params( + BatchCreateParams.Request.Params.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofDocument( + DocumentBlockParam.builder() + .source(Base64PdfSource.builder() + .data(pdfBase64) + .build()) + .build() + ), + ContentBlockParam.ofText( + TextBlockParam.builder() + .text("Extract 5 key insights from this document.") + .build() + ) + ) + ) + .build() ) - ) - .build() - ) - .build() - ) - .build(); + .build() + ) + .build(); MessageBatch batch = client.messages().batches().create(params); System.out.println(batch); @@ -1879,7 +1906,7 @@ Use the [Message Batches API](https://platform.claude.com/docs/en/build-with-cla # Load and encode the PDF pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf" pdf_bytes = URI.open(pdf_url, "rb") { |f| f.read } - pdf_data = [pdf_bytes].pack("m0") # Base64-encode without newlines + pdf_data = [pdf_bytes].pack("m0") # Encode as base64 without newlines anthropic = Anthropic::Client.new diff --git a/content/en/build-with-claude/preserved-thinking.md b/content/en/build-with-claude/preserved-thinking.md index 4ae864c048..156bd45433 100644 --- a/content/en/build-with-claude/preserved-thinking.md +++ b/content/en/build-with-claude/preserved-thinking.md @@ -36,11 +36,11 @@ Also check your integration if it sends Claude Sonnet 5.5 or Claude Haiku 5.5 th Claude Fable 5.1 and Claude Mythos 5.1 read thinking blocks produced by each other and by earlier Claude models. No other model reads thinking blocks from Claude Fable 5.1 or Claude Mythos 5.1. -Claude Opus 5.5 reads thinking blocks from Claude Opus 5, from earlier Opus, Sonnet, and Haiku models, and, on the Claude API and Google Cloud, from Claude Sonnet 5.5 and Claude Haiku 5.5, but not from Claude Fable or Claude Mythos models. On the Claude API, Claude Fable 5.1 and Claude Mythos 5.1 read thinking blocks from Claude Opus 5.5; no other model does. So a conversation that moves from Claude Opus 5 onto Claude Opus 5.5 keeps its reasoning, and so does one that moves from Claude Opus 5.5 up to Claude Fable 5.1 or Claude Mythos 5.1 on the Claude API. One that moves from Claude Fable 5.1 or Claude Mythos 5.1 to Claude Opus 5.5, or from Claude Opus 5.5 to any model other than those two, runs the turns after the switch without the previous model's reasoning. The blocks are dropped, not rejected, as described later in this section. +Claude Opus 5.5 reads thinking blocks from Claude Opus 5, from earlier Opus, Sonnet, and Haiku models, and, on the Claude API and Claude Models on Google Cloud (Google managed), from Claude Sonnet 5.5 and Claude Haiku 5.5, but not from Claude Fable or Claude Mythos models. On the Claude API, Claude Fable 5.1 and Claude Mythos 5.1 read thinking blocks from Claude Opus 5.5; no other model does. So a conversation that moves from Claude Opus 5 onto Claude Opus 5.5 keeps its reasoning, and so does one that moves from Claude Opus 5.5 up to Claude Fable 5.1 or Claude Mythos 5.1 on the Claude API. One that moves from Claude Fable 5.1 or Claude Mythos 5.1 to Claude Opus 5.5, or from Claude Opus 5.5 to any model other than those two, runs the turns after the switch without the previous model's reasoning. The blocks are dropped, not rejected, as described later in this section. -Claude Sonnet 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, and, on the Claude API and Google Cloud, from Claude Haiku 5.5, but not from Claude Opus 5, Claude Opus 5.5, or any Claude Fable or Claude Mythos model. On the Claude API and Google Cloud, Claude Opus 5.5 reads thinking blocks from Claude Sonnet 5.5; no other model does. So a conversation that moves from Claude Sonnet 5 onto Claude Sonnet 5.5 keeps its reasoning, and so does one that moves from Claude Sonnet 5.5 up to Claude Opus 5.5 on the Claude API and Google Cloud. One that moves onto Claude Sonnet 5.5 from Claude Opus 5, Claude Opus 5.5, or a Claude Fable or Claude Mythos model runs the turns after the switch without the previous model's reasoning. So does any other move away from Claude Sonnet 5.5, for example a [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) to Claude Sonnet 5. +Claude Sonnet 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, and, on the Claude API and Claude Models on Google Cloud (Google managed), from Claude Haiku 5.5, but not from Claude Opus 5, Claude Opus 5.5, or any Claude Fable or Claude Mythos model. On those two platforms, Claude Opus 5.5 reads thinking blocks from Claude Sonnet 5.5; no other model does. So a conversation that moves from Claude Sonnet 5 onto Claude Sonnet 5.5 keeps its reasoning, and so does one that moves from Claude Sonnet 5.5 up to Claude Opus 5.5 on those platforms. One that moves onto Claude Sonnet 5.5 from Claude Opus 5, Claude Opus 5.5, or a Claude Fable or Claude Mythos model runs the turns after the switch without the previous model's reasoning. So does any other move away from Claude Sonnet 5.5, for example a [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) to Claude Sonnet 5. -Claude Haiku 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, but not from Claude Opus 5, Claude Opus 5.5, Claude Sonnet 5.5, or any Claude Fable or Claude Mythos model. On the Claude API and Google Cloud, Claude Opus 5.5 and Claude Sonnet 5.5 read thinking blocks from Claude Haiku 5.5; no other model does. So a conversation that moves from Claude Haiku 4.5 onto Claude Haiku 5.5 keeps its reasoning, and so does one that moves from Claude Haiku 5.5 up to Claude Opus 5.5 or Claude Sonnet 5.5 on the Claude API and Google Cloud. One that moves onto Claude Haiku 5.5 from Claude Opus 5, Claude Opus 5.5, Claude Sonnet 5.5, or a Claude Fable or Claude Mythos model runs the turns after the switch without the previous model's reasoning, and so does any other move away from Claude Haiku 5.5. +Claude Haiku 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, but not from Claude Opus 5, Claude Opus 5.5, Claude Sonnet 5.5, or any Claude Fable or Claude Mythos model. On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 and Claude Sonnet 5.5 read thinking blocks from Claude Haiku 5.5; no other model does. So a conversation that moves from Claude Haiku 4.5 onto Claude Haiku 5.5 keeps its reasoning, and so does one that moves from Claude Haiku 5.5 up to Claude Opus 5.5 or Claude Sonnet 5.5 on the Claude API and Claude Models on Google Cloud (Google managed). One that moves onto Claude Haiku 5.5 from Claude Opus 5, Claude Opus 5.5, Claude Sonnet 5.5, or a Claude Fable or Claude Mythos model runs the turns after the switch without the previous model's reasoning, and so does any other move away from Claude Haiku 5.5. * **A conversation that moves to Claude Fable 5.1 from an earlier model, or from Claude Opus 5.5 on the Claude API, keeps its reasoning.** The earlier model's thinking blocks stay readable, so the model thinks as usual from the first turn after the switch. * **A conversation that moves from Claude Fable 5.1 to any model other than Claude Mythos 5.1 loses Claude Fable 5.1's reasoning for that request.** This occurs when a router sends a turn to a cheaper model, after a [classifier refusal fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback), or during a [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). The API removes the unreadable blocks before the prompt reaches the model. They aren't billed and don't count toward `input_tokens`. @@ -71,7 +71,7 @@ Without the header, the drop is silent. This entry isn't a bug in your integrati Thinking blocks that Claude Sonnet 5.5 or Claude Haiku 5.5 produces work only in the account that produced them, or in an account linked to it. When another account sends one of these blocks, the API drops the block before the model sees it, and the request succeeds. The model answers without the reasoning in the dropped blocks. Blocks from earlier models aren't affected. -On the Claude API and Google Cloud, with the `thinking-binding-controls-2026-08-01` [beta header](https://platform.claude.com/docs/en/api/beta-headers), the response lists each dropped block in `input_transformations` as a `thinking_dropped` entry with `reason: "organization_binding_mismatch"`. Without the header, the drop is silent. +On the Claude API and Claude Models on Google Cloud (Google managed), with the `thinking-binding-controls-2026-08-01` [beta header](https://platform.claude.com/docs/en/api/beta-headers), the response lists each dropped block in `input_transformations` as a `thinking_dropped` entry with `reason: "organization_binding_mismatch"`. Without the header, the drop is silent. ## Keeping the prefix unchanged @@ -1046,16 +1046,16 @@ Handle these entries as you would `prefix_binding_mismatch` drops. The edit is b Each common prefix edit has a replacement that gives the model the same information and leaves earlier bytes unchanged, so later thinking stays valid. Find the edit your code makes today in the first column: -| Instead of | Use | Beta header | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Rebuilding the top-level `system` prompt | A [mid-conversation system message](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#new-instructions) | None | -| Re-rendering the context in your first user message (environment, date, memory, project instructions) on each request | Render it once and resend it unchanged. When something changes, [put the new version in the newest turn](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#changing-context) | None | -| Clearing or shortening old `tool_result` content, or re-encoding old images, in place | Shorten a tool result or downscale an image before the first time you send it, not after. To clear old results later, [trim context on the server](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#server-side-trimming) with `clear_tool_uses_20250919` | `context-management-2025-06-27` | -| Injecting a reminder and deleting it on the next request | A [turn-scoped system message](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#per-turn-reminders) (`clear_at: "next_user_message"`) | `mid-conversation-system-clear-at-2026-08-21` | -| Adding or removing entries in `tools` | [`tool_addition` and `tool_removal` blocks](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#tool-changes) | `inline-tools-2026-09-15` (add `mcp-client-2026-09-15` when the tool comes from an MCP server connected through the MCP connector), or the older `mid-conversation-tool-changes-2026-07-01`, which works on the Claude API, Amazon Bedrock, and Google Cloud | -| Changing top-level `output_config.effort` (restarts the cache, doesn't affect thinking) | A [per-message `output_config`](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#effort-changes) | `mid-conversation-output-config-2026-07-01` | -| Dropping or summarizing old turns on the client | [On-demand compaction](https://platform.claude.com/docs/en/build-with-claude/compaction-on-demand) to keep the recent turns with their thinking, other server-side [compaction or context editing](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#server-side-trimming), or [client-side compaction](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#custom-compaction-on-the-client) that keeps no stale thinking | `compact-2026-09-04` | -| An image or document URL whose bytes change between requests | A [`file_id` from the Files API](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#files-by-id), or base64 | None | +| Instead of | Use | Beta header | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Rebuilding the top-level `system` prompt | A [mid-conversation system message](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#new-instructions) | None | +| Re-rendering the context in your first user message (environment, date, memory, project instructions) on each request | Render it once and resend it unchanged. When something changes, [put the new version in the newest turn](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#changing-context) | None | +| Clearing or shortening old `tool_result` content, or re-encoding old images, in place | Shorten a tool result or downscale an image before the first time you send it, not after. To clear old results later, [trim context on the server](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#server-side-trimming) with `clear_tool_uses_20250919` | `context-management-2025-06-27` | +| Injecting a reminder and deleting it on the next request | A [turn-scoped system message](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#per-turn-reminders) (`clear_at: "next_user_message"`) | `mid-conversation-system-clear-at-2026-08-21` | +| Adding or removing entries in `tools` | [`tool_addition` and `tool_removal` blocks](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#tool-changes) | `inline-tools-2026-09-15` (add `mcp-client-2026-09-15` when the tool comes from an MCP server connected through the MCP connector), or the older `mid-conversation-tool-changes-2026-07-01`, which works on the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed) | +| Changing top-level `output_config.effort` (restarts the cache, doesn't affect thinking) | A [per-message `output_config`](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#effort-changes) | `mid-conversation-output-config-2026-07-01` | +| Dropping or summarizing old turns on the client | [On-demand compaction](https://platform.claude.com/docs/en/build-with-claude/compaction-on-demand) to keep the recent turns with their thinking, other server-side [compaction or context editing](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#server-side-trimming), or [client-side compaction](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#custom-compaction-on-the-client) that keeps no stale thinking | `compact-2026-09-04` | +| An image or document URL whose bytes change between requests | A [`file_id` from the Files API](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#files-by-id), or base64 | None | All of these assume you [send assistant turns back exactly as returned](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#append-assistant-turns-exactly-as-returned). Mid-conversation system messages, turn-scoped system messages, and tool changes aren't available on every model: [Mid-conversation system messages and tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) lists the models that accept them. If your code serves several models, keep editing the top-level `system` prompt for the models that don't accept them. @@ -1161,7 +1161,7 @@ A user message that contains only `tool_result` blocks counts as the "next user ### Add or remove tools with `tool_addition` and `tool_removal` -Editing the `tools` array mid-session invalidates preserved thinking blocks. Leave the array as you first sent it, and change which tools the model can use by appending a `role: "system"` message that carries `tool_addition` or `tool_removal` blocks. These are [mid-conversation tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes) and need the beta header `inline-tools-2026-09-15`, which is available on the Claude API. The older `mid-conversation-tool-changes-2026-07-01` header still works for changes that name a tool by reference, on the Claude API, Amazon Bedrock, and Google Cloud. +Editing the `tools` array mid-session invalidates preserved thinking blocks. Leave the array as you first sent it, and change which tools the model can use by appending a `role: "system"` message that carries `tool_addition` or `tool_removal` blocks. These are [mid-conversation tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes) and need the beta header `inline-tools-2026-09-15`, which is available on the Claude API. The older `mid-conversation-tool-changes-2026-07-01` header still works for changes that name a tool by reference, on the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed). You have two ways to use these blocks: @@ -1229,7 +1229,7 @@ The `role: "system"` messages that carry these blocks join the prefix for later ### Change effort with a per-message `output_config` -Changing top-level `output_config.effort` between requests doesn't invalidate thinking, because effort isn't part of the prefix. Changing top-level effort does restart the prompt cache. Where the model and platform support [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta), use it instead: append a `role: "system"` message with empty `content` and the new level. It needs the beta header `mid-conversation-output-config-2026-07-01`. On Claude Haiku 5.5, per-message effort is available on the Claude API and Google Cloud and needs adaptive thinking. +Changing top-level `output_config.effort` between requests doesn't invalidate thinking, because effort isn't part of the prefix. Changing top-level effort does restart the prompt cache. Where the model and platform support [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta), use it instead: append a `role: "system"` message with empty `content` and the new level. It needs the beta header `mid-conversation-output-config-2026-07-01`. On Claude Haiku 5.5, per-message effort is available on the Claude API and Claude Models on Google Cloud (Google managed) and needs adaptive thinking. ```json { "role": "system", "content": [], "output_config": { "effort": "low" } } @@ -1254,7 +1254,7 @@ You can still compact on the client. If you write the summary yourself, don't se When the conversation grows too long, summarize the whole session into one user message and send only that message plus the next instruction. Nothing earlier is replayed, so there's no thinking left to fail the check, and the model reasons afresh from the summary. - ![Simple compaction: request 4 sends the full history with thinking; request 5 sends one summary message, so nothing is checked](https://platform.claude.com/docs/images/preserved-thinking-simple-compaction.svg) + ![Simple compaction: request 5 sends one user message (summary plus next instruction), so no old thinking is sent or checked](https://platform.claude.com/docs/images/preserved-thinking-simple-compaction.svg) ```json @@ -1277,7 +1277,7 @@ To keep that thinking, have the API write the summary with on-demand compaction. The rest of this section covers a summary you write yourself. - ![Keep-tail compaction: thinking on kept turns 3 and 4 fails; with drop\_block, the API drops it and the request succeeds](https://platform.claude.com/docs/images/preserved-thinking-keep-tail-compaction.svg) + ![Keep-tail compaction: a summary of turns 1 and 2, then turns 3 to 5 verbatim. Thinking on 3 and 4 fails; drop\_block succeeds](https://platform.claude.com/docs/images/preserved-thinking-keep-tail-compaction.svg) Fix: keep the turns exactly as they are and send `prefix_mismatch_behavior: "drop_block"`. The API drops the stale thinking blocks, the model reads the kept turns' `text` and `tool_use` blocks, and the request succeeds. @@ -1530,7 +1530,7 @@ A library, proxy, or gateway sits between someone else's history and the API, so - No. `output_config.effort`, `max_tokens`, and the `thinking` configuration aren't part of the checked prefix, which covers only `system`, `tools`, and `messages`. A top-level effort change invalidates most of the prompt cache. Where the model and platform support [per-message effort](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#effort-changes), a per-message effort change keeps the prompt cache and is used as the new effort level until changed again. + No. `output_config.effort`, `max_tokens`, and the `thinking` configuration aren't part of the checked prefix, which covers only `system`, `tools`, and `messages`. A top-level effort change invalidates most of the prompt cache. Where the model and platform support per-message effort, a [per-message effort change](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#effort-changes) keeps the prompt cache and is used as the new effort level until changed again. diff --git a/content/en/build-with-claude/prompt-caching.md b/content/en/build-with-claude/prompt-caching.md index 0dcdb40d96..71c90360a6 100644 --- a/content/en/build-with-claude/prompt-caching.md +++ b/content/en/build-with-claude/prompt-caching.md @@ -133,25 +133,26 @@ The simplest way to start is with automatic caching: // ... public class PromptCachingExample { - public static void main(String[] args) { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + public static void main(String[] args) { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .cacheControl(CacheControlEphemeral.builder().build()) - .system("You are an AI assistant tasked with analyzing literary works. Your goal is to provide insightful commentary on themes, characters, and writing style.") - .addUserMessage("Analyze the major themes in 'Pride and Prejudice'.") - .build(); + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .cacheControl(CacheControlEphemeral.builder().build()) + .system("You are an AI assistant tasked with analyzing literary works. Your goal is to provide insightful commentary on themes, characters, and writing style.") + .addUserMessage("Analyze the major themes in 'Pride and Prejudice'.") + .build(); - Message message = client.messages().create(params); - System.out.println(message.usage()); - } + Message message = client.messages().create(params); + System.out.println(message.usage()); + } } ``` ```php PHP use Anthropic\Messages\CacheControlEphemeral; + use Anthropic\Messages\Model; // ... $client = new Client(); @@ -160,9 +161,9 @@ The simplest way to start is with automatic caching: messages: [ ['role' => 'user', 'content' => "Analyze the major themes in 'Pride and Prejudice'."] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, cacheControl: CacheControlEphemeral::with(), - system: "You are an AI assistant tasked with analyzing literary works. Your goal is to provide insightful commentary on themes, characters, and writing style.", + system: 'You are an AI assistant tasked with analyzing literary works. Your goal is to provide insightful commentary on themes, characters, and writing style.', ); echo json_encode($response->usage); ``` @@ -227,29 +228,29 @@ The lifetime is measured from the start of the request that writes or reads the Prompt caching introduces a new pricing structure. The following table shows the price per million tokens for each supported model: -| Model | Base input tokens | 5m cache writes | 1h cache writes | Cache hits and refreshes | Output tokens | -| :----------------------------------------------------------------------------------------------------------------------------------- | :---------------- | :-------------- | :-------------- | :----------------------- | :------------ | -| Claude Fable 5.1 | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok1 | $50 / MTok | -| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok1 | $50 / MTok | -| Claude Fable 5 | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok | -| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok | -| Claude Opus 5.5 | $4 / MTok | $5 / MTok | $8 / MTok | $0.20 / MTok2 | $20 / MTok | -| Claude Opus 5 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | -| Claude Opus 4.8 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | -| Claude Opus 4.7 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | -| Claude Opus 4.6 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | -| Claude Opus 4.5 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | -| Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $15 / MTok | $18.75 / MTok | $30 / MTok | $1.50 / MTok | $75 / MTok | -| Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $15 / MTok | $18.75 / MTok | $30 / MTok | $1.50 / MTok | $75 / MTok | -| Claude Sonnet 5.5 | $2 / MTok | $2.50 / MTok | $4 / MTok | $0.10 / MTok2 | $10 / MTok | -| Claude Sonnet 5 | $2 / MTok | $2.50 / MTok | $4 / MTok | $0.20 / MTok | $10 / MTok | -| Claude Sonnet 4.6 | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | -| Claude Sonnet 4.5 | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | -| Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | -| Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.10 / MTok | $0.125 / MTok | $0.20 / MTok | $0.01 / MTok | $0.50 / MTok | -| Claude Haiku 5.5 (for prompts over 100,000 tokens) | $0.50 / MTok | $0.625 / MTok | $1 / MTok | $0.05 / MTok | $2.50 / MTok | -| Claude Haiku 4.5 | $1 / MTok | $1.25 / MTok | $2 / MTok | $0.10 / MTok | $5 / MTok | -| Claude Haiku 3.5 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.80 / MTok | $1 / MTok | $1.60 / MTok | $0.08 / MTok | $4 / MTok | +| Model | Base input tokens | 5m cache writes | 1h cache writes | Cache hits and refreshes | Output tokens | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------- | :-------------- | :-------------- | :----------------------- | :------------ | +| Claude Fable 5.1 | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok1 | $50 / MTok | +| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok1 | $50 / MTok | +| Claude Fable 5 | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok | +| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok | +| Claude Opus 5.5 | $4 / MTok | $5 / MTok | $8 / MTok | $0.20 / MTok2 | $20 / MTok | +| Claude Opus 5 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | +| Claude Opus 4.8 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | +| Claude Opus 4.7 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | +| Claude Opus 4.6 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | +| Claude Opus 4.5 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok | +| Claude Opus 4.1 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $15 / MTok | $18.75 / MTok | $30 / MTok | $1.50 / MTok | $75 / MTok | +| Claude Opus 4 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $15 / MTok | $18.75 / MTok | $30 / MTok | $1.50 / MTok | $75 / MTok | +| Claude Sonnet 5.5 | $2 / MTok | $2.50 / MTok | $4 / MTok | $0.10 / MTok2 | $10 / MTok | +| Claude Sonnet 5 | $2 / MTok | $2.50 / MTok | $4 / MTok | $0.20 / MTok | $10 / MTok | +| Claude Sonnet 4.6 | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | +| Claude Sonnet 4.5 | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | +| Claude Sonnet 4 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $3 / MTok | $3.75 / MTok | $6 / MTok | $0.30 / MTok | $15 / MTok | +| Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.10 / MTok | $0.125 / MTok | $0.20 / MTok | $0.01 / MTok | $0.50 / MTok | +| Claude Haiku 5.5 (for prompts over 100,000 tokens) | $0.50 / MTok | $0.625 / MTok | $1 / MTok | $0.05 / MTok | $2.50 / MTok | +| Claude Haiku 4.5 | $1 / MTok | $1.25 / MTok | $2 / MTok | $0.10 / MTok | $5 / MTok | +| Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.80 / MTok | $1 / MTok | $1.60 / MTok | $0.08 / MTok | $4 / MTok | *1 Cache hits and refreshes on Claude Fable 5.1 and Claude Mythos 5.1 are priced at 0.025x the base input price.* @@ -410,14 +411,14 @@ Automatic caching is the simplest way to enable prompt caching. Instead of placi AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .cacheControl(CacheControlEphemeral.builder().build()) - .system("You are a helpful assistant that remembers our conversation.") - .addUserMessage("My name is Alex. I work on machine learning.") - .addAssistantMessage("Nice to meet you, Alex! How can I help with your ML work today?") - .addUserMessage("What did I say I work on?") - .build(); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .cacheControl(CacheControlEphemeral.builder().build()) + .system("You are a helpful assistant that remembers our conversation.") + .addUserMessage("My name is Alex. I work on machine learning.") + .addAssistantMessage("Nice to meet you, Alex! How can I help with your ML work today?") + .addUserMessage("What did I say I work on?") + .build(); Message message = client.messages().create(params); System.out.println(message.usage()); @@ -427,6 +428,7 @@ Automatic caching is the simplest way to enable prompt caching. Instead of placi ```php PHP use Anthropic\Messages\CacheControlEphemeral; + use Anthropic\Messages\Model; // ... $client = new Client(); @@ -437,7 +439,7 @@ Automatic caching is the simplest way to enable prompt caching. Instead of placi ['role' => 'assistant', 'content' => 'Nice to meet you, Alex! How can I help with your ML work today?'], ['role' => 'user', 'content' => 'What did I say I work on?'], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, cacheControl: CacheControlEphemeral::with(), system: 'You are a helpful assistant that remembers our conversation.', ); @@ -590,18 +592,18 @@ Adding more `cache_control` breakpoints doesn't increase your costs; you still p ### Cache limitations -On the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), the minimum cacheable prompt length is: +On the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), the minimum cacheable prompt length is: * 512 tokens for Claude Fable 5.1, [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Fable 5, [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview), and Claude Haiku 5.5 * 2,048 tokens for [Claude Mythos Preview](https://anthropic.com/glasswing) and Claude Opus 4.7 * 4,096 tokens for Claude Opus 4.6 and Claude Opus 4.5 -* 1,024 tokens for Claude Opus 4.8, Claude Sonnet 5, Claude Sonnet 4.6, Claude Sonnet 4.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), and Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) +* 1,024 tokens for Claude Opus 4.8, Claude Sonnet 5, Claude Sonnet 4.6, Claude Sonnet 4.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Opus 4.1 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Opus 4 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)), and Claude Sonnet 4 ([retired, except on Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) * 4,096 tokens for Claude Haiku 4.5 -* 2,048 tokens for Claude Haiku 3.5 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) +* 2,048 tokens for Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) These minimums apply on every platform where each model is available. -Shorter prompts cannot be cached, even if marked with `cache_control`. Any requests to cache fewer than this number of tokens are processed without caching, and no error is returned. To verify whether a prompt was cached, check the [response usage fields](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#tracking-cache-performance): if both `cache_creation_input_tokens` and `cache_read_input_tokens` are 0, the prompt was not cached (likely because it did not meet the minimum length requirement). +Shorter prompts cannot be cached, even if marked with `cache_control`. Any requests to cache fewer than this number of tokens are processed without caching, and no error is returned. To check whether a prompt was cached, look at the [response usage fields](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#tracking-cache-performance): if both `cache_creation_input_tokens` and `cache_read_input_tokens` are 0, the prompt was not cached (likely because it did not meet the minimum length requirement). If your prompt falls just short of the minimum for your model and platform, expanding the cached content to reach the threshold is often worthwhile. Cache reads cost significantly less than uncached input tokens, so reaching the minimum can reduce costs for frequently reused prompts. @@ -746,10 +748,10 @@ For more detailed information, see [Thinking and prompt caching](https://platfor ### Cache storage and sharing - Prompt caching uses [workspace](https://platform.claude.com/docs/en/manage-claude/workspaces)-level isolation. Caches are isolated per workspace, ensuring data separation between workspaces within the same organization. This applies to the Claude API, Claude Platform on AWS, and Microsoft Foundry; Bedrock and Google Cloud maintain organization-level cache isolation. If you use multiple workspaces, review your caching strategy to account for this difference. + Prompt caching uses [workspace](https://platform.claude.com/docs/en/manage-claude/workspaces)-level isolation. Caches are isolated by workspace, ensuring data separation between workspaces within the same organization. This applies to the Claude API, Claude Platform on AWS, and Microsoft Foundry; Bedrock and Claude Models on Google Cloud (Google managed) maintain organization-level cache isolation. If you use multiple workspaces, review your caching strategy to account for this difference. -* **Organization and workspace isolation:** Caches are isolated between organizations. Different organizations never share caches, even if they use identical prompts. Caches are also isolated per workspace within an organization on the Claude API, Claude Platform on AWS, and Microsoft Foundry; Bedrock and Google Cloud use organization-level isolation only. +* **Organization and workspace isolation:** Caches are isolated between organizations. Different organizations never share caches, even if they use identical prompts. Caches are also isolated by workspace within an organization on the Claude API, Claude Platform on AWS, and Microsoft Foundry; Bedrock and Claude Models on Google Cloud (Google managed) use organization-level isolation only. * **Exact matching:** Cache hits require 100 percent identical prompt segments, including all text and images up to and including the block marked with cache control. @@ -805,7 +807,7 @@ If experiencing unexpected behavior: If you find that 5 minutes is too short, Anthropic also offers a 1-hour cache duration [at additional cost](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing). - The 1-hour cache duration is available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). + The 1-hour cache duration is available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). To use the extended cache, include `ttl` in the `cache_control` definition like this: @@ -1029,14 +1031,14 @@ Place the `cache_control` breakpoint on the last block that is shared with the f AnthropicClient client = AnthropicOkHttpClient.fromEnv(); Message prewarm = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(0) - .systemOfTextBlockParams(List.of(TextBlockParam.builder() - .text("You are an expert software engineer with deep knowledge of distributed systems...") - .cacheControl(CacheControlEphemeral.builder().build()) - .build())) - .addUserMessage("warmup") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(0) + .systemOfTextBlockParams(List.of(TextBlockParam.builder() + .text("You are an expert software engineer with deep knowledge of distributed systems...") + .cacheControl(CacheControlEphemeral.builder().build()) + .build())) + .addUserMessage("warmup") + .build()); IO.println(prewarm.stopReason()); // Optional[max_tokens] IO.println(prewarm.content()); // [] @@ -1392,28 +1394,28 @@ Make a pre-warm request when your application starts (or on a scheduled interval AnthropicClient client = AnthropicOkHttpClient.fromEnv(); List systemPrompt = List.of(TextBlockParam.builder() - .text("You are an expert software engineer with deep knowledge of distributed systems...") - .cacheControl(CacheControlEphemeral.builder().build()) - .build()); + .text("You are an expert software engineer with deep knowledge of distributed systems...") + .cacheControl(CacheControlEphemeral.builder().build()) + .build()); // Call this at application startup or on a scheduled interval. void prewarmCache() { client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(0) - .systemOfTextBlockParams(systemPrompt) - .addUserMessage("warmup") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(0) + .systemOfTextBlockParams(systemPrompt) + .addUserMessage("warmup") + .build()); } // The real user request; benefits from a warm cache. Message respond(String userMessage) { return client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .systemOfTextBlockParams(systemPrompt) - .addUserMessage(userMessage) - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .systemOfTextBlockParams(systemPrompt) + .addUserMessage(userMessage) + .build()); } void main() { @@ -1423,8 +1425,8 @@ Make a pre-warm request when your application starts (or on a scheduled interval // Later, when the user submits a message, the system-prompt prefix is already cached. Message response = respond("How do I implement a binary search tree?"); response.content().stream() - .flatMap(block -> block.text().stream()) - .forEach(textBlock -> IO.println(textBlock.text())); + .flatMap(block -> block.text().stream()) + .forEach(textBlock -> IO.println(textBlock.text())); } ``` @@ -1703,31 +1705,31 @@ The following code snippets showcase various prompt caching patterns. These exam // ... public class LegalDocumentAnalysisExample { - public static void main(String[] args) { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + public static void main(String[] args) { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .systemOfTextBlockParams( - List.of( - TextBlockParam.builder() - .text("You are an AI assistant tasked with analyzing legal documents.") - .build(), - TextBlockParam.builder() - .text( - "Here is the full text of a complex legal agreement: [Insert full text of a 50-page legal agreement here]" + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .systemOfTextBlockParams( + List.of( + TextBlockParam.builder() + .text("You are an AI assistant tasked with analyzing legal documents.") + .build(), + TextBlockParam.builder() + .text( + "Here is the full text of a complex legal agreement: [Insert full text of a 50-page legal agreement here]" + ) + .cacheControl(CacheControlEphemeral.builder().build()) + .build() + ) ) - .cacheControl(CacheControlEphemeral.builder().build()) - .build() - ) - ) - .addUserMessage("What are the key terms and conditions in this agreement?") - .build(); + .addUserMessage("What are the key terms and conditions in this agreement?") + .build(); - Message message = client.messages().create(params); - System.out.println(message.usage()); - } + Message message = client.messages().create(params); + System.out.println(message.usage()); + } } ``` @@ -1742,7 +1744,7 @@ The following code snippets showcase various prompt caching patterns. These exam 'content' => 'What are the key terms and conditions in this agreement?' ] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, system: [ [ 'type' => 'text', @@ -2076,16 +2078,13 @@ The following code snippets showcase various prompt caching patterns. These exam Messages: []anthropic.MessageParam{ anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, can you tell me more about the solar system?")), anthropic.NewAssistantMessage(anthropic.NewTextBlock("Certainly! The solar system is the collection of celestial bodies that orbit our Sun. It consists of eight planets, numerous moons, asteroids, comets, and other objects. The planets, in order from closest to farthest from the Sun, are: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune. Each planet has its own unique characteristics and features. Is there a specific aspect of the solar system you would like to know more about?")), - { - Role: anthropic.MessageParamRoleUser, - Content: []anthropic.ContentBlockParamUnion{ - anthropic.NewTextBlock("Good to know."), - {OfText: &anthropic.TextBlockParam{ - Text: "Tell me more about Mars.", - CacheControl: anthropic.NewCacheControlEphemeralParam(), - }}, - }, - }, + anthropic.NewUserMessage( + anthropic.NewTextBlock("Good to know."), + anthropic.ContentBlockParamUnion{OfText: &anthropic.TextBlockParam{ + Text: "Tell me more about Mars.", + CacheControl: anthropic.NewCacheControlEphemeralParam(), + }}, + ), }, }) if err != nil { @@ -2099,43 +2098,45 @@ The following code snippets showcase various prompt caching patterns. These exam // ... public class ConversationWithCacheControlExample { - public static void main(String[] args) { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + public static void main(String[] args) { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - // Create ephemeral system prompt - TextBlockParam systemPrompt = TextBlockParam.builder() - .text("...long system prompt") - .cacheControl(CacheControlEphemeral.builder().build()) - .build(); + // Create ephemeral system prompt + TextBlockParam systemPrompt = TextBlockParam.builder() + .text("...long system prompt") + .cacheControl(CacheControlEphemeral.builder().build()) + .build(); - // Create message params - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .systemOfTextBlockParams(List.of(systemPrompt)) - // First user message (without cache control) - .addUserMessage("Hello, can you tell me more about the solar system?") - // Assistant response - .addAssistantMessage( - "Certainly! The solar system is the collection of celestial bodies that orbit our Sun. It consists of eight planets, numerous moons, asteroids, comets, and other objects. The planets, in order from closest to farthest from the Sun, are: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune. Each planet has its own unique characteristics and features. Is there a specific aspect of the solar system you would like to know more about?" - ) - // Second user message (with cache control) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofText(TextBlockParam.builder().text("Good to know.").build()), - ContentBlockParam.ofText( - TextBlockParam.builder() - .text("Tell me more about Mars.") - .cacheControl(CacheControlEphemeral.builder().build()) - .build() - ) - ) - ) - .build(); + // Create message params + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .systemOfTextBlockParams(List.of(systemPrompt)) + // First user message (without cache control) + .addUserMessage("Hello, can you tell me more about the solar system?") + // Assistant response + .addAssistantMessage( + "Certainly! The solar system is the collection of celestial bodies that orbit our Sun. It consists of eight planets, numerous moons, asteroids, comets, and other objects. The planets, in order from closest to farthest from the Sun, are: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune. Each planet has its own unique characteristics and features. Is there a specific aspect of the solar system you would like to know more about?" + ) + // Second user message (with cache control) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Good to know.") + .build()), + ContentBlockParam.ofText( + TextBlockParam.builder() + .text("Tell me more about Mars.") + .cacheControl(CacheControlEphemeral.builder().build()) + .build() + ) + ) + ) + .build(); - Message message = client.messages().create(params); - System.out.println(message.usage()); - } + Message message = client.messages().create(params); + System.out.println(message.usage()); + } } ``` @@ -2156,7 +2157,7 @@ The following code snippets showcase various prompt caching patterns. These exam ], [ 'role' => 'assistant', - 'content' => "Certainly! The solar system is the collection of celestial bodies that orbit our Sun. It consists of eight planets, numerous moons, asteroids, comets, and other objects. The planets, in order from closest to farthest from the Sun, are: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune. Each planet has its own unique characteristics and features. Is there a specific aspect of the solar system you would like to know more about?" + 'content' => 'Certainly! The solar system is the collection of celestial bodies that orbit our Sun. It consists of eight planets, numerous moons, asteroids, comets, and other objects. The planets, in order from closest to farthest from the Sun, are: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune. Each planet has its own unique characteristics and features. Is there a specific aspect of the solar system you would like to know more about?' ], [ 'role' => 'user', @@ -2170,7 +2171,7 @@ The following code snippets showcase various prompt caching patterns. These exam ] ] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, system: [ [ 'type' => 'text', @@ -2787,15 +2788,10 @@ The following code snippets showcase various prompt caching patterns. These exam false, )), anthropic.NewAssistantMessage(anthropic.NewTextBlock("I found 3 relevant documents about Mars rovers. Let me get more details from the Mars Exploration document.")), - { - Role: anthropic.MessageParamRoleUser, - Content: []anthropic.ContentBlockParamUnion{ - {OfText: &anthropic.TextBlockParam{ - Text: "Yes, please tell me about the Perseverance rover specifically.", - CacheControl: anthropic.NewCacheControlEphemeralParam(), - }}, - }, - }, + anthropic.NewUserMessage(anthropic.ContentBlockParamUnion{OfText: &anthropic.TextBlockParam{ + Text: "Yes, please tell me about the Perseverance rover specifically.", + CacheControl: anthropic.NewCacheControlEphemeralParam(), + }}), }, }) if err != nil { @@ -2809,116 +2805,116 @@ The following code snippets showcase various prompt caching patterns. These exam // ... public class MultipleCacheBreakpointsExample { - public static void main(String[] args) { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + public static void main(String[] args) { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - // Search tool schema - InputSchema searchSchema = InputSchema.builder() - .properties( - JsonValue.from( - Map.of("query", Map.of("type", "string", "description", "Search query")) - ) - ) - .putAdditionalProperty("required", JsonValue.from(List.of("query"))) - .build(); - - // Get document tool schema - InputSchema getDocSchema = InputSchema.builder() - .properties( - JsonValue.from( - Map.of("doc_id", Map.of("type", "string", "description", "Document ID")) - ) - ) - .putAdditionalProperty("required", JsonValue.from(List.of("doc_id"))) - .build(); + // Search tool schema + InputSchema searchSchema = InputSchema.builder() + .properties( + JsonValue.from( + Map.of("query", Map.of("type", "string", "description", "Search query")) + ) + ) + .putAdditionalProperty("required", JsonValue.from(List.of("query"))) + .build(); - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - // Tools with cache control on the last one - .addTool( - Tool.builder() - .name("search_documents") - .description("Search through the knowledge base") - .inputSchema(searchSchema) - .build() - ) - .addTool( - Tool.builder() - .name("get_document") - .description("Retrieve a specific document by ID") - .inputSchema(getDocSchema) - .cacheControl(CacheControlEphemeral.builder().build()) - .build() - ) - // System prompts with cache control on instructions and context separately - .systemOfTextBlockParams( - List.of( - TextBlockParam.builder() - .text( - "You are a helpful research assistant with access to a document knowledge base.\n\n# Instructions\n- Always search for relevant documents before answering\n- Provide citations for your sources\n- Be objective and accurate in your responses\n- If multiple documents contain relevant information, synthesize them\n- Acknowledge when information is not available in the knowledge base" + // Get document tool schema + InputSchema getDocSchema = InputSchema.builder() + .properties( + JsonValue.from( + Map.of("doc_id", Map.of("type", "string", "description", "Document ID")) + ) ) - .cacheControl(CacheControlEphemeral.builder().build()) - .build(), - TextBlockParam.builder() - .text( - "# Knowledge Base Context\n\nHere are the relevant documents for this conversation:\n\n## Document 1: Solar System Overview\nThe solar system consists of the Sun and all objects that orbit it...\n\n## Document 2: Planetary Characteristics\nEach planet has unique features. Mercury is the smallest planet...\n\n## Document 3: Mars Exploration\nMars has been a target of exploration for decades...\n\n[Additional documents...]" + .putAdditionalProperty("required", JsonValue.from(List.of("doc_id"))) + .build(); + + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + // Tools with cache control on the last one + .addTool( + Tool.builder() + .name("search_documents") + .description("Search through the knowledge base") + .inputSchema(searchSchema) + .build() ) - .cacheControl(CacheControlEphemeral.builder().build()) - .build() - ) - ) - // Conversation history - .addUserMessage("Can you search for information about Mars rovers?") - .addAssistantMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofToolUse( - ToolUseBlockParam.builder() - .id("tool_1") - .name("search_documents") - .input(JsonValue.from(Map.of("query", "Mars rovers"))) - .build() - ) - ) - ) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofToolResult( - ToolResultBlockParam.builder() - .toolUseId("tool_1") - .content( - "Found 3 relevant documents: Document 3 (Mars Exploration), Document 7 (Rover Technology), Document 9 (Mission History)" - ) - .build() - ) - ) - ) - .addAssistantMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofText( - TextBlockParam.builder() - .text( - "I found 3 relevant documents about Mars rovers. Let me get more details from the Mars Exploration document." - ) - .build() - ) - ) - ) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofText( - TextBlockParam.builder() - .text("Yes, please tell me about the Perseverance rover specifically.") - .cacheControl(CacheControlEphemeral.builder().build()) - .build() - ) - ) - ) - .build(); + .addTool( + Tool.builder() + .name("get_document") + .description("Retrieve a specific document by ID") + .inputSchema(getDocSchema) + .cacheControl(CacheControlEphemeral.builder().build()) + .build() + ) + // System prompts with cache control on instructions and context separately + .systemOfTextBlockParams( + List.of( + TextBlockParam.builder() + .text( + "You are a helpful research assistant with access to a document knowledge base.\n\n# Instructions\n- Always search for relevant documents before answering\n- Provide citations for your sources\n- Be objective and accurate in your responses\n- If multiple documents contain relevant information, synthesize them\n- Acknowledge when information is not available in the knowledge base" + ) + .cacheControl(CacheControlEphemeral.builder().build()) + .build(), + TextBlockParam.builder() + .text( + "# Knowledge Base Context\n\nHere are the relevant documents for this conversation:\n\n## Document 1: Solar System Overview\nThe solar system consists of the Sun and all objects that orbit it...\n\n## Document 2: Planetary Characteristics\nEach planet has unique features. Mercury is the smallest planet...\n\n## Document 3: Mars Exploration\nMars has been a target of exploration for decades...\n\n[Additional documents...]" + ) + .cacheControl(CacheControlEphemeral.builder().build()) + .build() + ) + ) + // Conversation history + .addUserMessage("Can you search for information about Mars rovers?") + .addAssistantMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofToolUse( + ToolUseBlockParam.builder() + .id("tool_1") + .name("search_documents") + .input(JsonValue.from(Map.of("query", "Mars rovers"))) + .build() + ) + ) + ) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofToolResult( + ToolResultBlockParam.builder() + .toolUseId("tool_1") + .content( + "Found 3 relevant documents: Document 3 (Mars Exploration), Document 7 (Rover Technology), Document 9 (Mission History)" + ) + .build() + ) + ) + ) + .addAssistantMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofText( + TextBlockParam.builder() + .text( + "I found 3 relevant documents about Mars rovers. Let me get more details from the Mars Exploration document." + ) + .build() + ) + ) + ) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofText( + TextBlockParam.builder() + .text("Yes, please tell me about the Perseverance rover specifically.") + .cacheControl(CacheControlEphemeral.builder().build()) + .build() + ) + ) + ) + .build(); - Message message = client.messages().create(params); - System.out.println(message.usage()); - } + Message message = client.messages().create(params); + System.out.println(message.usage()); + } } ``` @@ -2973,7 +2969,7 @@ The following code snippets showcase various prompt caching patterns. These exam ] ] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, system: [ [ 'type' => 'text', @@ -3277,7 +3273,7 @@ For ZDR eligibility across all features, see [API and data retention](https://pl 1. Cache keys are generated using a cryptographic hash of the prompts up to the cache control point. This means only requests with identical prompts can access a specific cache. - 2. On the Claude API, Claude Platform on AWS, and Microsoft Foundry, caches are isolated per workspace within an organization. On Bedrock and Google Cloud, caches are isolated per organization. In every case, caches are never shared across organizations, even for identical prompts. See [Cache storage and sharing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#cache-storage-and-sharing) for details. + 2. On the Claude API, Claude Platform on AWS, and Microsoft Foundry, caches are isolated by workspace within an organization. On Bedrock and Claude Models on Google Cloud (Google managed), caches are isolated by organization. In every case, caches are never shared across organizations, even for identical prompts. See [Cache storage and sharing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#cache-storage-and-sharing) for details. 3. The caching mechanism is designed to maintain the integrity and privacy of each unique conversation or context. diff --git a/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md b/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md index db94bc6196..4adb946c0e 100644 --- a/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md +++ b/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md @@ -213,7 +213,7 @@ Setting a role in the system prompt focuses Claude's behavior and tone for your messages: [ ['role' => 'user', 'content' => 'How do I sort a list of dictionaries by key?'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, system: 'You are a helpful coding assistant specializing in Python.', ); @@ -716,7 +716,9 @@ If you are migrating from [extended thinking](https://platform.claude.com/docs/e client.messages().create(MessageCreateParams.builder() .model(Model.CLAUDE_SONNET_4_5_20250929) .maxTokens(16000L) - .thinking(ThinkingConfigEnabled.builder().budgetTokens(10000L).build()) + .thinking(ThinkingConfigEnabled.builder() + .budgetTokens(10000L) + .build()) .addUserMessage("...") .build()); diff --git a/content/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1.md b/content/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1.md index 49eb920ab5..df5caff318 100644 --- a/content/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1.md +++ b/content/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1.md @@ -53,7 +53,7 @@ If you still want more updates, for example when pair programming or in other hu Before you start, say in a line what you're about to do; brief updates while you work help the user follow along. Close with a short recap that stands on its own — what you found, what you did, and what's next — so a reader who only sees the last message has the full picture. ``` -If your product collapses or hides tool output, tell the model. Otherwise it may run commands to "show" the user output that your UI never displays. Each time you send back tool output that your UI hides, follow it with the note in a [turn-scoped system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages) (`clear_at: "next_user_message"`, beta): +If your product collapses or hides tool output, tell the model. Otherwise it might run commands to "show" the user output that your UI never displays. Each time you send back tool output that your UI hides, follow it with the note in a [turn-scoped system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages) (`clear_at: "next_user_message"`, beta): ```text wrap Only you see that command's output — the user's terminal shows at most a few lines of it. If the user needs to read any of it, put it in your reply. @@ -385,7 +385,7 @@ The following loop shows this placement. Each assistant turn goes back exactly a "fmt" "log" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) const batchNudge = "First privately list what you need next; then request every item " + @@ -465,11 +465,10 @@ The following loop shows this placement. Each assistant turn goes back exactly a // turn-scoped system message. Leave earlier copies in place: the API clears them, // so the model sees only the newest one. messages = append(messages, anthropic.NewBetaUserMessage(toolResults...)) - messages = append(messages, anthropic.BetaMessageParam{ - Role: anthropic.BetaMessageParamRoleSystem, - Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock(batchNudge)}, - ClearAt: anthropic.BetaMessageParamClearAtNextUserMessage, - }) + messages = append(messages, anthropic.BetaMessageParam{OfSystem: &anthropic.BetaSystemMessageParam{ + Content: []anthropic.BetaSystemMessageParamContentUnion{{OfText: &anthropic.BetaTextBlockParam{Text: batchNudge}}}, + ClearAt: anthropic.BetaSystemMessageParamClearAtNextUserMessage, + }}) } for _, block := range response.Content { diff --git a/content/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5.md b/content/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5.md index 9c03c6e431..4375dd06a0 100644 --- a/content/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5.md +++ b/content/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5.md @@ -21,7 +21,7 @@ Existing Claude Haiku 4.5 prompts should perform well without changes. Start wit For the breaking API changes when migrating from Claude Haiku 4.5, see the [migration guide](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide). - Several sections on this page suggest text to add to your system prompt. Add it to new conversations only. A request that sends thinking blocks back after `system` changed can return a 400 error, so a stored conversation resumed with the new system prompt can fail. To change instructions partway through a conversation, [put them in the newest turn](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#changing-context). On the Claude API, Amazon Bedrock, and Google Cloud, you can instead [append a system message to the conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#new-instructions). + Several sections on this page suggest text to add to your system prompt. Add it to new conversations only. A request that sends thinking blocks back after `system` changed can return a 400 error, so a stored conversation resumed with the new system prompt can fail. To change instructions partway through a conversation, [put them in the newest turn](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#changing-context). On the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed), you can instead [append a system message to the conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#new-instructions). ## Use effort to control thinking @@ -38,7 +38,7 @@ Claude Haiku 5.5 is the first Haiku model with effort levels. Thinking works as * Thinking is on by default and counts toward `max_tokens`, which can go up to 128,000. A `max_tokens` value sized for Claude Haiku 4.5 requests that ran without thinking can cut the reply off, so leave room for thinking. * To get less thinking, lower the effort level. In Anthropic's testing, telling the model in the prompt to answer directly didn't stop it from thinking. You can also turn thinking off with `thinking: {"type": "disabled"}`. This works at `low`, `medium`, and `high` only. At `xhigh` and `max`, the request returns a 400 error. * At `xhigh` effort in multi-turn chats, the model sometimes writes its whole answer in its thinking and ends the turn with no visible text. If you see this behavior, check each response for an empty reply. -* Changing the top-level `effort` value between requests invalidates the prompt cache for the conversation's messages. On the Claude API and Google Cloud, you can change the level partway through a conversation with a [per-message effort change](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta), which keeps the cache. A change holds for every later turn until another one replaces it. It needs the `mid-conversation-output-config-2026-07-01` beta header and adaptive thinking, which is the default. With thinking off, a per-message effort change returns a 400 error. +* Changing the top-level `effort` value between requests invalidates the prompt cache for the conversation's messages. On the Claude API and Claude Models on Google Cloud (Google managed), you can change the level partway through a conversation with a [per-message effort change](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta), which keeps the cache. A change holds for every later turn until another one replaces it. It needs the `mid-conversation-output-config-2026-07-01` beta header and adaptive thinking, which is the default. With thinking off, a per-message effort change returns a 400 error. ## Accurate search results diff --git a/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8.md b/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8.md index 41b6dd073e..2a0a7bde3d 100644 --- a/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8.md +++ b/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8.md @@ -14,7 +14,7 @@ Claude Opus 4.8 has particular strengths in long-horizon agentic work, knowledge ## Response length and verbosity -Claude Opus 4.8 calibrates response length to the complexity of the task, rather than defaulting to a fixed verbosity. This usually means shorter answers on simple lookups and much longer ones on open-ended analysis. +Claude Opus 4.8 calibrates response length to its estimate of the task's complexity, rather than defaulting to a fixed verbosity. This usually means shorter answers on simple lookups and much longer ones on open-ended analysis. If your product depends on a certain style or verbosity of output, you might need to tune your prompts. As an example, to decrease verbosity, you might add: @@ -157,6 +157,6 @@ Iterate on prompts against a subset of your evals or test cases to validate reca ## Computer use -Claude Opus 4.8 supports the `computer_toolset_20260801` toolset (on the Claude API and Google Cloud) and the earlier `computer_20251124` tool version. On the Claude API and Google Cloud, Claude Opus 4.8 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) (`browser_toolset_20260801`) for tasks inside webpages. [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) capability works across resolutions, up to a maximum resolution of 2576px / 3.75MP. Internal computer use testing shows that sending images at 1080p provides a good balance of performance and cost. +Claude Opus 4.8 supports the earlier `computer_20251124` tool version and, on the Claude API and Claude Models on Google Cloud (Google managed), the `computer_toolset_20260801` toolset. On those two platforms, Claude Opus 4.8 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) (`browser_toolset_20260801`) for tasks inside webpages. [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) capability works across resolutions, up to a maximum resolution of 2576px / 3.75MP. Internal computer use testing shows that sending images at 1080p provides a good balance of performance and cost. For particularly cost-sensitive workloads, 720p or 1366×768 are lower-cost options with strong performance. Conduct your own testing to find the ideal settings for your use case; experimenting with effort settings can also help tune the model's behavior. diff --git a/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-5.md b/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-5.md index 30b4f1272b..62bd1ff035 100644 --- a/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-5.md +++ b/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-5.md @@ -74,7 +74,7 @@ Claude Opus 5 delegates to subagents more readily than prior models. Delegation Delegate to a subagent only for large tasks that are genuinely independent and parallelizable, such as a wide multi-file investigation. Do not delegate work you can finish yourself in a handful of tool calls, and do not use subagents to verify or double-check your own work. If one subagent can complete the task, use one rather than several, and keep spawn counts low. ``` -If your harness is Claude Code or the Claude Agent SDK, the deterministic caps are the `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` and `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` environment variables and the SDK's `max_budget_usd` (typescript: `maxBudgetUsd`) option. Older versions of Claude Code don't have them, so use the latest version and update a pinned SDK before pointing it at Claude Opus 5. Claude Code adds a delegation instruction of its own on Claude Opus 5 only when you use its `claude_code` system prompt preset; with a custom or omitted system prompt, add a delegation instruction such as the example in this section yourself. See [Cap subagent depth, concurrency, and spend](https://code.claude.com/docs/en/agent-sdk/subagents#cap-subagent-depth-concurrency-and-spend) in the Agent SDK docs. +If your harness is Claude Code or the Claude Agent SDK, the deterministic caps are the `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` and `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` environment variables and the SDK's `max_budget_usd` (typescript: `maxBudgetUsd`) option. Older versions of Claude Code don't have them, so update Claude Code and any pinned SDK before pointing your harness at Claude Opus 5. Claude Code adds a delegation instruction of its own on Claude Opus 5 only when you use its `claude_code` system prompt preset; with a custom or omitted system prompt, add a delegation instruction such as the example in this section yourself. See [Cap subagent depth, concurrency, and spend](https://code.claude.com/docs/en/agent-sdk/subagents#cap-subagent-depth-concurrency-and-spend) in the Agent SDK docs. ## Self-correction diff --git a/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md b/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md index 3d2f5283b0..d0e4d839f7 100644 --- a/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md +++ b/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md @@ -149,6 +149,6 @@ Iterate on prompts against a subset of your evals or test cases to validate reca ## Computer use -Claude Sonnet 5 supports the `computer_toolset_20260801` toolset (on the Claude API and Google Cloud) and the earlier `computer_20251124` tool version. On the Claude API and Google Cloud, Claude Sonnet 5 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) (`browser_toolset_20260801`) for tasks inside webpages. [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) capability works across resolutions, up to a maximum resolution of 2576px / 3.75MP. Internal computer use testing shows that sending images at 1080p provides a good balance of performance and cost. +Claude Sonnet 5 supports the earlier `computer_20251124` tool version and, on the Claude API and Claude Models on Google Cloud (Google managed), the `computer_toolset_20260801` toolset. On those two platforms, Claude Sonnet 5 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) (`browser_toolset_20260801`) for tasks inside webpages. [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) capability works across resolutions, up to a maximum resolution of 2576px / 3.75MP. Internal computer use testing shows that sending images at 1080p provides a good balance of performance and cost. For particularly cost-sensitive workloads, 720p or 1366×768 are lower-cost options with strong performance. Conduct your own testing to find the ideal settings for your use case; experimenting with effort settings can also help tune the model's behavior. diff --git a/content/en/build-with-claude/refusals-and-fallback.md b/content/en/build-with-claude/refusals-and-fallback.md index fc53ee0191..b636b415f0 100644 --- a/content/en/build-with-claude/refusals-and-fallback.md +++ b/content/en/build-with-claude/refusals-and-fallback.md @@ -15,7 +15,7 @@ Related pages: * [SDK middleware](https://platform.claude.com/docs/en/cli-sdks-libraries/middleware): the SDK helper that wraps all of this * [Fallback and billing recipe](https://platform.claude.com/cookbook/fable-5-fallback-billing-guide): a worked end-to-end example -The simplest setup, in beta on the Claude API: set `fallbacks` to `"default"`, and the API retries a declined request on the fallback model Anthropic recommends for its refusal category. For categories with no recommended fallback, the refusal stands. Claude Haiku 5.5 has no server-side fallback, so for it use [client-side fallback with the SDK middleware](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) or [write the retry yourself](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#manual-retry). +The simplest setup, in beta on the Claude API and on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed): set `fallbacks` to `"default"`, and the API retries a declined request on the fallback model Anthropic recommends for its refusal category. For categories with no recommended fallback, the refusal stands. Claude Haiku 5.5 has no server-side fallback, so for it use [client-side fallback with the SDK middleware](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) or [write the retry yourself](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#manual-retry). ```bash cURL @@ -121,7 +121,7 @@ The simplest setup, in beta on the Claude API: set `fallbacks` to `"default"`, a $client = new Client(); $response = $client->beta->messages->create( - model: 'claude-fable-5', + model: Model::CLAUDE_FABLE_5, maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], fallbacks: 'default', @@ -184,7 +184,7 @@ The `stop_details` object explains the decline: | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------ | | `"cyber"` | The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. | No | | `"bio"` | The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. | Yes | -| `"frontier_llm"` | The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. | Yes | +| `"frontier_llm"` | The request could help with the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. | Yes | | `"reasoning_extraction"` | The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking). See [Keep reasoning in thinking blocks](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#keep-reasoning-in-thinking-blocks). | Yes | | `"general_harms"` | The request falls under a usage-policy area outside the four named categories. Benign work can also trigger this category. | No | @@ -205,7 +205,7 @@ You can still ask Claude to explain its answer. Ask for a short explanation, the ## How refusals are billed -These billing rules apply on every platform: the Claude API, Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry. +These billing rules apply on every platform. **Refusals before any output:** To disrupt attempts to circumvent Anthropic's safeguards at scale, a refusal that arrives before any output is billed when its `stop_details.category` is `"bio"`, `"frontier_llm"`, or `"reasoning_extraction"`. These are the categories where Anthropic measures low volumes of false positives, as of September 2026. These refusals are billed like any other request, at the rates of the model that ran it. A refusal before any output in any other category, or with a `null` category, is not billed. Either way, `content` is empty and token counts appear in `usage`. The request still counts against your rate limits. @@ -219,11 +219,11 @@ The billed categories may change as Anthropic keeps measuring and refining its s There are three ways to retry a refused request on another model. The right one depends on where you are running and how much control you need. -| Your situation | Use | Why | -| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -| Claude API, simplest setup | [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) | One request, one response. The API handles the retry. | -| Any platform, using an Anthropic SDK | [The SDK middleware](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) | Configure once on the client. Retries happen automatically. | -| Raw HTTP or custom retry logic | [A manual retry](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#manual-retry) with [fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) | Full control. Fallback credit keeps the cost down. | +| Your situation | Use | Why | +| ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | +| Claude API or Claude Models on Google Cloud (Anthropic managed), simplest setup | [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) | One request, one response. The API handles the retry. | +| Any platform, using an Anthropic SDK | [Client-side fallback with the SDK middleware](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) | Configure once on the client. Retries occur automatically. | +| Raw HTTP or custom retry logic | [A manual retry](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#manual-retry) with [fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) | Full control. Fallback credit keeps the cost down. | Server-side fallback and the SDK middleware apply fallback credit for you. You only need the [Fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) page when you build the retry yourself. Claude Haiku 5.5 has neither server-side fallback nor fallback credit, so use the SDK middleware or a manual retry. @@ -232,7 +232,7 @@ Server-side fallback and the SDK middleware apply fallback credit for you. You o Server-side fallback retries a refused request inside a single API call. In the default mode, when the primary model declines and the refusal category has a recommended fallback, the API runs the same request on the model Anthropic recommends for that category. You can instead [name up to three fallback models of your own](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#naming-your-own-fallback-models). Either way, you get back one response that names the model that answered, so your user gets an answer in one round trip. - Server-side fallback is in beta on the Claude API. The `fallbacks` parameter is not supported on the [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing) (a batch item that includes it comes back as an errored result) and is not available on Amazon Bedrock, Google Cloud, or Microsoft Foundry. On those platforms, use [client-side fallback with the SDK middleware](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) instead. Claude Haiku 5.5 has no server-side fallback: with `fallbacks: "default"`, a declined request stays declined, and a list of fallback models returns a 400 error. + Server-side fallback is in beta on the Claude API and on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). On platforms without server-side fallback, use [client-side fallback with the SDK middleware](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) instead. The `fallbacks` parameter is not supported on the [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing) (a batch item that includes it comes back as an errored result). Claude Haiku 5.5 has no server-side fallback: with `fallbacks: "default"`, a declined request stays declined, and a list of fallback models returns a 400 error. ### Making the request @@ -418,9 +418,9 @@ Default routing never draws the up-front [oversized-image rejection](https://pla IO.println(""" {"stop_reason":"%s","model":"%s","served_by_fallback":%b}\ """.formatted( - response.stopReason().map(BetaStopReason::asString).orElse("null"), - response.model().asString(), - servedByFallback)); + response.stopReason().map(BetaStopReason::asString).orElse("null"), + response.model().asString(), + servedByFallback)); ``` ```php PHP @@ -429,7 +429,7 @@ Default routing never draws the up-front [oversized-image rejection](https://pla $response = $client->beta->messages->create( maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], - model: 'claude-fable-5', + model: Model::CLAUDE_FABLE_5, fallbacks: 'default', betas: ['server-side-fallback-2026-07-01'], ); @@ -596,7 +596,7 @@ The highlighted lines are the only difference from the default-routing request. $client = new Client(); $response = $client->beta->messages->create( - model: 'claude-fable-5', + model: Model::CLAUDE_FABLE_5, maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], fallbacks: [['model' => 'claude-opus-4-8']], @@ -726,7 +726,7 @@ On a streaming request, the retry occurs on the same stream, and nothing you hav ### Non-streaming responses -On a non-streaming request, a mid-output decline behaves differently: the response omits the declined model's partial output, and the fallback model answers from the beginning. The result looks like a decline before any output, with the `fallback` block first. The declined attempt and its output tokens still appear in `usage.iterations`. +On a non-streaming request, a mid-output decline behaves differently: the response omits the declined model's partial output, and the fallback model starts a new answer. The result looks like a decline before any output, with the `fallback` block first. The declined attempt and its output tokens still appear in `usage.iterations`. **Declines during tool use:** completed tool work does not block fallback. When a decline fires after server tools (for example, web search or code execution) have finished executing within a request, the fallback attempt proceeds: the completed tool results carry over, and the fallback model can keep invoking server tools. The one case that does not retry is a streaming decline that fires while a tool-use block of any type (a client tool, a server tool, or an MCP tool call) is still open on the stream: that refusal is returned directly, and if the `fallback-credit-2026-07-01` header is set it still carries a credit token redeemable by continuing the partial response. Non-streaming requests are unaffected; the API clears the partial work and retries before responding. @@ -756,7 +756,7 @@ The SDK includes a refusal-fallback middleware. You configure it once on the cli ### Setting it up -Pass `BetaRefusalFallbackMiddleware` (typescript: `betaRefusalFallbackMiddleware`; go: `betafallback.BetaRefusalFallbackMiddleware`; csharp: `BetaRefusalFallbackHandler`; java: `BetaRefusalFallbackInterceptor`; php: `RefusalFallbackMiddleware`) to the client constructor, and share one `BetaFallbackState` (go: `betafallback.BetaFallbackState`) instance across the requests of a conversation. +Pass `BetaRefusalFallbackMiddleware` (typescript: `betaRefusalFallbackMiddleware()`; go: `betafallback.BetaRefusalFallbackMiddleware()`; csharp: `BetaRefusalFallbackHandler`; java: `BetaRefusalFallbackInterceptor`; php: `RefusalFallbackMiddleware`) to the client constructor, and share one `BetaFallbackState` (go: `betafallback.BetaFallbackState`) instance across the requests of a conversation. @@ -901,7 +901,7 @@ Pass `BetaRefusalFallbackMiddleware` (typescript: `betaRefusalFallbackMiddleware ```go Go import ( // ... - "github.com/anthropics/anthropic-sdk-go/lib/betafallback" + "github.com/anthropics/anthropic-sdk-go/v2/lib/betafallback" // ... ) @@ -916,7 +916,7 @@ Pass `BetaRefusalFallbackMiddleware` (typescript: `betaRefusalFallbackMiddleware )), ) - // One state per conversation: requests sharing it stay pinned to the + // One state for each conversation: requests sharing it stay pinned to the // model that accepted, so a follow-up never re-asks a model that refused. state := &betafallback.BetaFallbackState{} conversation := betafallback.WithBetaFallbackState(state) @@ -997,7 +997,9 @@ Pass `BetaRefusalFallbackMiddleware` (typescript: `betaRefusalFallbackMiddleware BetaMessageAccumulator accumulator = BetaMessageAccumulator.create(); try (StreamResponse streamResponse = client.beta() .messages() - .createStreaming(params, RequestOptions.builder().fallbackState(state).build())) { + .createStreaming(params, RequestOptions.builder() + .fallbackState(state) + .build())) { streamResponse.stream() .peek(accumulator::accumulate) .forEach(event -> event.contentBlockDelta() @@ -1009,7 +1011,9 @@ Pass `BetaRefusalFallbackMiddleware` (typescript: `betaRefusalFallbackMiddleware // Non-streaming: reusing the same state keeps the conversation pinned. BetaMessage message = client.beta() .messages() - .create(params, RequestOptions.builder().fallbackState(state).build()); + .create(params, RequestOptions.builder() + .fallbackState(state) + .build()); IO.println("served by: " + message.model().asString()); } ``` @@ -1021,6 +1025,7 @@ Pass `BetaRefusalFallbackMiddleware` (typescript: `betaRefusalFallbackMiddleware use Anthropic\Lib\Middleware\BetaFallbackState; use Anthropic\Lib\Middleware\RefusalFallbackMiddleware; use Anthropic\Lib\Streaming\MessageAccumulator; + use Anthropic\Messages\Model; // Configure the fallback chain once. On a refusal, the middleware retries the // request down the chain and sends the fallback-credit beta header for you. @@ -1037,7 +1042,7 @@ Pass `BetaRefusalFallbackMiddleware` (typescript: `betaRefusalFallbackMiddleware // Streaming: on a refusal the middleware splices the fallback model's events // onto the still-open stream. The accumulator's model is the serving model. $stream = $client->beta->messages->createStream( - model: 'claude-fable-5', + model: Model::CLAUDE_FABLE_5, maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], requestOptions: ['fallbackState' => $state], @@ -1055,7 +1060,7 @@ Pass `BetaRefusalFallbackMiddleware` (typescript: `betaRefusalFallbackMiddleware // Non-streaming: same middleware. Reusing the state keeps the conversation // pinned to the model that accepted. $message = $client->beta->messages->create( - model: 'claude-fable-5', + model: Model::CLAUDE_FABLE_5, maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], requestOptions: ['fallbackState' => $state], @@ -1100,7 +1105,7 @@ Pass `BetaRefusalFallbackMiddleware` (typescript: `betaRefusalFallbackMiddleware * Retries walk your fallback list in order. A fallback model that itself refuses passes the request to the next entry. * When every model in the list has declined, the middleware returns the final refusal (the last model's refusal response) rather than raising an error. -* Thinking blocks from Claude Fable 5.1, Claude Opus 5.5, Claude Sonnet 5.5, Claude Haiku 5.5, or Claude Fable 5 pass through unchanged. Each retry re-sends your original request body, and the only blocks the middleware removes from conversation history on later requests are the `fallback` boundary blocks it added itself. The fallback model can't read Claude Fable 5.1 blocks, which only [Claude Fable 5.1 and Claude Mythos 5.1 read](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-for-model), so the API drops them. The API also drops Claude Opus 5.5 blocks for every fallback model except Claude Fable 5.1 and Claude Mythos 5.1 (see [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models)). It drops Claude Sonnet 5.5 blocks too, for every fallback model except Claude Opus 5.5 on the Claude API and Google Cloud. Claude Opus 5.5 and Claude Sonnet 5.5 read Claude Haiku 5.5 blocks on the Claude API and Google Cloud, and the API drops them for a fallback model that can't read them. +* Thinking blocks from Claude Fable 5.1, Claude Opus 5.5, Claude Sonnet 5.5, Claude Haiku 5.5, or Claude Fable 5 pass through unchanged. Each retry re-sends your original request body, and the only blocks the middleware removes from conversation history on later requests are the `fallback` boundary blocks it added itself. The fallback model can't read Claude Fable 5.1 blocks, which only [Claude Fable 5.1 and Claude Mythos 5.1 read](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-for-model), so the API drops them. The API also drops Claude Opus 5.5 blocks for every fallback model except Claude Fable 5.1 and Claude Mythos 5.1 (see [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models)). It drops Claude Sonnet 5.5 blocks too, for every fallback model except Claude Opus 5.5 on the Claude API and Claude Models on Google Cloud (Google managed). Claude Opus 5.5 and Claude Sonnet 5.5 read Claude Haiku 5.5 blocks on the Claude API and Claude Models on Google Cloud (Google managed), and the API drops them for a fallback model that can't read them. * Responses served through the middleware include a `fallback` content block at each model boundary, the same as server-side fallback responses. The middleware manages those blocks for you on later requests. * The model that accepted is recorded in `BetaFallbackState` (go: `betafallback.BetaFallbackState`), so follow-up requests that share the state stay pinned to it rather than re-asking a model that refused. @@ -1120,7 +1125,7 @@ Over raw HTTP or with custom retry logic, implement the pattern the middleware w Send the same request with `model` set to a fallback model, such as Claude Opus 4.8. If the refused request sent `thinking: {"type": "between_tools"}`, change `thinking` first: only Claude Sonnet 5.5 accepts that value, so omit `thinking` or set a value the fallback model accepts. [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) under the `2026-07-01` header makes this change for you when it falls back to Claude Sonnet 5. Another model can normally serve a request that Claude Fable 5.1 or Claude Fable 5 declines. How you handle the conversation history depends on whether you redeem a [fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit): - * **Not redeeming a credit:** you can leave the earlier `thinking` and `redacted_thinking` blocks in place or strip them to save input tokens. The fallback model normally can't use them either way: only Claude Fable 5.1 and Claude Mythos 5.1 [read Claude Fable 5.1 blocks](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-for-model), and only those two models, Claude Fable 5, and Claude Mythos 5 read Claude Fable 5 blocks, so for any other fallback model the API drops them. The API also drops Claude Opus 5.5 blocks for every fallback model except Claude Fable 5.1 and Claude Mythos 5.1 (see [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models)). It drops Claude Sonnet 5.5 blocks too, for every fallback model except Claude Opus 5.5 on the Claude API and Google Cloud. A retry after a Claude Haiku 5.5 refusal is always in this case. Claude Opus 5.5 and Claude Sonnet 5.5 read Claude Haiku 5.5 blocks on the Claude API and Google Cloud, so leave those blocks in place when you fall back to either model there. For a fallback model that can't read them, the API drops them without billing them. + * **Not redeeming a credit:** you can leave the earlier `thinking` and `redacted_thinking` blocks in place or strip them to save input tokens. The fallback model normally can't use them either way: only Claude Fable 5.1 and Claude Mythos 5.1 [read Claude Fable 5.1 blocks](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-for-model), and only those two models, Claude Fable 5, and Claude Mythos 5 read Claude Fable 5 blocks, so for any other fallback model the API drops them. The API also drops Claude Opus 5.5 blocks for every fallback model except Claude Fable 5.1 and Claude Mythos 5.1 (see [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models)). It drops Claude Sonnet 5.5 blocks too, for every fallback model except Claude Opus 5.5 on the Claude API and Claude Models on Google Cloud (Google managed). A retry after a Claude Haiku 5.5 refusal is always in this case. Claude Opus 5.5 and Claude Sonnet 5.5 read Claude Haiku 5.5 blocks on the Claude API and Claude Models on Google Cloud (Google managed), so leave those blocks in place when you fall back to either model there. For a fallback model that can't read them, the API drops them without billing them. * **Redeeming a credit:** send the body unchanged, because redemption requires an exact match. The server handles the earlier model's thinking blocks on a redemption, so do not strip them (see [Fields that must match the refused request](https://platform.claude.com/docs/en/build-with-claude/fallback-credit#reference)). diff --git a/content/en/build-with-claude/search-results.md b/content/en/build-with-claude/search-results.md index bf2f510997..c8e007de0a 100644 --- a/content/en/build-with-claude/search-results.md +++ b/content/en/build-with-claude/search-results.md @@ -518,10 +518,9 @@ Returning search results from your custom tools lets you build dynamic RAG appli input.get("query").asStringOrThrow() ); - // Append Claude's entire turn to the running conversation, then the tool result. + // Append Claude's turn, then the tool result, to the running conversation. // Rebuilding only the tool_use block would drop any other content blocks Claude - // returned (e.g. leading text when the tool call is not forced) — append the - // full turn, as the other language tabs do. + // returned, for example leading text when the tool call is not forced. messages.add(response.toParam()); messages.add(MessageParam.ofUserOfContentBlockParams(List.of( ContentBlockParam.ofToolResult( @@ -555,7 +554,9 @@ Returning search results from your custom tools lets you build dynamic RAG appli .text("To configure the product, navigate to Settings > Configuration. The default timeout is 30 seconds, but can be adjusted between 10-120 seconds based on your needs.") .build() )) - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build() ), ToolResultBlockParam.Content.Block.ofSearchResult( @@ -567,7 +568,9 @@ Returning search results from your custom tools lets you build dynamic RAG appli .text("If you encounter timeout errors, first check the configuration settings. Common causes include network latency and incorrect timeout values.") .build() )) - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build() ) ); @@ -592,7 +595,8 @@ Returning search results from your custom tools lets you build dynamic RAG appli ] ]; - function searchKnowledgeBase($query) { + function searchKnowledgeBase($query) + { return [ [ 'type' => 'search_result', @@ -1046,7 +1050,9 @@ You can also provide search results directly in user messages. This is useful fo .text("All API requests must include an API key in the Authorization header. Keys can be generated from the dashboard. Rate limits: 1000 requests per hour for standard tier, 10000 for premium.") .build() )) - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build() ), ContentBlockParam.ofSearchResult( @@ -1058,7 +1064,9 @@ You can also provide search results directly in user messages. This is useful fo .text("To get started: 1) Sign up for an account, 2) Generate an API key from the dashboard, 3) Install our SDK using pip install company-sdk, 4) Initialize the client with your API key.") .build() )) - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build() ), ContentBlockParam.ofText( @@ -1114,7 +1122,7 @@ You can also provide search results directly in user messages. This is useful fo ] ] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); echo json_encode($message, JSON_PRETTY_PRINT); @@ -1443,7 +1451,7 @@ The following example replays a complete conversation. The first user message ca } # Replay a conversation that provides search results both ways: the first - # user message carries a pre-fetched result, the tool result returns another + # user message carries a pre-fetched result, and the tool result returns another response = client.messages.create( model="claude-opus-5-5", max_tokens=1024, @@ -1529,7 +1537,7 @@ The following example replays a complete conversation. The first user message ca }; // Replay a conversation that provides search results both ways: the first - // user message carries a pre-fetched result, the tool result returns another + // user message carries a pre-fetched result, and the tool result returns another const response = await client.messages.create({ model: "claude-opus-5-5", max_tokens: 1024, @@ -1601,7 +1609,7 @@ The following example replays a complete conversation. The first user message ca AnthropicClient client = new(); // Replay a conversation that provides search results both ways: the first - // user message carries a pre-fetched result, the tool result returns another + // user message carries a pre-fetched result, and the tool result returns another var response = await client.Messages.Create(new() { Model = Model.ClaudeOpus5_5, @@ -1697,7 +1705,7 @@ The following example replays a complete conversation. The first user message ca } // Replay a conversation that provides search results both ways: the first - // user message carries a pre-fetched result, the tool result returns another + // user message carries a pre-fetched result, and the tool result returns another response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5_5, MaxTokens: 1024, @@ -1772,7 +1780,7 @@ The following example replays a complete conversation. The first user message ca .build(); // Replay a conversation that provides search results both ways: the first - // user message carries a pre-fetched result, the tool result returns another + // user message carries a pre-fetched result, and the tool result returns another MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5_5) .maxTokens(1024L) @@ -1784,7 +1792,9 @@ The following example replays a complete conversation. The first user message ca .content(List.of(TextBlockParam.builder() .text("Acme Dashboard is a monitoring tool for distributed systems. It supports real-time alerting and custom metric dashboards.") .build())) - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build()), ContentBlockParam.ofText(TextBlockParam.builder() .text("What does Acme Dashboard do, and what plans is it available on?") @@ -1810,7 +1820,9 @@ The following example replays a complete conversation. The first user message ca .content(List.of(TextBlockParam.builder() .text("Acme Dashboard is available on the Starter plan at $10 per user per month and the Enterprise plan with custom pricing.") .build())) - .citations(CitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder() + .enabled(true) + .build()) .build()) )) .build()) @@ -1838,7 +1850,7 @@ The following example replays a complete conversation. The first user message ca ]; // Replay a conversation that provides search results both ways: the first - // user message carries a pre-fetched result, the tool result returns another + // user message carries a pre-fetched result, and the tool result returns another $response = $client->messages->create( maxTokens: 1024, tools: [$knowledgeBaseTool], @@ -1900,7 +1912,7 @@ The following example replays a complete conversation. The first user message ca ] ] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); echo json_encode($response, JSON_PRETTY_PRINT); @@ -1922,7 +1934,7 @@ The following example replays a complete conversation. The first user message ca } # Replay a conversation that provides search results both ways: the first - # user message carries a pre-fetched result, the tool result returns another + # user message carries a pre-fetched result, and the tool result returns another response = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5_5, max_tokens: 1024, @@ -2116,7 +2128,7 @@ When `citations.enabled` is set to `true`, Claude attaches citation references t ## Limitations -* Search result content blocks are available on Claude API, Amazon Bedrock, and Google Cloud. +* Search result content blocks are available on the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed). * Only text content is supported within search results (no images or other media). * `search_result` blocks can only appear in user messages (including inside tool results). Assistant messages with search results are rejected. * When the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) is enabled in the same request, citations must be enabled on all `search_result` blocks. diff --git a/content/en/build-with-claude/skills-guide.md b/content/en/build-with-claude/skills-guide.md index 09257e81d7..db33289367 100644 --- a/content/en/build-with-claude/skills-guide.md +++ b/content/en/build-with-claude/skills-guide.md @@ -257,7 +257,7 @@ The structure is identical for both Anthropic and custom Skills. Specify the req messages: [ ['role' => 'user', 'content' => 'Create a presentation about renewable energy'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, container: [ 'skills' => [ [ @@ -616,7 +616,8 @@ To provide input files for Skills to work on, [upload them with the Files API](h ); // Step 2: Extract file IDs from the response - function extractFileIds($response) { + function extractFileIds($response) + { $fileIds = []; foreach ($response->content as $item) { if ($item->type === 'bash_code_execution_tool_result') { @@ -1073,10 +1074,7 @@ The response's `container` object carries the container's `id` and `expires_at` }, Messages: []anthropic.MessageParam{ anthropic.NewUserMessage(anthropic.NewTextBlock("Create a sample sales dataset and analyze it")), - { - Role: anthropic.MessageParamRoleAssistant, - Content: []anthropic.ContentBlockParamUnion{anthropic.NewTextBlock(assistantText)}, - }, + anthropic.NewAssistantMessage(anthropic.NewTextBlock(assistantText)), anthropic.NewUserMessage(anthropic.NewTextBlock("What was the total revenue?")), }, Tools: []anthropic.ToolUnionParam{ @@ -2073,7 +2071,7 @@ Files are identified by the file name you attach (the `;filename=` suffix in the var skill = await client.Skills.Create(parameters); - // Option 2: Using individual files (path-qualified filenames preserve the Skill's directory layout) + // Option 2: Using individual files (path-qualified file names preserve the Skill's directory layout) var parameters2 = new SkillCreateParams { Files = @@ -2163,7 +2161,7 @@ Files are identified by the file name you attach (the `;filename=` suffix in the Skill skill = client.skills().create(params); - // Option 2: Using individual files (path-qualified filenames preserve the Skill's directory layout) + // Option 2: Using individual files (path-qualified file names preserve the Skill's directory layout) SkillCreateParams params2 = SkillCreateParams.builder() .addFile(MultipartField.builder() .value(Files.newInputStream(Path.of("financial_skill/SKILL.md"))) @@ -2509,7 +2507,7 @@ Get details about a specific Skill: ### Deleting a Skill -Deleting a Skill also removes all of its versions. +Deleting a Skill also deletes all of its versions. ```bash cURL @@ -3542,7 +3540,7 @@ Then use it with the Excel Skill to create a financial model. Pass the ID of the ### Request limits -* **Maximum Skills per request:** 20 +* **Maximum Skills for each request:** 20 * **Maximum Skill upload size:** 30 MB (all files combined, uncompressed) @@ -3888,7 +3886,7 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud "tools": [{"type": "code_execution_20250825", "name": "code_execution"}] }' - # Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit + # Changing the Skills list ([xlsx] versus [xlsx, pptx]) changes the prefix: a cache miss, whereas an identical list is a cache hit curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ @@ -3925,7 +3923,7 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud name: code_execution YAML - # Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit + # Changing the Skills list ([xlsx] versus [xlsx, pptx]) changes the prefix: a cache miss, whereas an identical list is a cache hit ant messages create <<'YAML' model: claude-opus-5-5 max_tokens: 4096 @@ -3960,7 +3958,7 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud tools=[{"type": "code_execution_20250825", "name": "code_execution"}], ) - # Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit + # Changing the Skills list ([xlsx] versus [xlsx, pptx]) changes the prefix: a cache miss, whereas an identical list is a cache hit response2 = client.messages.create( model="claude-opus-5-5", max_tokens=4096, @@ -3993,7 +3991,7 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud tools: [{ type: "code_execution_20250825", name: "code_execution" }] }); - // Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit + // Changing the Skills list ([xlsx] versus [xlsx, pptx]) changes the prefix: a cache miss, whereas an identical list is a cache hit const response2 = await client.messages.create({ model: "claude-opus-5-5", max_tokens: 4096, @@ -4035,7 +4033,7 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud var response1 = await client.Messages.Create(parameters1); Console.WriteLine(response1); - // Different Skill set ([xlsx] vs [xlsx, pptx]) = a different prefix: a cache miss (an identical set is a cache hit) + // Changing the Skills list ([xlsx] versus [xlsx, pptx]) changes the prefix: a cache miss, whereas an identical list is a cache hit var parameters2 = new MessageCreateParams { Model = Model.ClaudeOpus5_5, @@ -4096,7 +4094,7 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud } fmt.Println(response1) - // Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit + // Changing the Skills list ([xlsx] versus [xlsx, pptx]) changes the prefix: a cache miss, whereas an identical list is a cache hit response2, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5_5, MaxTokens: 4096, @@ -4157,7 +4155,7 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud Message response1 = client.messages().create(params1); System.out.println(response1); - // Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit + // Changing the Skills list ([xlsx] versus [xlsx, pptx]) changes the prefix: a cache miss, whereas an identical list is a cache hit MessageCreateParams params2 = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5_5) .maxTokens(4096L) @@ -4193,7 +4191,7 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud messages: [ ['role' => 'user', 'content' => 'Analyze sales data'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, container: [ 'skills' => [ ['type' => 'anthropic', 'skillID' => 'xlsx', 'version' => 'latest'] @@ -4205,13 +4203,13 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud ); echo $response1; - // Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit + // Changing the Skills list ([xlsx] versus [xlsx, pptx]) changes the prefix: a cache miss, whereas an identical list is a cache hit $response2 = $client->messages->create( maxTokens: 4096, messages: [ ['role' => 'user', 'content' => 'Create a presentation'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, container: [ 'skills' => [ ['type' => 'anthropic', 'skillID' => 'xlsx', 'version' => 'latest'], @@ -4240,7 +4238,7 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud ) puts response1 - # Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit + # Changing the Skills list ([xlsx] versus [xlsx, pptx]) changes the prefix: a cache miss, whereas an identical list is a cache hit response2 = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5_5, max_tokens: 4096, @@ -4463,7 +4461,7 @@ Handle Skill-related errors gracefully: echo $message; } catch (BadRequestException $e) { if (str_contains($e->getMessage(), 'skill')) { - echo "Skill error: " . $e->getMessage(); + echo 'Skill error: ' . $e->getMessage(); } else { throw $e; } diff --git a/content/en/build-with-claude/streaming.md b/content/en/build-with-claude/streaming.md index 924874a1e8..47911088f9 100644 --- a/content/en/build-with-claude/streaming.md +++ b/content/en/build-with-claude/streaming.md @@ -98,8 +98,8 @@ The [Python SDK](https://github.com/anthropics/anthropic-sdk-python) and [TypeSc try (var streamResponse = client.messages().createStreaming(params)) { streamResponse.stream().forEach(event -> { event.contentBlockDelta().ifPresent(deltaEvent -> - deltaEvent.delta().text().ifPresent(td -> - System.out.print(td.text()) + deltaEvent.delta().text().ifPresent(textDelta -> + System.out.print(textDelta.text()) ) ); }); @@ -114,7 +114,7 @@ The [Python SDK](https://github.com/anthropics/anthropic-sdk-python) and [TypeSc messages: [ ['role' => 'user', 'content' => 'Hello'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); foreach ($stream as $message) { @@ -493,8 +493,8 @@ There might be `ping` events dispersed throughout the response as well. See [Eve try (var streamResponse = client.messages().createStreaming(params)) { streamResponse.stream().forEach(event -> { event.contentBlockDelta().ifPresent(deltaEvent -> - deltaEvent.delta().text().ifPresent(td -> - System.out.print(td.text()) + deltaEvent.delta().text().ifPresent(textDelta -> + System.out.print(textDelta.text()) ) ); }); @@ -509,7 +509,7 @@ There might be `ping` events dispersed throughout the response as well. See [Eve messages: [ ['role' => 'user', 'content' => 'Hello'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); foreach ($stream as $message) { @@ -797,8 +797,8 @@ This request asks Claude to use a tool to report the weather. try (var streamResponse = client.messages().createStreaming(params)) { streamResponse.stream().forEach(event -> { event.contentBlockDelta().ifPresent(deltaEvent -> - deltaEvent.delta().text().ifPresent(td -> - System.out.print(td.text()) + deltaEvent.delta().text().ifPresent(textDelta -> + System.out.print(textDelta.text()) ) ); }); @@ -813,7 +813,7 @@ This request asks Claude to use a tool to report the weather. messages: [ ['role' => 'user', 'content' => 'What is the weather like in San Francisco?'] ], - model: 'claude-opus-5', + model: Model::CLAUDE_OPUS_5, toolChoice: ['type' => 'any'], tools: [ [ @@ -1111,11 +1111,11 @@ This request enables thinking with streaming. The `display: "summarized"` settin try (var streamResponse = client.messages().createStreaming(params)) { streamResponse.stream().forEach(event -> { event.contentBlockDelta().ifPresent(deltaEvent -> { - deltaEvent.delta().thinking().ifPresent(td -> - IO.print(td.thinking()) + deltaEvent.delta().thinking().ifPresent(thinkingDelta -> + IO.print(thinkingDelta.thinking()) ); - deltaEvent.delta().text().ifPresent(td -> - IO.print(td.text()) + deltaEvent.delta().text().ifPresent(textDelta -> + IO.print(textDelta.text()) ); }); }); @@ -1130,7 +1130,7 @@ This request enables thinking with streaming. The `display: "summarized"` settin messages: [ ['role' => 'user', 'content' => 'What is the greatest common divisor of 1071 and 462?'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, thinking: ['type' => 'adaptive', 'display' => 'summarized'], ); @@ -1344,8 +1344,8 @@ This request asks Claude to search the web for current weather information. try (var streamResponse = client.messages().createStreaming(params)) { streamResponse.stream().forEach(event -> { event.contentBlockDelta().ifPresent(deltaEvent -> - deltaEvent.delta().text().ifPresent(td -> - System.out.print(td.text()) + deltaEvent.delta().text().ifPresent(textDelta -> + System.out.print(textDelta.text()) ) ); }); diff --git a/content/en/build-with-claude/structured-outputs.md b/content/en/build-with-claude/structured-outputs.md index c898219ddb..f128aabad0 100644 --- a/content/en/build-with-claude/structured-outputs.md +++ b/content/en/build-with-claude/structured-outputs.md @@ -29,7 +29,7 @@ featureMetadata: Claude API: ga Claude Platform on AWS: ga Amazon Bedrock: ga - Google Cloud: ga + Claude Models on Google Cloud (Google managed): ga Microsoft Foundry: ga --- @@ -260,11 +260,14 @@ Structured outputs guarantee schema-compliant responses through constrained deco { Model = Model.ClaudeOpus5_5, MaxTokens = 1024, - Messages = [new UserMessageParam { - Content = "Extract the key information from this email: " - + "John Smith (john@example.com) is interested in our Enterprise plan " - + "and wants to schedule a demo for next Tuesday at 2pm." - }], + Messages = [ + new UserMessageParam + { + Content = "Extract the key information from this email: " + + "John Smith (john@example.com) is interested in our Enterprise plan " + + "and wants to schedule a demo for next Tuesday at 2pm." + } + ], }); if (response.Content.Select(block => block.Parsed()).OfType().FirstOrDefault() is { } contact) @@ -392,7 +395,7 @@ Structured outputs guarantee schema-compliant responses through constrained deco * **Local validation** occurs without sending requests to the remote AI model. * **Remote validation** is also performed by the AI model upon receiving the JSON schema. - * **Version compatibility:** Local validation might fail while remote validation succeeds if the SDK version is outdated. + * **Version compatibility:** If the SDK version is outdated, local validation might reject a schema that remote validation accepts. * **Disabling local validation:** Pass `JsonSchemaLocalValidation.NO` if you encounter compatibility issues: ```java @@ -460,7 +463,7 @@ Structured outputs guarantee schema-compliant responses through constrained deco The JSON output has this nested structure: - ```json + ```text Output wrap { "composedA": { "a": "hello" }, "composedB": { "b": "world" } @@ -481,7 +484,7 @@ Structured outputs guarantee schema-compliant responses through constrained deco The JSON output has this flat structure: - ```json + ```text Output wrap { "a": "hello", "b": "world" @@ -499,30 +502,30 @@ Structured outputs guarantee schema-compliant responses through constrained deco static class Person { - @JsonPropertyDescription("The first name and surname of the person") - public String name; + @JsonPropertyDescription("The first name and surname of the person") + public String name; - public int birthYear; + public int birthYear; - @JsonPropertyDescription("The year the person died, or 'present' if the person is living.") - public String deathYear; + @JsonPropertyDescription("The year the person died, or 'present' if the person is living.") + public String deathYear; } @JsonClassDescription("The details of one published book") static class Book { - public String title; - public Person author; + public String title; + public Person author; - @JsonPropertyDescription("The year in which the book was first published.") - public int publicationYear; + @JsonPropertyDescription("The year in which the book was first published.") + public int publicationYear; - @JsonIgnore - public String genre; + @JsonIgnore + public String genre; } static class BookList { - public List books; + public List books; } ``` @@ -543,15 +546,15 @@ Structured outputs guarantee schema-compliant responses through constrained deco static class Article { - @ArraySchema(minItems = 1) - public List authors; + @ArraySchema(minItems = 1) + public List authors; - public String title; + public String title; - @Schema(format = "date") - public String publicationDate; + @Schema(format = "date") + public String publicationDate; - public int pageCount; + public int pageCount; } ``` @@ -940,11 +943,14 @@ To use a JSON schema from a file, an OpenAPI spec, or code that builds it at run { Model = Model.ClaudeOpus5_5, MaxTokens = 1024, - Messages = [new UserMessageParam { - Content = "Extract the key information from this email: " - + "John Smith (john@example.com) is interested in our Enterprise plan " - + "and wants to schedule a demo for next Tuesday at 2pm." - }], + Messages = [ + new UserMessageParam + { + Content = "Extract the key information from this email: " + + "John Smith (john@example.com) is interested in our Enterprise plan " + + "and wants to schedule a demo for next Tuesday at 2pm." + } + ], OutputConfig = new OutputConfig { Format = new JsonOutputFormat @@ -967,7 +973,7 @@ To use a JSON schema from a file, an OpenAPI spec, or code that builds it at run }, }); - if (response.Content.Select(b => b.Value).OfType().FirstOrDefault() is { } textBlock) + if (response.Content.Select(block => block.Value).OfType().FirstOrDefault() is { } textBlock) { // JSON is guaranteed to match the schema var contact = JsonSerializer.Deserialize(textBlock.Text); @@ -975,7 +981,7 @@ To use a JSON schema from a file, an OpenAPI spec, or code that builds it at run } ``` - The example above outputs: + The previous example outputs: ```text Output wrap {"name":"John Smith","email":"john@example.com","plan_interest":"Enterprise","demo_requested":true} @@ -1065,7 +1071,9 @@ To use a JSON schema from a file, an OpenAPI spec, or code that builds it at run .build(); OutputConfig outputConfig = OutputConfig.builder() - .format(JsonOutputFormat.builder().schema(schema).build()) + .format(JsonOutputFormat.builder() + .schema(schema) + .build()) .build(); MessageCreateParams createParams = MessageCreateParams.builder() @@ -1770,7 +1778,7 @@ To use a JSON schema from a file, an OpenAPI spec, or code that builds it at run public string $sentiment; } - $feedbackText = "Great product, fast shipping!"; + $feedbackText = 'Great product, fast shipping!'; $message = $client->messages->create( maxTokens: 1024, @@ -2340,7 +2348,7 @@ When combined, Claude can call tools with guaranteed-valid parameters AND return ] }); - // Claude may call the tool first (tool_use) or respond with JSON (text) + // Claude might call the tool first (tool_use) or respond with JSON (text) console.log("Stop reason:", response.stop_reason); for (const block of response.content) { switch (block.type) { @@ -2478,7 +2486,9 @@ When combined, Claude can call tools with guaranteed-valid parameters AND return .maxTokens(1024L) .addUserMessage("Help me plan a trip to Paris departing May 15, 2026") .outputConfig(OutputConfig.builder() - .format(JsonOutputFormat.builder().schema(outputSchema).build()) + .format(JsonOutputFormat.builder() + .schema(outputSchema) + .build()) .build()) .addTool(Tool.builder() .name("search_flights") @@ -2533,7 +2543,7 @@ When combined, Claude can call tools with guaranteed-valid parameters AND return ], ); - // Claude may call the tool first (tool_use) or respond with JSON (text) + // Claude might call the tool first (tool_use) or respond with JSON (text) $plan = $message->parsedOutput(); if ($plan instanceof TripPlan) { echo $plan->summary, "\n"; diff --git a/content/en/build-with-claude/task-budgets.md b/content/en/build-with-claude/task-budgets.md index b843b2012a..6c300b12be 100644 --- a/content/en/build-with-claude/task-budgets.md +++ b/content/en/build-with-claude/task-budgets.md @@ -138,12 +138,9 @@ Add `task_budget` to `output_config` and include the beta header: Model: anthropic.ModelClaudeOpus5_5, MaxTokens: 128000, Betas: []anthropic.AnthropicBeta{"task-budgets-2026-03-13"}, - Messages: []anthropic.BetaMessageParam{{ - Role: anthropic.BetaMessageParamRoleUser, - Content: []anthropic.BetaContentBlockParamUnion{{ - OfText: &anthropic.BetaTextBlockParam{Text: "Review the codebase and propose a refactor plan."}, - }}, - }}, + Messages: []anthropic.BetaMessageParam{ + anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Review the codebase and propose a refactor plan.")), + }, OutputConfig: anthropic.BetaOutputConfigParam{ Effort: anthropic.BetaOutputConfigEffortHigh, TaskBudget: anthropic.BetaTokenTaskBudgetParam{ @@ -175,7 +172,9 @@ Add `task_budget` to `output_config` and include the beta header: .addUserMessage("Review the codebase and propose a refactor plan.") .outputConfig(BetaOutputConfig.builder() .effort(BetaOutputConfig.Effort.HIGH) - .taskBudget(BetaTokenTaskBudget.builder().total(64000L).build()) + .taskBudget(BetaTokenTaskBudget.builder() + .total(64000L) + .build()) .build()) .addBeta("task-budgets-2026-03-13") .build(); @@ -192,11 +191,12 @@ Add `task_budget` to `output_config` and include the beta header: ```php PHP use Anthropic\Beta\Messages\BetaRawMessageDeltaEvent; + use Anthropic\Messages\Model; $client = new Client(); $stream = $client->beta->messages->createStream( - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, maxTokens: 128000, messages: [ ['role' => 'user', 'content' => 'Review the codebase and propose a refactor plan.'], @@ -618,7 +618,7 @@ Run a representative sample of tasks **without** `task_budget` set and record th $client = new Client(); $response = $client->messages->create( - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, maxTokens: 4096, messages: [ ['role' => 'user', 'content' => 'Review the codebase and propose a refactor plan.'], diff --git a/content/en/build-with-claude/thinking-steering-and-cost.md b/content/en/build-with-claude/thinking-steering-and-cost.md index 9899998d8f..39be734395 100644 --- a/content/en/build-with-claude/thinking-steering-and-cost.md +++ b/content/en/build-with-claude/thinking-steering-and-cost.md @@ -96,7 +96,7 @@ You can also steer thinking on a per-message basis from the user turn, independe Per-message steering is useful when only some requests in a conversation warrant extended reasoning. An agent harness, for example, can append the encouraging phrase on planning steps and the discouraging phrase on routine confirmations, without touching the system prompt or changing any request parameters between turns. -On Claude Haiku 5.5, the discouraging phrase doesn't reliably reduce thinking. On the Claude API and Google Cloud, run routine turns on that model with less thinking by using a [per-message effort change](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta) instead, which also keeps the prompt cache. +On Claude Haiku 5.5, the discouraging phrase doesn't reliably reduce thinking. On the Claude API and Claude Models on Google Cloud (Google managed), run routine turns on that model with less thinking by using a [per-message effort change](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta) instead, which also keeps the prompt cache. ### Verify steering on your workload @@ -116,7 +116,7 @@ Assistant turns don't need to start with a thinking block. (Models using a legac For multi-turn applications, this means you can pass back conversation history in whatever shape you have it: -* Assistant turns without thinking are valid history as-is. +* Assistant turns that Claude produced without thinking are valid history as-is. * You can resume a conversation that started without thinking, or that used a different thinking configuration, without rewriting its history. * History assembled from mixed sources doesn't need thinking blocks reinserted at the start of each assistant turn to pass validation. @@ -131,621 +131,669 @@ The practical consequence: pick a thinking configuration and a top-level effort The following example demonstrates the invalidation with a multi-turn script you can run yourself: - - - - This workflow doesn't translate well to a one-off shell command. Use the Claude SDK to run it; per-turn HTTP requests follow the examples on the [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) page. - - + + + This workflow needs more logic than a single shell command. Use the Claude SDK to run it; per-turn HTTP requests follow the examples on the [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) page. + - - - This workflow doesn't translate well to a one-off shell command. Use the Claude SDK to run it; per-turn CLI commands follow the examples on the [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) page. - - + + This workflow needs more logic than a single shell command. Use the Claude SDK to run it; per-turn CLI commands follow the examples on the [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) page. + - - ```python - import requests + ```python Python + import requests - client = Anthropic() + client = Anthropic() - def fetch_article_content(url): - text = requests.get(url).text - lines = (line.strip() for line in text.splitlines()) - return "\n".join(line for line in lines if line) + def fetch_article_content(url): + text = requests.get(url).text + lines = (line.strip() for line in text.splitlines()) + return "\n".join(line for line in lines if line) - # Fetch the content of the article - book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" - book_content = fetch_article_content(book_url) - # Use just enough text for caching (first few chapters) - LARGE_TEXT = book_content[:10000] + # Fetch the content of the article + book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" + book_content = fetch_article_content(book_url) + # Use just enough text for caching (first few chapters) + LARGE_TEXT = book_content[:10000] - # No system prompt - caching in messages instead - MESSAGES = [ + # No system prompt: caching in messages instead + MESSAGES = [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": LARGE_TEXT, + "cache_control": {"type": "ephemeral"}, + }, + {"type": "text", "text": "Analyze the tone of this passage."}, + ], + } + ] + + # First request: establish cache + print("First request - establishing cache") + response1 = client.messages.create( + model="claude-opus-5-5", + max_tokens=16000, + thinking={"type": "adaptive"}, + messages=MESSAGES, + ) + + print(f"First response usage: {response1.usage}") + + MESSAGES.append({"role": "assistant", "content": response1.content}) + MESSAGES.append({"role": "user", "content": "Analyze the characters in this passage."}) + + # Second request: same configuration (cache hit expected) + print("\nSecond request - same configuration (cache hit expected)") + response2 = client.messages.create( + model="claude-opus-5-5", + max_tokens=16000, + thinking={"type": "adaptive"}, + messages=MESSAGES, + ) + + print(f"Second response usage: {response2.usage}") + + MESSAGES.append({"role": "assistant", "content": response2.content}) + MESSAGES.append({"role": "user", "content": "Analyze the setting in this passage."}) + + # Third request: different effort level (cache miss expected) + print("\nThird request - different effort level (cache miss expected)") + response3 = client.messages.create( + model="claude-opus-5-5", + max_tokens=16000, + thinking={"type": "adaptive"}, + output_config={"effort": "low"}, + messages=MESSAGES, + ) + + print(f"Third response usage: {response3.usage}") + ``` + + ```typescript TypeScript + + const client = new Anthropic(); + + async function fetchArticleContent(url: string): Promise { + const response = await fetch(url); + const text = await response.text(); + const lines = text.split("\n").map((line) => line.trim()); + return lines.filter((line) => line).join("\n"); + } + + const bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; + const bookContent = await fetchArticleContent(bookUrl); + const LARGE_TEXT = bookContent.substring(0, 10000); + + // No system prompt: caching in messages instead + const messages: Anthropic.MessageParam[] = [ + { + role: "user", + content: [ + { + type: "text", + text: LARGE_TEXT, + cache_control: { type: "ephemeral" } + }, { - "role": "user", - "content": [ - { - "type": "text", - "text": LARGE_TEXT, - "cache_control": {"type": "ephemeral"}, - }, - {"type": "text", "text": "Analyze the tone of this passage."}, - ], + type: "text", + text: "Analyze the tone of this passage." } - ] - - # First request - establish cache - print("First request - establishing cache") - response1 = client.messages.create( - model="claude-opus-5-5", - max_tokens=16000, - thinking={"type": "adaptive"}, - messages=MESSAGES, - ) - - print(f"First response usage: {response1.usage}") - - MESSAGES.append({"role": "assistant", "content": response1.content}) - MESSAGES.append({"role": "user", "content": "Analyze the characters in this passage."}) - - # Second request - same configuration (cache hit expected) - print("\nSecond request - same configuration (cache hit expected)") - response2 = client.messages.create( - model="claude-opus-5-5", - max_tokens=16000, - thinking={"type": "adaptive"}, - messages=MESSAGES, - ) - - print(f"Second response usage: {response2.usage}") - - MESSAGES.append({"role": "assistant", "content": response2.content}) - MESSAGES.append({"role": "user", "content": "Analyze the setting in this passage."}) - - # Third request - different effort level (cache miss expected) - print("\nThird request - different effort level (cache miss expected)") - response3 = client.messages.create( - model="claude-opus-5-5", - max_tokens=16000, - thinking={"type": "adaptive"}, - output_config={"effort": "low"}, - messages=MESSAGES, - ) - - print(f"Third response usage: {response3.usage}") - ``` - - - - ```typescript - - const client = new Anthropic(); - - async function fetchArticleContent(url: string): Promise { - const response = await fetch(url); - const text = await response.text(); - const lines = text.split("\n").map((line) => line.trim()); - return lines.filter((line) => line).join("\n"); + ] } - - const bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; - const bookContent = await fetchArticleContent(bookUrl); - const LARGE_TEXT = bookContent.substring(0, 10000); - - // No system prompt - caching in messages instead - const messages: Anthropic.MessageParam[] = [ + ]; + + // First request: establish cache + console.log("First request - establishing cache"); + const response1 = await client.messages.create({ + model: "claude-opus-5-5", + max_tokens: 16000, + thinking: { type: "adaptive" }, + messages + }); + + console.log("First response usage: ", response1.usage); + + messages.push( + { role: "assistant", content: response1.content }, + { role: "user", content: "Analyze the characters in this passage." } + ); + + // Second request: same configuration (cache hit expected) + console.log("\nSecond request - same configuration (cache hit expected)"); + const response2 = await client.messages.create({ + model: "claude-opus-5-5", + max_tokens: 16000, + thinking: { type: "adaptive" }, + messages + }); + + console.log("Second response usage: ", response2.usage); + + messages.push( + { role: "assistant", content: response2.content }, + { role: "user", content: "Analyze the setting in this passage." } + ); + + // Third request: different effort level (cache miss expected) + console.log("\nThird request - different effort level (cache miss expected)"); + const response3 = await client.messages.create({ + model: "claude-opus-5-5", + max_tokens: 16000, + thinking: { type: "adaptive" }, + output_config: { effort: "low" }, + messages + }); + + console.log("Third response usage: ", response3.usage); + ``` + + ```csharp C# + AnthropicClient client = new(); + + string bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; + string bookContent = await FetchArticleContent(bookUrl); + string largeText = bookContent.Substring(0, Math.Min(10000, bookContent.Length)); + + Console.WriteLine("First request - establishing cache"); + var parameters1 = new MessageCreateParams + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive(), + Messages = + [ + new UserMessageParam + { + Content = new List + { + new ContentBlockParam(new TextBlockParam() + { + Text = largeText, + CacheControl = new CacheControlEphemeral(), + }), + new ContentBlockParam(new TextBlockParam() + { + Text = "Analyze the tone of this passage." + }), + } + } + ] + }; + + var response1 = await client.Messages.Create(parameters1); + Console.WriteLine($"First response usage: {response1.Usage}"); + + Console.WriteLine("\nSecond request - same configuration (cache hit expected)"); + var parameters2 = new MessageCreateParams + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive(), + Messages = + [ + new UserMessageParam + { + Content = new List + { + new ContentBlockParam(new TextBlockParam() + { + Text = largeText, + CacheControl = new CacheControlEphemeral(), + }), + new ContentBlockParam(new TextBlockParam() + { + Text = "Analyze the tone of this passage." + }), + } + }, + new AssistantMessageParam + { + Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList() + }, + new UserMessageParam { Content = "Analyze the characters in this passage." } + ] + }; + + var response2 = await client.Messages.Create(parameters2); + Console.WriteLine($"Second response usage: {response2.Usage}"); + + Console.WriteLine("\nThird request - different effort level (cache miss expected)"); + var parameters3 = new MessageCreateParams + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive(), + OutputConfig = new OutputConfig { - role: "user", - content: [ + Effort = Effort.Low + }, + Messages = + [ + new UserMessageParam { - type: "text", - text: LARGE_TEXT, - cache_control: { type: "ephemeral" } + Content = new List + { + new ContentBlockParam(new TextBlockParam() + { + Text = largeText, + CacheControl = new CacheControlEphemeral(), + }), + new ContentBlockParam(new TextBlockParam() + { + Text = "Analyze the tone of this passage." + }), + } }, + new AssistantMessageParam { - type: "text", - text: "Analyze the tone of this passage." - } - ] - } - ]; - - // First request - establish cache - console.log("First request - establishing cache"); - const response1 = await client.messages.create({ - model: "claude-opus-5-5", - max_tokens: 16000, - thinking: { type: "adaptive" }, - messages - }); - - console.log("First response usage: ", response1.usage); - - messages.push( - { role: "assistant", content: response1.content }, - { role: "user", content: "Analyze the characters in this passage." } - ); - - // Second request - same configuration (cache hit expected) - console.log("\nSecond request - same configuration (cache hit expected)"); - const response2 = await client.messages.create({ - model: "claude-opus-5-5", - max_tokens: 16000, - thinking: { type: "adaptive" }, - messages - }); - - console.log("Second response usage: ", response2.usage); - - messages.push( - { role: "assistant", content: response2.content }, - { role: "user", content: "Analyze the setting in this passage." } - ); - - // Third request - different effort level (cache miss expected) - console.log("\nThird request - different effort level (cache miss expected)"); - const response3 = await client.messages.create({ - model: "claude-opus-5-5", - max_tokens: 16000, - thinking: { type: "adaptive" }, - output_config: { effort: "low" }, - messages - }); - - console.log("Third response usage: ", response3.usage); - ``` - - - - ```csharp - AnthropicClient client = new(); - - string bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; - string bookContent = await FetchArticleContent(bookUrl); - string largeText = bookContent.Substring(0, Math.Min(10000, bookContent.Length)); - - Console.WriteLine("First request - establishing cache"); - var parameters1 = new MessageCreateParams - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 16000, - Thinking = new ThinkingConfigAdaptive(), - Messages = - [ - new UserMessageParam - { - Content = new List - { - new ContentBlockParam(new TextBlockParam() - { - Text = largeText, - CacheControl = new CacheControlEphemeral(), - }), - new ContentBlockParam(new TextBlockParam() - { - Text = "Analyze the tone of this passage." - }), - } - } - ] - }; + Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList() + }, + new UserMessageParam { Content = "Analyze the characters in this passage." }, + new AssistantMessageParam + { + Content = response2.Content.Select(block => new ContentBlockParam(block.Json)).ToList() + }, + new UserMessageParam { Content = "Analyze the setting in this passage." } + ] + }; - var response1 = await client.Messages.Create(parameters1); - Console.WriteLine($"First response usage: {response1.Usage}"); + var response3 = await client.Messages.Create(parameters3); + Console.WriteLine($"Third response usage: {response3.Usage}"); - Console.WriteLine("\nSecond request - same configuration (cache hit expected)"); - var parameters2 = new MessageCreateParams - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 16000, - Thinking = new ThinkingConfigAdaptive(), - Messages = - [ - new UserMessageParam - { - Content = new List - { - new ContentBlockParam(new TextBlockParam() - { - Text = largeText, - CacheControl = new CacheControlEphemeral(), - }), - new ContentBlockParam(new TextBlockParam() - { - Text = "Analyze the tone of this passage." - }), - } - }, - new AssistantMessageParam - { - Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList() - }, - new UserMessageParam { Content = "Analyze the characters in this passage." } - ] - }; + static async Task FetchArticleContent(string url) + { + using HttpClient httpClient = new(); + string content = await httpClient.GetStringAsync(url); + return content; + } + ``` - var response2 = await client.Messages.Create(parameters2); - Console.WriteLine($"Second response usage: {response2.Usage}"); + ```go Go + client := anthropic.NewClient() - Console.WriteLine("\nThird request - different effort level (cache miss expected)"); - var parameters3 = new MessageCreateParams - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 16000, - Thinking = new ThinkingConfigAdaptive(), - OutputConfig = new OutputConfig - { - Effort = Effort.Low - }, - Messages = - [ - new UserMessageParam - { - Content = new List - { - new ContentBlockParam(new TextBlockParam() - { - Text = largeText, - CacheControl = new CacheControlEphemeral(), - }), - new ContentBlockParam(new TextBlockParam() - { - Text = "Analyze the tone of this passage." - }), - } - }, - new AssistantMessageParam - { - Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList() - }, - new UserMessageParam { Content = "Analyze the characters in this passage." }, - new AssistantMessageParam - { - Content = response2.Content.Select(block => new ContentBlockParam(block.Json)).ToList() - }, - new UserMessageParam { Content = "Analyze the setting in this passage." } - ] - }; + bookURL := "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" + bookContent, err := fetchArticleContent(bookURL) + if err != nil { + log.Fatal(err) + } - var response3 = await client.Messages.Create(parameters3); - Console.WriteLine($"Third response usage: {response3.Usage}"); + largeText := bookContent + if len(largeText) > 10000 { + largeText = largeText[:10000] + } - static async Task FetchArticleContent(string url) - { - using HttpClient httpClient = new(); - string content = await httpClient.GetStringAsync(url); - return content; - } - ``` - + // No system prompt: caching in messages instead + messages := []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.ContentBlockParamUnion{OfText: &anthropic.TextBlockParam{ + Text: largeText, + CacheControl: anthropic.NewCacheControlEphemeralParam(), + }}, + anthropic.NewTextBlock("Analyze the tone of this passage."), + ), + } - - ```go - client := anthropic.NewClient() + // First request: establish cache + fmt.Println("First request - establishing cache") + response1, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus5_5, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, + }, + Messages: messages, + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("First response usage: %s\n", response1.Usage.RawJSON()) + + messages = append(messages, response1.ToParam()) + messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the characters in this passage."))) + + // Second request: same configuration (cache hit expected) + fmt.Println("\nSecond request - same configuration (cache hit expected)") + response2, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus5_5, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, + }, + Messages: messages, + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Second response usage: %s\n", response2.Usage.RawJSON()) + + messages = append(messages, response2.ToParam()) + messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the setting in this passage."))) + + // Third request: different effort level (cache miss expected) + fmt.Println("\nThird request - different effort level (cache miss expected)") + response3, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus5_5, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, + }, + OutputConfig: anthropic.OutputConfigParam{ + Effort: anthropic.OutputConfigEffortLow, + }, + Messages: messages, + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Third response usage: %s\n", response3.Usage.RawJSON()) + ``` + + ```java Java + import com.anthropic.models.messages.CacheControlEphemeral; + // ... + void main() throws Exception { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + String bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; + String bookContent = fetchArticleContent(bookUrl); + String largeText = bookContent.substring(0, Math.min(10000, bookContent.length())); + + // First request: establish cache + IO.println("First request - establishing cache"); + MessageCreateParams params1 = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder().build()) + .addUserMessageOfContentBlockParams(List.of( + ContentBlockParam.ofText(TextBlockParam.builder() + .text(largeText) + .cacheControl(CacheControlEphemeral.builder().build()) + .build()), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Analyze the tone of this passage.") + .build()) + )) + .build(); + + Message response1 = client.messages().create(params1); + IO.println("First response usage: " + response1.usage()); + + // Second request: same configuration (cache hit expected) + IO.println("\nSecond request - same configuration (cache hit expected)"); + MessageCreateParams params2 = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder().build()) + .addUserMessageOfContentBlockParams(List.of( + ContentBlockParam.ofText(TextBlockParam.builder() + .text(largeText) + .cacheControl(CacheControlEphemeral.builder().build()) + .build()), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Analyze the tone of this passage.") + .build()) + )) + .addAssistantMessageOfContentBlockParams(response1.content().stream() + .map(block -> block.toParam()) + .collect(Collectors.toList())) + .addUserMessage("Analyze the characters in this passage.") + .build(); + + Message response2 = client.messages().create(params2); + IO.println("Second response usage: " + response2.usage()); + + // Third request: different effort level (cache miss expected) + IO.println("\nThird request - different effort level (cache miss expected)"); + MessageCreateParams params3 = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder().build()) + .outputConfig(OutputConfig.builder() + .effort(OutputConfig.Effort.LOW) + .build()) + .addUserMessageOfContentBlockParams(List.of( + ContentBlockParam.ofText(TextBlockParam.builder() + .text(largeText) + .cacheControl(CacheControlEphemeral.builder().build()) + .build()), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Analyze the tone of this passage.") + .build()) + )) + .addAssistantMessageOfContentBlockParams(response1.content().stream() + .map(block -> block.toParam()) + .collect(Collectors.toList())) + .addUserMessage("Analyze the characters in this passage.") + .addAssistantMessageOfContentBlockParams(response2.content().stream() + .map(block -> block.toParam()) + .collect(Collectors.toList())) + .addUserMessage("Analyze the setting in this passage.") + .build(); + + Message response3 = client.messages().create(params3); + IO.println("Third response usage: " + response3.usage()); + } - bookURL := "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" - bookContent, err := fetchArticleContent(bookURL) - if err != nil { - log.Fatal(err) - } + String fetchArticleContent(String url) throws Exception { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create(url)) + .build(); + HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); + return response.body(); + } + ``` + + ```php PHP + function fetchArticleContent($url) + { + $content = file_get_contents($url); + $lines = explode("\n", $content); + $cleanedLines = array_filter(array_map('trim', $lines)); + return implode("\n", $cleanedLines); + } - largeText := bookContent - if len(largeText) > 10000 { - largeText = largeText[:10000] - } + $client = new Client(); + + $bookUrl = 'https://www.gutenberg.org/cache/epub/1342/pg1342.txt'; + $bookContent = fetchArticleContent($bookUrl); + $largeText = substr($bookContent, 0, 10000); + + echo "First request - establishing cache\n"; + $response1 = $client->messages->create( + maxTokens: 16000, + messages: [[ + 'role' => 'user', + 'content' => [ + [ + 'type' => 'text', + 'text' => $largeText, + 'cache_control' => ['type' => 'ephemeral'] + ], + [ + 'type' => 'text', + 'text' => 'Analyze the tone of this passage.' + ] + ] + ]], + model: 'claude-opus-5-5', + thinking: ['type' => 'adaptive'], + ); - // No system prompt - caching in messages instead - messages := []anthropic.MessageParam{ - anthropic.NewUserMessage( - anthropic.ContentBlockParamUnion{OfText: &anthropic.TextBlockParam{ - Text: largeText, - CacheControl: anthropic.NewCacheControlEphemeralParam(), - }}, - anthropic.NewTextBlock("Analyze the tone of this passage."), - ), - } + echo 'First response usage: ' . json_encode($response1->usage) . "\n"; - // First request - establish cache - fmt.Println("First request - establishing cache") - response1, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeOpus5_5, - MaxTokens: 16000, - Thinking: anthropic.ThinkingConfigParamUnion{ - OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, - }, - Messages: messages, - }) - if err != nil { - log.Fatal(err) - } - fmt.Printf("First response usage: %s\n", response1.Usage.RawJSON()) - - messages = append(messages, response1.ToParam()) - messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the characters in this passage."))) - - // Second request - same configuration (cache hit expected) - fmt.Println("\nSecond request - same configuration (cache hit expected)") - response2, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeOpus5_5, - MaxTokens: 16000, - Thinking: anthropic.ThinkingConfigParamUnion{ - OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, - }, - Messages: messages, - }) - if err != nil { - log.Fatal(err) - } - fmt.Printf("Second response usage: %s\n", response2.Usage.RawJSON()) - - messages = append(messages, response2.ToParam()) - messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the setting in this passage."))) - - // Third request - different effort level (cache miss expected) - fmt.Println("\nThird request - different effort level (cache miss expected)") - response3, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeOpus5_5, - MaxTokens: 16000, - Thinking: anthropic.ThinkingConfigParamUnion{ - OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, - }, - OutputConfig: anthropic.OutputConfigParam{ - Effort: anthropic.OutputConfigEffortLow, - }, - Messages: messages, - }) - if err != nil { - log.Fatal(err) - } - fmt.Printf("Third response usage: %s\n", response3.Usage.RawJSON()) - ``` - - - - ```java - import com.anthropic.models.messages.CacheControlEphemeral; - // ... - void main() throws Exception { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - String bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; - String bookContent = fetchArticleContent(bookUrl); - String largeText = bookContent.substring(0, Math.min(10000, bookContent.length())); - - // First request - establishing cache - IO.println("First request - establishing cache"); - MessageCreateParams params1 = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(16000L) - .thinking(ThinkingConfigAdaptive.builder().build()) - .addUserMessageOfContentBlockParams(List.of( - ContentBlockParam.ofText(TextBlockParam.builder() - .text(largeText) - .cacheControl(CacheControlEphemeral.builder().build()) - .build()), - ContentBlockParam.ofText(TextBlockParam.builder() - .text("Analyze the tone of this passage.") - .build()) - )) - .build(); - - Message response1 = client.messages().create(params1); - IO.println("First response usage: " + response1.usage()); - - // Second request - same configuration (cache hit expected) - IO.println("\nSecond request - same configuration (cache hit expected)"); - MessageCreateParams params2 = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(16000L) - .thinking(ThinkingConfigAdaptive.builder().build()) - .addUserMessageOfContentBlockParams(List.of( - ContentBlockParam.ofText(TextBlockParam.builder() - .text(largeText) - .cacheControl(CacheControlEphemeral.builder().build()) - .build()), - ContentBlockParam.ofText(TextBlockParam.builder() - .text("Analyze the tone of this passage.") - .build()) - )) - .addAssistantMessageOfContentBlockParams(response1.content().stream() - .map(block -> block.toParam()) - .collect(Collectors.toList())) - .addUserMessage("Analyze the characters in this passage.") - .build(); - - Message response2 = client.messages().create(params2); - IO.println("Second response usage: " + response2.usage()); - - // Third request - different effort level (cache miss expected) - IO.println("\nThird request - different effort level (cache miss expected)"); - MessageCreateParams params3 = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(16000L) - .thinking(ThinkingConfigAdaptive.builder().build()) - .outputConfig(OutputConfig.builder() - .effort(OutputConfig.Effort.LOW) - .build()) - .addUserMessageOfContentBlockParams(List.of( - ContentBlockParam.ofText(TextBlockParam.builder() - .text(largeText) - .cacheControl(CacheControlEphemeral.builder().build()) - .build()), - ContentBlockParam.ofText(TextBlockParam.builder() - .text("Analyze the tone of this passage.") - .build()) - )) - .addAssistantMessageOfContentBlockParams(response1.content().stream() - .map(block -> block.toParam()) - .collect(Collectors.toList())) - .addUserMessage("Analyze the characters in this passage.") - .addAssistantMessageOfContentBlockParams(response2.content().stream() - .map(block -> block.toParam()) - .collect(Collectors.toList())) - .addUserMessage("Analyze the setting in this passage.") - .build(); - - Message response3 = client.messages().create(params3); - IO.println("Third response usage: " + response3.usage()); - } + echo "\nSecond request - same configuration (cache hit expected)\n"; + $response2 = $client->messages->create( + maxTokens: 16000, + messages: [ + [ + 'role' => 'user', + 'content' => [ + [ + 'type' => 'text', + 'text' => $largeText, + 'cache_control' => ['type' => 'ephemeral'] + ], + [ + 'type' => 'text', + 'text' => 'Analyze the tone of this passage.' + ] + ] + ], + [ + 'role' => 'assistant', + 'content' => $response1->content + ], + [ + 'role' => 'user', + 'content' => 'Analyze the characters in this passage.' + ] + ], + model: 'claude-opus-5-5', + thinking: ['type' => 'adaptive'], + ); - String fetchArticleContent(String url) throws Exception { - HttpClient client = HttpClient.newHttpClient(); - HttpRequest request = HttpRequest.newBuilder() - .uri(URI.create(url)) - .build(); - HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); - return response.body(); - } - ``` - - - - ```php - function fetchArticleContent($url) { - $content = file_get_contents($url); - $lines = explode("\n", $content); - $cleanedLines = array_filter(array_map('trim', $lines)); - return implode("\n", $cleanedLines); - } + echo 'Second response usage: ' . json_encode($response2->usage) . "\n"; - $client = new Client(); - - $bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; - $bookContent = fetchArticleContent($bookUrl); - $largeText = substr($bookContent, 0, 10000); - - echo "First request - establishing cache\n"; - $response1 = $client->messages->create( - maxTokens: 16000, - messages: [[ - 'role' => 'user', - 'content' => [ - [ - 'type' => 'text', - 'text' => $largeText, - 'cache_control' => ['type' => 'ephemeral'] - ], - [ - 'type' => 'text', - 'text' => 'Analyze the tone of this passage.' - ] - ] - ]], - model: 'claude-opus-5-5', - thinking: ['type' => 'adaptive'], - ); - - echo "First response usage: " . json_encode($response1->usage) . "\n"; - - echo "\nSecond request - same configuration (cache hit expected)\n"; - $response2 = $client->messages->create( - maxTokens: 16000, - messages: [ - [ - 'role' => 'user', - 'content' => [ - [ - 'type' => 'text', - 'text' => $largeText, - 'cache_control' => ['type' => 'ephemeral'] - ], - [ - 'type' => 'text', - 'text' => 'Analyze the tone of this passage.' - ] - ] - ], - [ - 'role' => 'assistant', - 'content' => $response1->content - ], - [ - 'role' => 'user', - 'content' => 'Analyze the characters in this passage.' - ] - ], - model: 'claude-opus-5-5', - thinking: ['type' => 'adaptive'], - ); - - echo "Second response usage: " . json_encode($response2->usage) . "\n"; - - echo "\nThird request - different effort level (cache miss expected)\n"; - $response3 = $client->messages->create( - maxTokens: 16000, - messages: [ - [ - 'role' => 'user', - 'content' => [ - [ - 'type' => 'text', - 'text' => $largeText, - 'cache_control' => ['type' => 'ephemeral'] - ], - [ - 'type' => 'text', - 'text' => 'Analyze the tone of this passage.' - ] - ] - ], - [ - 'role' => 'assistant', - 'content' => $response1->content - ], - [ - 'role' => 'user', - 'content' => 'Analyze the characters in this passage.' - ], - [ - 'role' => 'assistant', - 'content' => $response2->content - ], - [ - 'role' => 'user', - 'content' => 'Analyze the setting in this passage.' - ] - ], - model: 'claude-opus-5-5', - thinking: ['type' => 'adaptive'], - outputConfig: ['effort' => 'low'], - ); - - echo "Third response usage: " . json_encode($response3->usage) . "\n"; - ``` - - - - ```ruby - require "net/http" - require "uri" - - def fetch_article_content(url) - uri = URI.parse(url) - response = Net::HTTP.get_response(uri) - text = response.body - - lines = text.split("\n").map(&:strip) - lines.reject(&:empty?).join("\n") - end - - client = Anthropic::Client.new - - book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" - book_content = fetch_article_content(book_url) - large_text = book_content[0...10000] - - puts "First request - establishing cache" - response1 = client.messages.create( - model: "claude-opus-5-5", - max_tokens: 16000, - thinking: { - type: "adaptive" + echo "\nThird request - different effort level (cache miss expected)\n"; + $response3 = $client->messages->create( + maxTokens: 16000, + messages: [ + [ + 'role' => 'user', + 'content' => [ + [ + 'type' => 'text', + 'text' => $largeText, + 'cache_control' => ['type' => 'ephemeral'] + ], + [ + 'type' => 'text', + 'text' => 'Analyze the tone of this passage.' + ] + ] + ], + [ + 'role' => 'assistant', + 'content' => $response1->content + ], + [ + 'role' => 'user', + 'content' => 'Analyze the characters in this passage.' + ], + [ + 'role' => 'assistant', + 'content' => $response2->content + ], + [ + 'role' => 'user', + 'content' => 'Analyze the setting in this passage.' + ] + ], + model: 'claude-opus-5-5', + thinking: ['type' => 'adaptive'], + outputConfig: ['effort' => 'low'], + ); + + echo 'Third response usage: ' . json_encode($response3->usage) . "\n"; + ``` + + ```ruby Ruby + require "net/http" + require "uri" + + def fetch_article_content(url) + uri = URI.parse(url) + response = Net::HTTP.get_response(uri) + text = response.body + + lines = text.split("\n").map(&:strip) + lines.reject(&:empty?).join("\n") + end + + client = Anthropic::Client.new + + book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" + book_content = fetch_article_content(book_url) + large_text = book_content[0...10000] + + puts "First request - establishing cache" + response1 = client.messages.create( + model: "claude-opus-5-5", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + messages: [{ + role: "user", + content: [ + { + type: "text", + text: large_text, + cache_control: { type: "ephemeral" } + }, + { + type: "text", + text: "Analyze the tone of this passage." + } + ] + }] + ) + + puts "First response usage: #{response1.usage}" + + puts "\nSecond request - same configuration (cache hit expected)" + response2 = client.messages.create( + model: "claude-opus-5-5", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + messages: [ + { + role: "user", + content: [ + { + type: "text", + text: large_text, + cache_control: { type: "ephemeral" } + }, + { + type: "text", + text: "Analyze the tone of this passage." + } + ] + }, + { + role: "assistant", + content: response1.content }, - messages: [{ + { + role: "user", + content: "Analyze the characters in this passage." + } + ] + ) + + puts "Second response usage: #{response2.usage}" + + puts "\nThird request - different effort level (cache miss expected)" + response3 = client.messages.create( + model: "claude-opus-5-5", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + output_config: { + effort: "low" + }, + messages: [ + { role: "user", content: [ { @@ -758,94 +806,29 @@ The following example demonstrates the invalidation with a multi-turn script you text: "Analyze the tone of this passage." } ] - }] - ) - - puts "First response usage: #{response1.usage}" - - puts "\nSecond request - same configuration (cache hit expected)" - response2 = client.messages.create( - model: "claude-opus-5-5", - max_tokens: 16000, - thinking: { - type: "adaptive" }, - messages: [ - { - role: "user", - content: [ - { - type: "text", - text: large_text, - cache_control: { type: "ephemeral" } - }, - { - type: "text", - text: "Analyze the tone of this passage." - } - ] - }, - { - role: "assistant", - content: response1.content - }, - { - role: "user", - content: "Analyze the characters in this passage." - } - ] - ) - - puts "Second response usage: #{response2.usage}" - - puts "\nThird request - different effort level (cache miss expected)" - response3 = client.messages.create( - model: "claude-opus-5-5", - max_tokens: 16000, - thinking: { - type: "adaptive" + { + role: "assistant", + content: response1.content }, - output_config: { - effort: "low" + { + role: "user", + content: "Analyze the characters in this passage." }, - messages: [ - { - role: "user", - content: [ - { - type: "text", - text: large_text, - cache_control: { type: "ephemeral" } - }, - { - type: "text", - text: "Analyze the tone of this passage." - } - ] - }, - { - role: "assistant", - content: response1.content - }, - { - role: "user", - content: "Analyze the characters in this passage." - }, - { - role: "assistant", - content: response2.content - }, - { - role: "user", - content: "Analyze the setting in this passage." - } - ] - ) + { + role: "assistant", + content: response2.content + }, + { + role: "user", + content: "Analyze the setting in this passage." + } + ] + ) - puts "Third response usage: #{response3.usage}" - ``` - - + puts "Third response usage: #{response3.usage}" + ``` + Here is the output of the script (you might see slightly different numbers): diff --git a/content/en/build-with-claude/thinking-tool-workflows.md b/content/en/build-with-claude/thinking-tool-workflows.md index 1521e213a0..2bd9683855 100644 --- a/content/en/build-with-claude/thinking-tool-workflows.md +++ b/content/en/build-with-claude/thinking-tool-workflows.md @@ -91,7 +91,7 @@ The example defines a `get_weather` tool, lets Claude think and request a tool c }, } - # First request - Claude responds with thinking and tool request + # First request: Claude responds with thinking and tool request response = client.messages.create( model="claude-opus-5-5", max_tokens=16000, @@ -117,7 +117,7 @@ The example defines a `get_weather` tool, lets Claude think and request a tool c } }; - // First request - Claude responds with thinking and tool request + // First request: Claude responds with thinking and tool request const response = await client.messages.create({ model: "claude-opus-5-5", max_tokens: 16000, @@ -242,7 +242,7 @@ The example defines a `get_weather` tool, lets Claude think and request a tool c messages: [ ['role' => 'user', 'content' => "What's the weather in Paris?"] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, thinking: ['type' => 'adaptive'], tools: [$weatherTool], ); @@ -348,7 +348,7 @@ The example defines a `get_weather` tool, lets Claude think and request a tool c # Pretend this is what the weather API returns weather_data = {"temperature": 88} - # Second request - Include the assistant turn and the tool result + # Second request: include the assistant turn and the tool result continuation = client.messages.create( model="claude-opus-5-5", max_tokens=16000, @@ -407,7 +407,7 @@ The example defines a `get_weather` tool, lets Claude think and request a tool c const weatherData = { temperature: 88 }; if (toolUseBlock) { - // Second request - Include the assistant turn and the tool result + // Second request: include the assistant turn and the tool result const continuation = await client.messages.create({ model: "claude-opus-5-5", max_tokens: 16000, @@ -488,14 +488,17 @@ The example defines a `get_weather` tool, lets Claude think and request a tool c new UserMessageParam { Content = "What's the weather in Paris?" }, // response.Content includes the thinking blocks; passing them back is required new AssistantMessageParam { Content = response.Content.Select(block => new ContentBlockParam(block.Json)).ToList() }, - new UserMessageParam { Content = new List + new UserMessageParam { - new ContentBlockParam(new ToolResultBlockParam() + Content = new List { - ToolUseID = toolUseBlock?.ID ?? "", - Content = $"Current temperature: {weatherData.temperature}°F" - }) - }} + new ContentBlockParam(new ToolResultBlockParam() + { + ToolUseID = toolUseBlock?.ID ?? "", + Content = $"Current temperature: {weatherData.temperature}°F" + }) + } + } ] }; diff --git a/content/en/build-with-claude/thinking.md b/content/en/build-with-claude/thinking.md index 6435ac8506..53666b3093 100644 --- a/content/en/build-with-claude/thinking.md +++ b/content/en/build-with-claude/thinking.md @@ -243,6 +243,7 @@ On Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6, thi ``` ```php PHP + use Anthropic\Messages\Model; use Anthropic\Messages\TextBlock; use Anthropic\Messages\ThinkingBlock; @@ -256,7 +257,7 @@ On Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6, thi 'content' => 'What is the greatest common divisor of 1071 and 462?' ] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, thinking: ['type' => 'adaptive', 'display' => 'summarized'], ); @@ -433,7 +434,7 @@ On Claude Sonnet 5, where thinking is on by default, you can turn it off: 'content' => 'Summarize this article in one sentence.' ] ], - model: 'claude-sonnet-5', + model: Model::CLAUDE_SONNET_5, thinking: ['type' => 'disabled'], ); ``` @@ -532,7 +533,7 @@ To see the model's reasoning, read the `thinking` blocks rather than prompting f Thinking works with [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming). Thinking blocks stream as `thinking_delta` events inside `content_block_delta` events, followed by a single `signature_delta` event just before the block's `content_block_stop`. Text blocks stream afterward as usual. - ![Streaming with thinking: thinking deltas (text only if the display setting returns it), a signature delta, then text deltas](https://platform.claude.com/docs/images/how-thinking-streams.svg) + ![Thinking stream: the block opens, deltas carry text only if display returns text, one signature delta closes it, then text](https://platform.claude.com/docs/images/how-thinking-streams.svg) The following examples stream a response with adaptive thinking, printing thinking and text deltas as they arrive: @@ -720,11 +721,11 @@ The following examples stream a response with adaptive thinking, printing thinki } case CONTENT_BLOCK_DELTA -> { var deltaEvent = event.asContentBlockDelta(); - deltaEvent.delta().thinking().ifPresent(td -> - IO.print(td.thinking()) + deltaEvent.delta().thinking().ifPresent(thinkingDelta -> + IO.print(thinkingDelta.thinking()) ); - deltaEvent.delta().text().ifPresent(td -> - IO.print(td.text()) + deltaEvent.delta().text().ifPresent(textDelta -> + IO.print(textDelta.text()) ); } } @@ -734,6 +735,7 @@ The following examples stream a response with adaptive thinking, printing thinki ``` ```php PHP + use Anthropic\Messages\Model; use Anthropic\Messages\RawContentBlockDeltaEvent; use Anthropic\Messages\RawContentBlockStartEvent; use Anthropic\Messages\TextDelta; @@ -746,7 +748,7 @@ The following examples stream a response with adaptive thinking, printing thinki messages: [ ['role' => 'user', 'content' => 'What is the greatest common divisor of 1071 and 462?'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, thinking: ['type' => 'adaptive', 'display' => 'summarized'], ); @@ -906,7 +908,7 @@ Thinking works alongside [tool use](https://platform.claude.com/docs/en/agents-a 1. **Tool choice limitation (manual mode):** tool use with manual extended thinking (`thinking: {type: "enabled"}`) only supports `tool_choice: {"type": "auto"}` (the default) or `tool_choice: {"type": "none"}`. Using `tool_choice: {"type": "any"}` or `tool_choice: {"type": "tool", "name": "..."}` results in an error because these options force tool use, which is incompatible with manual extended thinking. Adaptive thinking, including on models where thinking is on by default, supports forced tool use, except on Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1, and Claude Mythos 5.1 (see [Response prefill and forced tool use](https://platform.claude.com/docs/en/build-with-claude/thinking#limits-and-feature-compatibility)). Where forced tool use is accepted, the response starts with the tool call and has no `thinking` block. 2. **Preserving thinking blocks:** when you return tool results, you must pass the thinking blocks from the assistant message back to the API, complete and unmodified. See [Preserving thinking blocks](https://platform.claude.com/docs/en/build-with-claude/thinking#preserving-thinking-blocks). -**A tool-use loop is one assistant turn.** From the model's perspective, an assistant turn doesn't complete until Claude finishes its full response, which might include multiple tool calls and results. This whole sequence is a single assistant turn: +**A tool-use loop is one assistant turn.** From the model's perspective, an assistant turn ends only when Claude completes its full response, which might include multiple tool calls and results. This whole sequence is a single assistant turn: ```text wrap User: "What's the weather in Paris?" @@ -987,7 +989,7 @@ What a progress-update block contains depends on [`display`](https://platform.cl On Claude Sonnet 5.5, the lowest thinking setting is `thinking: {type: "between_tools"}`. It turns off up-front thinking, and each progress update comes back with its summary text, as it would under `display: "updates"`. `between_tools` is accepted only at [effort](https://platform.claude.com/docs/en/build-with-claude/effort) `high` or below. At `xhigh` or `max`, a request with it returns a 400 error. `between_tools` takes no other field: `display`, `budget_tokens`, or `block_binding` sent with it returns a 400 error. The setting needs no beta header and works on every platform that offers Claude Sonnet 5.5. Pass the blocks back unchanged: a progress-update block you send back gives the model the full note it wrote, not the summary. -Use `display: "updates"` for an agent interface that keeps reasoning hidden and shows the user a status line at each step. Under it, any `thinking` block with non-empty text is a progress update, so render those and nothing else. It's in beta and requires the beta header `thinking-display-updates-2026-08-18` (to send it on Amazon Bedrock, Google Cloud, or Microsoft Foundry, see [Beta features on other platforms](https://platform.claude.com/docs/en/api/beta-headers#beta-features-on-other-platforms)). Without it, the value is rejected with the same 400 `invalid_request_error` as an unknown `display` value. +Use `display: "updates"` for an agent interface that keeps reasoning hidden and shows the user a status line at each step. Under it, any `thinking` block with non-empty text is a progress update, so render those and nothing else. It's in beta and requires the beta header `thinking-display-updates-2026-08-18` (to send it on Amazon Bedrock, Claude Models on Google Cloud (Google managed), or Microsoft Foundry, see [Beta features on other platforms](https://platform.claude.com/docs/en/api/beta-headers#beta-features-on-other-platforms)). Without it, the value is rejected with the same 400 `invalid_request_error` as an unknown `display` value. ```json { @@ -1065,7 +1067,7 @@ Preservation brings two benefits: The tradeoff is context usage: long conversations consume more context space on keep-all models, because retained thinking blocks count as input like any other conversation history (see [Thinking and the context window](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-the-context-window)). The behavior is automatic in both regimes. No code changes or beta headers are required, and you should keep passing complete, unmodified thinking blocks back as described in [Preserving thinking blocks](https://platform.claude.com/docs/en/build-with-claude/thinking#preserving-thinking-blocks). To override the default in either direction, use [thinking block clearing](https://platform.claude.com/docs/en/build-with-claude/context-editing#thinking-block-clearing). -**Switching models mid-conversation.** Keep passing thinking blocks back unchanged when you switch models, for example after a [classifier refusal fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback). A thinking block is readable only by the model that produced it and certain other models, and the API ignores or drops the blocks the target model can't read. On Claude Fable 5.1 and Claude Mythos 5.1 the direction matters: they read earlier models' thinking blocks, and only the two of them read each other's, so switching to them keeps the conversation's reasoning and switching from them to any other model drops it (see [how dropped blocks are billed and reported](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models)). Claude Opus 5.5 reads Claude Opus 5's thinking blocks and those of earlier Opus, Sonnet, and Haiku models, and, on the Claude API and Google Cloud, of Claude Haiku 5.5, but not those of the Claude Fable and Claude Mythos models; on the Claude API, Claude Fable 5.1 and Claude Mythos 5.1 read Claude Opus 5.5's blocks. A switch from Claude Opus 5.5 up to Claude Fable 5.1 on the Claude API keeps the earlier turns' reasoning; a switch from Claude Fable 5.1 to Claude Opus 5.5 drops it. Claude Sonnet 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, and, on the Claude API and Google Cloud, from Claude Haiku 5.5, but not from Claude Opus 5, Claude Opus 5.5, or any Claude Fable or Claude Mythos model. On the Claude API and Google Cloud, Claude Opus 5.5 reads Claude Sonnet 5.5's blocks and no other model does: a switch from Claude Sonnet 5.5 up to Claude Opus 5.5 on the Claude API and Google Cloud keeps the earlier turns' reasoning, and any other switch away from Claude Sonnet 5.5 drops it. Claude Haiku 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, but not from Claude Opus 5, Claude Opus 5.5, Claude Sonnet 5.5, or any Claude Fable or Claude Mythos model. On the Claude API and Google Cloud, Claude Opus 5.5 and Claude Sonnet 5.5 read Claude Haiku 5.5's blocks and no other model does. Strip prior `thinking` and `redacted_thinking` blocks yourself only to save input tokens on models that ignore rather than drop them, and never when redeeming a [fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit), which requires the body unchanged. +**Switching models mid-conversation.** Keep passing thinking blocks back unchanged when you switch models, for example after a [classifier refusal fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback). A thinking block is readable only by the model that produced it and certain other models, and the API ignores or drops the blocks the target model can't read. On Claude Fable 5.1 and Claude Mythos 5.1 the direction matters: they read earlier models' thinking blocks, and only the two of them read each other's, so switching to them keeps the conversation's reasoning and switching from them to any other model drops it (see [how dropped blocks are billed and reported](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models)). Claude Opus 5.5 reads Claude Opus 5's thinking blocks and those of earlier Opus, Sonnet, and Haiku models, and, on the Claude API and Claude Models on Google Cloud (Google managed), of Claude Haiku 5.5, but not those of the Claude Fable and Claude Mythos models; on the Claude API, Claude Fable 5.1 and Claude Mythos 5.1 read Claude Opus 5.5's blocks. A switch from Claude Opus 5.5 up to Claude Fable 5.1 on the Claude API keeps the earlier turns' reasoning; a switch from Claude Fable 5.1 to Claude Opus 5.5 drops it. Claude Sonnet 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, and, on the Claude API and Claude Models on Google Cloud (Google managed), from Claude Haiku 5.5, but not from Claude Opus 5, Claude Opus 5.5, or any Claude Fable or Claude Mythos model. On those two platforms, Claude Opus 5.5 reads Claude Sonnet 5.5's blocks and no other model does: a switch from Claude Sonnet 5.5 up to Claude Opus 5.5 there keeps the earlier turns' reasoning, and any other switch away from Claude Sonnet 5.5 drops it. Claude Haiku 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, but not from Claude Opus 5, Claude Opus 5.5, Claude Sonnet 5.5, or any Claude Fable or Claude Mythos model. On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 and Claude Sonnet 5.5 read Claude Haiku 5.5's blocks and no other model does. Strip prior `thinking` and `redacted_thinking` blocks yourself only to save input tokens on models that ignore rather than drop them, and never when redeeming a [fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit), which requires the body unchanged. ## Preserved thinking @@ -1160,7 +1162,7 @@ Keep the following in mind when working with signatures: * When [streaming responses](https://platform.claude.com/docs/en/build-with-claude/thinking#streaming-thinking), the signature arrives as a `signature_delta` inside a `content_block_delta` event just before the `content_block_stop` event. * `signature` values are significantly longer in Claude 4 and later models than in previous models. * The `signature` field is opaque: don't interpret or parse it. -* `signature` values are compatible across platforms (the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai)). Values generated on one platform work on another, except that thinking blocks from Claude Sonnet 5.5 and Claude Haiku 5.5 work only in the account that produced them or in an account linked to it. See [Thinking blocks stay with the account that produced them](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#account-bound-thinking). +* `signature` values are compatible across platforms, including the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed). Values generated on one platform work on another, except that thinking blocks from Claude Sonnet 5.5 and Claude Haiku 5.5 work only in the account that produced them or in an account linked to it. See [Thinking blocks stay with the account that produced them](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#account-bound-thinking). ## Redacted thinking blocks diff --git a/content/en/build-with-claude/token-counting.md b/content/en/build-with-claude/token-counting.md index ea2a1a9d76..4689c3677a 100644 --- a/content/en/build-with-claude/token-counting.md +++ b/content/en/build-with-claude/token-counting.md @@ -11,7 +11,7 @@ featureMetadata: Claude API: ga Claude Platform on AWS: ga Amazon Bedrock: ga - Google Cloud: ga + Claude Models on Google Cloud (Google managed): ga Microsoft Foundry: ga --- @@ -142,18 +142,18 @@ All [active models](https://platform.claude.com/docs/en/models/overview) support public class CountTokensExample { - public static void main(String[] args) { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + public static void main(String[] args) { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - MessageCountTokensParams params = MessageCountTokensParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .system("You are a scientist") - .addUserMessage("Hello, Claude") - .build(); + MessageCountTokensParams params = MessageCountTokensParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .system("You are a scientist") + .addUserMessage("Hello, Claude") + .build(); - MessageTokensCount count = client.messages().countTokens(params); - System.out.println(count); - } + MessageTokensCount count = client.messages().countTokens(params); + System.out.println(count); + } } ``` @@ -164,7 +164,7 @@ All [active models](https://platform.claude.com/docs/en/models/overview) support messages: [ ['role' => 'user', 'content' => 'Hello, Claude'] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, system: 'You are a scientist', ); @@ -375,39 +375,39 @@ All [active models](https://platform.claude.com/docs/en/models/overview) support import com.anthropic.models.messages.MessageCountTokensParams; import com.anthropic.models.messages.MessageTokensCount; // ... - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - InputSchema schema = InputSchema.builder() - .properties( - JsonValue.from( - Map.of( - "location", - Map.of( - "type", - "string", - "description", - "The city and state, e.g. San Francisco, CA" + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + InputSchema schema = InputSchema.builder() + .properties( + JsonValue.from( + Map.of( + "location", + Map.of( + "type", + "string", + "description", + "The city and state, e.g. San Francisco, CA" + ) + ) + ) + ) + .putAdditionalProperty("required", JsonValue.from(List.of("location"))) + .build(); + + MessageCountTokensParams params = MessageCountTokensParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .addTool( + Tool.builder() + .name("get_weather") + .description("Get the current weather in a given location") + .inputSchema(schema) + .build() ) - ) - ) - ) - .putAdditionalProperty("required", JsonValue.from(List.of("location"))) - .build(); - - MessageCountTokensParams params = MessageCountTokensParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .addTool( - Tool.builder() - .name("get_weather") - .description("Get the current weather in a given location") - .inputSchema(schema) - .build() - ) - .addUserMessage("What's the weather like in San Francisco?") - .build(); - - MessageTokensCount count = client.messages().countTokens(params); - System.out.println(count); + .addUserMessage("What's the weather like in San Francisco?") + .build(); + + MessageTokensCount count = client.messages().countTokens(params); + System.out.println(count); ``` ```php PHP @@ -417,7 +417,7 @@ All [active models](https://platform.claude.com/docs/en/models/overview) support messages: [ ['role' => 'user', 'content' => "What's the weather like in San Francisco?"] ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, tools: [ [ 'name' => 'get_weather', @@ -673,46 +673,50 @@ All [active models](https://platform.claude.com/docs/en/models/overview) support import com.anthropic.models.messages.MessageCountTokensParams; import com.anthropic.models.messages.MessageTokensCount; // ... - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - String imageUrl = - "https://platform.claude.com/docs/images/vision-example.jpg"; - String imageMediaType = "image/jpeg"; - - HttpClient httpClient = HttpClient.newHttpClient(); - HttpRequest request = HttpRequest.newBuilder().uri(URI.create(imageUrl)).build(); - byte[] imageBytes = httpClient - .send(request, HttpResponse.BodyHandlers.ofByteArray()) - .body(); - String imageBase64 = Base64.getEncoder().encodeToString(imageBytes); - - ContentBlockParam imageBlock = ContentBlockParam.ofImage( - ImageBlockParam.builder() - .source( - Base64ImageSource.builder() - .mediaType(Base64ImageSource.MediaType.IMAGE_JPEG) - .data(imageBase64) - .build() - ) - .build() - ); - - ContentBlockParam textBlock = ContentBlockParam.ofText( - TextBlockParam.builder().text("Describe this image").build() - ); - - MessageCountTokensParams params = MessageCountTokensParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .addUserMessageOfContentBlockParams(List.of(imageBlock, textBlock)) - .build(); - - MessageTokensCount count = client.messages().countTokens(params); - System.out.println(count); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + String imageUrl = + "https://platform.claude.com/docs/images/vision-example.jpg"; + String imageMediaType = "image/jpeg"; + + HttpClient httpClient = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create(imageUrl)) + .build(); + byte[] imageBytes = httpClient + .send(request, HttpResponse.BodyHandlers.ofByteArray()) + .body(); + String imageBase64 = Base64.getEncoder().encodeToString(imageBytes); + + ContentBlockParam imageBlock = ContentBlockParam.ofImage( + ImageBlockParam.builder() + .source( + Base64ImageSource.builder() + .mediaType(Base64ImageSource.MediaType.IMAGE_JPEG) + .data(imageBase64) + .build() + ) + .build() + ); + + ContentBlockParam textBlock = ContentBlockParam.ofText( + TextBlockParam.builder() + .text("Describe this image") + .build() + ); + + MessageCountTokensParams params = MessageCountTokensParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .addUserMessageOfContentBlockParams(List.of(imageBlock, textBlock)) + .build(); + + MessageTokensCount count = client.messages().countTokens(params); + System.out.println(count); ``` ```php PHP - $imageUrl = "https://platform.claude.com/docs/images/vision-example.jpg"; - $imageMediaType = "image/jpeg"; + $imageUrl = 'https://platform.claude.com/docs/images/vision-example.jpg'; + $imageMediaType = 'image/jpeg'; $imageData = base64_encode(file_get_contents($imageUrl)); $client = new Client(); @@ -994,36 +998,36 @@ An embedded image block that sets [`"oversized_image": "error"`](https://platfor import com.anthropic.models.messages.ThinkingBlockParam; import com.anthropic.models.messages.ThinkingConfigAdaptive; // ... - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - List assistantBlocks = List.of( - ContentBlockParam.ofThinking( - ThinkingBlockParam.builder() - .thinking( - "This is a nice number theory question. Let's think about it step by step..." - ) - .signature( - "EuYBCkQYAiJAgCs1le6/Pol5Z4/JMomVOouGrWdhYNsH3ukzUECbB6iWrSQtsQuRHJID6lWV..." - ) - .build() - ), - ContentBlockParam.ofText( - TextBlockParam.builder() - .text("Yes, there are infinitely many prime numbers p such that p mod 4 = 3...") - .build() - ) - ); - - MessageCountTokensParams params = MessageCountTokensParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .thinking(ThinkingConfigAdaptive.builder().build()) - .addUserMessage("Are there an infinite number of prime numbers such that n mod 4 == 3?") - .addAssistantMessageOfContentBlockParams(assistantBlocks) - .addUserMessage("Can you write a formal proof?") - .build(); - - MessageTokensCount count = client.messages().countTokens(params); - System.out.println(count); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + List assistantBlocks = List.of( + ContentBlockParam.ofThinking( + ThinkingBlockParam.builder() + .thinking( + "This is a nice number theory question. Let's think about it step by step..." + ) + .signature( + "EuYBCkQYAiJAgCs1le6/Pol5Z4/JMomVOouGrWdhYNsH3ukzUECbB6iWrSQtsQuRHJID6lWV..." + ) + .build() + ), + ContentBlockParam.ofText( + TextBlockParam.builder() + .text("Yes, there are infinitely many prime numbers p such that p mod 4 = 3...") + .build() + ) + ); + + MessageCountTokensParams params = MessageCountTokensParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .thinking(ThinkingConfigAdaptive.builder().build()) + .addUserMessage("Are there an infinite number of prime numbers such that n mod 4 == 3?") + .addAssistantMessageOfContentBlockParams(assistantBlocks) + .addUserMessage("Can you write a formal proof?") + .build(); + + MessageTokensCount count = client.messages().countTokens(params); + System.out.println(count); ``` ```php PHP @@ -1292,34 +1296,38 @@ An embedded image block that sets [`"oversized_image": "error"`](https://platfor import com.anthropic.models.messages.MessageCountTokensParams; import com.anthropic.models.messages.MessageTokensCount; // ... - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - byte[] fileBytes = Files.readAllBytes(Path.of("/path/to/document.pdf")); - String pdfBase64 = Base64.getEncoder().encodeToString(fileBytes); - - ContentBlockParam documentBlock = ContentBlockParam.ofDocument( - DocumentBlockParam.builder() - .source(Base64PdfSource.builder().data(pdfBase64).build()) - .build() - ); - - ContentBlockParam textBlock = ContentBlockParam.ofText( - TextBlockParam.builder().text("Please summarize this document.").build() - ); - - MessageCountTokensParams params = MessageCountTokensParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .addUserMessageOfContentBlockParams(List.of(documentBlock, textBlock)) - .build(); - - MessageTokensCount count = client.messages().countTokens(params); - System.out.println(count); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + byte[] fileBytes = Files.readAllBytes(Path.of("/path/to/document.pdf")); + String pdfBase64 = Base64.getEncoder().encodeToString(fileBytes); + + ContentBlockParam documentBlock = ContentBlockParam.ofDocument( + DocumentBlockParam.builder() + .source(Base64PdfSource.builder() + .data(pdfBase64) + .build()) + .build() + ); + + ContentBlockParam textBlock = ContentBlockParam.ofText( + TextBlockParam.builder() + .text("Please summarize this document.") + .build() + ); + + MessageCountTokensParams params = MessageCountTokensParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .addUserMessageOfContentBlockParams(List.of(documentBlock, textBlock)) + .build(); + + MessageTokensCount count = client.messages().countTokens(params); + System.out.println(count); ``` ```php PHP $client = new Client(); - $pdfBase64 = base64_encode(file_get_contents("/path/to/document.pdf")); + $pdfBase64 = base64_encode(file_get_contents('/path/to/document.pdf')); $response = $client->messages->countTokens( messages: [ diff --git a/content/en/build-with-claude/vision-coordinates.md b/content/en/build-with-claude/vision-coordinates.md index 01abc01ea1..c998edc427 100644 --- a/content/en/build-with-claude/vision-coordinates.md +++ b/content/en/build-with-claude/vision-coordinates.md @@ -57,7 +57,7 @@ First check which resolution tier your model is on (see [Resolution and token co def count_image_tokens(width: int, height: int) -> int: - """Visual tokens consumed by an image: one token per 28x28 pixel patch.""" + """Visual tokens consumed by an image: one token for each 28x28 pixel patch.""" return math.ceil(width / 28) * math.ceil(height / 28) @@ -108,7 +108,7 @@ First check which resolution tier your model is on (see [Resolution and token co ``` ```typescript TypeScript - /** Visual tokens consumed by an image: one token per 28x28 pixel patch. */ + /** Visual tokens consumed by an image: one token for each 28x28 pixel patch. */ function countImageTokens(width: number, height: number): number { return Math.ceil(width / 28) * Math.ceil(height / 28); } @@ -176,7 +176,7 @@ First check which resolution tier your model is on (see [Resolution and token co ``` ```csharp C# - // Visual tokens consumed by an image: one token per 28x28 pixel patch. + // Visual tokens consumed by an image: one token for each 28x28 pixel patch. static int CountImageTokens(int width, int height) { return (width + 27) / 28 * ((height + 27) / 28); // ceil(w/28) * ceil(h/28) @@ -233,7 +233,7 @@ First check which resolution tier your model is on (see [Resolution and token co ``` ```go Go - // countImageTokens is the visual tokens consumed by an image: one token per + // countImageTokens is the visual tokens consumed by an image: one token for each // 28x28 pixel patch. func countImageTokens(width, height int) int { return ((width + 27) / 28) * ((height + 27) / 28) // ceil(w/28) * ceil(h/28) @@ -282,7 +282,7 @@ First check which resolution tier your model is on (see [Resolution and token co /** A resized image size, as returned by resizedSize. */ record Size(int width, int height) {} - /** Visual tokens consumed by an image: one token per 28x28 pixel patch. */ + /** Visual tokens consumed by an image: one token for each 28x28 pixel patch. */ static int countImageTokens(int width, int height) { return Math.ceilDiv(width, 28) * Math.ceilDiv(height, 28); } @@ -325,8 +325,8 @@ First check which resolution tier your model is on (see [Resolution and token co private static boolean fits(int width, int height, int maxEdge, int maxTokens) { return Math.ceilDiv(width, 28) * 28 <= maxEdge - && Math.ceilDiv(height, 28) * 28 <= maxEdge - && countImageTokens(width, height) <= maxTokens; + && Math.ceilDiv(height, 28) * 28 <= maxEdge + && countImageTokens(width, height) <= maxTokens; } private static int shortEdge(int longEdge, double aspectRatio) { @@ -335,7 +335,7 @@ First check which resolution tier your model is on (see [Resolution and token co ``` ```php PHP - // Visual tokens consumed by an image: one token per 28x28 pixel patch. + // Visual tokens consumed by an image: one token for each 28x28 pixel patch. function countImageTokens(int $width, int $height): int { return intdiv($width + 27, 28) * intdiv($height + 27, 28); @@ -388,7 +388,7 @@ First check which resolution tier your model is on (see [Resolution and token co ``` ```ruby Ruby - # Visual tokens consumed by an image: one token per 28x28 pixel patch. + # Visual tokens consumed by an image: one token for each 28x28 pixel patch. def count_image_tokens(width, height) width.ceildiv(28) * height.ceildiv(28) end diff --git a/content/en/build-with-claude/vision.md b/content/en/build-with-claude/vision.md index e0f4e7dcb1..92a79ec5db 100644 --- a/content/en/build-with-claude/vision.md +++ b/content/en/build-with-claude/vision.md @@ -23,7 +23,7 @@ On the API, provide images to Claude as `image` content blocks using one of thre 3. A `file_id` returned by the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) (upload once, reference many times) - On Amazon Bedrock and Google Cloud, only base64-encoded sources are currently available. + On Amazon Bedrock and Claude Models on Google Cloud (Google managed), only base64-encoded sources are currently available. @@ -128,7 +128,7 @@ On the API, provide images to Claude as `image` content blocks using one of thre source: { type: "base64", media_type: "image/jpeg", - data: imageData // Base64-encoded image data as string + data: imageData // base64-encoded image data as string } }, { @@ -203,30 +203,32 @@ On the API, provide images to Claude as `image` content blocks using one of thre ```java Java AnthropicClient client = AnthropicOkHttpClient.fromEnv(); String imageData = - "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC"; + "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC"; List contentBlockParams = List.of( - ContentBlockParam.ofImage( - ImageBlockParam.builder() - .source( - Base64ImageSource.builder() - .mediaType(Base64ImageSource.MediaType.IMAGE_PNG) - .data(imageData) - .build() - ) - .build() - ), - ContentBlockParam.ofText(TextBlockParam.builder().text("Describe this image.").build()) + ContentBlockParam.ofImage( + ImageBlockParam.builder() + .source( + Base64ImageSource.builder() + .mediaType(Base64ImageSource.MediaType.IMAGE_PNG) + .data(imageData) + .build() + ) + .build() + ), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Describe this image.") + .build()) ); Message message = client - .messages() - .create( - MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessageOfContentBlockParams(contentBlockParams) - .build() - ); + .messages() + .create( + MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessageOfContentBlockParams(contentBlockParams) + .build() + ); IO.println(message); ``` @@ -234,7 +236,7 @@ On the API, provide images to Claude as `image` content blocks using one of thre ```php PHP $client = new Client(); - $imageData = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC"; + $imageData = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC'; $message = $client->messages->create( maxTokens: 1024, @@ -254,7 +256,7 @@ On the API, provide images to Claude as `image` content blocks using one of thre ], ], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); echo json_encode($message, JSON_PRETTY_PRINT), PHP_EOL; @@ -449,26 +451,28 @@ On the API, provide images to Claude as `image` content blocks using one of thre AnthropicClient client = AnthropicOkHttpClient.fromEnv(); List contentBlockParams = List.of( - ContentBlockParam.ofImage( - ImageBlockParam.builder() - .source( - UrlImageSource.builder() - .url("https://platform.claude.com/docs/images/vision-example.jpg") - .build() - ) - .build() - ), - ContentBlockParam.ofText(TextBlockParam.builder().text("Describe this image.").build()) + ContentBlockParam.ofImage( + ImageBlockParam.builder() + .source( + UrlImageSource.builder() + .url("https://platform.claude.com/docs/images/vision-example.jpg") + .build() + ) + .build() + ), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Describe this image.") + .build()) ); Message message = client - .messages() - .create( - MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessageOfContentBlockParams(contentBlockParams) - .build() - ); + .messages() + .create( + MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessageOfContentBlockParams(contentBlockParams) + .build() + ); System.out.println(message); ``` @@ -748,39 +752,43 @@ For images you'll use repeatedly or when you want to avoid encoding overhead, us import com.anthropic.models.files.FileMetadata; import com.anthropic.models.files.FileUploadParams; // ... - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - // Upload the image file - FileMetadata file = client.files().upload( - FileUploadParams.builder() - .file( - MultipartField.builder() - .value(Files.newInputStream(Path.of("vision-example.jpg"))) - .filename("vision-example.jpg") - .contentType("image/jpeg") - .build() - ) - .build() - ); + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + // Upload the image file + FileMetadata file = client.files().upload( + FileUploadParams.builder() + .file( + MultipartField.builder() + .value(Files.newInputStream(Path.of("vision-example.jpg"))) + .filename("vision-example.jpg") + .contentType("image/jpeg") + .build() + ) + .build() + ); + + // Use the uploaded file in a message + ImageBlockParam imageParam = ImageBlockParam.builder() + .fileSource(file.id()) + .build(); + + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessageOfContentBlockParams( + List.of( + ContentBlockParam.ofImage(imageParam), + ContentBlockParam.ofText( + TextBlockParam.builder() + .text("Describe this image.") + .build() + ) + ) + ) + .build(); - // Use the uploaded file in a message - ImageBlockParam imageParam = ImageBlockParam.builder().fileSource(file.id()).build(); - - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessageOfContentBlockParams( - List.of( - ContentBlockParam.ofImage(imageParam), - ContentBlockParam.ofText( - TextBlockParam.builder().text("Describe this image.").build() - ) - ) - ) - .build(); - - Message message = client.messages().create(params); - System.out.println(message.content()); + Message message = client.messages().create(params); + System.out.println(message.content()); ``` ```php PHP @@ -1089,7 +1097,9 @@ You can include multiple images in a single request, and Claude analyzes them jo String image2Data = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGNgYPgPAAEDAQAIicLsAAAAAElFTkSuQmCC"; List contentBlockParams = List.of( - ContentBlockParam.ofText(TextBlockParam.builder().text("Image 1:").build()), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Image 1:") + .build()), ContentBlockParam.ofImage( ImageBlockParam.builder() .source( @@ -1100,7 +1110,9 @@ You can include multiple images in a single request, and Claude analyzes them jo ) .build() ), - ContentBlockParam.ofText(TextBlockParam.builder().text("Image 2:").build()), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Image 2:") + .build()), ContentBlockParam.ofImage( ImageBlockParam.builder() .source( @@ -1112,7 +1124,9 @@ You can include multiple images in a single request, and Claude analyzes them jo .build() ), ContentBlockParam.ofText( - TextBlockParam.builder().text("How are these images different?").build() + TextBlockParam.builder() + .text("How are these images different?") + .build() ) ); @@ -1163,7 +1177,7 @@ You can include multiple images in a single request, and Claude analyzes them jo ], ], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); echo $message; @@ -1226,16 +1240,16 @@ The maximum number of images for each message or request is: The maximum dimensions for each image are 8000x8000 px. -If a single API request contains more than 20 images, a stricter per-image dimension limit applies to every image in that request. All `image` blocks in the request count toward this threshold, including images from earlier conversation turns that you resend and images nested inside `tool_result` content (for example, screenshots returned to the computer use tool). On Amazon Bedrock and Google Cloud, document blocks such as PDFs also count toward this threshold. Images exceeding the stricter limit are rejected with an `invalid_request_error` whose message references "many-image requests" and states the current limit in pixels. To stay under the limit on all platforms, either resize each image so that neither dimension exceeds 2000 px, or keep the request to 20 or fewer image and document blocks. +If a single API request contains more than 20 images, a stricter per-image dimension limit applies to every image in that request. All `image` blocks in the request count toward this threshold, including images from earlier conversation turns that you resend and images nested inside `tool_result` content (for example, screenshots returned to the computer use tool). On Amazon Bedrock and Claude Models on Google Cloud (Google managed), document blocks such as PDFs also count toward this threshold. Images exceeding the stricter limit are rejected with an `invalid_request_error` whose message references "many-image requests" and states the current limit in pixels. To stay under the limit on all platforms, either resize each image so that neither dimension exceeds 2000 px, or keep the request to 20 or fewer image and document blocks. The maximum size per image is: -* 10 MB (base64-encoded) when using the Claude API directly. -* 5 MB (base64-encoded) on Amazon Bedrock and Google Cloud. +* 10 MB (base64-encoded) on the Claude API and Claude Models on Google Cloud (Google managed). +* 5 MB (base64-encoded) on Amazon Bedrock. * 10 MB on [claude.ai](https://claude.ai/). - Although the API supports up to 600 images per request, [request size limits](https://platform.claude.com/docs/en/api/overview#request-size-limits) (32 MB for standard endpoints; lower on some partner-operated platforms, for example, Amazon Bedrock and Google Cloud) can be reached first. For many images, consider uploading with the [Files API](https://platform.claude.com/docs/en/build-with-claude/vision#files-api-image-example) and referencing by `file_id` to keep request payloads small. + Although the API supports up to 600 images for each request, [request size limits](https://platform.claude.com/docs/en/api/overview#request-size-limits) can be reached first: 32 MB for standard endpoints, and lower on some partner-operated platforms, such as Amazon Bedrock and Claude Models on Google Cloud (Google managed). For many images, consider [uploading with the Files API](https://platform.claude.com/docs/en/build-with-claude/vision#files-api-image-example) and referencing by `file_id` to keep request payloads small. Even when using the Files API, requests with many large images can fail before reaching the 600-image count. Reduce image dimensions or file sizes (for example, by downsampling) before uploading (see [Resolution and token cost](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size)). @@ -1319,7 +1333,7 @@ Always carefully review and verify Claude's image interpretations, especially fo - Yes. See [Request limits](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits) for per-image and overall request size limits across the Claude API, Amazon Bedrock, Google Cloud, and claude.ai. + Yes. See [Request limits](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits) for per-image and overall request size limits across the Claude API, Amazon Bedrock, Claude Models on Google Cloud (Google managed), and claude.ai. diff --git a/content/en/build-with-claude/working-with-messages.md b/content/en/build-with-claude/working-with-messages.md index 70ed0ef1ae..e83130ec40 100644 --- a/content/en/build-with-claude/working-with-messages.md +++ b/content/en/build-with-claude/working-with-messages.md @@ -114,7 +114,7 @@ This guide covers common patterns for working with the Messages API, including b $message = $client->messages->create( maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); echo json_encode($message, JSON_PRETTY_PRINT), PHP_EOL; ``` @@ -278,7 +278,7 @@ The Messages API is stateless, which means that you always send the full convers ['role' => 'assistant', 'content' => 'Hello!'], ['role' => 'user', 'content' => 'Can you describe LLMs to me?'], ], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, ); echo json_encode($message, JSON_PRETTY_PRINT), PHP_EOL; @@ -507,7 +507,7 @@ Claude can read both text and images in requests. You can supply images using th ```bash cURL #!/bin/sh - # Option 1: Base64-encoded image + # Option 1: base64-encoded image IMAGE_BASE64=$(curl "https://platform.claude.com/docs/images/vision-example.jpg" | base64 | tr -d '\n') curl https://api.anthropic.com/v1/messages \ @@ -552,7 +552,7 @@ Claude can read both text and images in requests. You can supply images using th ``` ```bash CLI - # Option 1: Base64-encoded image (CLI auto-encodes binary @file refs) + # Option 1: base64-encoded image (CLI auto-encodes binary @file refs) curl -s "https://platform.claude.com/docs/images/vision-example.jpg" \ -o ./vision-example.jpg @@ -591,7 +591,7 @@ Claude can read both text and images in requests. You can supply images using th import base64 import httpx2 - # Option 1: Base64-encoded image + # Option 1: base64-encoded image image_url = "https://platform.claude.com/docs/images/vision-example.jpg" image_media_type = "image/jpeg" image_data = base64.standard_b64encode(httpx2.get(image_url).content).decode("utf-8") @@ -644,7 +644,7 @@ Claude can read both text and images in requests. You can supply images using th ```typescript TypeScript const anthropic = new Anthropic(); - // Option 1: Base64-encoded image + // Option 1: base64-encoded image const imageUrl = "https://platform.claude.com/docs/images/vision-example.jpg"; const imageMediaType = "image/jpeg"; const imageArrayBuffer = await (await fetch(imageUrl)).arrayBuffer(); @@ -709,7 +709,7 @@ Claude can read both text and images in requests. You can supply images using th AnthropicClient client = new(); - // Option 1: Base64-encoded image + // Option 1: base64-encoded image string imageUrl = "https://platform.claude.com/docs/images/vision-example.jpg"; using HttpClient httpClient = new(); @@ -772,7 +772,7 @@ Claude can read both text and images in requests. You can supply images using th ```go Go client := anthropic.NewClient() - // Option 1: Base64-encoded image + // Option 1: base64-encoded image imageURL := "https://platform.claude.com/docs/images/vision-example.jpg" req, err := http.NewRequest("GET", imageURL, nil) @@ -830,11 +830,13 @@ Claude can read both text and images in requests. You can supply images using th ```java Java AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - // Option 1: Base64-encoded image + // Option 1: base64-encoded image String imageUrl = "https://platform.claude.com/docs/images/vision-example.jpg"; HttpClient httpClient = HttpClient.newHttpClient(); - HttpRequest request = HttpRequest.newBuilder().uri(URI.create(imageUrl)).build(); + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create(imageUrl)) + .build(); HttpResponse response = httpClient.send(request, HttpResponse.BodyHandlers.ofByteArray()); String imageData = Base64.getEncoder().encodeToString(response.body()); @@ -886,9 +888,9 @@ Claude can read both text and images in requests. You can supply images using th ```php PHP $client = new Client(); - // Option 1: Base64-encoded image + // Option 1: base64-encoded image $image_url = 'https://platform.claude.com/docs/images/vision-example.jpg'; - $image_media_type = "image/jpeg"; + $image_media_type = 'image/jpeg'; $image_data = base64_encode(file_get_contents($image_url)); $message = $client->messages->create( @@ -948,7 +950,7 @@ Claude can read both text and images in requests. You can supply images using th client = Anthropic::Client.new - # Option 1: Base64-encoded image + # Option 1: base64-encoded image image_url = "https://platform.claude.com/docs/images/vision-example.jpg" image_media_type = "image/jpeg" image_data = Base64.strict_encode64(Net::HTTP.get(URI(image_url))) diff --git a/content/en/claude_api_primer.md b/content/en/claude_api_primer.md index 770118593e..c4a1cc6366 100644 --- a/content/en/claude_api_primer.md +++ b/content/en/claude_api_primer.md @@ -145,7 +145,7 @@ Claude can read both text and images in requests. Both `base64` and `url` source ```bash CLI - # Option 1: Base64-encoded image (@ prefix auto-encodes binary files as base64) + # Option 1: base64-encoded image (@ prefix auto-encodes binary files as base64) curl -sSo vision-example.jpg \ https://platform.claude.com/docs/images/vision-example.jpg @@ -185,7 +185,7 @@ Claude can read both text and images in requests. Both `base64` and `url` source import base64 import httpx2 - # Option 1: Base64-encoded image + # Option 1: base64-encoded image image_url = "https://platform.claude.com/docs/images/vision-example.jpg" image_media_type = "image/jpeg" image_data = base64.standard_b64encode(httpx2.get(image_url).content).decode("utf-8") @@ -339,7 +339,7 @@ Important limitations: weather_data = {"temperature": 72} - # First request - Claude responds with thinking and tool request + # First request: Claude responds with thinking and tool request response = client.messages.create( model="claude-opus-5-5", max_tokens=16000, @@ -356,7 +356,7 @@ Important limitations: (block for block in response.content if block.type == "tool_use"), None ) - # Second request - Include thinking block and tool result + # Second request: include thinking block and tool result continuation = client.messages.create( model="claude-opus-5-5", max_tokens=16000, diff --git a/content/en/cli-sdks-libraries/cli/authentication.md b/content/en/cli-sdks-libraries/cli/authentication.md index 1ebca7454c..970af96f14 100644 --- a/content/en/cli-sdks-libraries/cli/authentication.md +++ b/content/en/cli-sdks-libraries/cli/authentication.md @@ -85,7 +85,7 @@ ant messages create \ ## Check authentication status -`ant auth status` prints the credential source the CLI selected (API key environment variable, OAuth login, federation, or profile), the active profile, the workspace the active token is bound to, and the configuration directory paths. Use it to diagnose why a workload picked the wrong credential or workspace. +`ant auth status` prints the credential source the CLI selected (API key environment variable, OAuth login, federation, Google Cloud, or profile), the active profile, the workspace the active token is bound to, and the configuration directory paths. Use it to diagnose why a workload picked the wrong credential or workspace. ```bash CLI ant auth status diff --git a/content/en/cli-sdks-libraries/libraries/openai-sdk.md b/content/en/cli-sdks-libraries/libraries/openai-sdk.md index f07d09ec8d..5749196e92 100644 --- a/content/en/cli-sdks-libraries/libraries/openai-sdk.md +++ b/content/en/cli-sdks-libraries/libraries/openai-sdk.md @@ -18,7 +18,7 @@ description: Anthropic provides a compatibility layer that lets you use the Open ## Getting started with the OpenAI SDK -To use the OpenAI SDK compatibility feature, you'll need to: +To use the OpenAI SDK compatibility feature, you need to: 1. Use an official OpenAI SDK. @@ -137,15 +137,15 @@ To use the OpenAI SDK compatibility feature, you'll need to: public class QuickStart { public static void main(String[] args) { OpenAIClient client = OpenAIOkHttpClient.builder() - .apiKey(System.getenv("ANTHROPIC_API_KEY")) // Your Claude API key - .baseUrl("https://api.anthropic.com/v1/") // the Claude API endpoint - .build(); + .apiKey(System.getenv("ANTHROPIC_API_KEY")) // Your Claude API key + .baseUrl("https://api.anthropic.com/v1/") // the Claude API endpoint + .build(); ChatCompletionCreateParams params = ChatCompletionCreateParams.builder() - .model("claude-opus-5-5") // Claude model name - .addSystemMessage("You are a helpful assistant.") - .addUserMessage("Who are you?") - .build(); + .model("claude-opus-5-5") // Claude model name + .addSystemMessage("You are a helpful assistant.") + .addUserMessage("Who are you?") + .build(); ChatCompletion completion = client.chat().completions().create(params); System.out.println(completion.choices().get(0).message().content().orElse("")); @@ -251,11 +251,11 @@ You can enable [thinking](https://platform.claude.com/docs/en/build-with-claude/ ```java Java ChatCompletionCreateParams params = ChatCompletionCreateParams.builder() - .model("claude-sonnet-4-6") - .addUserMessage("Who are you?") - .putAdditionalBodyProperty("thinking", - JsonValue.from(Map.of("type", "enabled", "budget_tokens", 2000))) - .build(); + .model("claude-sonnet-4-6") + .addUserMessage("Who are you?") + .putAdditionalBodyProperty("thinking", + JsonValue.from(Map.of("type", "enabled", "budget_tokens", 2000))) + .build(); ChatCompletion completion = client.chat().completions().create(params); ``` diff --git a/content/en/cli-sdks-libraries/overview.md b/content/en/cli-sdks-libraries/overview.md index a404c48e46..707cab321a 100644 --- a/content/en/cli-sdks-libraries/overview.md +++ b/content/en/cli-sdks-libraries/overview.md @@ -54,20 +54,20 @@ Anthropic provides three kinds of official tooling for building with the Claude -Each major version of a client SDK sends one [API version](https://platform.claude.com/docs/en/api/versioning) by default, and a new major version comes with each new API version. To move to `2026-10-21`, see [Upgrade to 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21#upgrade). +Each major version of a client SDK sends one [API version](https://platform.claude.com/docs/en/api/versioning) by default, and a new major version comes with each new API version. To move to `2026-10-21`, see [Switch to 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21#upgrade). ## Latest versions -| Tool | Latest version | Package | -| ---------- | -------------- | ----------------------------------------------------------------------------------------------------- | -| ant CLI | `2.1.0` | [`github.com/anthropics/anthropic-cli`](https://github.com/anthropics/anthropic-cli/releases) | -| Python | `2.1.0` | [`anthropic`](https://pypi.org/project/anthropic/) | -| TypeScript | `1.1.0` | [`@anthropic-ai/sdk`](https://www.npmjs.com/package/@anthropic-ai/sdk) | -| C# | `13.1.0` | [`Anthropic`](https://www.nuget.org/packages/Anthropic) | -| Go | `2.1.0` | [`github.com/anthropics/anthropic-sdk-go`](https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go) | -| Java | `3.1.0` | [`com.anthropic:anthropic-java`](https://central.sonatype.com/artifact/com.anthropic/anthropic-java) | -| PHP | `1.1.0` | [`anthropic-ai/sdk`](https://packagist.org/packages/anthropic-ai/sdk) | -| Ruby | `2.1.0` | [`anthropic`](https://rubygems.org/gems/anthropic) | +| Tool | Latest version | Package | +| ---------- | -------------- | ----------------------------------------------------------------------------------------------------------- | +| ant CLI | `2.1.0` | [`github.com/anthropics/anthropic-cli`](https://github.com/anthropics/anthropic-cli/releases) | +| Python | `2.1.0` | [`anthropic`](https://pypi.org/project/anthropic/) | +| TypeScript | `1.1.0` | [`@anthropic-ai/sdk`](https://www.npmjs.com/package/@anthropic-ai/sdk) | +| C# | `13.1.0` | [`Anthropic`](https://www.nuget.org/packages/Anthropic) | +| Go | `2.1.0` | [`github.com/anthropics/anthropic-sdk-go/v2`](https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/v2) | +| Java | `3.1.0` | [`com.anthropic:anthropic-java`](https://central.sonatype.com/artifact/com.anthropic/anthropic-java) | +| PHP | `1.1.0` | [`anthropic-ai/sdk`](https://packagist.org/packages/anthropic-ai/sdk) | +| Ruby | `2.1.0` | [`anthropic`](https://rubygems.org/gems/anthropic) | The same versions are available as JSON at `https://platform.claude.com/docs/sdk-versions.json`. diff --git a/content/en/cli-sdks-libraries/sdks/csharp.md b/content/en/cli-sdks-libraries/sdks/csharp.md index 8d2728b66d..86056d53f1 100644 --- a/content/en/cli-sdks-libraries/sdks/csharp.md +++ b/content/en/cli-sdks-libraries/sdks/csharp.md @@ -62,7 +62,7 @@ Configure the client using environment variables: ```csharp using Anthropic; -// Configured using the ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL environment variables +// Configured using the ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_BASE_URL environment variables AnthropicClient client = new(); ``` @@ -303,7 +303,7 @@ using Anthropic; using Microsoft.Extensions.AI; using ModelContextProtocol.Client; -// Configured using the ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL environment variables +// Configured using the ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_BASE_URL environment variables AnthropicClient client = new(); IChatClient chatClient = client.AsIChatClient("claude-opus-5-5") @@ -415,19 +415,23 @@ The SDK is typed for convenient usage of the documented API. However, it also su * [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) * [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) * [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) - * [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) + * [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) * [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) + + See also [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed).
The C# SDK supports the following platforms through separate NuGet packages: -* **Agent Platform:** `Anthropic.Vertex`. See [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) for client setup. +* **Claude Models on Google Cloud (Google managed):** `Anthropic.Vertex`. See [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) for client setup. * **Bedrock:** `Anthropic.Bedrock`. Use `AnthropicBedrockMantleClient` for the Messages-API Bedrock endpoint, or `AnthropicBedrockClient` (`bedrock-runtime` path). `AnthropicBedrockMantleClient` takes an optional `MantleAwsClientOptions` config object; `AnthropicBedrockClient` accepts `AnthropicBedrockCredentialsHelper.FromEnv()` or explicit credentials. * **Claude Platform on AWS:** `Anthropic.Aws`. Use `AnthropicAwsClient`; set `WorkspaceId` on the client or the `ANTHROPIC_AWS_WORKSPACE_ID` environment variable (see [Workspaces](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#workspaces)). Available in beta. * **Foundry:** `Anthropic.Foundry`. Use `AnthropicFoundryClient` with `DefaultAnthropicFoundryCredentials.FromEnv()` or explicit credentials. Use `AnthropicBedrockMantleClient` for new projects; `AnthropicBedrockClient` remains for existing applications using the Bedrock `InvokeModel` API. +The C# SDK also supports Claude Models on Google Cloud (Anthropic managed) through `AnthropicGoogleCloudClient`, from the `Anthropic.GoogleCloud` package. This client is in beta. Set `WorkspaceId` on an optional `GoogleCloudClientOptions` value, or set the `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID` environment variable. See [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution). + ## Semantic versioning Each major version of this SDK sends one API version in the `anthropic-version` header by default, and a new major version comes with each new API version. The first major version that sends `2026-10-21` is 13.0.0; see [Migrating to API version 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21#upgrade). diff --git a/content/en/cli-sdks-libraries/sdks/go.md b/content/en/cli-sdks-libraries/sdks/go.md index 54e97941ed..8e41cba097 100644 --- a/content/en/cli-sdks-libraries/sdks/go.md +++ b/content/en/cli-sdks-libraries/sdks/go.md @@ -14,14 +14,14 @@ The Anthropic Go library provides convenient access to the Claude API from appli ```go import ( - "github.com/anthropics/anthropic-sdk-go" // imported as anthropic + "github.com/anthropics/anthropic-sdk-go/v2" // imported as anthropic ) ``` Install with `go get`: ```bash -go get github.com/anthropics/anthropic-sdk-go +go get github.com/anthropics/anthropic-sdk-go/v2 ``` ## Requirements @@ -37,8 +37,8 @@ import ( "context" "fmt" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/option" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/option" ) func main() { @@ -458,14 +458,9 @@ To handle errors, use the `errors.As` pattern: ```go _, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ MaxTokens: 1024, - Messages: []anthropic.MessageParam{{ - Content: []anthropic.ContentBlockParamUnion{{ - OfText: &anthropic.TextBlockParam{ - Text: "What is a quaternion?", - }, - }}, - Role: anthropic.MessageParamRoleUser, - }}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("What is a quaternion?")), + }, Model: anthropic.ModelClaudeOpus5_5, }) if err != nil { @@ -499,14 +494,9 @@ client := anthropic.NewClient( context.TODO(), anthropic.MessageNewParams{ MaxTokens: 1024, - Messages: []anthropic.MessageParam{{ - Content: []anthropic.ContentBlockParamUnion{{ - OfText: &anthropic.TextBlockParam{ - Text: "What is a quaternion?", - }, - }}, - Role: anthropic.MessageParamRoleUser, - }}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("What is a quaternion?")), + }, Model: anthropic.ModelClaudeOpus5_5, }, option.WithMaxRetries(5), @@ -528,14 +518,9 @@ defer cancel() ctx, anthropic.MessageNewParams{ MaxTokens: 1024, - Messages: []anthropic.MessageParam{{ - Content: []anthropic.ContentBlockParamUnion{{ - OfText: &anthropic.TextBlockParam{ - Text: "What is a quaternion?", - }, - }}, - Role: anthropic.MessageParamRoleUser, - }}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("What is a quaternion?")), + }, Model: anthropic.ModelClaudeOpus5_5, }, // This sets the per-retry timeout @@ -558,7 +543,7 @@ This SDK will also return an error if a non-streaming request is expected to be Request parameters that correspond to file uploads in multipart requests are typed as `io.Reader`. The contents of the `io.Reader` are sent by default as a multipart form part with the file name of `anonymous_file` and content type of `application/octet-stream`, so the recommended approach is to specify a custom content type with the `anthropic.File(reader io.Reader, filename string, contentType string)` helper, which wraps any `io.Reader` with the appropriate file name and content type. ```go -// A file from the file system +// A file from the filesystem file, err := os.Open("/path/to/file.json") anthropic.FileUploadParams{ File: anthropic.File(file, "custom-name.json", "application/json"), @@ -629,7 +614,7 @@ client.Messages.New(context.TODO(), // ..., The request option `option.WithDebugLog(nil)` might be helpful while debugging. -See the [full list of request options](https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/option). +See the [full list of request options](https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/v2/option). ## HTTP client customization @@ -643,19 +628,23 @@ For request middleware (`option.WithMiddleware`) and replacing the default `http * [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) * [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) * [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) - * [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) + * [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) * [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) + + See also [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed).
The Go SDK supports the following platforms: -* **Agent Platform:** `import "github.com/anthropics/anthropic-sdk-go/vertex"`. Use `vertex.WithGoogleAuth(ctx, region, projectID)` or `vertex.WithCredentials(ctx, region, projectID, creds)`. -* **Bedrock:** `import "github.com/anthropics/anthropic-sdk-go/bedrock"`. Use `bedrock.NewMantleClient` for the Messages-API Bedrock endpoint (streams over SSE), or `bedrock.WithLoadDefaultConfig(ctx)` / `bedrock.WithConfig(cfg)` (`bedrock-runtime` path). Importing the `bedrock` package globally registers a decoder for `application/vnd.amazon.eventstream` with the SDK's streaming layer (through package `init()`). This applies whether you use the `bedrock-runtime` `WithConfig`/`WithLoadDefaultConfig` path or `NewMantleClient`. -* **Claude Platform on AWS:** `import anthropicaws "github.com/anthropics/anthropic-sdk-go/aws"`. Use `anthropicaws.NewClient(ctx, cfg)` with an `anthropicaws.ClientConfig` value to construct a client; set `WorkspaceID` on the config or the `ANTHROPIC_AWS_WORKSPACE_ID` environment variable. The `anthropicaws` import alias avoids a name collision with `github.com/aws/aws-sdk-go-v2/aws` when both are imported. Available in beta. -* **Foundry:** `import "github.com/anthropics/anthropic-sdk-go/foundry"`. Use `foundry.NewClient(cfg)` with a `foundry.ClientConfig` value to construct a client; set `APIKey` (or `AzureADTokenProvider` for Microsoft Entra ID) and `Resource` on the config, or the `ANTHROPIC_FOUNDRY_API_KEY` and `ANTHROPIC_FOUNDRY_RESOURCE` environment variables. +* **Claude Models on Google Cloud (Google managed):** `import "github.com/anthropics/anthropic-sdk-go/v2/vertex"`. Use `vertex.WithGoogleAuth(ctx, region, projectID)` or `vertex.WithCredentials(ctx, region, projectID, creds)`. +* **Bedrock:** `import "github.com/anthropics/anthropic-sdk-go/v2/bedrock"`. Use `bedrock.NewMantleClient` for the Messages-API Bedrock endpoint (streams over SSE), or `bedrock.WithLoadDefaultConfig(ctx)` / `bedrock.WithConfig(cfg)` (`bedrock-runtime` path). Importing the `bedrock` package globally registers a decoder for `application/vnd.amazon.eventstream` with the SDK's streaming layer (through package `init()`). This applies whether you use the `bedrock-runtime` `WithConfig`/`WithLoadDefaultConfig` path or `NewMantleClient`. +* **Claude Platform on AWS:** `import anthropicaws "github.com/anthropics/anthropic-sdk-go/v2/aws"`. Use `anthropicaws.NewClient(ctx, cfg)` with an `anthropicaws.ClientConfig` value to construct a client; set `WorkspaceID` on the config or the `ANTHROPIC_AWS_WORKSPACE_ID` environment variable. The `anthropicaws` import alias avoids a name collision with `github.com/aws/aws-sdk-go-v2/aws` when both are imported. Available in beta. +* **Foundry:** `import "github.com/anthropics/anthropic-sdk-go/v2/foundry"`. Use `foundry.NewClient(cfg)` with a `foundry.ClientConfig` value to construct a client; set `APIKey` (or `AzureADTokenProvider` for Microsoft Entra ID) and `Resource` on the config, or the `ANTHROPIC_FOUNDRY_API_KEY` and `ANTHROPIC_FOUNDRY_RESOURCE` environment variables. Use `bedrock.NewMantleClient` for new projects; `bedrock.WithLoadDefaultConfig`/`WithConfig` remain for existing applications using the Bedrock `InvokeModel` API. +The Go SDK also supports Claude Models on Google Cloud (Anthropic managed) through the `github.com/anthropics/anthropic-sdk-go/v2/googlecloud` package. To construct a client, call `googlecloud.NewClient(ctx, cfg)` with a `googlecloud.ClientConfig` value. This client is in beta. Set `WorkspaceID` on the config or set the `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID` environment variable. See [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution) for how the client resolves the workspace ID. + ## Advanced usage ### Accessing raw response data (for example, response headers) @@ -669,14 +658,9 @@ message, err := client.Messages.New( context.TODO(), anthropic.MessageNewParams{ MaxTokens: 1024, - Messages: []anthropic.MessageParam{{ - Content: []anthropic.ContentBlockParamUnion{{ - OfText: &anthropic.TextBlockParam{ - Text: "What is a quaternion?", - }, - }}, - Role: anthropic.MessageParamRoleUser, - }}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("What is a quaternion?")), + }, Model: anthropic.ModelClaudeOpus5_5, }, option.WithResponseInto(&response), @@ -750,6 +734,6 @@ Your feedback is welcome; open an [issue](https://github.com/anthropics/anthropi ## Additional resources * [GitHub repository](https://github.com/anthropics/anthropic-sdk-go) -* [Go package documentation](https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go) +* [Go package documentation](https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/v2) * [API reference](https://platform.claude.com/docs/en/api/overview) * [Streaming Messages](https://platform.claude.com/docs/en/build-with-claude/streaming) diff --git a/content/en/cli-sdks-libraries/sdks/java.md b/content/en/cli-sdks-libraries/sdks/java.md index 699c509324..a51322e2d1 100644 --- a/content/en/cli-sdks-libraries/sdks/java.md +++ b/content/en/cli-sdks-libraries/sdks/java.md @@ -47,15 +47,15 @@ import com.anthropic.models.messages.Message; import com.anthropic.models.messages.MessageCreateParams; import com.anthropic.models.messages.Model; -// Configures using the `anthropic.apiKey`, `anthropic.authToken` and `anthropic.baseUrl` system properties -// Or configures using the `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN` and `ANTHROPIC_BASE_URL` environment variables +// Configures using the `anthropic.apiKey`, `anthropic.authToken`, and `anthropic.baseUrl` system properties +// Or configures using the `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, and `ANTHROPIC_BASE_URL` environment variables AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams params = MessageCreateParams.builder() - .maxTokens(1024L) - .addUserMessage("Hello, Claude") - .model(Model.CLAUDE_OPUS_5_5) - .build(); + .maxTokens(1024L) + .addUserMessage("Hello, Claude") + .model(Model.CLAUDE_OPUS_5_5) + .build(); Message message = client.messages().create(params); ``` @@ -70,8 +70,8 @@ Configure the client using system properties or environment variables: import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; -// Configures using the `anthropic.apiKey`, `anthropic.authToken` and `anthropic.baseUrl` system properties -// Or configures using the `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN` and `ANTHROPIC_BASE_URL` environment variables +// Configures using the `anthropic.apiKey`, `anthropic.authToken`, and `anthropic.baseUrl` system properties +// Or configures using the `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, and `ANTHROPIC_BASE_URL` environment variables AnthropicClient client = AnthropicOkHttpClient.fromEnv(); ``` @@ -82,8 +82,8 @@ import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; AnthropicClient client = AnthropicOkHttpClient.builder() - .apiKey("my-anthropic-api-key") - .build(); + .apiKey("my-anthropic-api-key") + .build(); ``` Or use a combination of both approaches: @@ -93,10 +93,10 @@ import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; AnthropicClient client = AnthropicOkHttpClient.builder() - // Configures using system properties or environment variables - .fromEnv() - .apiKey("my-anthropic-api-key") - .build(); + // Configures using system properties or environment variables + .fromEnv() + .apiKey("my-anthropic-api-key") + .build(); ``` For authentication options including Workload Identity Federation, see [Authentication](https://platform.claude.com/docs/en/manage-claude/authentication). If your API key is a [personal or service account key](https://platform.claude.com/docs/en/manage-claude/authentication#key-types) that isn't scoped to a workspace, set the workspace ID in the `anthropic-workspace-id` request header; [Select a workspace](https://platform.claude.com/docs/en/manage-claude/authentication#select-a-workspace) shows the per-request option for this SDK. @@ -123,8 +123,8 @@ To temporarily use a modified client configuration while reusing the same connec import com.anthropic.client.AnthropicClient; AnthropicClient clientWithOptions = client.withOptions(optionsBuilder -> { - optionsBuilder.baseUrl("https://example.com"); - optionsBuilder.maxRetries(42); + optionsBuilder.baseUrl("https://example.com"); + optionsBuilder.maxRetries(42); }); ``` @@ -144,10 +144,10 @@ import com.anthropic.models.messages.Model; AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams params = MessageCreateParams.builder() - .maxTokens(1024L) - .addUserMessage("Hello, Claude") - .model(Model.CLAUDE_OPUS_5_5) - .build(); + .maxTokens(1024L) + .addUserMessage("Hello, Claude") + .model(Model.CLAUDE_OPUS_5_5) + .build(); CompletableFuture message = client.async().messages().create(params); ``` @@ -164,10 +164,10 @@ import com.anthropic.models.messages.Model; AnthropicClientAsync client = AnthropicOkHttpClientAsync.fromEnv(); MessageCreateParams params = MessageCreateParams.builder() - .maxTokens(1024L) - .addUserMessage("Hello, Claude") - .model(Model.CLAUDE_OPUS_5_5) - .build(); + .maxTokens(1024L) + .addUserMessage("Hello, Claude") + .model(Model.CLAUDE_OPUS_5_5) + .build(); CompletableFuture message = client.messages().create(params); ``` @@ -256,9 +256,9 @@ import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; AnthropicClient client = AnthropicOkHttpClient.builder() - .fromEnv() - .streamHandlerExecutor(Executors.newFixedThreadPool(4)) - .build(); + .fromEnv() + .streamHandlerExecutor(Executors.newFixedThreadPool(4)) + .build(); ``` ### Streaming with message accumulator @@ -278,10 +278,10 @@ MessageAccumulator messageAccumulator = MessageAccumulator.create(); try (StreamResponse streamResponse = client.messages().createStreaming(createParams)) { streamResponse.stream() - .peek(messageAccumulator::accumulate) - .flatMap(event -> event.contentBlockDelta().stream()) - .flatMap(deltaEvent -> deltaEvent.delta().text().stream()) - .forEach(textDelta -> IO.print(textDelta.text())); + .peek(messageAccumulator::accumulate) + .flatMap(event -> event.contentBlockDelta().stream()) + .flatMap(deltaEvent -> deltaEvent.delta().text().stream()) + .forEach(textDelta -> IO.print(textDelta.text())); } Message message = messageAccumulator.message(); @@ -296,12 +296,12 @@ import com.anthropic.models.messages.Message; MessageAccumulator messageAccumulator = MessageAccumulator.create(); client.async().messages() - .createStreaming(createParams) - .subscribe(event -> messageAccumulator.accumulate(event).contentBlockDelta().stream() - .flatMap(deltaEvent -> deltaEvent.delta().text().stream()) - .forEach(textDelta -> IO.print(textDelta.text()))) - .onCompleteFuture() - .join(); + .createStreaming(createParams) + .subscribe(event -> messageAccumulator.accumulate(event).contentBlockDelta().stream() + .flatMap(deltaEvent -> deltaEvent.delta().text().stream()) + .forEach(textDelta -> IO.print(textDelta.text()))) + .onCompleteFuture() + .join(); Message message = messageAccumulator.message(); ``` @@ -331,51 +331,51 @@ import com.fasterxml.jackson.annotation.JsonClassDescription; import com.fasterxml.jackson.annotation.JsonPropertyDescription; enum Unit { - CELSIUS, - FAHRENHEIT; - - public String toString() { - return switch (this) { - case CELSIUS -> "C"; - case FAHRENHEIT -> "F"; - }; - } - - public double fromKelvin(double temperatureK) { - return switch (this) { - case CELSIUS -> temperatureK - 273.15; - case FAHRENHEIT -> (temperatureK - 273.15) * 1.8 + 32.0; - }; - } + CELSIUS, + FAHRENHEIT; + + public String toString() { + return switch (this) { + case CELSIUS -> "C"; + case FAHRENHEIT -> "F"; + }; + } + + public double fromKelvin(double temperatureK) { + return switch (this) { + case CELSIUS -> temperatureK - 273.15; + case FAHRENHEIT -> (temperatureK - 273.15) * 1.8 + 32.0; + }; + } } @JsonClassDescription("Get the weather in a given location") static class GetWeather { - @JsonPropertyDescription("The city and state, e.g. San Francisco, CA") - public String location; - - @JsonPropertyDescription("The unit of temperature") - public Unit unit; - - public Weather execute() { - double temperatureK = switch (location) { - case "San Francisco, CA" -> 300.0; - case "New York, NY" -> 310.0; - case "Dallas, TX" -> 305.0; - default -> 295; - }; - return new Weather(String.format("%.0f%s", unit.fromKelvin(temperatureK), unit)); - } + @JsonPropertyDescription("The city and state, e.g. San Francisco, CA") + public String location; + + @JsonPropertyDescription("The unit of temperature") + public Unit unit; + + public Weather execute() { + double temperatureK = switch (location) { + case "San Francisco, CA" -> 300.0; + case "New York, NY" -> 310.0; + case "Dallas, TX" -> 305.0; + default -> 295; + }; + return new Weather(String.format("%.0f%s", unit.fromKelvin(temperatureK), unit)); + } } static class Weather { - public String temperature; + public String temperature; - public Weather(String temperature) { - this.temperature = temperature; - } + public Weather(String temperature) { + this.temperature = temperature; + } } ``` @@ -394,39 +394,39 @@ import com.anthropic.models.messages.Model; AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams.Builder createParamsBuilder = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(2048) - .addTool(GetWeather.class) - .addUserMessage("What's the temperature in New York?"); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(2048) + .addTool(GetWeather.class) + .addUserMessage("What's the temperature in New York?"); client.beta().messages().create(createParamsBuilder.build()).content().stream() - .flatMap(contentBlock -> contentBlock.toolUse().stream()) - .forEach(toolUseBlock -> createParamsBuilder - // Add a message indicating that the tool use was requested. - .addAssistantMessageOfContentBlockParams( - List.of(BetaContentBlockParam.ofToolUse(BetaToolUseBlockParam.builder() - .name(toolUseBlock.name()) - .id(toolUseBlock.id()) - .input(toolUseBlock._input()) - .build()))) - // Add a message with the result of the requested tool use. - .addUserMessageOfContentBlockParams( - List.of(BetaContentBlockParam.ofToolResult(BetaToolResultBlockParam.builder() - .toolUseId(toolUseBlock.id()) - .contentAsJson(callTool(toolUseBlock)) - .build())))); + .flatMap(contentBlock -> contentBlock.toolUse().stream()) + .forEach(toolUseBlock -> createParamsBuilder + // Add a message indicating that the tool use was requested. + .addAssistantMessageOfContentBlockParams( + List.of(BetaContentBlockParam.ofToolUse(BetaToolUseBlockParam.builder() + .name(toolUseBlock.name()) + .id(toolUseBlock.id()) + .input(toolUseBlock._input()) + .build()))) + // Add a message with the result of the requested tool use. + .addUserMessageOfContentBlockParams( + List.of(BetaContentBlockParam.ofToolResult(BetaToolResultBlockParam.builder() + .toolUseId(toolUseBlock.id()) + .contentAsJson(callTool(toolUseBlock)) + .build())))); client.beta().messages().create(createParamsBuilder.build()).content().stream() - .flatMap(contentBlock -> contentBlock.text().stream()) - .forEach(textBlock -> IO.println(textBlock.text())); + .flatMap(contentBlock -> contentBlock.text().stream()) + .forEach(textBlock -> IO.println(textBlock.text())); private static Object callTool(BetaToolUseBlock toolUseBlock) { - if (!"get_weather".equals(toolUseBlock.name())) { - throw new IllegalArgumentException("Unknown tool: " + toolUseBlock.name()); - } + if (!"get_weather".equals(toolUseBlock.name())) { + throw new IllegalArgumentException("Unknown tool: " + toolUseBlock.name()); + } - GetWeather tool = toolUseBlock.input(GetWeather.class); - return tool != null ? tool.execute() : new Weather("unknown"); + GetWeather tool = toolUseBlock.input(GetWeather.class); + return tool != null ? tool.execute() : new Weather("unknown"); } ``` @@ -440,10 +440,10 @@ You can perform local validation to check that the JSON schema derived from your ```java MessageCreateParams.Builder createParamsBuilder = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(2048) - .addTool(GetWeather.class, JsonSchemaLocalValidation.NO) - .addUserMessage("What's the temperature in New York?"); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(2048) + .addTool(GetWeather.class, JsonSchemaLocalValidation.NO) + .addUserMessage("What's the temperature in New York?"); ``` ### Annotating tool classes @@ -470,13 +470,13 @@ import com.anthropic.models.files.FileMetadata; import com.anthropic.models.files.FileUploadParams; FileUploadParams params = FileUploadParams.builder() - .file( - MultipartField.builder() - .value(Files.newInputStream(Paths.get("/path/to/file.pdf"))) - .contentType("application/pdf") - .build() - ) - .build(); + .file( + MultipartField.builder() + .value(Files.newInputStream(Paths.get("/path/to/file.pdf"))) + .contentType("application/pdf") + .build() + ) + .build(); FileMetadata fileMetadata = client.files().upload(params); ``` @@ -489,14 +489,14 @@ import com.anthropic.models.files.FileMetadata; import com.anthropic.models.files.FileUploadParams; FileUploadParams params = FileUploadParams.builder() - .file( - MultipartField.builder() - .value(URI.create("https://example.com/path/to/file").toURL().openStream()) - .filename("document.pdf") - .contentType("application/pdf") - .build() - ) - .build(); + .file( + MultipartField.builder() + .value(URI.create("https://example.com/path/to/file").toURL().openStream()) + .filename("document.pdf") + .contentType("application/pdf") + .build() + ) + .build(); FileMetadata fileMetadata = client.files().upload(params); ``` @@ -509,14 +509,14 @@ import com.anthropic.models.files.FileMetadata; import com.anthropic.models.files.FileUploadParams; FileUploadParams params = FileUploadParams.builder() - .file( - MultipartField.builder() - .value(new ByteArrayInputStream("content".getBytes())) - .filename("document.txt") - .contentType("text/plain") - .build() - ) - .build(); + .file( + MultipartField.builder() + .value(new ByteArrayInputStream("content".getBytes())) + .filename("document.txt") + .contentType("text/plain") + .build() + ) + .build(); FileMetadata fileMetadata = client.files().upload(params); ``` @@ -637,7 +637,10 @@ To set a custom number of retries, configure the client using the `maxRetries` m import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; -AnthropicClient client = AnthropicOkHttpClient.builder().fromEnv().maxRetries(4).build(); +AnthropicClient client = AnthropicOkHttpClient.builder() + .fromEnv() + .maxRetries(4) + .build(); ``` ## Timeouts @@ -668,8 +671,10 @@ To set a custom timeout per-request: import com.anthropic.models.messages.Message; Message message = client - .messages() - .create(params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()); + .messages() + .create(params, RequestOptions.builder() + .timeout(Duration.ofSeconds(30)) + .build()); ``` Or configure the default for all method calls at the client level: @@ -679,9 +684,9 @@ import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; AnthropicClient client = AnthropicOkHttpClient.builder() - .fromEnv() - .timeout(Duration.ofSeconds(30)) - .build(); + .fromEnv() + .timeout(Duration.ofSeconds(30)) + .build(); ``` ## Long requests @@ -797,13 +802,15 @@ Each class in the SDK has an associated builder for constructing it. Each class ```java MessageCreateParams params = MessageCreateParams.builder() - .maxTokens(1024L) - .addUserMessage("Hello, Claude") - .model(Model.CLAUDE_OPUS_5_5) - .build(); + .maxTokens(1024L) + .addUserMessage("Hello, Claude") + .model(Model.CLAUDE_OPUS_5_5) + .build(); // Create a modified copy using toBuilder() -MessageCreateParams modified = params.toBuilder().maxTokens(2048L).build(); +MessageCreateParams modified = params.toBuilder() + .maxTokens(2048L) + .build(); ``` Because each class is immutable, builder modification never affects already built class instances. @@ -823,10 +830,10 @@ import com.anthropic.core.JsonValue; import com.anthropic.models.messages.MessageCreateParams; MessageCreateParams params = MessageCreateParams.builder() - .putAdditionalHeader("Secret-Header", "42") - .putAdditionalQueryParam("secret_query_param", "42") - .putAdditionalBodyProperty("secretProperty", JsonValue.from("42")) - .build(); + .putAdditionalHeader("Secret-Header", "42") + .putAdditionalQueryParam("secret_query_param", "42") + .putAdditionalBodyProperty("secretProperty", JsonValue.from("42")) + .build(); ``` These can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods. @@ -843,10 +850,12 @@ import com.anthropic.models.messages.MessageCreateParams; import com.anthropic.models.messages.Metadata; MessageCreateParams params = MessageCreateParams.builder() - .metadata( - Metadata.builder().putAdditionalProperty("secretProperty", JsonValue.from("42")).build() - ) - .build(); + .metadata( + Metadata.builder() + .putAdditionalProperty("secretProperty", JsonValue.from("42")) + .build() + ) + .build(); ``` These properties can be accessed on the nested built object later using the `_additionalProperties()` method. @@ -859,10 +868,10 @@ import com.anthropic.models.messages.MessageCreateParams; import com.anthropic.models.messages.Model; MessageCreateParams params = MessageCreateParams.builder() - .maxTokens(JsonValue.from(3.14)) - .addUserMessage("Hello, Claude") - .model(Model.CLAUDE_OPUS_5_5) - .build(); + .maxTokens(JsonValue.from(3.14)) + .addUserMessage("Hello, Claude") + .model(Model.CLAUDE_OPUS_5_5) + .build(); ``` ### JsonValue creation @@ -902,10 +911,10 @@ import com.anthropic.models.messages.MessageCreateParams; import com.anthropic.models.messages.Model; MessageCreateParams params = MessageCreateParams.builder() - .addUserMessage("Hello, world") - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(JsonMissing.of()) - .build(); + .addUserMessage("Hello, world") + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(JsonMissing.of()) + .build(); ``` ### Response properties @@ -916,9 +925,9 @@ To access undocumented response properties, call the `_additionalProperties()` m import com.anthropic.core.JsonValue; Map additionalProperties = client - .messages() - .create(params) - ._additionalProperties(); + .messages() + .create(params) + ._additionalProperties(); JsonValue secretPropertyValue = additionalProperties.get("secretProperty"); @@ -953,16 +962,16 @@ import com.anthropic.models.messages.StopReason; JsonField stopReason = client.messages().create(params)._stopReason(); if (stopReason.isMissing()) { - // The property is absent from the JSON response + // The property is absent from the JSON response } else if (stopReason.isNull()) { - // The property was set to literal null + // The property was set to literal null } else { - // Check if value was provided as a string - // Other methods include `asNumber()`, `asBoolean()`, etc. - Optional jsonString = stopReason.asString(); + // Check if value was provided as a string + // Other methods include `asNumber()` and `asBoolean()`. + Optional jsonString = stopReason.asString(); - // Try to deserialize into a custom type - MyClass myObject = stopReason.asUnknown().orElseThrow().convert(MyClass.class); + // Try to deserialize into a custom type + MyClass myObject = stopReason.asUnknown().orElseThrow().convert(MyClass.class); } ``` @@ -984,8 +993,10 @@ Or configure per-request: import com.anthropic.models.messages.Message; Message message = client - .messages() - .create(params, RequestOptions.builder().responseValidation(true).build()); + .messages() + .create(params, RequestOptions.builder() + .responseValidation(true) + .build()); ``` Or configure the default for all method calls at the client level: @@ -995,9 +1006,9 @@ import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; AnthropicClient client = AnthropicOkHttpClient.builder() - .fromEnv() - .responseValidation(true) - .build(); + .fromEnv() + .responseValidation(true) + .build(); ``` ## HTTP client customization @@ -1010,9 +1021,9 @@ import com.anthropic.client.okhttp.AnthropicOkHttpClient; import java.net.Proxy; AnthropicClient client = AnthropicOkHttpClient.builder() - .fromEnv() - .proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("https://example.com", 8080))) - .build(); + .fromEnv() + .proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("https://example.com", 8080))) + .build(); ``` ### HTTPS / SSL configuration @@ -1026,11 +1037,11 @@ import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; AnthropicClient client = AnthropicOkHttpClient.builder() - .fromEnv() - .sslSocketFactory(yourSSLSocketFactory) - .trustManager(yourTrustManager) - .hostnameVerifier(yourHostnameVerifier) - .build(); + .fromEnv() + .sslSocketFactory(yourSSLSocketFactory) + .trustManager(yourTrustManager) + .hostnameVerifier(yourHostnameVerifier) + .build(); ``` ### Custom HTTP client @@ -1071,19 +1082,23 @@ To use a completely custom HTTP client: * [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) * [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) * [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) - * [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) + * [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) * [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) + + See also [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). The Java SDK supports the following platforms through separate dependencies that provide platform-specific `Backend` implementations: -* **Agent Platform:** `com.anthropic:anthropic-java-vertex`: Use `VertexBackend.builder()` or `VertexBackend.fromEnv()`. `fromEnv()` reads `CLOUD_ML_REGION` and `ANTHROPIC_VERTEX_PROJECT_ID` and uses Application Default Credentials. +* **Claude Models on Google Cloud (Google managed):** `com.anthropic:anthropic-java-vertex`: Use `VertexBackend.builder()` or `VertexBackend.fromEnv()`. `fromEnv()` reads `CLOUD_ML_REGION` and `ANTHROPIC_VERTEX_PROJECT_ID` and uses Application Default Credentials. * **Bedrock:** `com.anthropic:anthropic-java-bedrock`: Use `BedrockMantleBackend.fromEnv()` or `BedrockMantleBackend.builder()` for the Messages-API Bedrock endpoint, or `BedrockBackend.fromEnv()` / `BedrockBackend.builder()` (`bedrock-runtime` path). * **Claude Platform on AWS:** `com.anthropic:anthropic-java-aws`: Use `AwsBackend.fromEnv()` (reads `ANTHROPIC_AWS_WORKSPACE_ID` and the AWS default region/credential chain) or `AwsBackend.builder()`. Available in beta. * **Foundry:** `com.anthropic:anthropic-java-foundry`: Use `FoundryBackend.fromEnv()` or `FoundryBackend.builder()`. Use `BedrockMantleBackend` for new projects; `BedrockBackend` remains for existing applications using the Bedrock `InvokeModel` API. +The Java SDK also supports Claude Models on Google Cloud (Anthropic managed) through `GoogleCloudBackend`, from the `com.anthropic:anthropic-java-google-cloud` dependency. This backend is in beta. Create it with `GoogleCloudBackend.builder()` or `GoogleCloudBackend.fromEnv()`. `fromEnv()` reads `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID`, `ANTHROPIC_GOOGLE_CLOUD_PROJECT`, and Google Application Default Credentials. See [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution). + The platform artifacts are add-ons to the base `com.anthropic:anthropic-java` dependency, which provides `AnthropicOkHttpClient`, so install both. Each `Backend` implementation is passed to the client with `.backend()` on `AnthropicOkHttpClient.builder()`. Each cloud backend pulls in its respective cloud-platform SDK classes as transitive dependencies. ## Advanced usage @@ -1100,10 +1115,10 @@ import com.anthropic.models.messages.MessageCreateParams; import com.anthropic.models.messages.Model; MessageCreateParams params = MessageCreateParams.builder() - .maxTokens(1024L) - .addUserMessage("Hello, Claude") - .model(Model.CLAUDE_OPUS_5_5) - .build(); + .maxTokens(1024L) + .addUserMessage("Hello, Claude") + .model(Model.CLAUDE_OPUS_5_5) + .build(); HttpResponseFor message = client.messages().withRawResponse().create(params); @@ -1186,10 +1201,10 @@ Builder methods that take these types often also provide a `String` overload tha import com.anthropic.models.messages.MessageCreateParams; MessageCreateParams params = MessageCreateParams.builder() - .model("some-new-model") // same as .model(Model.of("some-new-model")) - .maxTokens(1024L) - .addUserMessage("Hello, Claude") - .build(); + .model("some-new-model") // same as .model(Model.of("some-new-model")) + .maxTokens(1024L) + .addUserMessage("Hello, Claude") + .build(); ``` Prefer the well-typed constants (for example, `Model.CLAUDE_OPUS_5`) so you get auto-complete and deprecation warnings. The `String` overloads and `of(...)` are primarily for setting the field to an undocumented or not yet supported value while waiting for an SDK release that includes it. diff --git a/content/en/cli-sdks-libraries/sdks/php.md b/content/en/cli-sdks-libraries/sdks/php.md index d4e506c0e4..ae7cc93b86 100644 --- a/content/en/cli-sdks-libraries/sdks/php.md +++ b/content/en/cli-sdks-libraries/sdks/php.md @@ -30,9 +30,9 @@ This library uses named parameters to specify optional arguments. Parameters wit $client = new Client(); $message = $client->messages->create( - maxTokens: 1024, - messages: [['role' => 'user', 'content' => 'Hello, Claude']], - model: 'claude-opus-5-5', + maxTokens: 1024, + messages: [['role' => 'user', 'content' => 'Hello, Claude']], + model: 'claude-opus-5-5', ); $textBlock = array_find($message->content, static fn ($block): bool => $block->type === 'text'); @@ -43,9 +43,9 @@ For authentication options including Workload Identity Federation, see [Authenti ## Value objects -The recommended way to initialize value objects is the static `with` constructor `Base64ImageSource::with(data: "U3RhaW5sZXNzIHJvY2tz", ...)` with named parameters. +The recommended way to initialize value objects is the static `with` constructor `Base64ImageSource::with(data: 'U3RhaW5sZXNzIHJvY2tz', ...)` with named parameters. -However, builders are also provided `(new Base64ImageSource)->withData("U3RhaW5sZXNzIHJvY2tz")`. +However, builders are also provided, for example `(new Base64ImageSource())->withData('U3RhaW5sZXNzIHJvY2tz')`. ## Streaming @@ -55,13 +55,13 @@ The SDK provides support for streaming responses using Server-Sent Events (SSE). $client = new Client(); $stream = $client->messages->createStream( - maxTokens: 1024, - messages: [['role' => 'user', 'content' => 'Hello, Claude']], - model: 'claude-opus-5-5', + maxTokens: 1024, + messages: [['role' => 'user', 'content' => 'Hello, Claude']], + model: Model::CLAUDE_OPUS_5_5, ); foreach ($stream as $event) { - echo $event->type . PHP_EOL; + echo $event->type . PHP_EOL; } ``` @@ -69,7 +69,7 @@ Streaming requires an HTTP client that returns the response body incrementally. ```php $client = new Client( - requestOptions: RequestOptions::with(streamingTransporter: $myStreamingClient), + requestOptions: RequestOptions::with(streamingTransporter: $myStreamingClient), ); ``` @@ -83,21 +83,22 @@ When the library is unable to connect to the API, or if the API returns a non-su use Anthropic\Core\Exceptions\APIConnectionException; use Anthropic\Core\Exceptions\APIStatusException; use Anthropic\Core\Exceptions\RateLimitException; +use Anthropic\Messages\Model; // ... try { - $message = $client->messages->create( - maxTokens: 1024, - messages: [['role' => 'user', 'content' => 'Hello, Claude']], - model: 'claude-opus-5-5', - ); + $message = $client->messages->create( + maxTokens: 1024, + messages: [['role' => 'user', 'content' => 'Hello, Claude']], + model: Model::CLAUDE_OPUS_5_5, + ); } catch (APIConnectionException $e) { - echo "The server could not be reached", PHP_EOL; - echo $e->getPrevious()?->getMessage(), PHP_EOL; + echo 'The server could not be reached', PHP_EOL; + echo $e->getPrevious()?->getMessage(), PHP_EOL; } catch (RateLimitException $_) { - echo "A 429 status code was received; we should back off a bit.", PHP_EOL; + echo 'A 429 status code was received; we should back off a bit.', PHP_EOL; } catch (APIStatusException $e) { - echo "Another non-200-range status code was received", PHP_EOL; - echo $e->getMessage(); + echo 'Another non-200-range status code was received', PHP_EOL; + echo $e->getMessage(); } ``` @@ -126,6 +127,7 @@ Connection errors (for example, because of a network connectivity problem), 408 You can use the `maxRetries` option to configure or disable this: ```php +use Anthropic\Messages\Model; use Anthropic\RequestOptions; // ... // Configure the default for all requests: @@ -133,10 +135,10 @@ $client = new Client(requestOptions: RequestOptions::with(maxRetries: 0)); // Or, configure per-request: $result = $client->messages->create( - maxTokens: 1024, - messages: [['role' => 'user', 'content' => 'Hello, Claude']], - model: 'claude-opus-5-5', - requestOptions: RequestOptions::with(maxRetries: 5), + maxTokens: 1024, + messages: [['role' => 'user', 'content' => 'Hello, Claude']], + model: Model::CLAUDE_OPUS_5_5, + requestOptions: RequestOptions::with(maxRetries: 5), ); ``` @@ -153,12 +155,12 @@ $page = $client->beta->messages->batches->list(limit: 20); // fetch items from the current page foreach ($page->getItems() as $item) { - echo $item->id, PHP_EOL; + echo $item->id, PHP_EOL; } // make additional network requests to fetch items from all pages, including and after the current page // ... foreach ($page->pagingEachItem() as $item) { - echo $item->id, PHP_EOL; + echo $item->id, PHP_EOL; // ... } ``` @@ -179,14 +181,14 @@ You can send undocumented parameters to any endpoint, and read undocumented resp use Anthropic\RequestOptions; // ... $message = $client->messages->create( - maxTokens: 1024, - messages: [['role' => 'user', 'content' => 'Hello, Claude']], - model: 'claude-opus-5-5', - requestOptions: RequestOptions::with( - extraQueryParams: ['my_query_parameter' => 'value'], - extraBodyParams: ['my_body_parameter' => 'value'], - extraHeaders: ['my-header' => 'value'], - ), + maxTokens: 1024, + messages: [['role' => 'user', 'content' => 'Hello, Claude']], + model: 'claude-opus-5-5', + requestOptions: RequestOptions::with( + extraQueryParams: ['my_query_parameter' => 'value'], + extraBodyParams: ['my_body_parameter' => 'value'], + extraHeaders: ['my-header' => 'value'], + ), ); ``` @@ -202,11 +204,11 @@ To make requests to undocumented endpoints while retaining the benefit of authen $client = new Client(); $response = $client->request( - method: "post", - path: '/undocumented/endpoint', - query: ['dog' => 'woof'], - headers: ['useful-header' => 'interesting-value'], - body: ['hello' => 'world'] + method: 'post', + path: '/undocumented/endpoint', + query: ['dog' => 'woof'], + headers: ['useful-header' => 'interesting-value'], + body: ['hello' => 'world'] ); ``` @@ -218,13 +220,15 @@ $response = $client->request( * [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) * [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) * [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) - * [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) + * [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) * [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) + + See also [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). The PHP SDK supports the following platforms: -* **Agent Platform:** `Anthropic\Vertex\Client`. Use `::fromEnvironment()`. +* **Claude Models on Google Cloud (Google managed):** `Anthropic\Vertex\Client`. Use `::fromEnvironment()`. * **Bedrock:** `Anthropic\Bedrock\MantleClient`. Use `new MantleClient(awsRegion: ...)`. * **Bedrock (legacy):** `Anthropic\Bedrock\Client`. Use `::fromEnvironment()` or `::withCredentials()`. * **Claude Platform on AWS:** `Anthropic\Aws\Client` (requires `aws/aws-sdk-php` as a soft dependency). Use `new Anthropic\Aws\Client(workspaceId: ...)` or set `ANTHROPIC_AWS_WORKSPACE_ID`. Available in beta. @@ -232,9 +236,11 @@ The PHP SDK supports the following platforms: Use `MantleClient` for new projects; `Anthropic\Bedrock\Client` remains for existing applications using the Bedrock `InvokeModel` API. +The PHP SDK also supports Claude Models on Google Cloud (Anthropic managed) through `Anthropic\GoogleCloud\Client`. This client is in beta. `Anthropic\GoogleCloud\Client` requires `google/auth` as a soft dependency. Use `new Anthropic\GoogleCloud\Client(workspaceId: ...)` or set the `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID` environment variable. See [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution). + ## Semantic versioning -Each major version of this SDK sends one API version in the `anthropic-version` header by default, and a new major version comes with each new API version. The first major version that sends `2026-10-21` is 1.0.0; see [Upgrade to 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21#upgrade). +Each major version of this SDK sends one API version by default, and a new major version comes with each new API version. The first major version that sends `2026-10-21` is 1.0.0; see [Switch to 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21#upgrade). This package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. diff --git a/content/en/cli-sdks-libraries/sdks/python.md b/content/en/cli-sdks-libraries/sdks/python.md index 31078fdb27..c235ad78af 100644 --- a/content/en/cli-sdks-libraries/sdks/python.md +++ b/content/en/cli-sdks-libraries/sdks/python.md @@ -4,7 +4,7 @@ url: https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/python description: Install and configure the Anthropic Python SDK with sync and async client support --- -The Anthropic Python SDK provides convenient access to the Claude API from Python applications. It supports both synchronous and asynchronous operations, streaming, and integrations with Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry. +The Anthropic Python SDK provides convenient access to the Claude API from Python applications. It supports both synchronous and asynchronous operations, streaming, and integrations with Amazon Bedrock, Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed), Claude Models on Google Cloud (Google managed), and Microsoft Foundry. For API feature documentation with code examples, see the [API reference](https://platform.claude.com/docs/en/api/overview). This page covers Python-specific SDK features and configuration. @@ -22,7 +22,7 @@ For platform-specific integrations or improved async performance, install with e # For Amazon Bedrock support pip install "anthropic[bedrock]" -# For Google Cloud support +# For Claude Models on Google Cloud (Google managed) support pip install "anthropic[vertex]" # For Claude Platform on AWS support @@ -34,6 +34,8 @@ pip install "anthropic[aws]" pip install "anthropic[aiohttp]" ``` +To use Claude Models on Google Cloud (Anthropic managed), run `pip install "anthropic[google_cloud]"`. + ## Requirements Python 3.10 or later is required. If you are upgrading from a 0.x release of the SDK, see the [v1 migration guide](https://github.com/anthropics/anthropic-sdk-python/blob/main/MIGRATION.md) for the list of breaking changes. @@ -739,21 +741,24 @@ response = client.beta.messages.create( * [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) * [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) * [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) - * [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) + * [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) * [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) + + See also [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). -All five client classes are included in the base `anthropic` package: +All six client classes are included in the base `anthropic` package: -| Provider | Client | Extra dependencies | -| -------------------------------- | ---------------------------------------------- | ---------------------------------- | -| Agent Platform | `from anthropic import AnthropicVertex` | `pip install "anthropic[vertex]"` | -| Bedrock | `from anthropic import AnthropicBedrockMantle` | `pip install "anthropic[bedrock]"` | -| Bedrock (`bedrock-runtime` path) | `from anthropic import AnthropicBedrock` | `pip install "anthropic[bedrock]"` | -| Claude Platform on AWS | `from anthropic import AnthropicAWS` | `pip install "anthropic[aws]"` | -| Foundry | `from anthropic import AnthropicFoundry` | None | +| Provider | Client | Extra dependencies | +| ------------------------------------------------- | ---------------------------------------------- | --------------------------------------- | +| Claude Models on Google Cloud (Google managed) | `from anthropic import AnthropicVertex` | `pip install "anthropic[vertex]"` | +| Bedrock | `from anthropic import AnthropicBedrockMantle` | `pip install "anthropic[bedrock]"` | +| Bedrock (`bedrock-runtime` path) | `from anthropic import AnthropicBedrock` | `pip install "anthropic[bedrock]"` | +| Claude Platform on AWS | `from anthropic import AnthropicAWS` | `pip install "anthropic[aws]"` | +| Claude Models on Google Cloud (Anthropic managed) | `from anthropic import AnthropicGoogleCloud` | `pip install "anthropic[google_cloud]"` | +| Foundry | `from anthropic import AnthropicFoundry` | None | -The `AnthropicAWS` client is in beta. Pass `workspace_id` to the constructor or set the `ANTHROPIC_AWS_WORKSPACE_ID` environment variable. +The `AnthropicAWS` client is in beta. Pass `workspace_id` to the constructor or set the `ANTHROPIC_AWS_WORKSPACE_ID` environment variable. The `AnthropicGoogleCloud` client is also in beta. Pass `workspace_id` to the constructor or set the `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID` environment variable. See [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution) for how the client resolves the workspace ID. Use `AnthropicBedrockMantle` for new projects; `AnthropicBedrock` remains for existing applications using the Bedrock `InvokeModel` API. diff --git a/content/en/cli-sdks-libraries/sdks/ruby.md b/content/en/cli-sdks-libraries/sdks/ruby.md index abafb84c67..51f363a8cb 100644 --- a/content/en/cli-sdks-libraries/sdks/ruby.md +++ b/content/en/cli-sdks-libraries/sdks/ruby.md @@ -236,13 +236,13 @@ Request parameters that correspond to file uploads can be passed as raw contents anthropic = Anthropic::Client.new require "pathname" -# Use `Pathname` to send the filename, avoid paging a large file into memory, or both: +# Use `Pathname` to send the file name, avoid paging a large file into memory, or both: file_metadata = anthropic.files.upload(file: Pathname("/path/to/file")) # Alternatively, pass file contents or a `StringIO` directly: file_metadata = anthropic.files.upload(file: File.read("/path/to/file")) -# Or, to control the filename, the content type, or both: +# Or, to control the file name, the content type, or both: file = Anthropic::FilePart.new(File.read("/path/to/file"), filename: "/path/to/file", content_type: "...") file_metadata = anthropic.files.upload(file: file) @@ -395,18 +395,22 @@ response = anthropic.request( * [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) * [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) * [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) - * [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) + * [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) + + See also [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). The Ruby SDK supports the following platforms: -* **Agent Platform:** `Anthropic::VertexClient`. Requires the `googleauth` gem. +* **Claude Models on Google Cloud (Google managed):** `Anthropic::VertexClient`. Requires the `googleauth` gem. * **Bedrock:** `Anthropic::BedrockMantleClient`, or `Anthropic::BedrockClient` for the `bedrock-runtime` path. `Anthropic::BedrockMantleClient` requires the `aws-sdk-core` gem; `Anthropic::BedrockClient` requires the `aws-sdk-bedrockruntime` gem. * **Claude Platform on AWS:** Part of the main `anthropic` gem (requires the `aws-sdk-core` gem). Provides `Anthropic::AWSClient`. Pass `workspace_id:` to the constructor or set the `ANTHROPIC_AWS_WORKSPACE_ID` environment variable (see [Workspaces](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#workspaces)). Available in beta. * **Foundry:** Not currently supported in the Ruby SDK. See [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) for supported SDKs. Use `Anthropic::BedrockMantleClient` for new projects; `Anthropic::BedrockClient` remains for existing applications using the Bedrock `InvokeModel` API. +The Ruby SDK also supports Claude Models on Google Cloud (Anthropic managed) through `Anthropic::GoogleCloudClient`. This client is in beta. It ships in the main `anthropic` gem and needs the `googleauth` gem. Pass `workspace_id:` to the constructor or set the `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID` environment variable. See [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution) for how the client resolves the workspace ID. + ## Semantic versioning Each major version of this SDK sends one API version in the `anthropic-version` header by default, and a new major version comes with each new API version. The first major version that sends `2026-10-21` is 2.0.0; see [Migrating to API version 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21#upgrade). diff --git a/content/en/cli-sdks-libraries/sdks/typescript.md b/content/en/cli-sdks-libraries/sdks/typescript.md index cb171f520a..2d6fc42e1c 100644 --- a/content/en/cli-sdks-libraries/sdks/typescript.md +++ b/content/en/cli-sdks-libraries/sdks/typescript.md @@ -767,19 +767,23 @@ const response = await client.beta.messages.create({ * [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) * [Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) * [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) - * [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) + * [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) * [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) + + See also [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). The TypeScript SDK supports the following platforms: -* **Agent Platform:** `npm install @anthropic-ai/vertex-sdk`: Provides `AnthropicVertex` client +* **Claude Models on Google Cloud (Google managed):** `npm install @anthropic-ai/vertex-sdk`: Provides `AnthropicVertex` client * **Bedrock:** `npm install @anthropic-ai/bedrock-sdk`: Provides `AnthropicBedrockMantle` client, and `AnthropicBedrock` for the `bedrock-runtime` path * **Claude Platform on AWS:** `npm install @anthropic-ai/aws-sdk`: Provides `AnthropicAws` client. Pass `workspaceId` to the constructor or set the `ANTHROPIC_AWS_WORKSPACE_ID` environment variable. Available in beta. * **Foundry:** `npm install @anthropic-ai/foundry-sdk`: Provides `AnthropicFoundry` client Use `AnthropicBedrockMantle` for new projects; `AnthropicBedrock` remains for existing applications using the Bedrock `InvokeModel` API. +The TypeScript SDK also supports Claude Models on Google Cloud (Anthropic managed) through the `AnthropicGoogleCloud` client. This client is in beta. To install it, run `npm install @anthropic-ai/google-cloud-sdk`. Pass `workspaceId` to the constructor or set the `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID` environment variable. See [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution) for how the client resolves the workspace ID. + ## Semantic versioning Each major version of this SDK sends one API version in the `anthropic-version` header by default, and a new major version comes with each new API version. The first major version that sends `2026-10-21` is 1.0.0; see [Migrating to API version 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21#upgrade). diff --git a/content/en/docs/claude-code/agent-sdk/file-checkpointing.md b/content/en/docs/claude-code/agent-sdk/file-checkpointing.md index a569498bd6..9d16cc2050 100644 --- a/content/en/docs/claude-code/agent-sdk/file-checkpointing.md +++ b/content/en/docs/claude-code/agent-sdk/file-checkpointing.md @@ -10,7 +10,7 @@ File checkpointing tracks file modifications made through the [Write](/docs/en/t > [!WARNING] > -> Only changes made through the Write, Edit, and NotebookEdit tools are tracked. Changes made through Bash commands (like `echo > file.txt` or `sed -i`) are not captured by the checkpoint system, and neither are edits a [subagent](/docs/en/agent-sdk/subagents.md) applies, except a [skill with `context: fork`](/docs/en/skills#run-skills-in-a-subagent) that runs in the foreground. +> `rewindFiles()` doesn't undo what `sed -i` or another Bash command did to a file, unless a tool such as Write or Edit had modified that file in the main conversation. [Subagent](/docs/en/agent-sdk/subagents.md) edits aren't tracked, while edits from a [skill with `context: fork`](/docs/en/skills#run-skills-in-a-subagent) running in the foreground are. ## How checkpointing works @@ -605,7 +605,7 @@ File checkpointing has the following limitations: | Limitation | Description | | - | - | -| Write/Edit/NotebookEdit tools only | Changes made through Bash commands are not tracked | +| Bash command changes | Rewinding doesn't undo changes a Bash command made, except in files the main conversation had already edited with a tool such as Write or Edit | | Subagent edits | Edits a [subagent](/docs/en/agent-sdk/subagents.md) applies aren't tracked, except a skill with `context: fork` running in the foreground. A rewind reverts them only in files the main conversation had already edited; use git to revert the rest | | Same session | Checkpoints are tied to the session that created them | | File content only | Creating, moving, or deleting directories is not undone by rewinding | diff --git a/content/en/docs/claude-code/agent-sdk/observability.md b/content/en/docs/claude-code/agent-sdk/observability.md index 1c86f03115..bd250288eb 100644 --- a/content/en/docs/claude-code/agent-sdk/observability.md +++ b/content/en/docs/claude-code/agent-sdk/observability.md @@ -224,7 +224,14 @@ const options = { }; ``` -With end-user identity attached, the `tool_decision`, `tool_result`, `mcp_server_connection`, and `permission_mode_changed` events, which export as log records named with a `claude_code.` prefix, become a per-user audit trail you can forward to a Security Information and Event Management (SIEM) platform. See [Audit security events](/docs/en/monitoring-usage.md#audit-security-events) in the Monitoring reference for the full list of security-relevant events and the attributes each one carries. +After you attach end-user identity, these events become a per-user audit trail you can forward to a Security Information and Event Management (SIEM) platform: + +* `tool_decision` and `tool_result`: each tool call, whether it was allowed or denied, and its result +* `safety_event`: which check refused a tool call or required a permission prompt for it, such as a permission rule or the auto mode classifier. Some calls [have no safety event](/docs/en/monitoring-usage.md#calls-without-a-safety-event). Requires Claude Code v2.1.307 or later +* `mcp_server_connection`: MCP server connections and connection failures +* `permission_mode_changed`: permission mode changes + +These events export as log records named with a `claude_code.` prefix, such as `claude_code.safety_event`. See [Audit security events](/docs/en/monitoring-usage.md#audit-security-events) in the Monitoring reference for the full list of security-relevant events and the attributes each one carries. ## Control sensitive data in exports @@ -233,7 +240,7 @@ Telemetry is structural by default. Durations, model names, and tool names are r | Variable | Adds | | - | - | | `OTEL_LOG_USER_PROMPTS=1` | Prompt text on `claude_code.user_prompt` events and on the `claude_code.interaction` span | -| `OTEL_LOG_TOOL_DETAILS=1` | Tool input arguments such as file paths, shell commands, and search patterns on `claude_code.tool_result` events, and real agent, skill, plugin, and MCP server names on the [cost and token metrics](/docs/en/monitoring-usage.md#cost-counter) | +| `OTEL_LOG_TOOL_DETAILS=1` | Tool input arguments such as file paths, shell commands, and search patterns on `claude_code.tool_result` events, and real agent, skill, plugin, and MCP server names on the [cost and token metrics](/docs/en/monitoring-usage.md#cost-counter). The built-in rule the auto mode classifier named when it blocked a call, as [`classifier_category`](/docs/en/monitoring-usage#tool-decision-event) on `claude_code.tool_decision` and `claude_code.safety_event` events | | `OTEL_LOG_TOOL_CONTENT=1` | A [`tool.output` span event](/docs/en/monitoring-usage#tool-output-span-event) on `claude_code.tool` with file contents, Bash output, and what MCP tools, WebFetch, and WebSearch return, truncated at 60 KB by default, configurable via `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`, which requires Claude Code v2.1.214 or later. Results from MCP tools, WebFetch, and WebSearch require Claude Code v2.1.283 or later. Requires [tracing](#read-agent-traces) to be enabled. Span attributes carry tool content under [their own gates](/docs/en/monitoring-usage.md#new-context-gates) | | `OTEL_LOG_RAW_API_BODIES` | Full Anthropic Messages API request and response JSON as `claude_code.api_request_body` and `claude_code.api_response_body` log events. Set to `1` for inline bodies truncated at 60 KB by default, or `file:` for untruncated bodies on disk with a `body_ref` path in the event. `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH` configures the inline truncation limit, and requires Claude Code v2.1.214 or later. Bodies include the entire conversation history and have extended-thinking content redacted. Enabling this implies consent to everything the three variables above would reveal | diff --git a/content/en/docs/claude-code/agent-sdk/permissions.md b/content/en/docs/claude-code/agent-sdk/permissions.md index 120594fc41..9c7c7a0776 100644 --- a/content/en/docs/claude-code/agent-sdk/permissions.md +++ b/content/en/docs/claude-code/agent-sdk/permissions.md @@ -134,7 +134,9 @@ The SDK supports these permission modes: > [!WARNING] > -> **Subagent inheritance:** A subagent runs in the parent session's permission mode unless you set `permissionMode` on its [`AgentDefinition`](/docs/en/agent-sdk/typescript#agentdefinition) and the parent session is in `default`, `dontAsk`, or `plan` mode. Even then, Claude Code never applies a `"bypassPermissions"` value, and applies an `"auto"` value only when [auto mode is available](/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) to that subagent. A subagent runs in `bypassPermissions` mode only when the parent session itself does. The `bypassPermissions` exception requires Claude Code v2.1.267 or later. +> **Subagent inheritance:** If your main session is in [plan mode](/docs/en/permission-modes.md#analyze-before-you-edit-with-plan-mode), a subagent whose [`AgentDefinition`](/docs/en/agent-sdk/typescript#agentdefinition) sets `permissionMode: "acceptEdits"` still runs in plan mode. That subagent's `Edit` and `Write` calls on your source files still go to your `canUseTool` callback. Plan mode holds for the subagents you define too, so that handing work to one doesn't get around reviewing the plan first. +> +> The subagent inherits `plan`, `acceptEdits`, `auto`, or `bypassPermissions` from the main session, and under a `default`- or `dontAsk`-mode main session it runs in the mode you set. Even then, Claude Code never applies a `"bypassPermissions"` value, and applies an `"auto"` value only when [auto mode is available](/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) to that subagent. The `bypassPermissions` exception requires Claude Code v2.1.267 or later. > > Subagents may have different system prompts and less constrained behavior than your main agent, so inheriting `bypassPermissions` grants them full, autonomous system access. The [actions no mode auto-approves](/docs/en/permission-modes.md#actions-no-mode-auto-approves) still apply. diff --git a/content/en/docs/claude-code/agent-sdk/skills.md b/content/en/docs/claude-code/agent-sdk/skills.md index 999bb65783..e2bad64eaa 100644 --- a/content/en/docs/claude-code/agent-sdk/skills.md +++ b/content/en/docs/claude-code/agent-sdk/skills.md @@ -97,7 +97,11 @@ The array lists user-invocable skills only. A skill with [`user-invocable: false ### Allow only specific skills -To let Claude invoke only specific skills, pass their names in the `skills` list. Names match the `name` field in `SKILL.md` or the skill's directory name. Use `plugin:skill` for plugin-provided skills. +To let Claude invoke only specific skills, pass their names in the `skills` list: + +* **Your own skills**: the skill's directory name +* **Plugin skills**: `plugin:skill` +* **Name clashes in `additionalDirectories` or `add_dirs`**: a skill in one of those directories gets a [prefixed name](/docs/en/skills.md#how-a-skill-gets-its-command-name) when its name clashes with an enterprise, personal, or project skill, or one in a directory added earlier. List it by that name. With a `verify` skill in `../api` and `../web`, added in that order, and no other `verify` skill, list them as `verify` and `web:verify`. Requires Claude Code v2.1.309 or later The list takes exact skill names only. If an entry can't work as an exact name, `query()` rejects the list before the session starts. See [Invalid skill name error](#invalid-skill-name-error) for the name rules and the error each SDK raises. diff --git a/content/en/docs/claude-code/agent-sdk/slash-commands.md b/content/en/docs/claude-code/agent-sdk/slash-commands.md index 999bb65783..e2bad64eaa 100644 --- a/content/en/docs/claude-code/agent-sdk/slash-commands.md +++ b/content/en/docs/claude-code/agent-sdk/slash-commands.md @@ -97,7 +97,11 @@ The array lists user-invocable skills only. A skill with [`user-invocable: false ### Allow only specific skills -To let Claude invoke only specific skills, pass their names in the `skills` list. Names match the `name` field in `SKILL.md` or the skill's directory name. Use `plugin:skill` for plugin-provided skills. +To let Claude invoke only specific skills, pass their names in the `skills` list: + +* **Your own skills**: the skill's directory name +* **Plugin skills**: `plugin:skill` +* **Name clashes in `additionalDirectories` or `add_dirs`**: a skill in one of those directories gets a [prefixed name](/docs/en/skills.md#how-a-skill-gets-its-command-name) when its name clashes with an enterprise, personal, or project skill, or one in a directory added earlier. List it by that name. With a `verify` skill in `../api` and `../web`, added in that order, and no other `verify` skill, list them as `verify` and `web:verify`. Requires Claude Code v2.1.309 or later The list takes exact skill names only. If an entry can't work as an exact name, `query()` rejects the list before the session starts. See [Invalid skill name error](#invalid-skill-name-error) for the name rules and the error each SDK raises. diff --git a/content/en/docs/claude-code/agent-sdk/typescript.md b/content/en/docs/claude-code/agent-sdk/typescript.md index cf45ed3e7d..8c38f67be8 100644 --- a/content/en/docs/claude-code/agent-sdk/typescript.md +++ b/content/en/docs/claude-code/agent-sdk/typescript.md @@ -5765,6 +5765,7 @@ type SandboxSettings = { filesystem?: SandboxFilesystemConfig; ignoreViolations?: Record; enableWeakerNestedSandbox?: boolean; + allowNestedUserNamespaces?: boolean; ripgrep?: { command: string; args?: string[] }; }; ``` @@ -5780,6 +5781,7 @@ type SandboxSettings = { | `filesystem` | [`SandboxFilesystemConfig`](#sandboxfilesystemconfig) | `undefined` | Filesystem-specific sandbox configuration for read/write restrictions | | `ignoreViolations` | `Record` | `undefined` | Map of command substrings, or `*` for every command, to substrings of the violation text to ignore, such as `{ "*": ['/etc/hosts'] }`; see [`sandbox.ignoreViolations`](/docs/en/settings-reference#sandbox-ignoreviolations) | | `enableWeakerNestedSandbox` | `boolean` | `false` | Enable a weaker nested sandbox for compatibility | +| `allowNestedUserNamespaces` | `boolean` | `false` | Let sandboxed commands on Linux and WSL2 create user namespaces. Before you set it to `true`, read [`sandbox.allowNestedUserNamespaces`](/docs/en/settings-reference#sandbox-allownestedusernamespaces), which covers the tools that need it and the security boundary you turn off. Requires Claude Code v2.1.305 or later | | `ripgrep` | `{ command: string; args?: string[] }` | `undefined` | Custom ripgrep binary configuration for sandbox environments | > [!NOTE] diff --git a/content/en/docs/claude-code/agent-teams.md b/content/en/docs/claude-code/agent-teams.md index ad19566172..4d7621de0d 100644 --- a/content/en/docs/claude-code/agent-teams.md +++ b/content/en/docs/claude-code/agent-teams.md @@ -290,6 +290,11 @@ For a teammate it brings back, Claude Code re-applies a definition that came fro Teammates start with the lead's permission mode, except [`dontAsk` mode](/docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode), which they don't inherit. If the lead runs with `--dangerously-skip-permissions`, all teammates do too. After spawning, you can change an individual teammate's permission mode, but you can't set per-teammate permission modes at spawn time. +An [in-process](#choose-a-display-mode) teammate runs under the lead's live allow and deny rules, so [`--disallowedTools`](/docs/en/cli-reference#cli-flags), `--tools`, and `--allowedTools` all apply to it. For a split-pane teammate, check each flag: + +* **`--disallowedTools` and `--tools`**: the teammate starts with the lead's command-line deny rules and tool list. Requires Claude Code v2.1.309 or later. +* **`--allowedTools`**: Claude Code doesn't pass this flag to a split-pane teammate, so an action you allowed with it alone isn't pre-approved there. To approve those actions ahead of time, put the rules under `permissions.allow` in [`--settings`](/docs/en/settings#change-a-setting-for-one-session) when you start the lead. For example, run `claude --settings '{"permissions":{"allow":["Bash(npm *)"]}}'` in your shell. The rules apply to the lead and each split-pane teammate for that session. + Teammate permission prompts appear in the lead session, so approve them there yourself. You don't need to approve [a teammate's plan](#have-teammates-plan-before-implementing). #### Messages between agents diff --git a/content/en/docs/claude-code/changelog.md b/content/en/docs/claude-code/changelog.md index cea253d770..5a181636b2 100644 --- a/content/en/docs/claude-code/changelog.md +++ b/content/en/docs/claude-code/changelog.md @@ -10,6 +10,101 @@ This page is generated from the [CHANGELOG.md on GitHub](https://github.com/anth Run `claude --version` to check your installed version. +**2.1.309** + +October 22, 2026 + +**Added** + +* \[VSCode] Added a log warning that says what to do when dictation or the extension's own requests fail certificate verification, such as behind a TLS-inspecting proxy + +**Changed** + +* Updated the bundled dataviz skill to accept APCA as a text-contrast measure (keeping WCAG 2 ratios where AA conformance is required), add an `apca(text, background)` function to its palette validator scripts, and say whether a label inside a colored chart fill should be white or near-black +* Updated the /claude-api skill: service account keys and Workload Identity Federation tokens can now manage OpenTelemetry destinations +* Changed `sed -i` to get the standard Bash prompt and run as written, not a simulated file-edit preview; like other Bash edits, it is no longer restored by `/rewind` +* Changed `claude ultrareview` to require workspace trust: it asks on a terminal, else refuses; scripts pass `--trust-workspace`, which takes no value (put a PR number or base branch before it), or set `CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECK=1` +* Changed the dangerous `rm` and `rmdir` prompt in bypass permissions mode in the Desktop app and VS Code to deny the command at once with a rewrite hint, so unattended sessions keep going +* Changed commands the settings exclude from the sandbox to ask before writing to its write-list paths while the sandbox is enabled but cannot run; the unsandboxed fallback is refused there +* Changed worktree creation and reuse so git no longer fetches objects on demand, in ordinary clones and in partial clones with a Bash sandbox configured; such a partial clone fetches them first +* Changed the `/claude-api` skill to build Managed Agents subagent teams on `multiagent_20261001` with dynamic workflows on by default, instead of `coordinator` + +**8 improvements** + +* Improved the speed of many git commands Claude Code runs for itself on Windows; on every platform, errors from those commands now show in English even when git is set to another language +* Improved the error when a hooks module is nested too deep to load: it now names the file instead of showing a bare stack-overflow message +* Improved disk-full handling: a Bash command cut off by a full disk now says so and names the folder to free up, and starting on a full temp volume prints a clear message, not a raw ENOSPC error +* Improved the /claude-api skill to offer API tracing alongside SDK tracing when asked to add OpenTelemetry +* Improved the /claude-api skill to check the live docs before saying a feature is unsupported +* Self-hosted runner: Improved sessions that move to a new runner: Claude now sees the tool call that was interrupted, marked as outcome unknown +* \[VSCode] Improved Edit and Write speed in the chat panel: the wait for new problems after each edit is now 0.75 seconds in most cases, down from 1 to 1.5 seconds +* \[Cloud sessions] Improved a cloud session's Changes pane, which now says when it lists only pushed commits or only Claude's edits + +**62 bug fixes** + +* Fixed sandboxed Bash commands on macOS and Linux running the shell's startup files outside the sandbox before each command +* Fixed macOS sandbox `denyWrite` glob patterns not applying at a path's real location when the pattern's folder is reached through a symlink +* Fixed sandboxed commands and auto-accepted edits being able to modify the MCP config file passed with `--mcp-config` +* Fixed a disabled MCP server being reconnected by a later permission prompt in print and SDK sessions +* Fixed the Bash permission check trusting a variable set by a command whose redirect can fail to open +* Fixed Bash permission checks not prompting for some compound commands that change directory before running git when the `cd` is wrapped or prefixed, as they do for a plain `cd` +* Fixed an `Edit(path)` deny rule not blocking a Bash redirect to that path in some commands that also held a subshell +* Fixed worktree-isolated sessions accepting some locale-prefixed commands the isolation guard should refuse +* Fixed worktree-isolated sessions on zsh accepting some arithmetic commands that the isolation guard should refuse +* Fixed worktrees and branch checkouts that Claude Code creates so they ignore git replace refs, as its other git operations already do +* Fixed profile store write protection not applying when the config directory is reached through a symlink +* Fixed sessions compacting repeatedly after reading files under a very large nested CLAUDE.md; a nested CLAUDE.md over the size limit now loads only its start +* Fixed ctrl+enter (send now) only queuing a message when pressed before the response had started, and restarting a prompt's hooks while leaving the message queued when pressed while those hooks were running +* Fixed key-bound slash commands running in the shell from `!` mode +* Fixed ctrl+o not showing messages from other agents and sessions that are still waiting to be delivered; they now appear in full under the transcript, marked as waiting +* Fixed long tool output previews being cut through an emoji, leaving session transcripts that `jq` could not parse +* Fixed Read reporting "File does not exist" for PDF page ranges in Linux sandboxes that share the parent's `/proc` +* Fixed messages from a Claude Desktop-hosted session sometimes being lost when its connection refreshed +* Fixed features missing from Claude Code sessions in the Claude desktop app when the terminal on the same computer was signed in to a different account or organization +* Fixed the `claude remote-control` status line showing `HEAD` as the branch for a folder that is not in a git repository +* Fixed split-pane agent teammates not inheriting the tool deny and `--tools` rules given on the leader's command line +* Fixed sessions renamed with `/rename` appearing to other sessions under a generated name after a VS Code window reload or a non-interactive `--resume` +* Fixed the `/rewind` list showing "No code changes" for a turn that changed checkpointed files through `/code-review --fix`, a subagent or a shell command +* Fixed `/privacy-settings` showing an out-of-date "Help improve our AI models" value; it now also says when the setting can't be fetched +* Fixed feedback saying "try again later" when your organization does not accept feedback; it now shows the server's reason and where to report a bug +* Fixed oversized /feedback reports failing instead of being resent without the transcript +* Fixed a skill in an `--add-dir` folder being unreachable when another skill already held its name; it is now offered as `:` +* Fixed `/verify` and `/code-review` not finding a nested package's own skill when its files were changed from the shell +* Fixed the /claude-api skill saying that `ant beta:worker poll --on-work` passes trace context to the command +* Fixed the /claude-api skill's C# tracing setup missing spans from the cloud platform clients +* Fixed the /claude-api skill saying that API spans for requests to Claude Platform on AWS can't join the caller's trace +* Fixed hooks that run in PowerShell not blocking when the hook's program exits with code 2, and on Windows `PreToolUse` and `PermissionRequest` hooks with `"shell": "powershell"` failing open when Git for Windows isn't installed +* Fixed a mod's `turn.step` hook that names a model by alias, such as `haiku`, failing every request with a model error: the alias now resolves to its model +* Fixed plugins and skills synced from claude.ai being removed, sometimes mid-session, after a disk read error +* Fixed artifact publishes and updates being refused for some ordinary pages, such as pages with certain minified scripts or artifacts Claude could not read first +* Fixed Claude asking for permission on each artifact update for the rest of a turn after the conversation was compacted in that turn +* Fixed fine-grained tool streaming staying off on Amazon Bedrock when `ANTHROPIC_BEDROCK_BASE_URL` is set to the default `bedrock-runtime..amazonaws.com` endpoint +* Fixed the "Waiting for API response" hint flickering behind gateways that send only keepalive pings: routes off Anthropic's backend now wait 45 seconds +* Fixed Claude notifying unrelated GitHub users by writing role names and placeholders as mentions in PRs, issues and comments +* Linux: Fixed sandbox write denies lifting when a background command outlived the session +* Windows: Fixed PowerShell permission checks auto-approving some `Set-Location` or `cd` commands that target the current directory and carry extra arguments; these now prompt for approval +* macOS: Fixed the "Install Command Line Developer Tools" dialog opening each time Claude Code starts on a Mac without Xcode or the Command Line Tools +* Self-hosted runner: Fixed `--startup-timeout-min` stopping a session whose first prompt, such as `/code-review`, was still working in a subagent; a frozen process is still stopped +* \[VSCode] Fixed the Claude panel staying blank after the editor cached an incomplete copy of its files; it now recovers by itself, or says what went wrong and how to fix it +* \[VSCode] Fixed Session history filling up with empty "Untitled" sessions each time you start a new session without sending a message +* \[VSCode] Fixed long slash-command messages such as `/goal` filling the chat panel; they now fold behind Show more like other prompts (anthropics/claude-code#97469) +* \[VSCode] Fixed long messages not folding behind Show more after the chat panel is made narrower +* \[VSCode] Fixed Ctrl+J in the chat input always inserting a newline: it is now left to VS Code and the OS when "ctrl+j" is set to null in the Chat context of \~/.claude/keybindings.json +* \[VSCode] Fixed a mod's "From the … plugin" label above the prompt being drawn over the slash command and @-mention menus (anthropics/claude-code#102981) +* \[VSCode] Fixed an empty list item, paragraph or code block, and list items renumbered from 1, when pasting copied LaTeX math +* \[VSCode] Fixed the feedback error showing only an HTTP status when your organization does not accept feedback +* \[Cloud sessions] Fixed the Add connector list in routine forms saying no connectors were available while they were still loading +* \[Cloud sessions] Fixed the cloud environment editor shuffling environment variables and adding backslashes to values that contain both kinds of quote +* \[Cloud sessions] Fixed the self-hosted environment details dialog in admin settings so its title, tabs and buttons stay in view while only the content scrolls +* \[Cloud sessions] Fixed the "read documentation" tool row in cloud sessions, which showed escaped JSON instead of a readable page +* \[Claude Tag] Fixed Claude in Slack posting a draft you approved for a channel into your DM by mistake; a post with no channel is now refused so it can go to the approved channel +* \[Claude Tag] Fixed Allow and Deny on Claude's approval cards in Slack doing nothing when the session had stopped; your answer now restarts the session +* \[Claude Tag] Fixed Claude ignoring untagged messages in a Slack channel after its workspace moved to a different Claude organization, including unshared channels on Enterprise Grid +* \[Claude Tag] Fixed Claude in a Slack channel posting a threaded reply before reading a newer message someone had just added to that thread +* \[Claude Tag] Fixed the Slack page in Claude Tag admin settings saying no workspaces were connected when the list failed to load; it now shows an error with a Retry button +* \[Code Review] Fixed a finished review showing no check on the pull request when earlier tries to create it failed; a final try now adds a completed check +* \[Code Review] Fixed a push queued behind a running review still starting a review after `@claude review stop`; its check now closes and says why + **2.1.308** October 22, 2026 diff --git a/content/en/docs/claude-code/checkpointing.md b/content/en/docs/claude-code/checkpointing.md index d95b8ac095..a6038661a2 100644 --- a/content/en/docs/claude-code/checkpointing.md +++ b/content/en/docs/claude-code/checkpointing.md @@ -73,22 +73,16 @@ Checkpoints are particularly useful when: ### Bash command changes not tracked -Checkpointing does not track files modified by Bash commands. For example, if Claude Code runs: +Once Claude has edited a file with its file editing tools in your conversation, `/rewind` undoes changes that Bash commands make to that file afterward. A file that only Bash commands changed isn't tracked and stays as it is. To revert it, use version control, such as Git. -```bash theme={null} -rm file.txt -mv old.txt new.txt -cp source.txt dest.txt -``` - -These file modifications cannot be undone through rewind. Only direct file edits made through Claude's file editing tools are tracked. +Under each prompt, the rewind menu counts changes to files Claude had already edited, whatever made them. A prompt where a shell command changed such a file lists file changes too. ### Subagent edits not restored A [subagent](/docs/en/sub-agents.md) makes edits with Claude's file editing tools, but Claude Code usually doesn't capture those edits in your session's checkpoints. Whether rewinding restores them depends on how the subagent runs: * **Foreground forked skill**: a [skill with `context: fork`](/docs/en/skills#run-skills-in-a-subagent) that runs in the foreground edits your working tree during your own turn, so rewinding restores its edits as usual. Set `background: false` to run a fork in the foreground; a few situations, [listed on the skills page](/docs/en/skills.md#run-skills-in-a-subagent), run it there regardless of the setting. -* **Any other subagent**: rewinding restores only the files Claude had already edited in your conversation. The subagent's edits to other files stay, so use git to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](/docs/en/code-review-local) run. +* **Any other subagent**: rewinding restores only the files Claude had already edited in your conversation. The subagent's edits to other files stay, so use version control, such as Git, to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](/docs/en/code-review-local) run. ### External changes not tracked diff --git a/content/en/docs/claude-code/claude-apps-gateway-deploy.md b/content/en/docs/claude-code/claude-apps-gateway-deploy.md index 0de815f1e0..0f849e4c88 100644 --- a/content/en/docs/claude-code/claude-apps-gateway-deploy.md +++ b/content/en/docs/claude-code/claude-apps-gateway-deploy.md @@ -203,13 +203,27 @@ If you autoscale on CPU, a replica at the limit queues requests without triggeri ### Keep `API_TIMEOUT_MS` above the gateway's time to first byte -If you lower [`API_TIMEOUT_MS`](/docs/en/network-config#streaming-idle-watchdogs) to retry an unanswered request sooner, keep it above the time the gateway takes to send the first bytes of a streaming response. A request that waits longer times out, and so does each retry that waits as long, until the turn ends with `Request timed out`. +If you lower [`API_TIMEOUT_MS`](/docs/en/network-config#streaming-idle-watchdogs) to retry an unanswered request sooner, keep it above the time the gateway takes to send the first bytes of a streaming response. A request that waits longer times out, and so does each retry that waits as long, until the turn ends with `Request timed out` unless the [first-byte deadline](#retry-an-unanswered-request-sooner-with-the-first-byte-deadline) ends it. * **`provider: anthropic`**: set `API_TIMEOUT_MS` above the longest time your upstream takes to send its first event. * **Every other upstream**: set it more than 20 seconds above the longest time your upstream takes to return response headers. The gateway sends its first [keepalive `ping`](#deployment) about 15 seconds after those headers, unless the upstream's first event comes sooner. A gateway older than v2.1.229 sends no pings, so use the `provider: anthropic` rule there. On top of that time, allow for any [wait for a free slot](#concurrent-upstream-requests) and for the wait on a down upstream before [failover](/docs/en/claude-apps-gateway-config.md#multiple-upstreams). Keep the value above the longest [non-streaming request](/docs/en/network-config.md#streaming-idle-watchdogs) too. +### Retry an unanswered request sooner with the first-byte deadline + +To make Claude Code retry an unanswered streaming request sooner, give it a first-byte deadline by setting [`CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`](/docs/en/env-vars) on your developers' machines. The deadline limits how long the first attempt waits for response headers. Without it, that attempt can wait 5 to 6 minutes. Requires Claude Code v2.1.307 or later on the developer's machine. + +Set the variable to a positive whole number of milliseconds, in a [gateway policy's `env` block](#deliver-the-value-in-a-policy) or a developer's shell. Keep the value above your gateway's longest [time to first byte](#keep-api_timeout_ms-above-the-gateways-time-to-first-byte), or Claude Code can abort and re-send healthy requests whose headers take longer. This example sets 60 seconds in a developer's shell: + +```bash theme={null} +export CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS=60000 +``` + +An unanswered re-send can wait 5 to 6 minutes, until the [body idle timeout](/docs/en/network-config.md#streaming-idle-watchdogs) ends it and Claude Code retries it within the [retry budget](/docs/en/errors.md#tune-retry-behavior). If you lowered `API_TIMEOUT_MS` only to retry sooner, remove that value, or one unanswered re-send can end the turn with [No response from API](/docs/en/errors.md#no-response-from-api). + +To confirm the deadline fired, have a developer start Claude Code with [debug logging](/docs/en/network-config.md#verify-your-configuration), then search the log for `[first-byte] no response headers`. + ### Outage behavior If Postgres goes down, the gateway itself keeps serving signed-in developers and new sign-ins fail. Whether developers actually keep working depends on how your orchestrator handles readiness: diff --git a/content/en/docs/claude-code/claude-apps-gateway.md b/content/en/docs/claude-code/claude-apps-gateway.md index f255675383..ee25d9b1bc 100644 --- a/content/en/docs/claude-code/claude-apps-gateway.md +++ b/content/en/docs/claude-code/claude-apps-gateway.md @@ -456,6 +456,22 @@ These parent-supplied settings pass the filter even with all five locks set: Under the default first-wins setting, an admin value blocks the parent's only when it sits in the highest-priority admin source, except for `allowedMcpServers` while the [MCP server lock](#lock-behavior-across-sources) is on. Under the `managedSourcesBehavior` merge opt-in, [how Claude Code combines managed sources](/docs/en/managed-settings.md#how-claude-code-combines-managed-sources) says which source's value applies instead. +#### How hook and skill keys in parent settings take effect + +If you pass `disableAllHooks: true` as a parent setting through the Agent SDK's `managedSettings` option, not every hook stops. Your [SDK hook callbacks](/docs/en/agent-sdk/hooks.md) still run, and so do the administrator's hooks, which your application can't switch off. + +On a machine where an administrator deploys managed settings, Claude Code ignores parent settings unless the administrator [lets an embedding host add policy](/docs/en/managed-settings.md#let-an-embedding-host-add-policy). + +| What you pass | What happens | +| :- | :- | +| `disableAllHooks: true` | Treated as `allowManagedHooksOnly: true`, so the hooks listed as [blocked under `allowManagedHooksOnly`](/docs/en/settings-reference#what-runs-under-allowmanagedhooksonly) stop, and so do hooks in the SDK's [`settings` option](/docs/en/agent-sdk/typescript#options). | +| [`disableSkillShellExecution: true`](/docs/en/settings-reference#disableskillshellexecution) | Takes effect. | +| `allowedHttpHookUrls: []` | Takes effect unless the administrator defines `hooks` or enables a plugin. No HTTP hook runs, except for URLs another settings source lists. | +| `httpHookAllowedEnvVars: []` | Takes effect unless the administrator defines `hooks` or enables a plugin. HTTP hook headers can include only environment variables another settings source lists. | +| `allowedHttpHookUrls` or `httpHookAllowedEnvVars` with entries | Claude Code ignores it, since merging would widen an administrator's list. Use the SDK `settings` option instead. | + +Passing these keys in `managedSettings` requires Claude Code v2.1.309 or later, or TypeScript Agent SDK v0.3.309 or later. + ### Connect Claude Desktop [Claude Desktop](/docs/en/desktop.md) connects to the same gateway through a different MDM key: set `bootstrapUrl` in Claude Desktop's [managed configuration](https://claude.com/docs/third-party/claude-desktop/configuration) to `/user/bootstrap`, and opt the user's policy in with a `desktop` key. [Claude Desktop overlay](/docs/en/claude-apps-gateway-config.md#claude-desktop-overlay) covers both halves. Requires Claude Code v2.1.203 or later on the gateway server. diff --git a/content/en/docs/claude-code/claude-code-on-the-web.md b/content/en/docs/claude-code/claude-code-on-the-web.md index 596d29adfc..3384ebeeb8 100644 --- a/content/en/docs/claude-code/claude-code-on-the-web.md +++ b/content/en/docs/claude-code/claude-code-on-the-web.md @@ -264,15 +264,15 @@ Cloud sessions support [built-in commands](/docs/en/commands.md) that produce te * **`/model`, `/effort`, `/color`, and `/rename`**: pass the value as an argument, for example `/model sonnet`, instead of opening the terminal picker or slider. The argument forms follow each command's [availability notes](/docs/en/commands.md#all-commands). * **`/fast`**: toggles [fast mode](/docs/en/fast-mode.md#use-fast-mode-in-cloud-sessions) for the session when fast mode is [available on your account](/docs/en/fast-mode.md#requirements). Requires Claude Code v2.1.271 or later in the session's environment. -* **`/config`**: in your browser at claude.ai/code, opens the Claude Code section of your settings instead of setting a value, and text after the command, including `key=value`, is ignored. To change a setting for a cloud session, set an [environment variable](/docs/en/cloud-environments.md#set-environment-variables) on the environment. In a session with one repository outside a [project](/docs/en/claude-projects.md)'s threads, commit the key to that repository's `.claude/settings.json` instead. [Settings in cloud sessions](/docs/en/settings.md#settings-in-cloud-sessions) lists what each session reads. +* **`/config`**: in your browser at claude.ai/code, opens the Claude Code section of your settings instead of setting a value. To change a setting for a cloud session, set an [environment variable](/docs/en/cloud-environments.md#set-environment-variables) on the environment. In a session with one repository outside a [project](/docs/en/claude-projects.md)'s threads, commit the key to that repository's `.claude/settings.json` instead. [Settings in cloud sessions](/docs/en/settings.md#settings-in-cloud-sessions) lists what each session reads. -For context management specifically: +For context management in a cloud session outside a [project's threads](/docs/en/claude-projects.md#choose-models-and-let-claude-manage-context): | Command | Works in cloud sessions | Notes | | :- | :- | :- | | `/compact` | Yes | Summarizes the conversation to free up context. Accepts optional focus instructions like `/compact keep the test output` | | `/context` | Yes | Shows what's currently in the context window | -| `/clear` | No | Start a new session from the sidebar instead | +| `/clear` | Yes | Starts a fresh conversation with empty context in the same cloud session | Auto-compaction runs automatically when the context window approaches capacity. Cloud sessions set [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](/docs/en/env-vars) themselves, so compaction triggers partway through the [auto-compact window](/docs/en/model-config.md#set-the-auto-compact-window) rather than when the window fills. That value overrides one you add in your [environment variables](/docs/en/cloud-environments.md#set-environment-variables), so adding the variable there doesn't change when compaction triggers. diff --git a/content/en/docs/claude-code/claude-projects.md b/content/en/docs/claude-code/claude-projects.md index 9a52ab43d6..1c0aaa01e2 100644 --- a/content/en/docs/claude-code/claude-projects.md +++ b/content/en/docs/claude-code/claude-projects.md @@ -8,7 +8,9 @@ > [!NOTE] > -> Projects are in public beta on Pro and Max plans and rolling out gradually, starting with accounts that have used [cloud sessions](/docs/en/claude-code-on-the-web.md) and don't have existing projects in claude.ai chat or Cowork. They aren't available on Team or Enterprise plans yet. If **Projects** doesn't appear in the sidebar at [claude.ai/code](https://claude.ai/code) or in the Code tab of the [desktop app](/docs/en/desktop.md), the rollout hasn't reached your account, and you can [join the waitlist](https://claude.com/form/projects). [Run agents in parallel](/docs/en/agents.md) lists what you can use in the meantime. +> Projects are in public beta on Pro and Max plans and rolling out gradually. The rollout started with accounts that have used [cloud sessions](/docs/en/claude-code-on-the-web.md) and don't have existing projects in claude.ai chat or Cowork. Projects aren't offered on Team or Enterprise plans yet. +> +> If you don't see **Projects** in the sidebar at [claude.ai/code](https://claude.ai/code) or in the Code tab of the [desktop app](/docs/en/desktop.md), check under **More** there. If it's missing there too, the rollout hasn't reached your account yet. You can [join the waitlist](https://claude.com/form/projects), and see [Run agents in parallel](/docs/en/agents.md) for what you can use in the meantime. A project is one ongoing conversation where Claude coordinates a stream of related work for you. You tell it what needs doing and it starts a thread for each task. @@ -86,7 +88,7 @@ Starting a project from scratch means opening the **New project** dialog, naming **1. Open Projects** -At [claude.ai/code](https://claude.ai/code) or in the Code tab of the desktop app, select **Projects** in the left sidebar, then select **New project**. In a browser you can also go straight to [claude.ai/code/projects/browse](https://claude.ai/code/projects/browse). +At [claude.ai/code](https://claude.ai/code) or in the Code tab of the desktop app, select **Projects** in the left sidebar, or under **More** there. In a browser you can also go straight to [claude.ai/code/projects/browse](https://claude.ai/code/projects/browse). Then select **New project**. If the button reads **Get started** instead, select it and first upgrade or archive the existing claude.ai projects it lists. **2. Fill in the New project dialog** diff --git a/content/en/docs/claude-code/costs.md b/content/en/docs/claude-code/costs.md index e20895182d..923af46609 100644 --- a/content/en/docs/claude-code/costs.md +++ b/content/en/docs/claude-code/costs.md @@ -58,7 +58,9 @@ Status line scripts can read the same numbers from the [`prompt_cache` object](/ On a Pro, Max, Team, or Enterprise plan, `/usage` also shows a breakdown of what counts against your plan limits, with recommendations: * **Attribution**: recent usage attributed to skills, subagents, plugins, and individual MCP servers, each shown as a percentage of the total. An MCP server's share counts only the requests that consumed one of its tool results. Before v2.1.222, after one call to an MCP server, Claude Code attributed every subsequent request to that server, overstating its share. -* **Recommendations**: changes that lower your usage, one per row. Each row starts with the share of recent usage it addresses, at least 10%, as in `25% Trim ~/code/api/CLAUDE.md · 49k tokens per request`. To have Claude Code apply the ones it can, see [Apply recommendations with the fix shortcut](#apply-recommendations-with-the-fix-shortcut). +* **Recommendations**: suggested changes, one per row. Each row starts with a share of your recent usage, at least 10%, as in `25% Trim ~/code/api/CLAUDE.md · 49k tokens per request`. + * **How to read the share**: it tells you how much of your usage the row applies to, not how much the change saves. One request can count toward several rows, so the shares can add up to more than 100%. + * **How to apply recommendations**: to have Claude Code apply the ones it can, see [Apply recommendations with the fix shortcut](#apply-recommendations-with-the-fix-shortcut) * **Loops**: a row for each of the heaviest [`/loop` or other session-scoped scheduled tasks](/docs/en/scheduled-tasks) that ran recently, ordered by total tokens, with a count of the rest. Requires Claude Code v2.1.242 or later. * **What each row reports**: how often the task fires, how many times it ran, its total and per-run tokens, and when it last ran * **Stopped and re-created loops**: Claude Code keys a row by the task's prompt, so a loop you stop and re-create stays one row diff --git a/content/en/docs/claude-code/desktop-changelog.md b/content/en/docs/claude-code/desktop-changelog.md index dc546e2d40..8dab2a4ba3 100644 --- a/content/en/docs/claude-code/desktop-changelog.md +++ b/content/en/docs/claude-code/desktop-changelog.md @@ -507,7 +507,7 @@ Cloud sessions also support multiple repositories. Choose the repositories: * **Current layout**: in the row under the prompt box, once you select a cloud environment. * **[Earlier layout](#check-which-layout-you-have)**: above the prompt box. To add another repository, click **+** beside the selected one. -See [Use Claude Code in the cloud](/docs/en/claude-code-on-the-web.md) for more on how cloud sessions work. When one body of work needs many cloud sessions, select **Projects** in the sidebar to create a [project](/docs/en/claude-projects.md), where Claude starts and tracks the sessions for you from one conversation. +See [Use Claude Code in the cloud](/docs/en/claude-code-on-the-web.md) for more on how cloud sessions work. When one body of work needs many cloud sessions, use a [project](/docs/en/claude-projects.md): Claude starts and tracks the sessions for you from one conversation. [Create a project](/docs/en/claude-projects.md#create-a-project) has the steps. > [!NOTE] > @@ -1021,6 +1021,8 @@ Host devbox Enter `devbox` in the **SSH host** field. +If your administrator [restricts SSH hosts](#allow-jump-hosts), the jump host has to be on the list too. Run `ssh -G bastion.example.com` in a terminal on your computer, and ask them to allow the `hostname` that it prints. + ##### Reach a container on a remote machine To run a session inside a container that publishes no SSH port, reach it with a `ProxyCommand`, because Desktop doesn't run the `RemoteCommand` of the entry you connect to. If your entry uses `RemoteCommand` to step into the container, the session runs on the machine that the entry logs in to, not in the container. @@ -1531,10 +1533,38 @@ The following example allows connections to any host under `devboxes.example.com > > Also keep the same list on each user's machine, in the highest-ranked MDM policy or managed settings file there. Desktop fetches server-managed settings at launch and keeps no cached copy, so until a fetch succeeds the machine's list is the one that applies. -Patterns are case-insensitive. `*` matches any host, and `*.example.com` matches `example.com` and any subdomain. Anything else is an exact match. The check runs against the hostname after `~/.ssh/config` resolution via `ssh -G`, so `Host` aliases and `ProxyCommand`/`ProxyJump` entries are permitted as long as the resolved `HostName` matches. +Patterns are case-insensitive. `*` matches any host, and `*.example.com` matches `example.com` and any subdomain. Anything else is an exact match. The check runs against the hostname after `~/.ssh/config` resolution via `ssh -G`, so a `Host` alias is permitted as long as its resolved `HostName` matches. A session's [jump hosts](#allow-jump-hosts) have to match too. `sshHostAllowlist` is read from managed settings only; values in user or project settings are ignored. Only the Claude Desktop app honors this setting; the Claude Code CLI and IDE extensions do not read it, and it does not restrict `ssh` commands run through the Bash tool. It governs which hosts the Desktop app connects to, not network egress, so pair it with your organization's network or zero-trust controls if you need a hard boundary. +##### Allow jump hosts + +Add each jump host that Desktop checks to `sshHostAllowlist`, by its own resolved `HostName`. Add the jump hosts before users update to Claude Desktop v3.1623.0 or later, or they can't connect through them. + +> [!WARNING] +> +> The list has one kind of entry, so users can also start a session on any host that you list. List only jump hosts that you'd also let users run sessions on. + +Desktop checks jump hosts in the `ProxyJump` that the user's `~/.ssh/config` sets for the session's host, or in a `ProxyCommand` written as `ssh -W %h:%p `. If one that it checks isn't on the list when Desktop connects or reconnects a session, the connection fails. When a user starts a session or sends a message, the error's details give that jump host's `HostName`, which is the name to add: + +```text theme={null} +SSH host "bastion.example.com" is not allowed by your organization's managed settings. It is a jump host on the way to "devbox". +``` + +If the message says `managed settings on this computer`, add the name to the list on the user's computer. If more than one jump host is missing, the error names one at a time. To find every name before users update, use a terminal on a user's computer: + +**1. Find the route** + +Run `ssh -G` with a host that users connect to, such as `ssh -G devbox`. Look for a `proxyjump` line, or a `proxycommand` line written as `ssh -W %h:%p `. The command still counts with any of `-l`, `-p`, `-J`, `-q`, `-v`, `-N`, `-T`, `-x`, or `-a`, and the hosts after `-J` are jump hosts too. If a `proxycommand` line runs a program other than `ssh`, add nothing for it. + +**2. Look up each jump host** + +Run `ssh -G` with each jump host on that line, without any `:port`, and note the `hostname` that it prints. If the output for the first jump host on that line has a line of either kind, repeat this step with it. Ignore such a line in a later jump host's output. + +**3. Add the names** + +Add each hostname, or a wildcard that covers it, to `sshHostAllowlist` in every managed source where you set a list. Then have users quit and reopen Desktop, because it fetches server-managed settings at launch. + #### Turn off local sessions and distribute SSH connections To turn off local sessions and limit SSH sessions to hosts that you choose, deploy [`disableDesktopLocalSessions`](/docs/en/settings-reference#disabledesktoplocalsessions), [`sshConfigs`](#pre-configure-ssh-connections-for-your-team), and [`sshHostAllowlist`](#restrict-which-ssh-hosts-users-can-connect-to) together. @@ -1567,7 +1597,7 @@ The keys apply to the desktop app. They leave other ways to run Claude Code as t When you adapt the example, check the hostnames, the Desktop version, and the file's permissions: -* **Hostnames**: make sure that a pattern in `sshHostAllowlist` matches the hostname of each `sshConfigs` entry, without `user@`, or developers can't connect to it. For how Desktop matches a hostname, see [Restrict which SSH hosts users can connect to](#restrict-which-ssh-hosts-users-can-connect-to). +* **Hostnames**: make sure that a pattern in `sshHostAllowlist` matches the hostname of each `sshConfigs` entry, without `user@`, or developers can't connect to it. Also add a pattern that matches each [jump host](#allow-jump-hosts) that Desktop checks on the way to it. For how Desktop matches a hostname, see [Restrict which SSH hosts users can connect to](#restrict-which-ssh-hosts-users-can-connect-to). * **Version**: `disableDesktopLocalSessions` requires Claude Desktop v1.37937.0 or later * **File permissions**: make sure that each developer's account on the computer can read the managed settings file. Desktop doesn't apply the keys in a file that the account can't read, and Claude Code [starts without them](/docs/en/managed-settings.md#find-entries-claude-code-dropped) too. @@ -1820,7 +1850,7 @@ The following features aren't available in Desktop, except where noted: * **Agent teams**: coordinated teams, where Claude as the team lead assigns tasks to teammates from a shared task list, are available in the [CLI](/docs/en/agent-teams.md), not in Desktop. For multi-agent work inside one session, use [dynamic workflows](/docs/en/workflows.md), which run in Desktop; Claude can also [message and manage your other sessions](#work-across-sessions) directly. * **Terminal-dialog commands**: built-in commands that open an interactive panel in the terminal behave differently in the Code tab. Edit [settings files](/docs/en/settings.md) directly to manage permission rules and configuration, or run the commands from the standalone CLI. * Commands with no argument form, such as `/permissions`, reply with `isn't available in this environment`. - * `/config` opens Settings → Claude Code. Text after the command is ignored, so `/config theme=dark` doesn't set the theme. + * `/config` opens **Settings > Claude Code**. ## Troubleshooting @@ -1899,7 +1929,7 @@ Find the card's title, or the code that ends the error message, in this table, t | `SFTP doesn't start on ` | `[SFTP_NOT_STARTED]` | Connect to the same host with `sftp` in a terminal on your computer to see what stops it, then check the settings and files that Desktop's message names | | ` allows too few SSH sessions per connection` | `[SESSION_LIMIT]` | Raise `MaxSessions` in the server's `sshd_config`, for example to OpenSSH's default of 10 | | ` is out of disk space` | `[ENOSPC]` or `[EDQUOT]` | Free space or quota on the remote machine, in your home directory or `/tmp` | -| `This computer is out of disk space` | `[ENOSPC]` or `[EDQUOT]`, in a message that starts with `Couldn't prepare the deploy locally` | Free space on your computer | +| `Free up disk space on this computer` | `[ENOSPC]` or `[EDQUOT]`, in a message that starts with `Couldn't prepare the deploy locally` | Free space on your computer | | `Claude Code won't start on ` | `[CLI_UNRESPONSIVE]` | Wait a minute, then try again. If it keeps failing, run the command that the message names on the remote machine to see whether Claude Code answers there. | For any other message, check the [remote machine requirements](#remote-machine-requirements-for-ssh-sessions). diff --git a/content/en/docs/claude-code/desktop.md b/content/en/docs/claude-code/desktop.md index dc546e2d40..8dab2a4ba3 100644 --- a/content/en/docs/claude-code/desktop.md +++ b/content/en/docs/claude-code/desktop.md @@ -507,7 +507,7 @@ Cloud sessions also support multiple repositories. Choose the repositories: * **Current layout**: in the row under the prompt box, once you select a cloud environment. * **[Earlier layout](#check-which-layout-you-have)**: above the prompt box. To add another repository, click **+** beside the selected one. -See [Use Claude Code in the cloud](/docs/en/claude-code-on-the-web.md) for more on how cloud sessions work. When one body of work needs many cloud sessions, select **Projects** in the sidebar to create a [project](/docs/en/claude-projects.md), where Claude starts and tracks the sessions for you from one conversation. +See [Use Claude Code in the cloud](/docs/en/claude-code-on-the-web.md) for more on how cloud sessions work. When one body of work needs many cloud sessions, use a [project](/docs/en/claude-projects.md): Claude starts and tracks the sessions for you from one conversation. [Create a project](/docs/en/claude-projects.md#create-a-project) has the steps. > [!NOTE] > @@ -1021,6 +1021,8 @@ Host devbox Enter `devbox` in the **SSH host** field. +If your administrator [restricts SSH hosts](#allow-jump-hosts), the jump host has to be on the list too. Run `ssh -G bastion.example.com` in a terminal on your computer, and ask them to allow the `hostname` that it prints. + ##### Reach a container on a remote machine To run a session inside a container that publishes no SSH port, reach it with a `ProxyCommand`, because Desktop doesn't run the `RemoteCommand` of the entry you connect to. If your entry uses `RemoteCommand` to step into the container, the session runs on the machine that the entry logs in to, not in the container. @@ -1531,10 +1533,38 @@ The following example allows connections to any host under `devboxes.example.com > > Also keep the same list on each user's machine, in the highest-ranked MDM policy or managed settings file there. Desktop fetches server-managed settings at launch and keeps no cached copy, so until a fetch succeeds the machine's list is the one that applies. -Patterns are case-insensitive. `*` matches any host, and `*.example.com` matches `example.com` and any subdomain. Anything else is an exact match. The check runs against the hostname after `~/.ssh/config` resolution via `ssh -G`, so `Host` aliases and `ProxyCommand`/`ProxyJump` entries are permitted as long as the resolved `HostName` matches. +Patterns are case-insensitive. `*` matches any host, and `*.example.com` matches `example.com` and any subdomain. Anything else is an exact match. The check runs against the hostname after `~/.ssh/config` resolution via `ssh -G`, so a `Host` alias is permitted as long as its resolved `HostName` matches. A session's [jump hosts](#allow-jump-hosts) have to match too. `sshHostAllowlist` is read from managed settings only; values in user or project settings are ignored. Only the Claude Desktop app honors this setting; the Claude Code CLI and IDE extensions do not read it, and it does not restrict `ssh` commands run through the Bash tool. It governs which hosts the Desktop app connects to, not network egress, so pair it with your organization's network or zero-trust controls if you need a hard boundary. +##### Allow jump hosts + +Add each jump host that Desktop checks to `sshHostAllowlist`, by its own resolved `HostName`. Add the jump hosts before users update to Claude Desktop v3.1623.0 or later, or they can't connect through them. + +> [!WARNING] +> +> The list has one kind of entry, so users can also start a session on any host that you list. List only jump hosts that you'd also let users run sessions on. + +Desktop checks jump hosts in the `ProxyJump` that the user's `~/.ssh/config` sets for the session's host, or in a `ProxyCommand` written as `ssh -W %h:%p `. If one that it checks isn't on the list when Desktop connects or reconnects a session, the connection fails. When a user starts a session or sends a message, the error's details give that jump host's `HostName`, which is the name to add: + +```text theme={null} +SSH host "bastion.example.com" is not allowed by your organization's managed settings. It is a jump host on the way to "devbox". +``` + +If the message says `managed settings on this computer`, add the name to the list on the user's computer. If more than one jump host is missing, the error names one at a time. To find every name before users update, use a terminal on a user's computer: + +**1. Find the route** + +Run `ssh -G` with a host that users connect to, such as `ssh -G devbox`. Look for a `proxyjump` line, or a `proxycommand` line written as `ssh -W %h:%p `. The command still counts with any of `-l`, `-p`, `-J`, `-q`, `-v`, `-N`, `-T`, `-x`, or `-a`, and the hosts after `-J` are jump hosts too. If a `proxycommand` line runs a program other than `ssh`, add nothing for it. + +**2. Look up each jump host** + +Run `ssh -G` with each jump host on that line, without any `:port`, and note the `hostname` that it prints. If the output for the first jump host on that line has a line of either kind, repeat this step with it. Ignore such a line in a later jump host's output. + +**3. Add the names** + +Add each hostname, or a wildcard that covers it, to `sshHostAllowlist` in every managed source where you set a list. Then have users quit and reopen Desktop, because it fetches server-managed settings at launch. + #### Turn off local sessions and distribute SSH connections To turn off local sessions and limit SSH sessions to hosts that you choose, deploy [`disableDesktopLocalSessions`](/docs/en/settings-reference#disabledesktoplocalsessions), [`sshConfigs`](#pre-configure-ssh-connections-for-your-team), and [`sshHostAllowlist`](#restrict-which-ssh-hosts-users-can-connect-to) together. @@ -1567,7 +1597,7 @@ The keys apply to the desktop app. They leave other ways to run Claude Code as t When you adapt the example, check the hostnames, the Desktop version, and the file's permissions: -* **Hostnames**: make sure that a pattern in `sshHostAllowlist` matches the hostname of each `sshConfigs` entry, without `user@`, or developers can't connect to it. For how Desktop matches a hostname, see [Restrict which SSH hosts users can connect to](#restrict-which-ssh-hosts-users-can-connect-to). +* **Hostnames**: make sure that a pattern in `sshHostAllowlist` matches the hostname of each `sshConfigs` entry, without `user@`, or developers can't connect to it. Also add a pattern that matches each [jump host](#allow-jump-hosts) that Desktop checks on the way to it. For how Desktop matches a hostname, see [Restrict which SSH hosts users can connect to](#restrict-which-ssh-hosts-users-can-connect-to). * **Version**: `disableDesktopLocalSessions` requires Claude Desktop v1.37937.0 or later * **File permissions**: make sure that each developer's account on the computer can read the managed settings file. Desktop doesn't apply the keys in a file that the account can't read, and Claude Code [starts without them](/docs/en/managed-settings.md#find-entries-claude-code-dropped) too. @@ -1820,7 +1850,7 @@ The following features aren't available in Desktop, except where noted: * **Agent teams**: coordinated teams, where Claude as the team lead assigns tasks to teammates from a shared task list, are available in the [CLI](/docs/en/agent-teams.md), not in Desktop. For multi-agent work inside one session, use [dynamic workflows](/docs/en/workflows.md), which run in Desktop; Claude can also [message and manage your other sessions](#work-across-sessions) directly. * **Terminal-dialog commands**: built-in commands that open an interactive panel in the terminal behave differently in the Code tab. Edit [settings files](/docs/en/settings.md) directly to manage permission rules and configuration, or run the commands from the standalone CLI. * Commands with no argument form, such as `/permissions`, reply with `isn't available in this environment`. - * `/config` opens Settings → Claude Code. Text after the command is ignored, so `/config theme=dark` doesn't set the theme. + * `/config` opens **Settings > Claude Code**. ## Troubleshooting @@ -1899,7 +1929,7 @@ Find the card's title, or the code that ends the error message, in this table, t | `SFTP doesn't start on ` | `[SFTP_NOT_STARTED]` | Connect to the same host with `sftp` in a terminal on your computer to see what stops it, then check the settings and files that Desktop's message names | | ` allows too few SSH sessions per connection` | `[SESSION_LIMIT]` | Raise `MaxSessions` in the server's `sshd_config`, for example to OpenSSH's default of 10 | | ` is out of disk space` | `[ENOSPC]` or `[EDQUOT]` | Free space or quota on the remote machine, in your home directory or `/tmp` | -| `This computer is out of disk space` | `[ENOSPC]` or `[EDQUOT]`, in a message that starts with `Couldn't prepare the deploy locally` | Free space on your computer | +| `Free up disk space on this computer` | `[ENOSPC]` or `[EDQUOT]`, in a message that starts with `Couldn't prepare the deploy locally` | Free space on your computer | | `Claude Code won't start on ` | `[CLI_UNRESPONSIVE]` | Wait a minute, then try again. If it keeps failing, run the command that the message names on the remote machine to see whether Claude Code answers there. | For any other message, check the [remote machine requirements](#remote-machine-requirements-for-ssh-sessions). diff --git a/content/en/docs/claude-code/env-vars.md b/content/en/docs/claude-code/env-vars.md index 55d8280d17..cd9ca762ee 100644 --- a/content/en/docs/claude-code/env-vars.md +++ b/content/en/docs/claude-code/env-vars.md @@ -269,6 +269,7 @@ Numeric variables such as timeouts, token budgets, and retry counts accept scien | `CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT` | Set to `1` to turn off the [critical-path](/docs/en/permission-modes.md#critical-paths) check for a recursive `rm` whose target is entirely the output of a command substitution, such as `rm -rf "$(pwd)"`. The other critical-path checks keep running. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings `env` block. Requires Claude Code v2.1.281 or later | | `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context. This also skips the background small/fast-model request that [generates a session title](/docs/en/sessions.md#name-your-sessions), and turns off [status reports to your terminal](/docs/en/terminal-config.md#see-session-status-in-your-terminal) | | `CLAUDE_CODE_DISABLE_THINKING` | Set to `1` to omit the `thinking` parameter from API requests entirely. This is a compatibility option for proxies and gateways that reject the parameter. On models that think by default, omitting the parameter means the model may still think. To explicitly disable [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) on the Anthropic API, use `MAX_THINKING_TOKENS=0` instead. Neither variable turns thinking off on Opus 5.5, Sonnet 5.5, Haiku 5.5, or the Fable models, which can't have thinking turned off. On [third-party providers](/docs/en/third-party-integrations.md), `MAX_THINKING_TOKENS=0` likewise omits the parameter, so the two variables behave the same there | +| `CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECK` | Set to `1` so that [`claude ultrareview`](/docs/en/ultrareview#trust-the-folder-before-the-review-runs) doesn't exit with `Error: Workspace not trusted` in a folder you haven't trusted when it can't ask you to trust it, such as in CI. Set it in the environment that launches Claude Code, not a settings `env` block, and only where every such run starts in a folder you trust. Runs that can ask still ask. Requires Claude Code v2.1.309 or later | | `CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT` | Set to `1` to skip proactive [auto-compaction](/docs/en/costs.md#reduce-token-usage) when Claude Code doesn't recognize the model ID, such as an [LLM gateway](/docs/en/llm-gateway) alias. Without this variable, Claude Code compacts at the context window it assumes for the ID. `CLAUDE_CODE_MAX_CONTEXT_TOKENS` can correct the assumed window instead; see [Correct the window for a gateway or custom model ID](/docs/en/model-config.md#correct-the-window-for-a-gateway-or-custom-model-id) for when each variable applies. Requires Claude Code v2.1.223 or later | | `CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL` | Set to `1` to disable virtual scrolling in [fullscreen rendering](/docs/en/fullscreen.md) and render every message in the transcript. Use this if scrolling in fullscreen mode shows blank regions where messages should appear | | `CLAUDE_CODE_DISABLE_WEB_FETCH` | Set to `1` to turn off the [WebFetch](/docs/en/tools-reference.md#webfetch-tool-behavior) tool. The [WebSearch](/docs/en/tools-reference.md#websearch-tool-behavior) tool stays available. Requires Claude Code v2.1.285 or later | diff --git a/content/en/docs/claude-code/errors.md b/content/en/docs/claude-code/errors.md index 330b43cd53..6fd673f7a2 100644 --- a/content/en/docs/claude-code/errors.md +++ b/content/en/docs/claude-code/errors.md @@ -226,9 +226,12 @@ Match the message you see to a section below. | `Error: --agents file not found` | [Command-line errors](#invalid-agents-configuration) | | `Error: Settings file exceeds the 2MiB limit` | [Command-line errors](#settings-file-exceeds-the-2mib-limit) | | `The current directory no longer exists (it was deleted or moved)` / `Can't read the current directory` | [Command-line errors](#the-current-directory-no-longer-exists) | -| `Temp directory ... Refusing to use it` / `ENOSPC: no space left on device, mkdir ''` | [Command-line errors](#temp-directory-refused-or-cannot-be-created) | +| `Temp directory ... Refusing to use it` / `Claude Code's temporary directory could not be created` | [Command-line errors](#temp-directory-refused-or-cannot-be-created) | +| `ENOSPC: no space left on device, mkdir ''` | [Command-line errors](#temp-directory-refused-or-cannot-be-created) | | `couldn't be resolved to a real location, so its skills, commands, and agents weren't loaded` | [Command-line errors](#directory-couldnt-be-resolved-to-a-real-location) | | `Error: Workspace not trusted` when starting Remote Control | [Command-line errors](#workspace-not-trusted-when-starting-remote-control) | +| `Error: Workspace not trusted` when running `claude ultrareview` | [Command-line errors](#workspace-not-trusted-when-running-claude-ultrareview) | +| `Ultrareview did not start` | [Command-line errors](#ultrareview-did-not-start) | | `` `` before `remote-control` is not carried over to the sessions Remote Control starts `` | [Command-line errors](#not-carried-over-to-the-sessions-remote-control-starts) | | `--sandbox is not supported by claude remote-control` / `--no-sandbox is not supported by claude remote-control` | [Command-line errors](#sandbox-is-not-supported-by-claude-remote-control) | | `` `claude import` is not yet available in this build `` | [Command-line errors](#claude-import-is-not-yet-available-in-this-build) | @@ -311,6 +314,7 @@ Match the message you see to a section below. | `"" was not uninstalled: is there and could not be read` | [Plugin errors](#plugin-was-not-uninstalled) | | `Plugin "" was not uninstalled: installed_plugins.json` | [Plugin troubleshooting](/docs/en/plugins/troubleshooting.md#installed-plugins-json-holds-a-record-this-version-cannot-read) | | `Plugin directory does not exist: ` | [Plugin troubleshooting](/docs/en/plugins/troubleshooting.md#plugin-directory-does-not-exist) | +| `Skipping connection (recent failure cached; retries automatically in 15 min, or edit the plugin config to retry now)` | [Plugin errors](#skipping-connection-recent-failure-cached) | | `Error: No such tool available: ` | [Tool errors](#no-such-tool-available) | | `MCP server "" connection closed before the tool call was answered` | [Tool errors](#connection-closed-before-the-tool-call-was-answered) | | `would be spawned with zero tools — refusing` | [Tool errors](#agent-would-be-spawned-with-zero-tools) | @@ -338,10 +342,11 @@ Match the message you see to a section below. | `its permission check expired before it ran (too many concurrent file operations)` / `ripgrep was found only by name on PATH` | [Tool errors](#refusing-after-a-symlink-changed) | | `task output swap refused (tasks dir moved or linked)` | [Tool errors](#task-output-swap-refused) | | `Command killed: its output file was replaced or could no longer be verified` | [Tool errors](#task-output-swap-refused) | -| `Your disk quota is full on the filesystem with Claude Code's temp directory (EDQUOT)` | [Tool errors](#disk-quota-or-temp-filesystem-is-full) | -| `The filesystem with Claude Code's temp directory , or your disk quota on it, is full (ENOSPC)` | [Tool errors](#disk-quota-or-temp-filesystem-is-full) | +| `Disk full: this computer's volume holding (Claude Code's temporary directory) has MB free` / `Nearly out of inodes: this computer's volume holding ` | [Tool errors](#disk-quota-or-temp-filesystem-is-full) | +| `Disk full: a test write beside this command's output file` / `Disk quota used up: a test write beside this command's output file` | [Tool errors](#disk-quota-or-temp-filesystem-is-full) | +| `The command was not started: this computer's disk is full (ENOSPC)` / `the user's disk quota is used up (EDQUOT)` | [Tool errors](#disk-quota-or-temp-filesystem-is-full) | +| `Your disk quota is full on the filesystem with Claude Code's temp directory (EDQUOT)` / `The filesystem with Claude Code's temp directory , or your disk quota on it, is full (ENOSPC)` | [Tool errors](#disk-quota-or-temp-filesystem-is-full) | | `Command output was lost: the temp filesystem at is full` / `is out of inodes` | [Tool errors](#disk-quota-or-temp-filesystem-is-full) | -| `The command was not started: this computer's disk is full (ENOSPC)` / `(EDQUOT)` | [Tool errors](#disk-quota-or-temp-filesystem-is-full) | | `File is not valid UTF-8. It may use a legacy encoding such as Windows-1252, Shift-JIS or GBK, or be binary` | [Tool errors](#file-is-not-valid-utf-8) | | `the source file is not valid UTF-8 text` / `the source file is not valid UTF-16 text` | [Tool errors](#the-source-file-is-not-valid-utf-8-text) | | `the source file has the replacement character U+FFFD` | [Tool errors](#the-source-file-is-not-valid-utf-8-text) | @@ -429,6 +434,7 @@ Match the message you see to a section below. | `Claude Code doesn't recognize the model "", so it assumes a context window of 200k tokens` | [Correct the window for a gateway or custom model ID](/docs/en/model-config.md#correct-the-window-for-a-gateway-or-custom-model-id) | | `[claude-code:unrecognized_model]` | [Configuration warnings](#unrecognized-model-id-on-a-request) | | `is ignored — managed settings set allowManagedReadPathsOnly` / `is ignored — managed settings set allowManagedDomainsOnly` | [Configuration warnings](#sandbox-allow-entries-are-ignored-under-a-managed-lock) | +| `Sandbox mask files left behind at write-deny paths` | [Configuration warnings](#stale-sandbox-mask-files-left-by-a-killed-session) | | `Stale sandbox mask files left by a killed session` | [Configuration warnings](#stale-sandbox-mask-files-left-by-a-killed-session) | | Responses seem lower quality than usual | [Response quality](#responses-seem-lower-quality-than-usual) | @@ -443,7 +449,7 @@ Claude Code retries these failures: * Dropped connections. When a connection drops partway through a request before Claude has completed any part of its response, including its thinking, Claude Code re-issues the request with the same backoff and the turn continues, even if some text had already started streaming. When it drops after Claude has finished thinking but before it has started any text or tool call, Claude Code instead re-issues the request up to two times in quick succession, and ends the turn with `Connection lost before a response was produced` if the connection keeps dropping at that point. * A connection that Claude Code detects was broken by your computer going to sleep partway through a request. Claude Code counts it as a dropped connection under the rules above; once the retry label names the specific reason, it reads `Connection lost while your computer was asleep`, and if the turn ends after Claude has finished thinking but before any text or tool call, the message reads `Your computer went to sleep before a response was produced`. * A stalled response stream, when the response headers have arrived but none of Claude's response has arrived, or when Claude has finished thinking but hasn't started any text or tool call: Claude Code aborts the stalled connection and streams the request again at most once. If the response stalls a second time after Claude has finished thinking but before any text or tool call, Claude Code ends the turn with `The response stalled before a response was produced`. -* A streaming request the API never answers with response headers, on a connection where the [first-byte deadline runs](/docs/en/network-config.md#streaming-idle-watchdogs): Claude Code aborts it at the deadline and re-sends it at most once per model request, within the retry budget, then ends the turn with [No response from API](#no-response-from-api) if that attempt goes unanswered too. When you set `CLAUDE_CODE_RETRY_WATCHDOG`, the one-retry cap doesn't apply. +* A streaming request the API never answers with response headers, on a connection where the [first-byte deadline runs](/docs/en/network-config.md#streaming-idle-watchdogs). At the deadline, Claude Code aborts the request and re-sends it within the retry budget. If the deadline fires for a re-send too, the turn ends with [No response from API](#no-response-from-api). When you set `CLAUDE_CODE_RETRY_WATCHDOG`, Claude Code keeps re-sending within the budget instead. * A streaming response that the API's output content filter stops before Claude has either finished thinking or started any text or tool call. Claude Code re-sends the request once, within the retry budget, and shows [Output blocked by content filtering policy](#output-blocked-by-content-filtering-policy) if the filter stops the second response too. * Temporary 429 throttles, but not a gateway's spend-limit `429`, which isn't a throttle; see [Spend limit reached](#spend-limit-reached). * When you're signed in with a claude.ai subscription, this includes 429 throttles that don't carry your plan's quota headers. Before v2.1.199, Claude Code retried those throttles only for API key and Enterprise sign-ins. @@ -561,7 +567,9 @@ The default request timeout is 10 minutes. If you set [`API_TIMEOUT_MS`](/docs/e ### No response from API -Claude Code sent a streaming request and the API returned no response headers within the deadline for the first byte, so Claude Code aborted the request instead of waiting for the full `API_TIMEOUT_MS` request timeout, 10 minutes by default. Claude Code sends the request again at most once, if the [retry budget](#tune-retry-behavior) allows. When the retry goes unanswered too, the turn ends with this message, which shows how long each attempt waited. When you set [`CLAUDE_CODE_RETRY_WATCHDOG`](/docs/en/env-vars), the one-retry cap doesn't apply and Claude Code retries under the budget described in [Tune retry behavior](#tune-retry-behavior). +Claude Code sent a streaming request, and the API returned no response headers within the deadline for the first byte. Claude Code aborts such a request rather than wait for the full `API_TIMEOUT_MS` request timeout, and sends it again if the [retry budget](#tune-retry-behavior) allows. When the deadline passes for the retry too, the turn ends with this message, which shows how long each attempt waited. + +If you set [`CLAUDE_CODE_RETRY_WATCHDOG`](/docs/en/env-vars), Claude Code keeps retrying under the budget described in [Tune retry behavior](#tune-retry-behavior) instead of ending the turn. ```text theme={null} API Error: No response from API (waited 3m, then 10m on the retry). If a proxy or gateway on your network holds responses until they complete, raise API_TIMEOUT_MS or CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS to wait longer. @@ -576,6 +584,8 @@ Claude Code sets the first attempt's wait for response headers and the retry's w Neither wait exceeds one second less than a positive `API_TIMEOUT_MS`, and a positive `API_TIMEOUT_MS` under 11 seconds turns the deadline off. The byte-level watchdog starts only once the response headers arrive, so a response that stops sending bytes after that follows the [stalled-stream rules](#automatic-retries) instead of this deadline. +In a [Claude apps gateway](/docs/en/claude-apps-gateway) session, this deadline runs only when you [turn it on](/docs/en/claude-apps-gateway-deploy.md#retry-an-unanswered-request-sooner-with-the-first-byte-deadline) by setting `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS` to `1` or more. + **What to do:** * Send your message again. Your original message is still in the conversation, so for a long prompt you can type `try again` instead of pasting the whole thing. @@ -583,7 +593,7 @@ Neither wait exceeds one second less than a positive `API_TIMEOUT_MS`, and a pos * If a proxy or gateway on your network holds responses until they complete, raise `API_TIMEOUT_MS` so the retry waits longer. On Amazon Bedrock, raise `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS` as well. * If the first attempt keeps timing out and the retry then succeeds, raise `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS` so the first attempt waits long enough too. -Before v2.1.242, Claude Code waited for the full `API_TIMEOUT_MS` request timeout, 10 minutes by default, before failing an unanswered streaming request. Before v2.1.261, the retry waited the same deadline as the first attempt and the message showed no durations. +Before v2.1.242, Claude Code waited for the full `API_TIMEOUT_MS` request timeout, 10 minutes by default, before failing an unanswered streaming request. Before v2.1.261, the retry waited the same deadline as the first attempt and the message showed no durations. Before v2.1.307, Claude Code ignored `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS` in a Claude apps gateway session. ### The response above may be incomplete @@ -2162,24 +2172,25 @@ The upload must fit an 8 MiB limit. On a long session, Claude Code progressively ### Couldn't send feedback -You sent a report from the [`/feedback`, `/bug`, or `/share` dialog](/docs/en/commands#all-commands) and the upload to Anthropic failed. The dialog keeps your text so you can retry. - -```text theme={null} -Couldn't send feedback (couldn't reach the service). If it keeps failing, you can file at https://github.com/anthropics/claude-code/issues instead. -``` +A message starting `Couldn't send feedback` means the report you submitted from the [`/feedback`, `/bug`, or `/share` dialog](/docs/en/commands#all-commands), or a queued [feedback draft](/docs/en/tools-reference.md#sendfeedback-tool-behavior), wasn't sent. When a sentence about your organization follows the colon, your organization refuses feedback and the same report gets the same answer. -The text after the prefix names what failed: +The first of these two examples is a network failure and the second is an organization's refusal: -* **`: not signed in. Run /login, then retry.`**: the dialog uploads only when Claude Code found Anthropic credentials as it opened, and none were usable by the time you sent. For example, you signed out on this machine in the meantime, or your login could no longer be refreshed. -* **A parenthetical**: `(server returned )` is the service's response code; `(request timed out)` and `(couldn't reach the service)` are network failures. When Claude Code can't name a reason, the parenthetical is absent. +```text wrap theme={null} +Couldn't send feedback (couldn't reach the service). If it keeps failing, you can file at https://github.com/anthropics/claude-code/issues instead. -In the [feedback drafts queue](/docs/en/tools-reference.md#sendfeedback-tool-behavior), the same failure ends with `The draft is still queued. Try again later.` instead, and the draft stays in the queue for another attempt. +Couldn't send feedback: Feedback has not been enabled for your organization. To report a bug, open an issue at https://github.com/anthropics/claude-code/issues. Issues are public, so leave out anything confidential. +``` **What to do:** -* For the not-signed-in wording, run `/login` and send again -* Otherwise, send again; if other requests are failing too, check your network connection and see [Unable to connect to API](#unable-to-connect-to-api) -* If it keeps failing, file the report at [github.com/anthropics/claude-code/issues](https://github.com/anthropics/claude-code/issues), as the message says +* **Not signed in**: the message continues `: not signed in. Run /login, then retry.` Run `/login`, then send again +* **Your organization's refusal**: for example `: Feedback has not been enabled for your organization.` or `: Feedback collection is not available for organizations with custom data retention policies.` If the message adds `To report a bug, open an issue`, do so at [github.com/anthropics/claude-code/issues](https://github.com/anthropics/claude-code/issues). A queued draft stays queued, and you can [discard it](/docs/en/tools-reference.md#discard-or-keep-a-draft) +* **Refused credentials**: the message continues `: the sign-in this session uses is not allowed to send feedback` or `: the server did not accept the credentials this session uses`. Run `/status` at the Claude Code prompt to see which login, token, or API key this session sends +* **`(request timed out)` or `(couldn't reach the service)` straight after `Couldn't send feedback`**: these are network failures. Send the report or the queued draft again. The dialog keeps your text, and a queued draft's message says `The draft is still queued.` If other requests are failing too, check your network connection and see [Unable to connect to API](#unable-to-connect-to-api). If it keeps failing, file the report at [github.com/anthropics/claude-code/issues](https://github.com/anthropics/claude-code/issues) +* **`(server returned )`, or no reason, straight after `Couldn't send feedback`**: the status is the service's response code. The service's own message follows it when one was sent, as in `(server returned 403: Access Forbidden)`. If it keeps failing, file the report at [github.com/anthropics/claude-code/issues](https://github.com/anthropics/claude-code/issues) + +Issues at github.com/anthropics/claude-code are public, so leave out code, transcripts, and anything else confidential when you open one. Before v2.1.281, every send failed with this message once a Remote Control **Stop** or an urgent cross-session message had arrived while the dialog was open. On those versions, close the dialog, reopen it, and send again. @@ -3169,7 +3180,7 @@ On macOS, `EPERM` for a directory in `~/Desktop`, `~/Documents`, `~/Downloads`, On macOS and Linux, Claude Code creates a private temp directory at startup, `claude-` under the system temp directory or the [`CLAUDE_CODE_TMPDIR`](/docs/en/env-vars) override. When the directory can't be created, or an entry already at that path fails the safety checks, Claude Code prints the failure to stderr and exits with code 1 rather than start the session: ```text wrap theme={null} -ENOSPC: no space left on device, mkdir '/tmp/claude-501' +Claude Code's temporary directory /tmp/claude-501 could not be created: the volume holding /tmp is full (ENOSPC). Free space on that volume, or set CLAUDE_CODE_TMPDIR to a directory on another one, then try again. Temp directory /tmp/claude-501 is not a directory (may be an attacker-planted symlink). Refusing to use it. Set CLAUDE_CODE_TMPDIR to a directory you control, or ask an administrator to remove it. @@ -3180,11 +3191,13 @@ Temp directory /tmp/claude-501 is not readable (its mode may have been altered, **What to do:** -* For `ENOSPC`, free disk space on the volume that holds the temp directory +* For `could not be created` followed by `is full (ENOSPC)`, free disk space on the volume the message names. When it says `your disk quota on the volume holding /tmp is used up (EDQUOT)` instead, delete your own files on that volume that you no longer need * For the `Refusing to use it` forms, remove the named entry itself, not what a link points to, and start Claude Code again; for the `owned by uid` form, only an administrator or that user can remove it * For `is not readable`, run `chmod 0700` on the named directory, or remove it and start again * In any of these cases, set [`CLAUDE_CODE_TMPDIR`](/docs/en/env-vars) to a directory you control and start Claude Code again, leaving the refused path alone +Before v2.1.309, Claude Code printed only the operating system's error text when the volume was full or your quota was used up. An example is `ENOSPC: no space left on device, mkdir '/tmp/claude-501'`, and the same steps apply. + ### Directory couldn't be resolved to a real location You ran `/add-dir` for a subdirectory of your working directory, and Claude Code couldn't resolve the directory to its real location. @@ -3204,6 +3217,10 @@ Before v2.1.261, this message also appeared for every `/add-dir ` ### Workspace not trusted when starting Remote Control +> [!NOTE] +> +> If `claude ultrareview` printed `Error: Workspace not trusted`, see [Workspace not trusted when running claude ultrareview](#workspace-not-trusted-when-running-claude-ultrareview) instead. + You started [Remote Control](/docs/en/remote-control.md) server mode with `claude remote-control` or its `claude rc` alias in a directory you haven't trusted, and the command couldn't ask you whether to trust it. For example, the command's standard input or standard output isn't a terminal because one of them is redirected or piped. The command exits with code 1: ```text theme={null} @@ -3227,6 +3244,31 @@ If you answer `n` or press Enter at the [`Trust ?` question](/docs/en Before v2.1.284, the command never asked, even in a terminal. +### Workspace not trusted when running claude ultrareview + +In a folder you haven't trusted, when [`claude ultrareview`](/docs/en/ultrareview#trust-the-folder-before-the-review-runs) can't ask whether you trust it, the run exits with code 1 before the review starts: + +```text theme={null} +Error: Workspace not trusted. Please run `claude` in /Users/you/project first to review and accept the workspace trust dialog. Or, in a script or CI job, pass `--trust-workspace` to trust the folder for this run only. +``` + +For example, the subcommand can't ask when its standard input or standard output isn't a terminal. Sending the output to a file, as in `claude ultrareview --json > findings.json`, means standard output isn't a terminal. + +**What to do:** + +* In a script or CI job, append `--trust-workspace` to trust the checkout for that run only: `claude ultrareview --trust-workspace`. Append it only for code you trust, because the checkout's git configuration and Claude Code project settings can then run programs. To review a pull request whose code you don't trust, see [how to review it from a checkout you do trust](/docs/en/ultrareview.md#trust-the-folder-before-the-review-runs). +* On your own machine, run `claude` in that folder and accept the [workspace trust dialog](/docs/en/permissions.md#project-allow-rules-and-workspace-trust), then run your original command again + +Each of these messages from `claude ultrareview` means that no review started and the exit code is 1: + +* **`Error: Workspace not trusted. This terminal ...`**: the terminal reported no row and column count, or can't fit the trust question and its warnings. Enlarge it or use a terminal that reports its size, then run `claude ultrareview` again. Outside your home directory, you can also run `claude` in that folder once and accept the trust dialog, so later runs there don't ask. +* **`Error: Workspace not trusted. is your home directory`**: because trust for your home directory is never saved, running `claude` there first can't help. Run `claude ultrareview` from a project directory instead, after running `claude` there once to accept the trust dialog, or append `--trust-workspace`. +* **`No answer in time.` followed by `Error: Workspace not trusted`**: the `Trust ? [y/N]` question went unanswered for 5 minutes. Run `claude ultrareview` again and answer it. +* **`Ultrareview did not start: is not trusted`**: you declined at the `Trust ? [y/N]` question, for example by answering `n` or pressing Enter. To start the review, run `claude ultrareview` again and answer `y`. +* **``Ultrareview did not start: `--trust-workspace` takes no value``**: something other than a flag follows `--trust-workspace`, such as a PR number or `false`. If you don't trust the folder, leave the flag out. To trust it for this run, put the PR number or base branch before the flag: `claude ultrareview 1234 --trust-workspace`. + +Before v2.1.309, `claude ultrareview` didn't accept `--trust-workspace`. + ### Not carried over to the sessions Remote Control starts You started [Remote Control](/docs/en/remote-control.md) with a global `claude` flag before the `remote-control` verb, one that would restrict or configure the sessions Remote Control starts, such as `--settings`, `--setting-sources`, `--permission-mode`, `--disallowed-tools`, or `--mcp-config`. A flag placed before the verb never reaches those sessions. Claude Code refuses to start instead, naming the flag: @@ -4317,6 +4359,27 @@ The middle of the message names the file and the cause: * Follow the last sentence of the message: repair or replace the settings file it names, or remove the plugin's entry from `enabledPlugins` in that file yourself, then run the uninstall again +### Skipping connection (recent failure cached; retries automatically in 15 min, or edit the plugin config to retry now) + +This message means Claude Code didn't start a stdio [MCP server that a plugin provides](/docs/en/mcp.md#plugin-provided-mcp-servers), because a connection to that server failed less than 15 minutes earlier: + +```text theme={null} +Skipping connection (recent failure cached; retries automatically in 15 min, or edit the plugin config to retry now) +``` + +The session continues without the server's tools, and Claude Code doesn't try the server again in that session when the 15 minutes end. When you start a new session or [`claude -p`](/docs/en/headless) run at least 15 minutes after the most recent failed connection, Claude Code tries the server again. + +**What to do:** + +To have Claude Code try the server again without waiting: + +* **In an interactive session**: run `/mcp`, select the server, and select **Reconnect** +* **In an [Agent SDK](/docs/en/agent-sdk/overview.md) application**: call [`reconnectMcpServer()`](/docs/en/agent-sdk/typescript#methods) in TypeScript or [`ClaudeSDKClient.reconnect_mcp_server()`](/docs/en/agent-sdk/python#methods) in Python with the server's name +* **In `claude -p`**: start an interactive session that loads the same plugin, on the same machine and with the same operating system account and [`CLAUDE_CONFIG_DIR`](/docs/en/env-vars) value as your runs. Reconnect the server there from `/mcp`. Once it connects, Claude Code tries the connection in your next run. +* **If you're developing the plugin**: change the server's `command`, `args`, or `env` in the plugin's `.mcp.json` or `plugin.json`. Claude Code tries the connection in the next session or `claude -p` run that loads the changed entry. + +The message replaces the error from the failed connection. If the new attempt fails too, Claude Code reports that attempt's error instead of this message. + ## Tool errors These errors come from Claude's tool calls. Claude corrects most tool errors on its own. When one needs a change from you, that error's **What to do** list says what to change. @@ -4668,35 +4731,39 @@ Command killed: its output file was replaced or could no longer be verified * Or check your project's directory under the Claude Code temp directory, `/private/tmp/claude-501/-Users-you-my-project` in the example message. If that path is a symbolic link, or a directory that shouldn't be there, remove the link or directory itself rather than the link's target, and restart Claude Code * If the refusal repeats, a process is replacing, linking, or removing entries under Claude Code's temp directory while the session runs. Set [`CLAUDE_CODE_TMPDIR`](/docs/en/env-vars) to a directory nothing else manages and restart -### Disk quota or temp filesystem is full +### Disk full or disk quota used up -Claude Code saves each Bash and PowerShell command's output to a file under its temp directory. These messages in a command's result mean that the filesystem holding that directory, or your disk quota on it, is full. +Free up space, inodes, or disk quota on the volume that holds Claude Code's temporary directory. A line in a command's result starting `Disk full:`, `Disk quota used up:`, or `Nearly out of inodes:` names that directory. -If Claude Code can't create that file because the filesystem or your quota on it is full, your command doesn't start, and the result reads: +Claude Code saves each Bash and PowerShell command's output to a file under that directory. If it can't create that file because the volume or your quota on it is full, your command doesn't start, and the result Claude reads is: ```text wrap theme={null} -The command was not started: this computer's disk is full (ENOSPC), so the file that captures command output could not be created. Nothing ran. If this is the user's own computer, tell them before deleting anything to make room. +The command was not started: this computer's disk is full (ENOSPC) on the volume holding /tmp/claude-501 (Claude Code's temporary directory), so the file that captures command output could not be created there and nothing ran. Free space on that volume, or restart Claude Code with CLAUDE_CODE_TMPDIR set to a directory on another one, then retry. If this is the user's own computer, tell them before deleting anything to make room. ``` -When a command exits with a nonzero code and no output at all, Claude Code checks the filesystem holding the output file. If that filesystem is out of space or inodes, or your disk quota on it is used up, a diagnostic replaces the empty output in the command's result: +The other three messages follow a command that ran and exited with a nonzero code. This example is the `Disk full:` form: ```text wrap theme={null} -Your disk quota is full on the filesystem with Claude Code's temp directory /private/tmp/claude-501/-Users-you-my-project/1f0e62dc-4b0a-4f5e-9c2d-8a7b6c5d4e3f/tasks (EDQUOT), so any output this command printed was lost, and it may have failed because it could not write. Delete files you no longer need there, or restart Claude Code with CLAUDE_CODE_TMPDIR set to a directory on another filesystem. +Disk full: this computer's volume holding /tmp/claude-501 (Claude Code's temporary directory) has 3 MB free, so whatever this command printed was lost and its own writes may have failed with "No space left on device". Free space on that volume, or restart Claude Code with CLAUDE_CODE_TMPDIR set to a directory on another one, then retry. If this is the user's own computer, tell them before deleting anything to make room. ``` -The message names what ran out: - -* `Your disk quota is full ... (EDQUOT)`: your own quota on that filesystem is used up. A quota can be full while the filesystem still shows free space -* `The filesystem with Claude Code's temp directory ..., or your disk quota on it, is full (ENOSPC)`: the filesystem, or your quota on it, has no space left -* `Command output was lost: the temp filesystem at ... is full` or `... is out of inodes`: the filesystem has almost no free space left, or is running out of inodes -* `The command was not started: this computer's disk is full (ENOSPC)` or `... (EDQUOT)`: the filesystem has no space left for the output file, or with `EDQUOT` your own quota on it is used up - **What to do:** -* Delete files you no longer need on the filesystem that holds Claude Code's temp directory. If your message doesn't name that directory, look up its default location in the [`CLAUDE_CODE_TMPDIR`](/docs/en/env-vars) reference. For `EDQUOT`, delete files that count against your own quota. For `out of inodes`, delete many files rather than a few large ones, since each file takes one inode whatever its size -* Or restart Claude Code with [`CLAUDE_CODE_TMPDIR`](/docs/en/env-vars) set to a directory on a filesystem with room +* On macOS and Linux, run `df -h ` in your shell to see which volume holds the directory and how full it is. `df -i ` shows how many inodes are free. `` is the directory your message names, as in `df -i /tmp/claude-501` +* **`Disk full: this computer's volume` or `disk is full (ENOSPC)`**: anywhere on that volume, delete files you don't need +* **`Disk quota used up:` or `Disk full: a test write`**: delete your own files on that volume, even if it still shows free space +* **`disk quota is used up (EDQUOT)`**: delete your own files on that volume +* **`Nearly out of inodes:`**: delete many files on that volume. Each takes one inode whatever its size, so their number matters, not their size +* Or restart Claude Code with [`CLAUDE_CODE_TMPDIR`](/docs/en/env-vars) set to a directory on a volume with room * Then have Claude run the command again +Before v2.1.309, the messages read as follows, and the same steps apply: + +* `Your disk quota is full on the filesystem with Claude Code's temp directory (EDQUOT)` +* `The filesystem with Claude Code's temp directory , or your disk quota on it, is full (ENOSPC)` +* `Command output was lost: the temp filesystem at is full` or `... is out of inodes` +* `The command was not started: this computer's disk is full (ENOSPC), so the file that captures command output could not be created. Nothing ran.`, or the same with `(EDQUOT)`. This form names no directory: look on the volume holding your system temp directory, such as `/tmp`, or the directory set in `CLAUDE_CODE_TMPDIR` + Before v2.1.305, a command that Claude Code couldn't start because the disk was full returned only the operating system's error text. That text read, for example, `ENOSPC: no space left on device, open .output`. ### File is not valid UTF-8 @@ -5969,22 +6036,30 @@ For the network lock, the warning names `sandbox.network.allowedDomains` and `al * If you need those paths or domains and your organization's managed settings set the lock, ask your administrator to add them to those settings. The warning stays until you also remove the entries from the named file. * To clear the warning, remove the entries from the named file. For a file you share, such as a project's `.claude/settings.json`, you can leave the entries in for teammates without the lock and leave the warning showing. -### Stale sandbox mask files left by a killed session +### Sandbox mask files left behind at write-deny paths + +This warning in `claude doctor` and `/status` lists mask files: 0-byte read-only placeholder files at paths the [sandbox](/docs/en/sandboxing.md) denies writes to. It appears on Linux and WSL2 when sandboxing is enabled with filesystem isolation on. Delete them from your shell once no Claude Code session is open in the project that holds them. -`claude doctor` prints this warning in its diagnostics, and `/status` lists the same line. It appears on Linux and WSL2 when [sandboxing](/docs/en/sandboxing.md) is enabled with filesystem isolation on. +The sandbox creates a placeholder while a sandboxed command runs and removes it when the command ends. One stays behind in cases such as these: -While a sandboxed command runs, the sandbox holds a write denial on a file that doesn't exist yet by creating a 0-byte read-only placeholder there, and removes it afterward. A session killed before that cleanup runs, for example by SIGKILL, leaves the placeholders behind. Later sessions bind them read-only again on every start, so a settings write such as saving "Yes, and don't ask again" fails where one sits. +* The session is killed before the command ends, for example by SIGKILL +* You quit the session while a sandboxed command is still running, such as one in the background + +In `claude doctor`, the warning reads: ```text theme={null} -- Stale sandbox mask files left by a killed session: /home/you/project/.claude/settings.local.json - Fix: Remove each with `rm ` while no other Claude Code session is running in that project — a 0-byte read-only file where a settings file belongs makes "Yes, and don't ask again" fail to save, and the sandbox binds it read-only again on every start +- Sandbox mask files left behind at write-deny paths: /home/you/project/.claude/settings.local.json + Fix: A session leaves one where it was killed, or where it exited while a sandboxed command was still running. Remove each with `rm ` while no other Claude Code session is running in that project — a 0-byte read-only file where a settings file belongs makes "Yes, and don't ask again" fail to save, and the sandbox binds it read-only again on every start ``` **What to do:** -* Quit any other Claude Code session running in that project, then delete each listed file with `rm`. The warning names up to three files and counts the rest, so rerun `claude doctor` after deleting until the warning no longer appears. A placeholder that another session's sandbox is still using is a live part of that session's write protection +* Quit every Claude Code session open in the project that holds the listed files, including any session where `/status` showed the warning, then work from your shell. A placeholder that another session's sandbox is still using is a live part of that session's write protection +* In your shell, delete each listed file with `rm`, and confirm if `rm` asks about a write-protected file. The warning names up to three files and counts the rest, so run `claude doctor` again after deleting until the warning no longer appears * If a permission choice you saved with "Yes, and don't ask again" didn't stick, save it again after deleting the placeholder +Before v2.1.309, the warning read `Stale sandbox mask files left by a killed session`. + Before v2.1.257, `claude doctor` didn't flag these files; earlier versions leave the same placeholders behind when a session is killed. ## Responses seem lower quality than usual diff --git a/content/en/docs/claude-code/features-overview.md b/content/en/docs/claude-code/features-overview.md index 7ab91f2015..6f81e52d64 100644 --- a/content/en/docs/claude-code/features-overview.md +++ b/content/en/docs/claude-code/features-overview.md @@ -222,7 +222,7 @@ Each feature has a different loading strategy and context cost: | Feature | When it loads | What loads | Context cost | | - | - | - | - | -| **CLAUDE.md** | Session start | Full content | Every request | +| **CLAUDE.md** | Session start | Full content of each file that loads at session start | Every request | | **Output styles** | Session start, and again when you switch styles | The active style's full instructions; nothing for the Default style | Every request | | **Skills** | Session start + when used | Descriptions at start, full content when used | Low (descriptions every request)\* | | **MCP servers** | Session start | Tool names; full schemas on demand | Low until a tool is used | @@ -242,9 +242,9 @@ Each feature loads at different points in your session. The tabs below explain w **When:** Session start -**What loads:** Full content of all CLAUDE.md files (managed, user, and project levels). +**What loads:** Full content of each CLAUDE.md file that loads at session start (managed, user, and project levels). -**Inheritance:** Claude reads CLAUDE.md files from your working directory up to the root, and discovers nested ones in subdirectories as it accesses those files. See [How CLAUDE.md files load](/docs/en/memory.md#how-claude-md-files-load) for details. +**Inheritance:** Claude reads CLAUDE.md files from your working directory up to the root, and discovers nested ones in subdirectories as it accesses those files. See [How CLAUDE.md files load](/docs/en/memory.md#how-claude-md-files-load) for details. If a nested CLAUDE.md is over its [per-file size limit](/docs/en/memory.md#claude-ignores-the-end-of-my-subdirectory-claude-md), Claude receives only the start of the file. > [!TIP] > diff --git a/content/en/docs/claude-code/glossary.md b/content/en/docs/claude-code/glossary.md index bbbc78c8fc..46ea4af667 100644 --- a/content/en/docs/claude-code/glossary.md +++ b/content/en/docs/claude-code/glossary.md @@ -82,7 +82,9 @@ Learn more: [Channels](/docs/en/channels.md) ### Checkpoint -A restore point created at each prompt you send that starts a turn. Claude Code snapshots files before every edit so a checkpoint can revert them. Press `Esc` twice or run `/rewind` to restore code, conversation, or both to an earlier point, or to summarize part of the conversation from a selected message. Checkpoints are saved with the conversation, so a resumed session can still `/rewind` to them. They're separate from git and don't track changes made through the Bash tool. +A restore point created at each prompt you send that starts a turn. Claude Code snapshots files before every edit so a checkpoint can revert them. Press `Esc` twice or run `/rewind` to restore code, conversation, or both to an earlier point, or to summarize part of the conversation from a selected message. + +Checkpoints are saved with the conversation, so a resumed session can still `/rewind` to them. Rewinding doesn't undo a Bash command's changes to a file unless Claude had already used its file editing tools on that file in your conversation. Learn more: [Checkpointing](/docs/en/checkpointing.md) diff --git a/content/en/docs/claude-code/hooks.md b/content/en/docs/claude-code/hooks.md index f69f426f40..0b393ac6b8 100644 --- a/content/en/docs/claude-code/hooks.md +++ b/content/en/docs/claude-code/hooks.md @@ -958,18 +958,21 @@ The field has no effect on these hooks: If the error for a blocked tool call includes this text, a `PreToolUse` or `PermissionRequest` command hook failed or timed out and blocked the call: ```text theme={null} -blocking because Git Bash wasn't found and this hook doesn't set "shell" to "powershell", so only exit code 0 or 2 counts as its verdict. +blocking because Git Bash wasn't found, so only exit code 0 or 2 counts as this hook's verdict. ``` -A shell-form hook with no `shell` set runs in PowerShell when Git Bash isn't installed, and a script written for Bash may not run as written there. Pick the fix that matches your hook: +To find out why the hook failed, check the [debug log](#debug-hooks). Pick the fix that matches your hook: -* **The hook is written for Bash**: install [Git for Windows](https://git-scm.com/downloads/win), or set [`CLAUDE_CODE_GIT_BASH_PATH`](/docs/en/env-vars) if Git Bash is installed where Claude Code doesn't find it, then start a new session -* **The hook runs one `.exe`, not a `.cmd` or `.bat` file**: put the program in `command` and its arguments in `args` to use [exec form](#exec-form-and-shell-form), and add [`"onFailure": "block"`](#block-the-action-when-a-hook-fails). Claude Code then starts the program with no shell. Without `"onFailure": "block"`, the call can go ahead when the program fails, is missing, or times out -* **The hook is written for PowerShell**: add `"shell": "powershell"` and [`"onFailure": "block"`](#block-the-action-when-a-hook-fails) to the hook. Without `"onFailure": "block"`, the call can go ahead when the hook still fails or times out. To find out why the hook failed, check the [debug log](#debug-hooks) -* **The action should go ahead when the hook fails**: add `"onFailure": "continue"` to the hook +* **The action should go ahead when the hook fails**: add [`"onFailure": "continue"`](#block-the-action-when-a-hook-fails) to the hook +* **The hook is written for Bash**: a [shell-form](#exec-form-and-shell-form) hook with no `shell` set runs in PowerShell when Git Bash isn't installed, where a script written for Bash may not run as written. Install [Git for Windows](https://git-scm.com/downloads/win), or set [`CLAUDE_CODE_GIT_BASH_PATH`](/docs/en/env-vars) if Git Bash is installed where Claude Code doesn't find it, then start a new session +* **The hook runs one `.exe`, not a `.cmd` or `.bat` file**: put the program in `command` and its arguments in `args` to use exec form, and add `"onFailure": "block"`. Claude Code then starts the program with no shell. Without `"onFailure": "block"`, the call can go ahead when the program fails, is missing, or times out +* **The hook exits 1 to warn but must block when it crashes**: with `"onFailure": "continue"`, the call goes ahead on exit code 1, warning or crash alike. Add `"onFailure": "block"` instead, and end the script with exit code 0 where it warns, so those calls go ahead. To show the warning on `PreToolUse` after exit code 0, print it to stdout in the [`systemMessage`](#json-output) field of one JSON object +* **A PowerShell guard hook that must block on failure**: with `onFailure` unset, it stops doing so once Git for Windows is installed and Claude Code finds Git Bash. Add `"onFailure": "block"` so a failure or a timeout blocks the call with or without Git Bash. Also set `"shell": "powershell"` so the hook keeps running in PowerShell from then on instead of in Git Bash For a hook that shows this error, any exit code other than 0 or 2 counts as a [failure](#block-the-action-when-a-hook-fails), even when the hook prints JSON that doesn't deny the call. +Before v2.1.309, the message read `blocking because Git Bash wasn't found and this hook doesn't set "shell" to "powershell", so only exit code 0 or 2 counts as its verdict.` + #### Exit code 2 behavior per event Exit code 2 is the way a hook signals "stop, don't do this." The effect depends on the event, because some events represent actions that can be blocked (like a tool call that hasn't happened yet) and others represent things that already happened or can't be prevented. diff --git a/content/en/docs/claude-code/keybindings.md b/content/en/docs/claude-code/keybindings.md index 14d3bc0d4b..8ced5f1326 100644 --- a/content/en/docs/claude-code/keybindings.md +++ b/content/en/docs/claude-code/keybindings.md @@ -124,6 +124,7 @@ Actions available in the `Chat` context: | `chat:externalEditor` | Ctrl+G, Ctrl+X Ctrl+E | Open in external editor. The [agent view dispatch input](/docs/en/agent-view.md#keyboard-shortcuts) follows this action's single-keystroke bindings too | | `chat:stash` | Ctrl+S | Stash current prompt | | `chat:imagePaste` | Ctrl+V (Alt+V on Windows and WSL) | Paste image from clipboard. On WSL, both shortcuts are bound by default | +| `command:` | (unbound) | Run the [command](/docs/en/commands.md) `/`. For example, `"meta+g": "command:compact"` in a `Chat` block makes `Meta+G` run `/compact` | \*On Windows without VT mode (Node \<24.2.0/\<22.17.0, Bun \<1.2.23), defaults to Meta+M. diff --git a/content/en/docs/claude-code/mcp.md b/content/en/docs/claude-code/mcp.md index 4bf3b065cf..680329ca47 100644 --- a/content/en/docs/claude-code/mcp.md +++ b/content/en/docs/claude-code/mcp.md @@ -366,7 +366,7 @@ Until the stream reopens, you keep the server's last fetched tools, prompts, and ### Automatic reconnection -Claude Code reconnects a remote server that drops mid-session and retries an HTTP or SSE server's first connection after a transient error. Stdio servers are local processes, and Claude Code doesn't reconnect them automatically. +Claude Code reconnects a remote server that drops mid-session and retries an HTTP or SSE server's first connection after a transient error. For a stdio server, see [Stdio servers that exit or fail to start](#stdio-servers-that-exit-or-fail-to-start). #### Mid-session drops of a remote server @@ -381,11 +381,22 @@ Claude Code first tries to reconnect a dropped remote server up to five times wi When an HTTP or SSE server's first connection fails with a transient error, such as a 5xx response, a connection refused, or a timeout, Claude Code retries up to three times. If the connection still fails, Claude Code marks the server as failed. -Claude Code doesn't retry in these cases: +Those retries don't apply in these cases: +* A stdio server's first connection. To try it again, see [Stdio servers that exit or fail to start](#stdio-servers-that-exit-or-fail-to-start) * A WebSocket server's first connection * An authentication or not-found error, because it requires a configuration change to resolve. When a [`headersHelper`](#use-dynamic-headers-for-custom-authentication) is the server's only source of the `Authorization` header, Claude Code retries an authentication error anyway, because it re-runs the helper on each attempt and can pick up a fresh credential +#### Stdio servers that exit or fail to start + +To start a stdio server again, read the column that matches what happened to it. Find your row by how you run Claude Code: an interactive session, a `claude -p` run, or an Agent SDK session. + +| How you run Claude Code | The server's process exits mid-session | The server's first connection fails | +| - | - | - | +| Interactive session | Claude Code marks the server as failed. To start it again, select **Reconnect** from the server's menu in `/mcp` | Claude Code marks the server as failed. To start it again, select **Reconnect** from the server's menu in `/mcp` | +| `claude -p` run | Claude Code starts the server again the next time Claude calls one of the server's tools, and the call runs once the server connects | The run continues without the server's tools. To have Claude Code try the connection again, start the run again. When a plugin provides the server, new runs skip the connection for 15 minutes after a failure, so wait that long first or [retry sooner](/docs/en/errors.md#skipping-connection-recent-failure-cached) | +| Agent SDK session | Claude Code starts the server again the next time Claude calls one of the server's tools, and the call runs once the server connects | The session continues without the server's tools. Your code can [reconnect the server](/docs/en/agent-sdk/mcp.md#error-handling) | + #### Failed discovery requests After a server connects, Claude Code sends it capability discovery requests such as `tools/list`, `prompts/list`, and `resources/list`. Claude Code retries those requests up to three times with short backoff after a transient network or server error. It doesn't retry authentication errors, 4xx responses, or request timeouts. @@ -498,7 +509,7 @@ Or inline in `plugin.json`: **Plugin MCP features**: * **Automatic lifecycle**: servers connect and disconnect at these points: - * At session startup, Claude Code connects the servers for enabled plugins automatically. In `/mcp`, a remote (HTTP or SSE) plugin server you've used before can show the [`cached` status](#server-status-detail) instead; Claude Code connects it when Claude first calls one of its tools + * At session startup, Claude Code connects the servers for enabled plugins automatically. In `/mcp`, a remote (HTTP or SSE) plugin server you've used before can show the [`cached` status](#server-status-detail) instead; Claude Code connects it when Claude first calls one of its tools. When a stdio plugin server's connection failed less than 15 minutes earlier, Claude Code [skips the connection](/docs/en/errors.md#skipping-connection-recent-failure-cached) * If you enable or disable a plugin during a session, Claude Code connects or disconnects its MCP servers when the change applies. [Apply plugin changes without restarting](/docs/en/plugins/cli-reference.md#reload-plugins) describes when that is. In a session without an interactive terminal, `/reload-plugins` doesn't connect or disconnect plugin MCP servers; those changes take effect in your next session * When you reload, Claude Code keeps the live connections of plugin servers whose configuration is unchanged, and does the same when you [replace the session's MCP server list](/docs/en/agent-sdk/typescript.md#mcpsetserversresult) from the Agent SDK without naming them * When you [move the session with `/cd`](/docs/en/permissions#move-the-session-to-another-directory) on v2.1.246 or later, Claude Code connects the servers of plugins the new directory's settings enable and disconnects the servers of plugins that are no longer enabled, so you don't need to run `/reload-plugins` after the move diff --git a/content/en/docs/claude-code/memory.md b/content/en/docs/claude-code/memory.md index bbb7d6f4e7..022dc3bab2 100644 --- a/content/en/docs/claude-code/memory.md +++ b/content/en/docs/claude-code/memory.md @@ -85,7 +85,7 @@ Claude treats CLAUDE.md files as context, not enforced configuration, so how you Keep your files short, organized, and consistent: -* **Size**: target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce adherence. Move instructions that matter for only part of the codebase into [path-scoped rules](#path-specific-rules), which load only when Claude works with matching files. [Imports](#import-additional-files) help you organize a long file but don't reduce its context cost, because imported files also load at launch. +* **Size**: target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce adherence. Move instructions that matter for only part of the codebase into [path-scoped rules](#path-specific-rules), which load only when Claude works with matching files. [Imports](#import-additional-files) help you organize a long file but don't reduce its context cost, because imported files load together with the CLAUDE.md that imports them. * **Structure**: group related instructions under markdown headers and bullets. Organized sections are easier for Claude to follow than dense paragraphs. * **Consistency**: if two instructions contradict each other, Claude may pick one arbitrarily. Review your CLAUDE.md files, nested CLAUDE.md files in subdirectories, and [`.claude/rules/`](#organize-rules-with-claude/rules/) periodically to remove outdated or conflicting instructions. To have Claude find them for you, [run a prompt audit](#audit-your-instruction-files). @@ -99,7 +99,7 @@ The audit runs through the bundled `/claude-api` skill. It's unavailable while t ### Import additional files -CLAUDE.md files can import additional files using `@path/to/import` syntax. Imported files are expanded and loaded into context at launch alongside the CLAUDE.md that references them. +CLAUDE.md files can import additional files using `@path/to/import` syntax. Imported files are expanded and loaded into context alongside the CLAUDE.md that references them. Both relative and absolute paths are allowed. Relative paths resolve relative to the file containing the import, not the working directory. Imported files can recursively import other files, with a maximum depth of four hops. @@ -548,7 +548,9 @@ The first 200 lines of `MEMORY.md`, or the first 25KB, whichever comes first, ar After Claude writes to `MEMORY.md`, Claude Code measures the file against the 200-line and 25KB read limits. If the file is near a limit, Claude Code reminds Claude to shorten it: keep one line per entry, move detail into topic files, and merge or drop stale entries. If the file is over a limit, the write still succeeds, but Claude Code returns an [error telling Claude to rewrite the index](/docs/en/errors.md#memory-index-is-over-its-read-limit), because everything past the limit is dropped on the next load. -This limit applies only to `MEMORY.md`. Claude Code loads a CLAUDE.md file of up to 4 MiB in full and skips a larger file. Shorter files produce better adherence. +> [!NOTE] +> +> This limit applies only to `MEMORY.md`. Claude gets the whole of each CLAUDE.md file that loads at launch, as long as the file is 4 MiB or smaller. Claude Code skips a file over 4 MiB and loads none of it. Path-scoped rules and CLAUDE.md files in subdirectories have [a smaller per-file limit of their own](#claude-ignores-the-end-of-my-subdirectory-claude-md). Claude Code doesn't load topic files such as `user_role.md` or `feedback_testing.md` at startup. Claude reads them on demand using its standard file tools when it needs the information. @@ -616,12 +618,36 @@ Run `/memory` and select the auto memory folder to browse what Claude has saved. ### My CLAUDE.md is too large -Files over 200 lines consume more context and may reduce adherence. Claude Code skips a file over 4 MiB. Use [path-scoped rules](#path-specific-rules) to load instructions only when Claude works with matching files, or trim content that isn't needed in every session. Splitting into [`@path` imports](#import-additional-files) helps organization but doesn't reduce context, since imported files load at launch. +Files over 200 lines consume more context and may reduce adherence. Claude Code skips a file over 4 MiB. Use [path-scoped rules](#path-specific-rules) to load instructions only when Claude works with matching files, or trim content that isn't needed in every session. Splitting into [`@path` imports](#import-additional-files) helps organization but doesn't reduce context, since imported files load with the CLAUDE.md importing them. If one of your instruction files is over the recommended length, you see a warning at startup and when you run `/status`. You also see a warning when files that are each within that length add up past a combined limit at session start. Each CLAUDE.md, rules file, and `@path` import counts as a separate file. The [`/doctor`](/docs/en/commands#all-commands) checkup proposes trims for a checked-in CLAUDE.md: it cuts content Claude can derive from the codebase, such as directory layouts, dependency lists, and architecture overviews, and keeps pitfalls, rationale, and conventions that differ from tool defaults. +> [!NOTE] +> +> Keep each path-scoped rules file within [its own per-file size limit](#claude-ignores-the-end-of-my-subdirectory-claude-md), because Claude receives only the start of a file that's over it. + +### Claude ignores the end of my subdirectory CLAUDE.md + +When a subdirectory `CLAUDE.md` or a rules file that loads on demand is over a per-file size limit, Claude receives only the start of it. That part ends with a note telling Claude to read the rest with the Read tool, and until Claude chooses to, the later instructions aren't in its context. + +Check whether your file is over the limit, and shrink it if it is: + +1. Confirm that the limit applies to your file. The limit applies to these files, which load on demand: + * `CLAUDE.md` and `CLAUDE.local.md` in a subdirectory of the directory where you started Claude Code, and the files they [import](#import-additional-files) with `@path` + * Rules files in a subdirectory's `.claude/rules/` + * [Path-scoped rules](#path-specific-rules) in your project's `.claude/rules/` or in `~/.claude/rules/` +2. Find the limit for your session's [context window](/docs/en/model-config.md#extended-context): + * **200K context window**: 40,000 characters + * **1M context window**: 200,000 characters on Claude Opus 4.6 and Claude Sonnet 4.6, and 150,000 characters on later models +3. In Bash or Zsh, run `wc -m path/to/CLAUDE.md` to print your file's character count. +4. Compare the count with your limit: + * **Over the limit**: trim the file, or move part of it into one or more rules files, which each count against the limit on their own + * **Under the limit**: look for another cause under [Claude isn't following my CLAUDE.md](#claude-isn’t-following-my-claude-md) + +Before v2.1.309, Claude Code didn't apply this limit to files that load on demand. + ### Instructions seem lost after `/compact` Project-root CLAUDE.md survives compaction: after `/compact`, Claude re-reads it from disk and re-injects it into the session. Nested CLAUDE.md files in subdirectories and rules with [`paths:` frontmatter](#path-specific-rules) load again on demand. diff --git a/content/en/docs/claude-code/monitoring-usage.md b/content/en/docs/claude-code/monitoring-usage.md index 5a9665af57..2caa5ac5ab 100644 --- a/content/en/docs/claude-code/monitoring-usage.md +++ b/content/en/docs/claude-code/monitoring-usage.md @@ -766,7 +766,7 @@ For message-level reconstruction, each event class carries a key that matches a * `message.uuid` on `user_prompt`, `assistant_response`, and `api_response_body` * `request_id` on the API events, persisted as `requestId` on the transcript's assistant entries -* `tool_use_id` on `tool_result` and `tool_decision` events +* `tool_use_id` on `tool_result` and `tool_decision` events, and on `safety_event` events except those for the [end of a turn](#safety-event) #### User prompt event @@ -989,7 +989,7 @@ Logged when a tool permission decision is made (accept/reject). * A grant for the rest of the session, given at an earlier permission prompt in the same interactive CLI session * The tool being inherently safe - The `source` value doesn't indicate which of these sources matched. + The `source` value doesn't indicate which of these sources matched. To find which one refused a call, look for the [Safety event](#safety-event) with the same `tool_use_id` and read its `category` and `rule_source` attributes. Some refused calls [have no safety event](#calls-without-a-safety-event). Claude Code also reports `"config"` when the permission prompt request itself fails. For example, that request fails when the Agent SDK's [`canUseTool`](/docs/en/agent-sdk/typescript#canusetool) callback or the [`--permission-prompt-tool`](/docs/en/cli-reference#cli-flags) tool returns an invalid result, or when the input stream closes while the request is pending. Before v2.1.216, Claude Code reported these failures as `"user_reject"`. * `"hook"`: A `PreToolUse` or `PermissionRequest` hook returned the decision. @@ -1026,6 +1026,93 @@ Logged when a tool permission decision is made (accept/reject). If you lower the OpenTelemetry SDK's `OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT` below the number of attributes on a `tool_decision` event, the SDK drops the attributes that Claude Code set last. The SDK drops `permission_mode` first, `classifier_category` second, and `classifier_verdict` third, and drops the event's other attributes only after those three. This ordering requires Claude Code v2.1.302 or later. +#### Safety event + +Logged when a check refuses a tool call or requires a permission prompt, except for [calls without a safety event](#calls-without-a-safety-event). Also logged when the [sandbox's network proxy](/docs/en/sandboxing.md#network-isolation) refuses a connection or request, and when a hook blocks a result. Requires Claude Code v2.1.307 or later. + +The event exports with the other events and has no separate setting. The event's own attributes hold no command text, file paths, host names, or MCP server and tool names. The record also carries the [standard attributes](#standard-attributes) every event has, which can include `workspace.host_paths` and the [repository attributes](#repository-attributes). To see the command or MCP tool behind an event, set `OTEL_LOG_TOOL_DETAILS=1` and read `tool_parameters` on the matching `tool_decision` event. + +**Event Name**: `claude_code.safety_event` + +**Attributes**: + +* All [standard attributes](#standard-attributes) +* `event.name`: `"safety_event"` +* `event.timestamp`: ISO 8601 timestamp +* `event.sequence`: per-process counter for ordering events, described under [Event correlation attributes](#event-correlation-attributes) +* `category`: The check or outcome, a [category value](#safety-event-categories) +* `decision`: `"accept"`, `"reject"`, or `"sent_back"` when a hook blocked a result or turn end +* `decision_source`: Who or what decided, a [`tool_decision`](#tool-decision-event) `source` value or `"other"` +* `reason_code`: The check's reason, such as `"rule:policySettings"`, `"mode:dontAsk"`, `"hook:PreToolUse"`, `"classifier:auto-mode"`, `"bashMiss:too-complex"`, or `"unknown"` +* `reason_type`: The check's reason type, such as `"rule"`, `"subcommandResults"`, `"mode"`, `"hook"`, `"classifier"`, or `"asyncAgent"` +* `rule_source`: Settings source of the rule involved, such as `"policySettings"`, `"userSettings"`, `"projectSettings"`, `"localSettings"`, `"flagSettings"`, `"cliArg"`, or `"session"` +* `grant_scope`: `"once"` or `"session"` for a prompt approved without saving a rule to a settings file +* `circuit_breaker`: The built-in safety check, such as `"dangerousRemoval"`, `"outsideReadsBlocked"`, or `"claudeSettingsFile"` +* `classifier_category`: With `OTEL_LOG_TOOL_DETAILS=1`, the [built-in rule](/docs/en/auto-mode-config.md#inspect-the-defaults-and-your-effective-config) behind an auto mode block, such as `"data_exfiltration"` +* `hook_event`: `"pre_tool_use"` for a `PreToolUse` hook, or `"post_tool_use"`, `"post_tool_use_failure"`, `"stop"`, or `"subagent_stop"` on `"hook_review"` events +* `tool_class`: `"bash"` for Bash and [Monitor](/docs/en/tools-reference.md#monitor-tool), `"powershell"`, `"file"` for Read, Edit, Write, NotebookEdit, Glob, and Grep, `"web"` for WebFetch and WebSearch, `"mcp"`, or `"other"` +* `tool_name`: The tool's name, such as `"Bash"` for a built-in tool, or `"mcp_tool"`, `"skill_tool"`, `"dynamic_tool"`, or `"other_tool"` +* `tool_source`: `"builtin"`, `"mcp"`, or `"sdk_host_builtin_mcp"`, as on [`tool_decision`](#tool-decision-event) +* `permission_mode`: The call's [permission mode](/docs/en/permission-modes.md) when checked: `"default"`, `"plan"`, `"acceptEdits"`, `"bypassPermissions"`, `"dontAsk"`, or `"auto"` +* `tool_use_id`: The call's ID, as on `tool_decision` and `tool_result` +* `sandbox_violation_count`: How many distinct connections or requests from the call's command the sandbox's network proxy refused, `"0"` to `"20"` as a string. Refusals are counted for a sandboxed command that finished in the foreground +* `sandbox_enabled`: `"true"` if [sandboxing](/docs/en/sandboxing.md) is on for the session, else `"false"` + +These are the event's own attributes when a managed-settings deny rule refuses a Bash command: + +```json theme={null} +{ + "event.name": "safety_event", + "category": "managed_policy", + "decision": "reject", + "decision_source": "config", + "reason_code": "rule:policySettings", + "rule_source": "policySettings", + "tool_class": "bash", + "tool_name": "Bash", + "tool_source": "builtin", + "permission_mode": "default", + "tool_use_id": "toolu_01ABC123...", + "sandbox_violation_count": "0", + "sandbox_enabled": "false" +} +``` + +##### Safety event categories + +| Value | Check or outcome | Detail attribute | +| - | - | - | +| `"permission_rule"` | A deny or ask [permission rule](/docs/en/permissions.md#manage-permissions) outside managed settings | `rule_source` | +| `"managed_policy"` | A deny or ask rule from [managed settings](/docs/en/permissions.md#managed-settings) | `rule_source` | +| `"permission_mode"` | [`dontAsk`](/docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode) or [plan](/docs/en/permission-modes.md#analyze-before-you-edit-with-plan-mode) mode, or a prompt with [no category](#prompts-with-no-category) in a session that can't show prompts, as with [`--permission-prompts none`](/docs/en/headless#turn-off-permission-prompts-in-unattended-runs) | `reason_code`, `reason_type` | +| `"hook"` | A hook, such as [`PreToolUse`](/docs/en/hooks#pretooluse) or [`PermissionRequest`](/docs/en/hooks#permissionrequest) | `hook_event`, `reason_code` | +| `"auto_mode_block"` | The auto mode [classifier](/docs/en/permission-modes.md#how-the-classifier-evaluates-actions) blocked the call | `classifier_category` | +| `"auto_mode_no_verdict"` | No usable [classifier verdict](/docs/en/errors.md#auto-mode-cannot-determine-the-safety-of-an-action), such as after a failed request | `reason_code` | +| `"safety_check"` | A built-in safety check, such as for Read, Edit, or Write outside your [working directories](/docs/en/permissions.md#working-directories) | `circuit_breaker` | +| `"static_analysis"` | How a Bash or Monitor command is written, such as one too complex to analyze | `reason_code` | +| `"sandbox_override"` | The prompt to [run a command outside the sandbox](/docs/en/sandboxing.md#the-unsandboxed-retry-escape-hatch) | `reason_code` | +| `"user_rejected"` | Someone declined or dismissed a prompt that had [no category](#prompts-with-no-category) or that only a hook required, or a `canUseTool` callback or `--permission-prompt-tool` tool denied one | `decision_source` | +| `"sandbox_network"` | The call ran and the [sandbox's network proxy](/docs/en/sandboxing.md#network-isolation) refused a connection or request | `sandbox_violation_count` | +| `"sandbox_other"` | Like `"sandbox_network"`, but no refused target reads as a host name or IP address | `sandbox_violation_count` | +| `"hook_review"` | A hook [blocked the call's result](/docs/en/hooks.md#posttooluse-decision-control) or [the end of a turn](/docs/en/hooks.md#stop-decision-control) | `hook_event` | +| `"other"` | A refusal no other value describes | `reason_code` | + +To find proxy refusals under any `category`, filter for a `sandbox_violation_count` that is present and isn't `"0"`. + +##### Calls without a safety event + +To find calls refused because nobody could answer a [prompt with no category](#prompts-with-no-category), look for [`tool_decision`](#tool-decision-event) events reporting `"reject"` with `source` `"config"` and no safety event sharing their `tool_use_id`. Such refusals happen in a `-p` run with neither [`--permission-prompt-tool`](/docs/en/cli-reference#cli-flags) nor `--permission-prompts none`. + +Check calls such as these for a `tool_decision` event, since they have no safety event except [`"sandbox_network"`, `"sandbox_other"`, or `"hook_review"` events](#safety-event-categories) sent after they run: + +* A call approved at a prompt with no category +* A call that a `canUseTool` callback or `--permission-prompt-tool` tool approved at a prompt only a `PreToolUse` hook required +* An [`AskUserQuestion`](/docs/en/tools-reference#askuserquestion-tool-behavior) or `ExitPlanMode` call, declined or not + +##### Prompts with no category + +A prompt has no category when no [`category` value](#safety-event-categories) names its check, such as the `default` mode prompt for an edit inside your working directory. + #### Permission mode changed event Logged when the permission mode changes, for example from `Shift+Tab` cycling, exiting plan mode, or an auto mode gate check. @@ -1553,11 +1640,14 @@ When building detection rules, look up the signal you want to monitor and query | Signal | Event | Key attributes | | - | - | - | -| Tool call allowed or denied, and where the decision came from, such as a rule, a hook, or the user | [`tool_decision`](#tool-decision-event) | `decision`, `source`, `classifier_verdict`, `permission_mode`, `tool_name`; `tool_parameters` when you set `OTEL_LOG_TOOL_DETAILS=1` | +| Tool call allowed or denied, and where the decision came from, such as configuration, a hook, or the user | [`tool_decision`](#tool-decision-event) | `decision`, `source`, `classifier_verdict`, `permission_mode`, `tool_name`; `tool_parameters` when you set `OTEL_LOG_TOOL_DETAILS=1` | +| Which check refused a tool call or required a permission prompt for it | [`safety_event`](#safety-event) where `category` names the check, such as `"managed_policy"`, `"permission_rule"`, `"hook"`, or `"auto_mode_block"`. `decision` is `"reject"` for a call that didn't run. Some calls [have no safety event](#calls-without-a-safety-event) | `category`, `decision`, `reason_code`, `rule_source`, `tool_name`, `tool_use_id` | | Auto mode classifier allowed or blocked a tool call, or Claude Code denied the call without a classifier verdict | [`tool_decision`](#tool-decision-event) where `classifier_verdict` is present. For a denial without a verdict, `classifier_verdict` is `"no_verdict"` or `"unavailable"` | `classifier_verdict`, `permission_mode`, `tool_name`; `classifier_category` when you set `OTEL_LOG_TOOL_DETAILS=1` | | Permission mode escalation | `permission_mode_changed` | `from_mode`, `to_mode`, `trigger` | | Which permission mode each tool call was checked in, including calls subagents make | [`tool_decision`](#tool-decision-event) | `permission_mode`, `session.id` | | Policy hook blocked an action | `hook_execution_complete` | `hook_event`, `num_blocking` | +| Which tool call a hook refused, and which result or turn end a hook blocked | [`safety_event`](#safety-event) where `category` is `"hook"` and `decision` is `"reject"` for a refused call, or `category` is `"hook_review"` for a blocked result or turn end | `category`, `decision`, `hook_event`; `tool_use_id` for a tool call | +| Sandbox's network proxy refused a connection or request from a Bash or PowerShell command | [`safety_event`](#safety-event) where `sandbox_violation_count` is present and isn't `"0"` | `sandbox_violation_count`, `category`, `sandbox_enabled`, `tool_use_id` | | Login, logout, and authentication failure | `auth` | `action`, `success`, `error_category` | | MCP server connect or failure | `mcp_server_connection` | `status`, `server_name`, `is_plugin`, `error_code` | | Plugin installed and its source | `plugin_installed` | `plugin.name`, `marketplace.name`, `marketplace.is_official` | diff --git a/content/en/docs/claude-code/network-config.md b/content/en/docs/claude-code/network-config.md index 28ab562661..a515d9ba91 100644 --- a/content/en/docs/claude-code/network-config.md +++ b/content/en/docs/claude-code/network-config.md @@ -183,12 +183,12 @@ Set the [`processWrapper`](/docs/en/settings-reference#processwrapper) setting t Claude Code runs four independent timers that abort a streaming model response when it goes quiet, so a dead connection fails and retries instead of hanging. A request that gets no response headers at all ends in one of two ways: -* **Where the first-byte deadline runs**: the first attempt ends at that deadline. To change it, set `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`. For the retry's wait, see [No response from API](/docs/en/errors.md#no-response-from-api). -* **On the other connections**: the request ends after 5 to 6 minutes, when the body idle timeout fires, unless you turned that timeout off. To end it sooner, lower `API_TIMEOUT_MS`. +* **Where the first-byte deadline runs**: the first attempt ends no later than that deadline. To change it, set `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`. For the retry's wait, see [No response from API](/docs/en/errors.md#no-response-from-api). +* **On the other connections**: the request ends after 5 to 6 minutes, when the body idle timeout fires, unless you turned that timeout off. To end the request sooner, lower `API_TIMEOUT_MS`. In a [Claude apps gateway](/docs/en/claude-apps-gateway) session, you can instead end the first attempt sooner by [turning on the first-byte deadline](/docs/en/claude-apps-gateway-deploy.md#retry-an-unanswered-request-sooner-with-the-first-byte-deadline). | Timer | Aborts when | Runs on | Default timeout | | :- | :- | :- | :- | -| First-byte deadline | No response headers arrive after Claude Code sends the request | Direct Anthropic API and [Claude Platform on AWS](/docs/en/claude-platform-on-aws.md), including through an HTTPS proxy, but not when `ANTHROPIC_BASE_URL` or `ANTHROPIC_AWS_BASE_URL` routes them through a [gateway](/docs/en/gateways.md). Opt-in on Amazon Bedrock with `CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK=1`; doesn't run on Google Cloud's Agent Platform or Microsoft Foundry, or in a [Claude apps gateway](/docs/en/claude-apps-gateway) session | 180 seconds on the direct Anthropic API, 300 seconds elsewhere, plus one second per 32KB of request body | +| First-byte deadline | No response headers arrive after Claude Code sends the request | Direct Anthropic API and [Claude Platform on AWS](/docs/en/claude-platform-on-aws.md), including through an HTTPS proxy, but not when `ANTHROPIC_BASE_URL` or `ANTHROPIC_AWS_BASE_URL` routes them through a [gateway](/docs/en/gateways.md). Opt-in for a [Claude apps gateway session](/docs/en/claude-apps-gateway-deploy.md#retry-an-unanswered-request-sooner-with-the-first-byte-deadline), and on Amazon Bedrock with `CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK=1`; doesn't run on Google Cloud's Agent Platform or Microsoft Foundry | 180 seconds on the direct Anthropic API and 300 seconds on Claude Platform on AWS or Amazon Bedrock, plus one second per 32KB of request body | | Event-level watchdog | No response events parse. Where the byte-level watchdog runs on a connection other than Amazon Bedrock, arriving bytes, including keep-alive pings, also reset this watchdog, for a limited time without a parsed event. That time is about five minutes when bytes arrive at least every 10 seconds. On a Claude apps gateway's 15-second pings it is about 7.5 minutes, so a pings-only stream ends after about 12.5 minutes at the default timeout. | Every provider | 300 seconds | | Byte-level watchdog | No bytes arrive on the wire, including SSE keep-alive pings | Direct Anthropic API, [Claude Platform on AWS](/docs/en/claude-platform-on-aws.md), and [gateway](/docs/en/gateways.md) connections, including a custom `ANTHROPIC_BASE_URL`. Opt-in on Amazon Bedrock `vnd.amazon.eventstream` responses with `CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK=1`; doesn't run on Google Cloud's Agent Platform or Microsoft Foundry | 180 seconds on the direct Anthropic API. 300 seconds on Claude Platform on AWS, on Amazon Bedrock, in a [Claude apps gateway](/docs/en/claude-apps-gateway) session, and through a custom `ANTHROPIC_BASE_URL` | | Body idle timeout | No bytes arrive for 5 minutes, counting the wait for response headers | Providers other than the direct Anthropic API, Claude Platform on AWS, and Amazon Bedrock with `CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK=1` set, unless [`API_FORCE_IDLE_TIMEOUT`](/docs/en/env-vars) changes that | 5 minutes | @@ -200,8 +200,8 @@ Configure the timers with these variables, each detailed in the [environment var * `CLAUDE_ENABLE_STREAM_WATCHDOG` and `CLAUDE_ENABLE_BYTE_WATCHDOG` force the corresponding watchdog on with `1` or off with `0`, within the connections the table lists; neither variable extends a watchdog to a connection type it doesn't cover. `CLAUDE_ENABLE_BYTE_WATCHDOG` set to `0` also turns off the first-byte deadline. * `CLAUDE_STREAM_IDLE_TIMEOUT_MS` sets both watchdogs' timeout. Claude Code raises values below 5 minutes to 5 minutes, and caps the value at 30 minutes for the byte-level watchdog. * `CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS` sets the byte-level watchdog's timeout without changing the event-level watchdog's, clamped to between 10 seconds and 30 minutes, and takes precedence over `CLAUDE_STREAM_IDLE_TIMEOUT_MS` for that watchdog. -* `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS` sets the first-byte deadline directly. Leave it unset and Claude Code uses the byte-level watchdog's timeout, so `CLAUDE_STREAM_IDLE_TIMEOUT_MS` and `CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS` change the deadline too. For the clamps, the upload allowance, the `API_TIMEOUT_MS` cap, and how long the retry waits after a no-response abort, see [No response from API](/docs/en/errors.md#no-response-from-api). -* `API_TIMEOUT_MS` limits the wait for response headers, not how long a response streams after them. Where the first-byte deadline doesn't run, such as a Claude apps gateway session, set it below `300000`, which is 5 minutes, to retry an unanswered request sooner. Keep it above the longest wait for headers, and the longest [non-streaming request](/docs/en/errors.md#streaming-response-ended-before-any-complete-data-was-received), that you expect: a request that needs longer times out again on each retry. +* `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS` sets the first-byte deadline. In a Claude apps gateway session, set this variable to [turn the deadline on](/docs/en/claude-apps-gateway-deploy.md#retry-an-unanswered-request-sooner-with-the-first-byte-deadline). If you leave the variable unset on another connection where the deadline runs, Claude Code uses the byte-level watchdog's timeout, so `CLAUDE_STREAM_IDLE_TIMEOUT_MS` and `CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS` change the deadline too. For the limits on the value, see [No response from API](/docs/en/errors.md#no-response-from-api). +* `API_TIMEOUT_MS` limits the wait for response headers, not how long a response streams after them. Where the first-byte deadline doesn't run, set `API_TIMEOUT_MS` to a positive value under `300000` to retry an unanswered request in less than 5 minutes. Keep `API_TIMEOUT_MS` above the longest wait for headers, and the longest [non-streaming request](/docs/en/errors.md#streaming-response-ended-before-any-complete-data-was-received), that you expect: a request that needs longer times out again on each retry. * `API_FORCE_IDLE_TIMEOUT` set to `0` turns the body idle timeout off, and set to `1` turns it on for every provider. The watchdogs run independently of it, so to let a stream pause longer than their thresholds, also raise or disable them. When a watchdog aborts a stalled stream, Claude Code treats the abort as a mid-stream failure, and what you see depends on how far the response had got. Claude Code retries the request or ends the turn with an error, keeps the completed output and shows an [incomplete-response notice](/docs/en/errors.md#the-response-above-may-be-incomplete), or ends the turn normally. [Automatic retries](/docs/en/errors.md#automatic-retries) says where each outcome applies. diff --git a/content/en/docs/claude-code/permissions.md b/content/en/docs/claude-code/permissions.md index 5c813135c0..eeb44fbaf4 100644 --- a/content/en/docs/claude-code/permissions.md +++ b/content/en/docs/claude-code/permissions.md @@ -104,6 +104,8 @@ To match all uses of a tool, use only the tool name without parentheses: `Bash(*)` is equivalent to `Bash` and matches all Bash commands. As a deny rule, both forms remove the tool from Claude's context. +The label shown for a tool in the transcript and permission dialog can differ from its canonical name. For example, the tool labeled `Stop Task` in the transcript has the canonical name `TaskStop`. Permission rules and [hook matchers](/docs/en/hooks.md) don't match the label, so a rule written as `Stop Task` doesn't match. For deny and ask rules, a [startup warning](/docs/en/errors.md#matches-no-tool) says so. Use the canonical names listed in the [tools reference](/docs/en/tools-reference.md). + ### Use specifiers for fine-grained control Add a specifier in parentheses to match specific tool uses: @@ -206,8 +208,6 @@ Allow rules accept tool-name globs only after a literal `mcp____` prefix A deny or ask rule whose tool name matches no known tool produces a [startup warning](/docs/en/errors.md#matches-no-tool) to catch typos. Tool names containing `_` or `*` are exempt from the check, and so are the names of tools Claude Code has removed, such as `TaskOutput`. -The label shown for a tool in the transcript and permission dialog can differ from its canonical name. For example, the tool labeled `Stop Task` in the transcript has the canonical name `TaskStop`. Permission rules and [hook matchers](/docs/en/hooks.md) don't match the label, so a rule written as `Stop Task` doesn't match. For deny and ask rules, the startup warning above catches the mismatch. Use the canonical names listed in the [tools reference](/docs/en/tools-reference.md). - ## Tool-specific permission rules ### Bash diff --git a/content/en/docs/claude-code/plugins/mods/interface.md b/content/en/docs/claude-code/plugins/mods/interface.md index 5ad1ee5f31..63370cfd30 100644 --- a/content/en/docs/claude-code/plugins/mods/interface.md +++ b/content/en/docs/claude-code/plugins/mods/interface.md @@ -512,7 +512,7 @@ A test presses or types into a control by its `key`, so give each control one. E ### Keyboard focus and hotkeys -Your mod never reads the keyboard itself. The user presses a key, Claude Code decides which of your controls it's for, and that control's callback runs. Apart from a [digit hotkey on the band](/docs/en/plugins/mods/reference.md#elements), that happens only while your pane or band has keyboard focus. The rest of the time, keys go to the prompt. +Your mod never reads the keyboard itself. The user presses a key, Claude Code decides which of your controls it's for, and that control's callback runs. Apart from a [digit hotkey on the band or an `action` binding](/docs/en/plugins/mods/reference#elements), that happens only while your pane or band has keyboard focus. The rest of the time, keys go to the prompt. In the [VS Code extension](#draw-in-the-vs-code-extension), buttons have no hotkeys: the user clicks a button or presses Enter on it, and types into fields. @@ -522,7 +522,7 @@ A pane gets keyboard focus when: * Your mod opens it with `focus: true` from a command or a press * The user presses Ctrl+X then Tab -* The user clicks it +* The user clicks it, which in the terminal needs [fullscreen rendering](/docs/en/fullscreen.md) Claude Code grants `focus: true` only while the prompt is empty and nothing else has keyboard focus. A pane that opens while the user is typing doesn't take their keystrokes. @@ -539,6 +539,7 @@ This table lists what a key does while your pane or band has keyboard focus: | Page Up, Page Down, Home, and End | Scroll your pane or band when it has more rows than it can show | | Ctrl+X then an arrow key | Resizes your pane. Left or Up gives it more room, and Right or Down gives the room back. A pane beside the transcript stops widening at 45% of the terminal's width. | | Ctrl+X then X | Closes your pane, even while one of its fields has the focus | +| Ctrl+X then Ctrl+A | [Collapses the band](#when-the-user-collapses-the-band) to one row while a mod draws there, or expands it again. These keys also work while the prompt has the focus. | | Esc | Returns keyboard focus to the prompt. With `closeOnEscape: true`, it also closes the pane. | A mod can't bind Tab or the arrow keys to anything else, so a game steers with `w`, `a`, `s`, and `d`. @@ -557,6 +558,23 @@ How a hotkey shows depends on the button and the app: In the terminal, name the key in a bracketed button's label, or use `plain: true`, so the user can see what to press. The [elements reference](/docs/en/plugins/mods/reference.md#elements) has the other `Button` rules: `action`, digit hotkeys on the band, and two buttons on one hotkey. +#### When the user collapses the band + +In the terminal, while a mod draws in the band, the user can collapse the band to one row to get it out of the way: + +* **Click `[-]`**: while the band is expanded, Claude Code draws this mark at the right end of its first row. In [fullscreen rendering](/docs/en/fullscreen.md), the user clicks it to collapse the band. +* **Press Ctrl+X then Ctrl+A**: this works whether the prompt, the band, or a pane has keyboard focus. The user can [bind other keys](/docs/en/keybindings.md#above-prompt-actions) to it through the `abovePrompt:toggle` action. + +A collapsed band hides everything the mods draw there and shows one dim row instead, which names the keys that expand it as the user has them bound: + +```text theme={null} +▸ plugin panel hidden · ctrl+x ctrl+a or click to show +``` + +The same keys, or in fullscreen rendering a click on the row, expand the band again. Until then, nothing presses a button in it: no hotkey, no digit typed into an empty prompt, and no keybinding for a button's [`action`](/docs/en/plugins/mods/reference#elements). If the band has keyboard focus when the user collapses it, the focus returns to the prompt, and Ctrl+X then Tab skips the band while it's collapsed. + +The band stays collapsed until the user expands it, even after `/clear`, and is expanded again the next time Claude Code starts. Your mod can't expand it or tell that it's collapsed: the `ui.render` hook keeps running, and nothing in `e.props` says so. Don't make the band the only place your mod shows something the user has to answer. + ### Take typed input and draw a row for each item Many panes are a text field with a list under it. The example in this section is a notes pane: you type a note and press Enter to add it, and each note has an `x` button that deletes it. With two notes added, the terminal draws the pane this way: diff --git a/content/en/docs/claude-code/plugins/mods/reference.md b/content/en/docs/claude-code/plugins/mods/reference.md index 94fb0db7ff..291f55d539 100644 --- a/content/en/docs/claude-code/plugins/mods/reference.md +++ b/content/en/docs/claude-code/plugins/mods/reference.md @@ -261,28 +261,36 @@ Elements are the building blocks of a tree a `ui.render` hook returns, and you g | Element | Main props | Terminal | Desktop | VS Code | | :- | :- | :-: | :-: | :-: | -| [`Box`](/docs/en/plugins/mods/interface#build-a-tree-from-elements) | `key`, flex layout, [`gap`, `padding`, `margin`](#box-spacing-steps), `width`, `height`, [`borderStyle`](#box-border-styles), `backgroundColor`, `position`, `hover` | ✓ | ✓ | ✓ | -| [`Text`](/docs/en/plugins/mods/interface#build-a-tree-from-elements) | `color`, `backgroundColor`, [`bold`](#text-bold), `italic`, `underline`, `dimColor`, `inverse`, `wrap`, [`size`, `weight`, `mono`, `tabular`](#text-typography) | ✓ | ✓ | ✓ | -| [`Button`](/docs/en/plugins/mods/interface#respond-to-presses-and-typing) | `key`, `label`, `onPress`, `hotkey`, `plain`, `dimColor`, `autoFocus`, `action` | ✓ | ✓ | ✓ | +| [`Box`](/docs/en/plugins/mods/interface#build-a-tree-from-elements) | `key`, flex layout, [`gap`, `padding`, `margin`](#box-spacing-steps), `width`, `height`, `minWidth`, `minHeight`, [`borderStyle`](#box-border-styles), `borderColor`, `borderDimColor`, `backgroundColor`, `position`, `top`, `left`, `right`, `bottom`, `overflow`, `display`, `hover` | ✓ | ✓ | ✓ | +| [`Text`](/docs/en/plugins/mods/interface#build-a-tree-from-elements) | `color`, `backgroundColor`, [`bold`](#text-bold), `italic`, `underline`, `strikethrough`, `dimColor`, `inverse`, `wrap`, [`size`, `weight`, `mono`, `tabular`](#text-typography), `hover` | ✓ | ✓ | ✓ | +| [`Button`](/docs/en/plugins/mods/interface#respond-to-presses-and-typing) | `key`, `label`, `onPress`, `hotkey`, `plain`, `dimColor`, `autoFocus`, `action`, `hover` | ✓ | ✓ | ✓ | | [`Link`](/docs/en/plugins/mods/interface#link-in-the-desktop-app) | `href`, `label`. See [Limits](#limits). | ✓ | ✓ | ✓ | | [`Code`](/docs/en/plugins/mods/gallery#show-code-and-changes) | `source`, `language`, `path`, `startLine`, `format`, `wrap` | ✓ | ✓ | ✓ | | `Markdown` | `text`, `key`, `dimColor`, `onLinkPress`, `pressableLinks` | ✓ | ✓ | ✓ | | [`Input`](/docs/en/plugins/mods/interface#take-typed-input-and-draw-a-row-for-each-item) | `key`, `label`, `placeholder`, `value`, `submitLabel`, `onSubmit`, `onInput`, `autoFocus` | ✓ | ✓ | ✓ | | `Select` | `key`, `label`, `options`, `value`, `onSelect`, `autoFocus` | ✓ | ✓ | ✓ | -| `Svg` | An SVG document, up to 131,072 characters | | ✓ | ✓ | -| [`Client`](/docs/en/plugins/mods/interface#build-a-tree-from-elements) | `module`, `key` | ✓ | ✓ | | +| `Svg` | a `source` of SVG markup up to 131,072 characters, `alt` text, `width`, `height`, and `isInteractive` | | ✓ | ✓ | +| [`Client`](/docs/en/plugins/mods/interface#build-a-tree-from-elements) | `module`, `key`, `props`, `width`, `height`, `flexGrow` | ✓ | ✓ | | | [`Raster`](/docs/en/plugins/mods/interface#draw-a-grid-of-colored-cells) | `key`, `columns` up to 512, `rows` up to 256, `cells`. See [Draw a grid of colored cells](/docs/en/plugins/mods/interface.md#draw-a-grid-of-colored-cells). | ✓ | | | -| `Image` | PNG or RGBA bytes up to 2 MiB, or a file path, `columns` and `rows` up to 255, and `alt` text. See [which terminals draw it](/docs/en/plugins/mods/gallery.md#image-and-client). | ✓ | | | +| `Image` | `key`, a `source` such as PNG or RGBA bytes up to 2 MiB, or a file path, `columns` and `rows` up to 255, and `alt` text. See [which terminals draw it](/docs/en/plugins/mods/gallery.md#image-and-client). | ✓ | | | -More `Button` rules: `action` names one of Claude Code's own [keybinding actions](/docs/en/keybindings.md), and the user's binding for it presses the button when that binding is a chord or a modified key. A digit `hotkey` on a button in the band also fires when the user types that digit alone into an empty prompt and pauses. When two buttons in one drawing name the same `hotkey`, the later one gets it. `autoFocus` accepts only `true` on any control, so omit the prop to leave it off. +More `Button` rules: + +* **`action`**: names one of Claude Code's own [keybinding actions](/docs/en/keybindings.md), and the user's binding for it presses the button when that binding is a chord or a modified key +* **Digit hotkeys on the band**: a digit `hotkey` on a button in the band also fires when the user types that digit alone into an empty prompt and pauses +* **A collapsed band**: while the band is [collapsed](/docs/en/plugins/mods/interface.md#when-the-user-collapses-the-band), neither an `action` binding nor a hotkey presses a button in it +* **Two buttons on one hotkey**: when two buttons in one drawing name the same `hotkey`, the later one gets it + +`autoFocus` accepts only `true` on any control, so omit the prop to leave it off. The VS Code extension ignores some element props and draws the element as if you had left them out: -* **`Box`**: `position` and `hover` -* **`Text`**: `size`, `mono`, and `tabular` -* **`Button`**: `hotkey`, `plain`, `autoFocus`, and `action`, so the user presses a button there with a click, or with Enter once it has focus +* **`Box`**: `position` with its `top`, `left`, `right`, and `bottom`, `alignSelf`, `borderDimColor`, and `hover` +* **`Text`**: `size`, `mono`, `tabular`, and `hover` +* **`Button`**: `hotkey`, `plain`, `autoFocus`, `action`, and `hover`, so the user presses a button there with a click, or with Enter once it has focus * **`Code`**: `language`, `path`, `startLine`, `format`, and `wrap`, so code draws without colors or line numbers, and a `format: 'diff'` block shows the diff's raw text * **`Input` and `Select`**: `autoFocus` +* **`Svg`**: `isInteractive` ### `Box` border styles diff --git a/content/en/docs/claude-code/plugins/mods/troubleshoot.md b/content/en/docs/claude-code/plugins/mods/troubleshoot.md index d8ca3bf8be..5ab5653b8e 100644 --- a/content/en/docs/claude-code/plugins/mods/troubleshoot.md +++ b/content/en/docs/claude-code/plugins/mods/troubleshoot.md @@ -102,6 +102,12 @@ The line starts with the mod's name, then `hooks module did not load:`, the file Rewrite the code so its scopes nest less deeply. +### `the engine ran out of stack linking the file and its imports` + +Code in the hooks module is nested too deeply, or its chain of imports is too long, for Claude Code to load it. The line starts with the mod's name and `hooks module did not load:`, then gives a file's name and this reason. + +Look through that file and the files reached through its imports for the most deeply nested part and rewrite it to nest less, or shorten the chain of imports. If you installed the mod and didn't write it, ask its author to. + ### `the parser stopped` or `the engine ran out of stack loading the file` Code in one file of the hooks module is nested so deeply that Claude Code ran out of stack reading it. The line starts with the mod's name and `hooks module did not load:`, then gives that file's name and one of these reasons: @@ -253,11 +259,18 @@ Your mod calls [`$.ui.toast`](/docs/en/plugins/mods/api#show-something-without-s Before v2.1.290, Claude Code dropped a toast raised within two seconds of the last one it showed for your mod, and the debug log line for the dropped toast said `within 2000ms of the last; dropped`. +### The band shows `plugin panel hidden` + +The band is [collapsed](/docs/en/plugins/mods/interface.md#when-the-user-collapses-the-band). It collapses when you press Ctrl+X then Ctrl+A, or the keys you bound in their place, and in [fullscreen rendering](/docs/en/fullscreen.md) when you click the `[-]` on its first row. It stays collapsed until you expand it or start Claude Code again, and meanwhile no hotkey or `action` binding presses a button in it. + +To expand the band, press the keys the row names, Ctrl+X then Ctrl+A by default, or in fullscreen rendering click the row. + ### Hotkeys do nothing -Your pane doesn't have keyboard focus, or the drawing is in the VS Code extension, where buttons have no hotkeys. Do the one that matches: +Your pane or band doesn't have keyboard focus, your button is in a collapsed band, or the drawing is in the VS Code extension, where buttons have no hotkeys. Do the one that matches: -* **No keyboard focus**: press Ctrl+X then Tab, or click the pane. To have the pane take focus when it opens, open it with `focus: true` from a command. +* **No keyboard focus**: press Ctrl+X then Tab or, in [fullscreen rendering](/docs/en/fullscreen.md), click the pane or band. To have the pane take focus when it opens, open it with `focus: true` from a command. +* **The button is in a collapsed band**: the band shows one dim row that starts with `▸ plugin panel hidden`. Press the keys the row names, Ctrl+X then Ctrl+A by default, to [expand it](#plugin-panel-hidden). * **In the VS Code extension**: click the button, or press Enter on it once it has focus ### A drawing works in the terminal and not in the Desktop app or VS Code diff --git a/content/en/docs/claude-code/plugins/troubleshooting.md b/content/en/docs/claude-code/plugins/troubleshooting.md index 9411583ff6..678f9a807c 100644 --- a/content/en/docs/claude-code/plugins/troubleshooting.md +++ b/content/en/docs/claude-code/plugins/troubleshooting.md @@ -902,6 +902,10 @@ Run `/mcp` to see the server's status. When the server is healthy, `/mcp` lists To read the error the server printed while starting, run `claude --debug` and open the log at `~/.claude/debug/.txt`. The `--debug` flag doesn't print to the terminal. +> [!NOTE] +> +> When a connection to a [plugin's stdio server](/docs/en/mcp.md#plugin-provided-mcp-servers) failed less than 15 minutes before you ran `claude --debug`, Claude Code [doesn't start the server](/docs/en/errors.md#skipping-connection-recent-failure-cached). In the new session, select **Reconnect** from the server's menu in `/mcp` to start it, then open the log. + A server entry in `.mcp.json` that fails the schema doesn't appear in the **Errors** tab. Claude Code drops that server and records `Invalid MCP server config for in ` only in that debug log. To find the entry without loading the plugin, run `claude plugin validate` in your shell on the plugin directory, which reports it as an error. Before v2.1.281, `claude plugin validate` didn't check `.mcp.json`. diff --git a/content/en/docs/claude-code/prompt-caching.md b/content/en/docs/claude-code/prompt-caching.md index 85e748e27a..bdf4814180 100644 --- a/content/en/docs/claude-code/prompt-caching.md +++ b/content/en/docs/claude-code/prompt-caching.md @@ -118,7 +118,7 @@ Without tool search, whether a mid-session server change invalidates the cache d | Mid-session change | Cache | Tool definitions in the next request | | - | - | - | | A server connects, or a [dynamic tool update](/docs/en/mcp.md#dynamic-tool-updates) adds tools | Invalidated | The new definitions are added | -| A server drops out with no action on your part, such as a stdio server's process exiting | Kept | The server's definitions stay unchanged. A call to one of its tools returns an error instead of running | +| A server drops out with no action on your part, such as a stdio server's process exiting | Kept | The server's definitions stay unchanged. A call to one of its tools returns an error instead of running, unless Claude Code [starts the server again](/docs/en/mcp.md#stdio-servers-that-exit-or-fail-to-start) for that call | | A remote server [reconnects automatically](/docs/en/mcp.md#automatic-reconnection) after its connection drops | Kept, unless a request sent while the server reconnects adds the `WaitForMcpServers` tool, which invalidates the cache once | The server's definitions stay unchanged. A request sent while the server reconnects can add `WaitForMcpServers` when the conversation hasn't listed it yet, and the tool then stays listed for the rest of the conversation | | You remove a tool on purpose, such as with a [deny rule](#denying-an-entire-tool) or by disabling its server in `/mcp` | Invalidated | The definition is removed | diff --git a/content/en/docs/claude-code/remote-control.md b/content/en/docs/claude-code/remote-control.md index 53c670be3f..8ebc100fcd 100644 --- a/content/en/docs/claude-code/remote-control.md +++ b/content/en/docs/claude-code/remote-control.md @@ -363,7 +363,7 @@ Claude Code skips mobile push notifications while you are typing in or focused o * Text-output commands: `/compact`, `/clear`, `/context`, `/usage`, `/exit`, `/usage-credits`, `/recap`, and `/reload-plugins`. `/usage-credits` prints the billing URL instead of opening a browser. `/reload-plugins` works only when the session runs in an interactive terminal; a session without one declines it. * `/model`, `/effort`, `/fast`, `/color`, and `/rename`: pass the value as an argument, for example `/model sonnet` or `/effort high`. From mobile and web, `/model` and `/effort` take the argument in place of the terminal picker or slider. * `/mcp`: from the mobile app, returns a text summary of server status instead of opening the picker. On the web, `/mcp` on its own opens a directory of [claude.ai connectors](/docs/en/mcp.md#use-mcp-servers-from-claude-ai) instead of returning the summary. The `reconnect`, `enable`, and `disable` [subcommands](/docs/en/commands.md#all-commands) work from both when the session runs in an interactive terminal. `/mcp reconnect` with no server name retries every server that has failed or needs authentication. To authorize a claude.ai connector without the picker, see [Authorize a connector again from your shell](#authorize-a-connector-again-from-your-shell). - * `/config`: from the mobile app, pass `key=value` to set a setting, or run it with no argument to list the keys you can set. On the web, `/config` opens the Claude Code section of your settings instead, and ignores text after the command. + * `/config`: from the mobile app, pass `key=value` to set a setting, or run it with no argument to list the keys you can set. On the web, `/config` opens the Claude Code section of your settings instead. * On Team and Enterprise, `/usage-credits` from mobile or web doesn't send a [usage-credits request to your admin](/docs/en/costs.md#add-usage-credits-to-your-subscription). Sending requires a confirmation that appears only in the interactive CLI, so the command tells you to run it there instead. * `/autocompact`, from v2.1.221: pass the window size as an argument, for example `/autocompact 500k`. With no argument, it prints the current window size as text instead of opening the dialog the command shows in a terminal session. * `/advisor`, from v2.1.260: pass the model as an argument, for example `/advisor opus`, or pass `off` to turn the advisor off. Both forms apply to the current session only and leave your saved default unchanged. With no argument, it prints the current advisor as text instead of opening the picker. diff --git a/content/en/docs/claude-code/sandboxing.md b/content/en/docs/claude-code/sandboxing.md index 7ba7c77201..e1c2874e87 100644 --- a/content/en/docs/claude-code/sandboxing.md +++ b/content/en/docs/claude-code/sandboxing.md @@ -889,7 +889,7 @@ In an unprivileged container, [bubblewrap](#os-level-enforcement) can't mount a On Linux and WSL2, the sandbox holds a write denial on a file that doesn't exist yet by creating a 0-byte read-only placeholder there while a sandboxed command runs. The sandbox removes the placeholder afterward. If a session is killed before that cleanup runs, for example by SIGKILL, the placeholders stay behind. Later sessions bind the placeholders read-only again on every start, so a settings write such as saving a permission choice fails at a path where a placeholder remains. -Run `claude doctor` in your terminal to list the leftover placeholder files. The [`Stale sandbox mask files left by a killed session`](/docs/en/errors#stale-sandbox-mask-files-left-by-a-killed-session) warning names some of them and counts the rest. Delete each file with `rm` while no other Claude Code session is running in that project. Before v2.1.257, Claude Code left the same placeholders behind without flagging them. +Run `claude doctor` in your terminal to list the leftover placeholder files. The [`Sandbox mask files left behind at write-deny paths`](/docs/en/errors#stale-sandbox-mask-files-left-by-a-killed-session) warning names some of them and counts the rest. Delete each file with `rm` while no other Claude Code session is running in that project. Before v2.1.257, Claude Code left the same placeholders behind without flagging them. ### `git` over SSH fails with the sandbox on diff --git a/content/en/docs/claude-code/sessions.md b/content/en/docs/claude-code/sessions.md index 2b2e063a1a..8c372df971 100644 --- a/content/en/docs/claude-code/sessions.md +++ b/content/en/docs/claude-code/sessions.md @@ -91,6 +91,15 @@ A `claude -p --resume` or `claude -p --continue` run resumes in plan mode only w * The run isn't started through [channels](/docs/en/channels.md) * No [deny rule](/docs/en/permissions.md#manage-permissions) removes the `ExitPlanMode` tool +### The "Resume this conversation?" dialog + +If you see the "Resume this conversation?" dialog when resuming a session, its estimate is the share of your 5-hour usage limit that the saved conversation alone would use. The estimate doesn't count what you've already used. + +On Pro and Max plans, the dialog can appear when you resume a long conversation [after a long break](/docs/en/prompt-caching.md#resuming-a-session) or on a different model. The estimated use comes when you send your first message after **Resume**, not when you select it. Choose by whether your next task still needs the saved conversation: + +* **Resume**: keep working in the saved conversation. +* **Start a new conversation**: switch to work that doesn't need the saved conversation. To reopen it later, run [`/resume`](#use-the-session-picker) at the prompt. The estimate doesn't apply to your first message in the new conversation. If the option says that Claude can look up this conversation, you can still refer to earlier work in the new conversation. + ### Where the session picker looks Claude Code stores sessions per project directory. By default the session picker shows: diff --git a/content/en/docs/claude-code/settings-reference.md b/content/en/docs/claude-code/settings-reference.md index 5ae735dde8..fa0aab53a1 100644 --- a/content/en/docs/claude-code/settings-reference.md +++ b/content/en/docs/claude-code/settings-reference.md @@ -3469,6 +3469,8 @@ This example allows any URL under `https://hooks.example.com/` and any `http://l Hostname matching is case-insensitive and treats `hooks.example.com.`, with the trailing dot that marks a fully qualified domain name, the same as `hooks.example.com`, which is how DNS treats them. The allowlist applies to hooks from every source, including managed settings. +In the Agent SDK's `managedSettings` option, Claude Code ignores this key when its list has entries, so pass the list in the SDK's `settings` option instead. See [what each value does in parent settings](/docs/en/claude-apps-gateway#how-hook-and-skill-keys-in-parent-settings-take-effect). + ### `allowManagedHooksOnly` Restrict hook execution to hooks your organization deploys. @@ -3517,6 +3519,7 @@ Turn off [hooks](/docs/en/hooks.md#disable-or-remove-hooks), any custom [status The reach depends on which file carries the key: * **In managed settings**: Claude Code disables every configured hook, including managed ones, and keeps running the hooks the [Agent SDK](/docs/en/agent-sdk/overview.md) registers in process +* **In the Agent SDK's `managedSettings` option**: Claude Code treats the key as `allowManagedHooksOnly: true`, so see [what runs under `allowManagedHooksOnly`](#what-runs-under-allowmanagedhooksonly) for which hooks stop. On a machine where an administrator deploys managed settings, Claude Code ignores this key unless the administrator [lets an embedding host add policy](/docs/en/managed-settings.md#let-an-embedding-host-add-policy). Requires Claude Code v2.1.309 or later. * **In any other settings file**: Claude Code disables user, project, local, and plugin hooks; managed hooks, Agent SDK hooks, and hooks from plugins force-enabled in managed [`enabledPlugins`](#enabledplugins) keep running The key also stops [mods](/docs/en/plugins/mods/overview.md), which are plugins whose code registers hooks: @@ -3620,6 +3623,8 @@ This example limits header interpolation to `MY_TOKEN` and `HOOK_SECRET`: The allowlist applies to hooks from every source, including managed settings. +In the Agent SDK's `managedSettings` option, Claude Code ignores this key when its list has entries, so pass the list in the SDK's `settings` option instead. See [what each value does in parent settings](/docs/en/claude-apps-gateway#how-hook-and-skill-keys-in-parent-settings-take-effect). + ### `workflowKeywordTriggerEnabled` Choose whether typing the keyword `ultracode` in a prompt triggers a [dynamic workflow](/docs/en/workflows.md#ask-for-a-workflow-in-your-prompt). Set it to `false` to type the word without triggering one. @@ -4976,6 +4981,8 @@ This example adds one connection named `Dev VM` that connects to `user@dev.examp Limit the hosts a [Desktop SSH session](/docs/en/desktop.md#restrict-which-ssh-hosts-users-can-connect-to) can connect to. Only the Desktop app reads this key; the CLI doesn't. Patterns are case-insensitive: `*` matches any host, `*.example.com` matches `example.com` and every subdomain, and anything else is an exact match against the hostname after `~/.ssh/config` resolution. An empty array turns SSH sessions off. +With Claude Desktop v3.1623.0 or later, a session's [jump hosts](/docs/en/desktop.md#allow-jump-hosts) have to match a pattern too. + * **Scope**: [`Managed`](#scopes). By default, Desktop reads the key from [one managed source](/docs/en/managed-settings.md#how-claude-code-combines-managed-sources). * **Type**: array of hostname patterns * **Default**: unset, so any host is allowed diff --git a/content/en/docs/claude-code/skills.md b/content/en/docs/claude-code/skills.md index 66893a0b9f..09830fcef1 100644 --- a/content/en/docs/claude-code/skills.md +++ b/content/en/docs/claude-code/skills.md @@ -193,9 +193,18 @@ Claude Code watches `.claude/skills/` in a directory you pass with `--add-dir` a These loads depend on the `project` [setting source](/docs/en/agent-sdk/claude-code-features.md#control-filesystem-settings-with-settingsources), which is on by default. A [`strictPluginOnlyCustomization`](/docs/en/settings-reference#strictpluginonlycustomization) policy, [bare mode](/docs/en/headless.md#start-faster-with-bare-mode), and [`--safe-mode`](/docs/en/cli-reference#cli-flags) each restrict them further, as those pages describe. See [Additional directories grant file access, not configuration](/docs/en/permissions.md#additional-directories-grant-file-access-not-configuration) for the full table of what an added directory loads, including `CLAUDE.md` and plugin settings. +#### Run a same-named skill from an added directory + +An added directory's skill gets a prefix when its folder name clashes with an enterprise, personal, or project skill, or one in a directory added earlier. To run it, type `/:` at the Claude Code prompt. The `/` menu lists the skill under its prefixed name, and [How a skill gets its command name](#how-a-skill-gets-its-command-name) describes where the prefix comes from. That name requires Claude Code v2.1.309 or later. + +For example, with `--add-dir ../cli` and a `verify` skill in both your project and `../cli`: + +* `/verify` runs your project's skill +* `/cli:verify` runs the skill from `../cli` + ### Resolve skills that share a name -When two skills share a directory or file name, where each one came from decides which one `/name` runs. For a name set by the frontmatter `name` field, see [How a skill gets its command name](#how-a-skill-gets-its-command-name). The table covers the enterprise, personal, project, nested, plugin, and claude.ai locations, bundled skills, built-in commands, and command files: +When two skills share a directory or file name, where each one came from decides which one `/name` runs. For a name set by the frontmatter `name` field, see [How a skill gets its command name](#how-a-skill-gets-its-command-name). | Same name in | Which one runs | | :- | :- | @@ -204,6 +213,8 @@ When two skills share a directory or file name, where each one came from decides | Any of those locations and a [built-in command](/docs/en/commands.md) | In a local terminal session, your skill replaces the built-in command, but not its aliases. A project `usage` skill replaces `/usage`, and the built-in alias `/cost` still runs the built-in command | | A skill and a file in `.claude/commands/` | The skill | | A project-root skill and a nested skill | Both load. See [monorepos and subdirectories](#discovery-from-parent-and-nested-directories) | +| An enterprise, personal, or project skill and a skill in an [added directory outside the project](#skills-from-additional-directories) | The enterprise, personal, or project skill, while the added directory's skill runs under a prefixed name. See [run a same-named skill from an added directory](#run-a-same-named-skill-from-an-added-directory) | +| Two [added directories](#skills-from-additional-directories) outside the project | The skill from the directory added first, in `--add-dir` or `/add-dir` order. The other runs under a [prefixed name](#run-a-same-named-skill-from-an-added-directory) | | A plugin skill and a skill at any of the locations above | Both load, because plugin skills are namespaced as `/plugin-name:skill-name` | | Any of the above and the short name of a skill [synced from your claude.ai account](#how-synced-skills-behave) | The other skill or command. The synced skill is then listed and runs only under its full name. See [When a synced skill name matches another command](#when-a-synced-skill-name-matches-another-command) | @@ -435,6 +446,7 @@ The table below shows where the command name comes from for each layout: | :- | :- | :- | | Skill directory under `~/.claude/skills/` or `.claude/skills/` | Frontmatter `name` or the directory name | `.claude/skills/deploy-staging/SKILL.md` → `/deploy-staging`, or `/deploy` with `name: deploy` | | [Nested](#where-skills-live) `.claude/skills/` directory, when the directory name clashes with another skill | Subdirectory path relative to the working directory, then the skill directory name | `apps/web/.claude/skills/deploy/SKILL.md` → `/apps/web:deploy` | +| `.claude/skills/` in an [added directory outside the project](#skills-from-additional-directories), when the skill directory name clashes with an enterprise, personal, or project skill, or one in a directory added earlier | The added directory's folder name, then the skill directory name. When two added directories share a folder name, the prefix starts with the parent folder's name. Requires v2.1.309 or later | `../cli/.claude/skills/verify/SKILL.md` with `--add-dir ../cli` → `/cli:verify`. With `--add-dir ../a/cli --add-dir ../b/cli`, a `verify` skill in each, and none elsewhere, the one in `../a/cli` → `/verify` and the other → `/b/cli:verify` | | File under `.claude/commands/` | File name without extension | `.claude/commands/deploy.md` → `/deploy` | | File in a subdirectory of `.claude/commands/` | Subdirectory path relative to `commands/` with each `/` replaced by `:`, then the file name without extension | `.claude/commands/frontend/component.md` → `/frontend:component` | | Plugin `skills/` subdirectory | Frontmatter `name` or the directory name, namespaced by plugin | `my-plugin/skills/review/SKILL.md` → `/my-plugin:review`, or `/my-plugin:fancy` with `name: fancy` | @@ -621,6 +633,13 @@ allowed-tools: Bash(git add *) Bash(git commit *) Bash(git status *) To remove tools from Claude's available pool while a skill is active, list them in `disallowed-tools` in the skill's frontmatter. The restriction clears when you send your next message. Like deny rules, the field can't remove [`EndConversation`](/docs/en/tools-reference#endconversation-tool-behavior) while any other tool remains. To block tools across all skills and prompts, add deny rules in your [permission settings](/docs/en/permissions.md). +#### When managed settings lock hooks to plugins + +When your organization's managed settings list `hooks` in `strictPluginOnlyCustomization`, a personal or project skill whose frontmatter declares `hooks` loses its `allowed-tools` pre-approval, apart from the [skills that keep it](/docs/en/settings-reference.md#strictpluginonlycustomization-hooks). + +* **Check**: type `/status` in a Claude Code session. If `/status` shows [`Enterprise managed settings`](/docs/en/settings#check-what-your-organization-enforces), ask your administrator whether `strictPluginOnlyCustomization` lists `hooks`. +* **Fix**: remove `hooks` from the skill's frontmatter, because its hooks don't run under that setting. To keep them, [move the skill into a plugin](/docs/en/hooks.md#limits-on-skill-hooks) that you install from a marketplace. + #### When only managed permission rules apply When your organization sets `allowManagedPermissionRulesOnly` in managed settings, Claude Code ignores `allowed-tools` in project and personal skills and in the [other sources the setting's entry lists](/docs/en/settings-reference.md#allowmanagedpermissionrulesonly). This requires Claude Code v2.1.282 or later. diff --git a/content/en/docs/claude-code/slash-commands.md b/content/en/docs/claude-code/slash-commands.md index 66893a0b9f..09830fcef1 100644 --- a/content/en/docs/claude-code/slash-commands.md +++ b/content/en/docs/claude-code/slash-commands.md @@ -193,9 +193,18 @@ Claude Code watches `.claude/skills/` in a directory you pass with `--add-dir` a These loads depend on the `project` [setting source](/docs/en/agent-sdk/claude-code-features.md#control-filesystem-settings-with-settingsources), which is on by default. A [`strictPluginOnlyCustomization`](/docs/en/settings-reference#strictpluginonlycustomization) policy, [bare mode](/docs/en/headless.md#start-faster-with-bare-mode), and [`--safe-mode`](/docs/en/cli-reference#cli-flags) each restrict them further, as those pages describe. See [Additional directories grant file access, not configuration](/docs/en/permissions.md#additional-directories-grant-file-access-not-configuration) for the full table of what an added directory loads, including `CLAUDE.md` and plugin settings. +#### Run a same-named skill from an added directory + +An added directory's skill gets a prefix when its folder name clashes with an enterprise, personal, or project skill, or one in a directory added earlier. To run it, type `/:` at the Claude Code prompt. The `/` menu lists the skill under its prefixed name, and [How a skill gets its command name](#how-a-skill-gets-its-command-name) describes where the prefix comes from. That name requires Claude Code v2.1.309 or later. + +For example, with `--add-dir ../cli` and a `verify` skill in both your project and `../cli`: + +* `/verify` runs your project's skill +* `/cli:verify` runs the skill from `../cli` + ### Resolve skills that share a name -When two skills share a directory or file name, where each one came from decides which one `/name` runs. For a name set by the frontmatter `name` field, see [How a skill gets its command name](#how-a-skill-gets-its-command-name). The table covers the enterprise, personal, project, nested, plugin, and claude.ai locations, bundled skills, built-in commands, and command files: +When two skills share a directory or file name, where each one came from decides which one `/name` runs. For a name set by the frontmatter `name` field, see [How a skill gets its command name](#how-a-skill-gets-its-command-name). | Same name in | Which one runs | | :- | :- | @@ -204,6 +213,8 @@ When two skills share a directory or file name, where each one came from decides | Any of those locations and a [built-in command](/docs/en/commands.md) | In a local terminal session, your skill replaces the built-in command, but not its aliases. A project `usage` skill replaces `/usage`, and the built-in alias `/cost` still runs the built-in command | | A skill and a file in `.claude/commands/` | The skill | | A project-root skill and a nested skill | Both load. See [monorepos and subdirectories](#discovery-from-parent-and-nested-directories) | +| An enterprise, personal, or project skill and a skill in an [added directory outside the project](#skills-from-additional-directories) | The enterprise, personal, or project skill, while the added directory's skill runs under a prefixed name. See [run a same-named skill from an added directory](#run-a-same-named-skill-from-an-added-directory) | +| Two [added directories](#skills-from-additional-directories) outside the project | The skill from the directory added first, in `--add-dir` or `/add-dir` order. The other runs under a [prefixed name](#run-a-same-named-skill-from-an-added-directory) | | A plugin skill and a skill at any of the locations above | Both load, because plugin skills are namespaced as `/plugin-name:skill-name` | | Any of the above and the short name of a skill [synced from your claude.ai account](#how-synced-skills-behave) | The other skill or command. The synced skill is then listed and runs only under its full name. See [When a synced skill name matches another command](#when-a-synced-skill-name-matches-another-command) | @@ -435,6 +446,7 @@ The table below shows where the command name comes from for each layout: | :- | :- | :- | | Skill directory under `~/.claude/skills/` or `.claude/skills/` | Frontmatter `name` or the directory name | `.claude/skills/deploy-staging/SKILL.md` → `/deploy-staging`, or `/deploy` with `name: deploy` | | [Nested](#where-skills-live) `.claude/skills/` directory, when the directory name clashes with another skill | Subdirectory path relative to the working directory, then the skill directory name | `apps/web/.claude/skills/deploy/SKILL.md` → `/apps/web:deploy` | +| `.claude/skills/` in an [added directory outside the project](#skills-from-additional-directories), when the skill directory name clashes with an enterprise, personal, or project skill, or one in a directory added earlier | The added directory's folder name, then the skill directory name. When two added directories share a folder name, the prefix starts with the parent folder's name. Requires v2.1.309 or later | `../cli/.claude/skills/verify/SKILL.md` with `--add-dir ../cli` → `/cli:verify`. With `--add-dir ../a/cli --add-dir ../b/cli`, a `verify` skill in each, and none elsewhere, the one in `../a/cli` → `/verify` and the other → `/b/cli:verify` | | File under `.claude/commands/` | File name without extension | `.claude/commands/deploy.md` → `/deploy` | | File in a subdirectory of `.claude/commands/` | Subdirectory path relative to `commands/` with each `/` replaced by `:`, then the file name without extension | `.claude/commands/frontend/component.md` → `/frontend:component` | | Plugin `skills/` subdirectory | Frontmatter `name` or the directory name, namespaced by plugin | `my-plugin/skills/review/SKILL.md` → `/my-plugin:review`, or `/my-plugin:fancy` with `name: fancy` | @@ -621,6 +633,13 @@ allowed-tools: Bash(git add *) Bash(git commit *) Bash(git status *) To remove tools from Claude's available pool while a skill is active, list them in `disallowed-tools` in the skill's frontmatter. The restriction clears when you send your next message. Like deny rules, the field can't remove [`EndConversation`](/docs/en/tools-reference#endconversation-tool-behavior) while any other tool remains. To block tools across all skills and prompts, add deny rules in your [permission settings](/docs/en/permissions.md). +#### When managed settings lock hooks to plugins + +When your organization's managed settings list `hooks` in `strictPluginOnlyCustomization`, a personal or project skill whose frontmatter declares `hooks` loses its `allowed-tools` pre-approval, apart from the [skills that keep it](/docs/en/settings-reference.md#strictpluginonlycustomization-hooks). + +* **Check**: type `/status` in a Claude Code session. If `/status` shows [`Enterprise managed settings`](/docs/en/settings#check-what-your-organization-enforces), ask your administrator whether `strictPluginOnlyCustomization` lists `hooks`. +* **Fix**: remove `hooks` from the skill's frontmatter, because its hooks don't run under that setting. To keep them, [move the skill into a plugin](/docs/en/hooks.md#limits-on-skill-hooks) that you install from a marketplace. + #### When only managed permission rules apply When your organization sets `allowManagedPermissionRulesOnly` in managed settings, Claude Code ignores `allowed-tools` in project and personal skills and in the [other sources the setting's entry lists](/docs/en/settings-reference.md#allowmanagedpermissionrulesonly). This requires Claude Code v2.1.282 or later. diff --git a/content/en/docs/claude-code/sub-agents.md b/content/en/docs/claude-code/sub-agents.md index f218215827..f52aac2b95 100644 --- a/content/en/docs/claude-code/sub-agents.md +++ b/content/en/docs/claude-code/sub-agents.md @@ -439,9 +439,7 @@ Before v2.1.280, background subagents couldn't use `LSP`. [`ListAgents`](/docs/en/cross-session-messaging) follows these filters like any built-in tool: a foreground subagent inherits it in sessions where cross-session messaging is enabled, and a background subagent doesn't keep it. -Teammates in [agent teams](/docs/en/agent-teams.md) additionally keep the task tools and cron tools: `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, `CronCreate`, `CronDelete`, and `CronList`. - -In a [session without the Task tools](/docs/en/tools-reference.md#task-tool-availability), Claude Code doesn't provide the task tools to subagents either, even when the subagent runs a different model. An in-process teammate follows your session the same way, while a teammate in its own [split pane](/docs/en/agent-teams.md#choose-a-display-mode) runs as a separate Claude Code process, so its own model decides. +Teammates in [agent teams](/docs/en/agent-teams.md) additionally keep the task tools and cron tools: `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, `CronCreate`, `CronDelete`, and `CronList`. In a [session without the Task tools](/docs/en/tools-reference.md#task-tool-availability), Claude Code doesn't provide the task tools to subagents either, even when the subagent runs a different model. An in-process teammate follows your session the same way. To find out whether a split-pane teammate has the task tools, see [Task tool availability](/docs/en/tools-reference.md#task-tool-availability). #### Restrict which tools a subagent can use @@ -590,7 +588,8 @@ Set `permissionMode` to choose the permission mode a subagent runs in. Use the m The main conversation's permission mode decides whether Claude Code uses the value you set: * When the main conversation is in `bypassPermissions`, `acceptEdits`, or [auto mode](/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode), the subagent runs in that same mode and Claude Code ignores the `permissionMode` you set. Under auto mode, the classifier evaluates the subagent's tool calls with the main conversation's block and allow rules. When the subagent finishes, the classifier also reviews its work and its final report before the report is delivered, as [How auto mode handles subagents](/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) describes. -* When the main conversation is in `default`, `dontAsk`, or `plan` mode, the subagent runs in the permission mode you set. It keeps the main conversation's permission mode instead in these cases: +* When the main conversation is in `plan` mode, the subagent stays in plan mode whichever `permissionMode` you set, unless it runs as an [agent team teammate](#subagent-names) under the [agent teams rules](/docs/en/agent-teams.md#have-teammates-plan-before-implementing). If you set `dontAsk`, the subagent also doesn't prompt you: an action that plan mode would ask you to approve is denied instead. +* When the main conversation is in `default` or `dontAsk` mode, the subagent runs in the permission mode you set. It keeps the main conversation's permission mode instead in these cases: * You set `bypassPermissions`. The `bypassPermissions` exception requires Claude Code v2.1.267 or later. * You set `auto` and [auto mode isn't available](/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) to the subagent, such as when a settings file sets [`disableAutoMode`](/docs/en/settings-reference#disableautomode) or the subagent's model doesn't support auto mode. diff --git a/content/en/docs/claude-code/tools-reference.md b/content/en/docs/claude-code/tools-reference.md index 341eeee96e..0614b7078a 100644 --- a/content/en/docs/claude-code/tools-reference.md +++ b/content/en/docs/claude-code/tools-reference.md @@ -600,10 +600,19 @@ If you'd like to use these tools on a model that doesn't have them by default, d In [background sessions](/docs/en/agent-view.md) and in [cloud sessions](/docs/en/claude-code-on-the-web.md), Claude Code provides the same tools on every model, listed or not. -Claude Code gives a subagent the tools only when your session has them, even when the subagent runs a different model. An in-process [agent team](/docs/en/agent-teams.md) teammate follows your session the same way, while a teammate in its own [split pane](/docs/en/agent-teams.md#choose-a-display-mode) runs as a separate Claude Code process, so its own model decides. Without the Task tools, an agent coordinates with its team through messages instead of the [shared task list](/docs/en/agent-teams.md#assign-and-claim-tasks). - The default set described here applies in Claude Code v2.1.268 and later. +### Task-tracking tools in subagents and agent teams + +A subagent has the task-tracking tools only when your session has them, whatever model the subagent runs. An in-process [agent team](/docs/en/agent-teams.md) teammate has the task-tracking tools when your session does. A [split-pane](/docs/en/agent-teams.md#choose-a-display-mode) teammate is a separate Claude Code process that [inherits](/docs/en/agent-teams.md#permissions) your `--tools` list and deny rules, not `--allowedTools`, so check what you set: + +* **No `--tools` list or deny rule, and `CLAUDE_CODE_ENABLE_TODO_TOOLS` unset for the teammate**: the teammate has the task-tracking tools its own model has by default. +* **`CLAUDE_CODE_ENABLE_TODO_TOOLS` exported in your shell**: Claude Code passes the teammate a fixed set of environment variables that doesn't include the one you exported. To set it for the teammate too, start your session by running `claude --settings '{"env":{"CLAUDE_CODE_ENABLE_TODO_TOOLS":"1"}}'` in your shell. The teammate also gets your [`--settings`](/docs/en/settings#change-a-setting-for-one-session) value. +* **`--tools` naming the task-tracking tools**: the teammate has them on any model. +* **A task-tracking tool missing from `--tools` or named in a deny rule**: the teammate lacks that tool. + +Without the Task tools, an agent coordinates with its team through messages instead of the [shared task list](/docs/en/agent-teams.md#assign-and-claim-tasks). + ## WebFetch tool behavior WebFetch takes a URL and a prompt describing what to extract. It fetches the page and converts the response to Markdown when the server returns HTML. For most fetches, it then runs the prompt against the content in a separate model call, and Claude receives the result of that call rather than the raw page. The conversion step is not configurable. diff --git a/content/en/docs/claude-code/troubleshooting.md b/content/en/docs/claude-code/troubleshooting.md index 46ac87018f..d79058f978 100644 --- a/content/en/docs/claude-code/troubleshooting.md +++ b/content/en/docs/claude-code/troubleshooting.md @@ -20,7 +20,7 @@ This page covers performance, stability, and search problems once Claude Code is | After you update Claude Code or the Agent SDK, tool calls are denied in `claude -p` or SDK runs that don't pass `--permission-mode`, `permissionMode`, or `permission_mode` | [Tool calls denied in `claude -p` and Agent SDK runs](/docs/en/permission-modes#which-mode-a-non-interactive-run-starts-in) | | `API Error: 5xx`, `529 Overloaded`, `429`, request validation errors | [Error reference](/docs/en/errors.md) | | `model not found` or `you may not have access to it` | [Error reference](/docs/en/errors.md#theres-an-issue-with-the-selected-model) | -| A command Claude runs fails with `Your disk quota is full`, `is full (ENOSPC)`, or `Command output was lost` | [Error reference](/docs/en/errors.md#disk-quota-or-temp-filesystem-is-full) | +| A command Claude runs fails with `Disk full:`, `Disk quota used up:`, `Nearly out of inodes:`, `The command was not started:`, `Your disk quota is full`, `is full (ENOSPC)`, or `Command output was lost` | [Error reference](/docs/en/errors.md#disk-quota-or-temp-filesystem-is-full) | | VS Code extension not connecting or detecting Claude | [VS Code integration](/docs/en/vs-code.md#fix-common-issues) | | `Claude Code process exited with code 1` in VS Code or an SDK app | [Error reference](/docs/en/errors.md#claude-code-process-exited-with-code-n) | | JetBrains plugin or IDE not detected | [JetBrains integration](/docs/en/jetbrains.md#troubleshooting) | diff --git a/content/en/docs/claude-code/ultrareview.md b/content/en/docs/claude-code/ultrareview.md index 6bfcd5d8b8..ae272e5f69 100644 --- a/content/en/docs/claude-code/ultrareview.md +++ b/content/en/docs/claude-code/ultrareview.md @@ -147,7 +147,7 @@ When the review finishes, Claude Code shows the verified findings as a notificat ## Run ultrareview non-interactively -Use the `claude ultrareview` subcommand to start an ultrareview from CI or a script without an interactive session. The subcommand launches the same review as `/code-review ultra`, blocks until the remote review finishes, and prints the findings to stdout. +Use the `claude ultrareview` subcommand to start an ultrareview from CI or a script without an interactive session. The subcommand launches the same review as `/code-review ultra`, blocks until the remote review finishes, and prints the findings to stdout. If the run exits with `Error: Workspace not trusted`, see [Trust the folder before the review runs](#trust-the-folder-before-the-review-runs). ```bash theme={null} claude ultrareview @@ -157,26 +157,27 @@ claude ultrareview origin/main Without arguments, the subcommand reviews the diff between your current branch and the default branch, with the same [whole-repository fallback](#diff-limits-and-fallbacks) as `/code-review ultra` when no merge base exists. Pass a PR number to [review a pull request on `github.com`](#review-a-pull-request), or a base branch to review against it; [base-branch handling](#review-against-a-different-base) matches the interactive command. -You consent to the whole-repository fallback and to the billing and terms prompt when you run the subcommand, so the run starts without waiting for input. Running it yourself is what counts as consent. When Claude runs the subcommand for you instead, for example through the Bash tool, Claude Code refuses the whole-repository review. +You consent to the whole-repository fallback and to the billing and terms prompt when you run the subcommand, so the run doesn't stop to confirm them. Running it yourself is what counts as consent. When Claude runs the subcommand for you instead, for example through the Bash tool, Claude Code refuses the whole-repository review. `claude -p '/code-review ultra'` doesn't get you the findings, so use `claude ultrareview` in scripts. The `-p` run launches the cloud review and exits without waiting for it. When the review would bill usage credits, the `-p` run stops without launching it. Before v2.1.218, `/code-review ultra` in a non-interactive session ran a local review. -`claude ultrareview` writes its progress messages to stderr so stdout stays parseable. Use these flags to control its output, the timeout, and whether to post the findings: - | Flag | Description | | - | - | | `--json` | Print the raw `bugs.json` payload instead of the formatted findings | | `--timeout ` | Maximum minutes to wait for the review to finish. Defaults to 45 | | `--post` | [Post the finished findings](#post-findings-to-the-pull-request) to the pull request as one plain comment from your GitHub account. Works on `github.com` pull request targets; on other targets, Claude Code ignores the flag and says so. Requires Claude Code v2.1.227 or later | | `--no-post` | Don't post the findings. This is the default, and if you pass both flags, Claude Code doesn't post. Requires Claude Code v2.1.227 or later | +| `--trust-workspace` | [Trust the current folder](#trust-the-folder-before-the-review-runs) for this run only, without asking, so a script or CI job can review a checkout you haven't trusted. Takes no value: put a PR number or base branch before it. Requires Claude Code v2.1.309 or later | + +`claude ultrareview` writes its progress messages to stderr so stdout stays parseable. Running `claude ultrareview` requires the same authentication and usage-credits configuration as `/code-review ultra`. The subcommand exits with one of three codes: * **0**: the review completed, with or without findings -* **1**: the review failed to launch or was stopped before it finished, the cloud session errored, or the timeout elapsed -* **130**: you interrupted the subcommand with Ctrl-C +* **1**: the review failed to launch or was stopped before it finished, the cloud session errored, or the timeout elapsed. The code is also 1 when the [folder isn't trusted](#trust-the-folder-before-the-review-runs), including when you answer `n` or press Ctrl-C at the trust question. +* **130**: you pressed Ctrl-C while the subcommand was launching the review, waiting for the findings, or sending the `--post` comment, rather than at the trust question If the subcommand exits before the findings arrive, they never reach your terminal. The review may still be running in the cloud. Running the subcommand again starts a new review rather than resuming that one, and the new review [uses a free run or bills as usage credits](#pricing-and-free-runs). @@ -187,6 +188,18 @@ With `--post`, the subcommand starts the post right after printing the findings, For automatic reviews on GitHub pull requests, [Code Review](/docs/en/code-review.md) integrates with your repository directly and posts findings as inline PR comments without a CLI step. +### Trust the folder before the review runs + +When `claude ultrareview` asks `Trust ? [y/N]`, answer `y` to [trust the folder](/docs/en/permissions.md#project-allow-rules-and-workspace-trust). Trust it only if you trust its code, because git and Claude Code can then run programs named in its git configuration and project settings. + +When it can't ask you, such as in a CI job or with output sent to a file, it exits with [`Error: Workspace not trusted`](/docs/en/errors#workspace-not-trusted-when-running-claude-ultrareview). Append `--trust-workspace` to trust the folder for that run: + +```bash theme={null} +claude ultrareview 1234 --trust-workspace +``` + +To review an untrusted pull request, run `claude ultrareview --trust-workspace` from a branch you trust. Unlike `y`, the flag saves nothing. The PR is [cloned in the cloud](#review-a-pull-request), so you don't need its branch locally. + ## How ultrareview compares to /code-review Both reviews examine code, but you use them at different stages of your workflow. diff --git a/content/en/docs/claude-code/vs-code.md b/content/en/docs/claude-code/vs-code.md index a1296839a3..8e17c2fb0d 100644 --- a/content/en/docs/claude-code/vs-code.md +++ b/content/en/docs/claude-code/vs-code.md @@ -320,7 +320,7 @@ Run `/usage` to open the Account & usage dialog, which shows your signed-in acco The dialog also breaks down what is contributing to your plan limits: - * **Recommendations**: changes that lower your usage, one per row with the share of recent usage it addresses, such as `Trim ~/code/api/CLAUDE.md · 49k tokens per request` + * **Recommendations**: suggested changes, one per row, such as `Trim ~/code/api/CLAUDE.md · 49k tokens per request` * **Fix button**: to have Claude Code apply the recommendations it can, click the button under them, such as **Fix both**. To learn which rows the button acts on and what then happens in your session, see [Apply recommendations with the fix shortcut](/docs/en/costs.md#apply-recommendations-with-the-fix-shortcut). Requires Claude Code v2.1.305 or later. The button isn't shown while [Remote Control](/docs/en/remote-control.md) is connected. If a warning reads `The usage fix wasn’t fully sent. Open usage and try again.` after Remote Control connected, [disconnect Remote Control](/docs/en/remote-control.md#check-connection-status) before you try again. @@ -927,6 +927,50 @@ On macOS Tahoe and later, the system Game Overlay shortcut is bound to `Cmd+Esc` Alternatively, rebind the extension to a different key: open the VS Code [Keyboard Shortcuts editor](https://code.visualstudio.com/docs/configure/keybindings) (`Cmd+K Cmd+S`), search for `Claude Code: Focus input`, and assign a new binding. +### Ctrl+J adds a new line in the prompt box + +To stop `Ctrl+J` from adding a new line in the prompt box, [unbind the key](/docs/en/keybindings.md#unbind-default-shortcuts) in Claude Code's `keybindings.json` file. The extension reads this file in version 2.1.309 or later, so update an older extension in the Extensions view first. + +This example is the whole file with the one entry that unbinds the key, `"ctrl+j": null` in a `Chat` block: + +```json theme={null} +{ + "bindings": [ + { + "context": "Chat", + "bindings": { + "ctrl+j": null + } + } + ] +} +``` + +The file goes in your Claude Code configuration directory, which is `~/.claude` unless you moved it with `CLAUDE_CONFIG_DIR`. Look in that directory and take the step that matches what you find: + +* **No `keybindings.json` yet**: create it with exactly the content of the example +* **A `keybindings.json` with no `Chat` block**: add the example's `Chat` block to the top-level `bindings` array, at any position +* **A `Chat` block with no `"ctrl+j"` line**: add `"ctrl+j": null` to that block's `bindings` +* **A `Chat` block that already has a `"ctrl+j"` line**: change that line's value to `null` + +After you save the file, pressing `Ctrl+J` in the prompt box adds no new line. + +If `Ctrl+J` still adds a line in the prompt box, run these two commands from the Command Palette in order: + +1. **Developer: Reload Window**, then press `Ctrl+J` in the prompt box again +2. **Claude Code: Show Logs**, then look for a warning that includes `Ctrl+J in the chat input still inserts a newline`. Correct the problem it reports in the file it names, save the file, and press `Ctrl+J` again. + +If the log has no such warning, check that the file is in your Claude Code configuration directory and that its `Chat` block sets `"ctrl+j"` to `null`. [Report the issue](https://github.com/anthropics/claude-code/issues) if `Ctrl+J` still adds a line. + +### The Claude Code panel is blank or couldn't load + +If the Claude Code panel opens but shows nothing at all, not even the prompt box, update the extension to v2.1.309 or later in the Extensions view. Then run **Developer: Reload Window** from the Command Palette. If you then see a `Claude Code couldn’t load` notice, work through the steps it lists in order. + +If the panel still doesn't load, open the extension's log and [report the issue](https://github.com/anthropics/claude-code/issues) with a copy of it: + +* **Still blank on v2.1.309 or later**: open the log with **Claude Code: Show Logs** from the Command Palette +* **The notice's steps didn't help**: click **Show logs** in the notice to open the log + ### A resumed conversation is blank at first When you [resume a past conversation](#resume-past-conversations) or one [comes back after a reload](#continue-conversations-after-a-reload), its messages can stay blank while the conversation's Claude Code process starts. After about a second, `Waiting for your plugins…` appears in the empty space. diff --git a/content/en/docs/claude-code/worktrees.md b/content/en/docs/claude-code/worktrees.md index 9f3d6ce1c3..f44ca8ba3d 100644 --- a/content/en/docs/claude-code/worktrees.md +++ b/content/en/docs/claude-code/worktrees.md @@ -337,6 +337,10 @@ In four rare cases, Claude Code creates no worktree at all: it can't tell which * **`The repository git config has a conditional include (includeIf)`**: move the settings the `includeIf` in `.git/config` pulls in directly into that file, remove the `includeIf`, and retry. An `includeIf` in your global git config doesn't trigger this. * **`Git was not run: the repository's own git config sets `**: the message names a key that points Git LFS at a program to run, such as `lfs.customtransfer..path` or `lfs.standalonetransferagent`. If that setting is yours, move it to your global git config. If you don't recognize it, remove it from the repository's git config, since a tool or checkout you don't trust may have written it. Retry once the key is gone from the repository's config. +### Worktree creation fails in a partial clone + +An error containing `This repository is a partial clone` means Claude Code couldn't fetch every git object the worktree's starting commit needs. Take the step in the message's sentence ending in `try again`. Then retry from the shell where you took it: run `claude --worktree`, or start `claude` there and ask again. + ### Claude Code refuses to use a worktree An error starting `Refusing to use as an isolation worktree` means Claude Code checked the directory's git identity before adopting it as a session's or subagent's isolated checkout, and declined it. The check runs whether Claude Code is creating the worktree, entering an existing one, or reusing one from an earlier run. diff --git a/content/en/get-started.md b/content/en/get-started.md index eb5d0059d4..4c1eff960c 100644 --- a/content/en/get-started.md +++ b/content/en/get-started.md @@ -339,7 +339,7 @@ description: Make your first API call to Claude and build a simple web search as ```bash mkdir claude-quickstart && cd claude-quickstart go mod init claude-quickstart - go get github.com/anthropics/anthropic-sdk-go + go get github.com/anthropics/anthropic-sdk-go/v2 ``` @@ -354,7 +354,7 @@ description: Make your first API call to Claude and build a simple web search as "fmt" "log" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) func main() { diff --git a/content/en/home.md b/content/en/home.md index 423e14247c..9b2d09faec 100644 --- a/content/en/home.md +++ b/content/en/home.md @@ -66,7 +66,7 @@ with Claude" ``` ```go Go - import "github.com/anthropics/anthropic-sdk-go" + import "github.com/anthropics/anthropic-sdk-go/v2" client := anthropic.NewClient() msg, _ := client.Messages.New( @@ -229,7 +229,7 @@ with Claude" Amazon Bedrock - + Google Cloud diff --git a/content/en/manage-claude/access-transparency.md b/content/en/manage-claude/access-transparency.md index cebab676be..f5a497b876 100644 --- a/content/en/manage-claude/access-transparency.md +++ b/content/en/manage-claude/access-transparency.md @@ -36,8 +36,8 @@ Anthropic personnel access customer content only under defined conditions. Acces * **Your own organization's activity:** Your API calls, admin actions, and Compliance API reads are covered by standard [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed) event types. * **Claude for Enterprise and Claude Apps:** claude.ai Enterprise seats, Claude for Work, Cowork, and Claude in Chrome are not covered. * **Claude consumer products:** Claude Free, Pro, or Max plans. -* **Partner-operated platforms:** Amazon Bedrock and Google Cloud; refer to those platforms' transparency controls. -* **Anything ZDR does not cover:** Products that are not covered by ZDR (for example, the Files API, Anthropic-hosted stateful applications, and the Batch API) are not covered by Access Transparency. See [ZDR documentation](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#zero-data-retention-zdr-scope) for additional details. +* **Partner-operated platforms:** Amazon Bedrock and Claude Models on Google Cloud (Google managed). Refer to those platforms' transparency controls. +* **Anything ZDR does not cover:** Products that are not covered by ZDR (for example, the Files API, Anthropic-hosted stateful applications, and the Batch API) are not covered by Access Transparency. See [Zero data retention (ZDR)](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#zero-data-retention-zdr-scope) for additional details. ## Getting started @@ -165,18 +165,18 @@ The set of reason codes is closed. Anthropic will update this page in the event The following table lists which surfaces are covered by Access Transparency. Coverage means human access to content from that surface generates `anthropic_access` events. -| Surface | Covered | Details | -| ----------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------- | -| Claude API (`api.anthropic.com`) | Yes | Prompts, completions, and data directly embedded in the API inputs | -| Claude Code (using an API key) | Yes | API traffic from Claude Code is covered as Claude API traffic | -| Claude Platform on AWS | Yes | Claude Platform on AWS generates Access Transparency events within the Compliance API (not AWS CloudTrail) | -| Claude API (`api.anthropic.com`) (Batch, Files) | No | The Claude API Batch and Files APIs are not covered, just like they are not covered by ZDR | -| Claude for Enterprise (claude.ai seats) | No | Not covered | -| Claude for Work | No | Not covered | -| Claude Free, Pro, Max | No | Consumer plans are not eligible | -| Playground (Claude Console) | No | Not covered | -| Microsoft Foundry | No | Not available | -| Amazon Bedrock, Google Cloud | No | Partner-operated platforms; refer to those platforms' transparency controls | +| Surface | Covered | Details | +| -------------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------- | +| Claude API (`api.anthropic.com`) | Yes | Prompts, completions, and data directly embedded in the API inputs | +| Claude Code (using an API key) | Yes | API traffic from Claude Code is covered as Claude API traffic | +| Claude Platform on AWS | Yes | Claude Platform on AWS generates Access Transparency events within the Compliance API (not AWS CloudTrail) | +| Claude API (`api.anthropic.com`) (Batch, Files) | No | The Claude API Batch and Files APIs are not covered, just like they are not covered by ZDR | +| Claude for Enterprise (claude.ai seats) | No | Not covered | +| Claude for Work | No | Not covered | +| Claude Free, Pro, Max | No | Consumer plans are not eligible | +| Playground (Claude Console) | No | Not covered | +| Microsoft Foundry | No | Not available | +| Amazon Bedrock, Claude Models on Google Cloud (Google managed) | No | Partner-operated platforms; refer to those platforms' transparency controls | ## Limitations and exclusions diff --git a/content/en/manage-claude/admin-api.md b/content/en/manage-claude/admin-api.md index b06a646182..c90143dbc1 100644 --- a/content/en/manage-claude/admin-api.md +++ b/content/en/manage-claude/admin-api.md @@ -30,7 +30,7 @@ The Admin API accepts any of these three credentials: An Admin API key covers most endpoints. The service-account, federation-issuer, and federation-rule endpoints accept only an `org:admin` OAuth token. Send a personal key or service account key in the `x-api-key` header, as you would an Admin API key. The following examples call the [organization info endpoint](https://platform.claude.com/docs/en/manage-claude/admin-api#accessing-organization-info) with an OAuth token and with an Admin API key. -The SDK exposes the endpoints on this page under `client.organization` (csharp, go: `client.Organization`; java: `client.organization()`; php: `$client->organization`), and the `ant` CLI under `ant organization`. The examples on this page use the default client, which reads an Admin API key from `ANTHROPIC_API_KEY` or an OAuth bearer token from `ANTHROPIC_AUTH_TOKEN`. SDK list methods in Python, TypeScript, C#, Go, and Java return an iterator that fetches more pages on demand, so `limit` sets the page size, not the total. The PHP, Ruby, and curl examples return one page. In the CLI, `--limit` caps the results on the member, invite, workspace, workspace-member, and API-key lists. For each endpoint's parameters and responses, see the [Admin API reference](https://platform.claude.com/docs/en/api/organization). +In Python, TypeScript, C#, Go, Java, PHP, and Ruby, the SDK exposes the endpoints on this page under `client.organization` (csharp, go: `client.Organization`; java: `client.organization()`; php: `$client->organization`), and the `ant` CLI under `ant organization`. The examples on this page use the default client, which reads an Admin API key from `ANTHROPIC_API_KEY` or an OAuth bearer token from `ANTHROPIC_AUTH_TOKEN`. SDK list methods in Python, TypeScript, C#, Go, and Java return an iterator that fetches more pages on demand, so `limit` sets the page size, not the total. The PHP, Ruby, and curl examples return one page. In the CLI, `--limit` caps the results on the member, invite, workspace, workspace-member, and API-key lists. For each endpoint's parameters and responses, see the [Admin API reference](https://platform.claude.com/docs/en/api/organization). ### OAuth bearer token diff --git a/content/en/manage-claude/api-and-data-retention.md b/content/en/manage-claude/api-and-data-retention.md index e3711e25ee..bca4660a76 100644 --- a/content/en/manage-claude/api-and-data-retention.md +++ b/content/en/manage-claude/api-and-data-retention.md @@ -4,7 +4,7 @@ url: https://platform.claude.com/docs/en/manage-claude/api-and-data-retention description: Learn about how Anthropic's APIs and associated features retain data, including information about zero data retention (ZDR) and HIPAA-ready API access. --- -This page covers the Claude API (`api.anthropic.com`), Claude Platform on AWS, and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), where Anthropic is the data processor. On Amazon Bedrock and Google Cloud's Agent Platform, the cloud provider is the data processor; refer to those platforms' data retention and compliance documentation for their equivalent controls. +This page covers the Claude API (`api.anthropic.com`), Claude Platform on AWS, [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), and [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), where Anthropic is the data processor. On Amazon Bedrock and Claude Models on Google Cloud (Google managed), the cloud provider is the data processor; refer to those platforms' data retention and compliance documentation for their equivalent controls. Anthropic offers two data handling arrangements for the Claude API: [zero data retention (ZDR)](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#zero-data-retention-zdr-scope) and [HIPAA readiness](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#hipaa-readiness). The [feature eligibility table](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility) lists which API features each arrangement covers. For Anthropic's standard retention policies outside these arrangements, see the [commercial data retention policy](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data) and the [consumer data retention policy](https://privacy.claude.com/en/articles/10023548-how-long-do-you-store-my-data). @@ -27,6 +27,7 @@ Under a ZDR arrangement, Anthropic does not store customer prompts or responses * **Claude Messages and Token Counting APIs:** ZDR applies to these endpoints for eligible features listed in the [feature eligibility table](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility). Features that use `/v1/messages` but are marked "No" in the table (such as code execution) are not covered. * **Claude Code with API keys:** ZDR applies when Claude Code is used with API keys from a Commercial organization (an organization under Anthropic's Commercial Terms of Service, as distinct from a consumer Claude account). If metrics logging is enabled in Claude Code, productivity data such as usage statistics is exempted from ZDR and may be retained. Claude Code on Claude Enterprise is not covered by this arrangement and has a separate ZDR offering; see [What ZDR does not cover](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#what-zdr-does-not-cover). * **Claude Platform on AWS:** [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) follows the same data retention policy as the first-party Claude API. ZDR is available on request; contact your Anthropic account representative to enable it. +* **Claude Models on Google Cloud (Anthropic managed):** [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) follows the same data retention policy as the first-party Claude API. ZDR is available on request; contact your Anthropic account representative to enable it. ### What ZDR does not cover @@ -170,7 +171,7 @@ Each eligibility column uses three values: | [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) | `/v1/messages` | Yes | Yes | | | [Adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | `/v1/messages` | Yes | Yes | | | [Advisor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool) | `/v1/messages`
with `advisor` tool | Yes | No | Advisor model output is returned in the API response; nothing is stored server-side after the response. | -| [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) | `/v1/skills`
`/v1/messages` with `skills` | No | No | Skill data retained according to standard policy. See [Agent Skills data retention](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#data-retention). | +| [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) | `/v1/skills`
`/v1/messages`
with `skills` | No | No | Skill data retained according to standard policy. See [Agent Skills data retention](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#data-retention). | | [Bash tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) | `/v1/messages`
with `bash` tool | Yes | Yes | Client-side tool run in your environment. | | [Batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing) | `/v1/messages/batches` | No | No | 29-day retention; async storage required. See [Batch processing data retention](https://platform.claude.com/docs/en/build-with-claude/batch-processing#data-retention). | | [Browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) | `/v1/messages`
with `browser` toolset | Yes | No | Client-side tool. Anthropic does not run browser actions or retain page content beyond standard API handling. Not covered under HIPAA readiness; requests that include the browser use tool are not blocked. See [Browser use data retention](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#data-retention). | @@ -249,7 +250,7 @@ Even with ZDR or HIPAA arrangements in place, Anthropic may retain data where re - No. The ZDR and HIPAA arrangements described on this page apply to the Claude API, where Anthropic is the data processor. On Bedrock and Google Cloud, the cloud provider is the data processor; refer to those platforms' data retention and compliance policies for their equivalent controls. + [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) follows the same data retention policy as the first-party Claude API, and Anthropic is the data processor. ZDR is available there on request. On Amazon Bedrock and Claude Models on Google Cloud (Google managed), the cloud provider is the data processor; refer to those platforms' data retention and compliance policies for their equivalent controls. diff --git a/content/en/manage-claude/authentication.md b/content/en/manage-claude/authentication.md index dee63e6542..30ae2fe983 100644 --- a/content/en/manage-claude/authentication.md +++ b/content/en/manage-claude/authentication.md @@ -80,6 +80,14 @@ Store API keys in a secrets manager, rotate them periodically, and disable or de // const client = new Anthropic(); ``` + ```csharp C# + using Anthropic; + + AnthropicClient client = new() { ApiKey = "my-anthropic-api-key" }; + // Or, with ANTHROPIC_API_KEY set in the environment: + // AnthropicClient client = new(); + ``` + ```go Go client := anthropic.NewClient( option.WithAPIKey("sk-ant-api03-..."), // defaults to os.LookupEnv("ANTHROPIC_API_KEY") @@ -92,21 +100,13 @@ Store API keys in a secrets manager, rotate them periodically, and disable or de // Explicit AnthropicClient client = AnthropicOkHttpClient.builder() - .apiKey("my-anthropic-api-key") - .build(); + .apiKey("my-anthropic-api-key") + .build(); // From ANTHROPIC_API_KEY (or anthropic.apiKey system property) AnthropicClient clientFromEnv = AnthropicOkHttpClient.fromEnv(); ``` - ```csharp C# - using Anthropic; - - AnthropicClient client = new() { ApiKey = "my-anthropic-api-key" }; - // Or, with ANTHROPIC_API_KEY set in the environment: - // AnthropicClient client = new(); - ``` - ```php PHP // Reads ANTHROPIC_API_KEY from the environment $client = new Client(); @@ -133,8 +133,8 @@ You can find a workspace's ID in the **ID** column on the [Workspaces](https://p ```bash cURL - # Required on every request for a multi-workspace key. - # Omit the anthropic-workspace-id header for a single-workspace key. + # Required on every request for a key that isn't scoped to a workspace. + # Omit the anthropic-workspace-id header for a key scoped to one workspace. curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ @@ -148,8 +148,8 @@ You can find a workspace's ID in the **ID** column on the [Workspaces](https://p ``` ```bash CLI - # Required on every command for a multi-workspace key. - # Omit --workspace-id for a single-workspace key. + # Required on every command for a key that isn't scoped to a workspace. + # Omit --workspace-id for a key scoped to one workspace. ant messages create \ --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \ --model claude-opus-5-5 \ @@ -160,8 +160,8 @@ You can find a workspace's ID in the **ID** column on the [Workspaces](https://p ```python Python client = Anthropic() # reads ANTHROPIC_API_KEY - # Required on every request for a multi-workspace key. - # Omit extra_headers for a single-workspace key. + # Required on every request for a key that isn't scoped to a workspace. + # Omit extra_headers for a key scoped to one workspace. message = client.messages.create( model="claude-opus-5-5", max_tokens=1024, @@ -179,8 +179,8 @@ You can find a workspace's ID in the **ID** column on the [Workspaces](https://p ```typescript TypeScript const client = new Anthropic(); // reads ANTHROPIC_API_KEY - // Required on every request for a multi-workspace key. - // Omit the second argument for a single-workspace key. + // Required on every request for a key that isn't scoped to a workspace. + // Omit the second argument for a key scoped to one workspace. const message = await client.messages.create( { model: "claude-opus-5-5", @@ -207,8 +207,8 @@ You can find a workspace's ID in the **ID** column on the [Workspaces](https://p Messages = [new UserMessageParam { Content = "Hello, Claude" }], }; - // Required on every request for a multi-workspace key. - // Call client.Messages.Create(parameters) directly for a single-workspace key. + // Required on every request for a key that isn't scoped to a workspace. + // Call client.Messages.Create(parameters) directly for a key scoped to one workspace. var message = await client .WithOptions(options => options with @@ -235,8 +235,8 @@ You can find a workspace's ID in the **ID** column on the [Workspaces](https://p ```go Go client := anthropic.NewClient() // reads ANTHROPIC_API_KEY - // Required on every request for a multi-workspace key. - // Omit the option for a single-workspace key. + // Required on every request for a key that isn't scoped to a workspace. + // Omit the option for a key scoped to one workspace. message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5_5, MaxTokens: 1024, @@ -258,8 +258,8 @@ You can find a workspace's ID in the **ID** column on the [Workspaces](https://p ```java Java AnthropicClient client = AnthropicOkHttpClient.fromEnv(); // reads ANTHROPIC_API_KEY - // Required on every request for a multi-workspace key. - // Omit putAdditionalHeader for a single-workspace key. + // Required on every request for a key that isn't scoped to a workspace. + // Omit putAdditionalHeader for a key scoped to one workspace. Message message = client.messages().create(MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5_5) .maxTokens(1024) @@ -279,8 +279,8 @@ You can find a workspace's ID in the **ID** column on the [Workspaces](https://p ```php PHP $client = new Client(); // reads ANTHROPIC_API_KEY - // Required on every request for a multi-workspace key. - // Omit requestOptions for a single-workspace key. + // Required on every request for a key that isn't scoped to a workspace. + // Omit requestOptions for a key scoped to one workspace. $message = $client->messages->create( model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, @@ -296,8 +296,8 @@ You can find a workspace's ID in the **ID** column on the [Workspaces](https://p ```ruby Ruby client = Anthropic::Client.new # reads ANTHROPIC_API_KEY - # Required on every request for a multi-workspace key. - # Omit request_options for a single-workspace key. + # Required on every request for a key that isn't scoped to a workspace. + # Omit request_options for a key scoped to one workspace. message = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5_5, max_tokens: 1024, diff --git a/content/en/manage-claude/claude-code-analytics-api.md b/content/en/manage-claude/claude-code-analytics-api.md index 4ae804eb63..26b906d8e3 100644 --- a/content/en/manage-claude/claude-code-analytics-api.md +++ b/content/en/manage-claude/claude-code-analytics-api.md @@ -262,7 +262,7 @@ Historical Claude Code analytics data is retained and accessible through the API ### Which Claude Code deployments are supported? -This API only tracks Claude Code usage on the Claude API. Usage through [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), or [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) is not included. +This API only tracks Claude Code usage on the Claude API. Usage through [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Models on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview), or [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) is not included. ### What does it cost to use this API? diff --git a/content/en/manage-claude/cmek.md b/content/en/manage-claude/cmek.md index 2aaa094cd8..ed54992ead 100644 --- a/content/en/manage-claude/cmek.md +++ b/content/en/manage-claude/cmek.md @@ -137,6 +137,7 @@ Outside of [CSAM screening](https://support.claude.com/en/articles/9020328-csam- * **No retroactive encryption:** CMEK only protects data written after your key takes effect (see [How it works](https://platform.claude.com/docs/en/manage-claude/cmek#how-it-works)). * **Latency:** Operations that wrap or unwrap data keys make a round-trip to your key management service, which can add a small amount of latency to actions that read or write data at rest. * **Revocation delay:** Key revocation can take up to 1 hour (the cache TTL). Requests already in flight during that window may continue to succeed. +* **Unreachable key:** If Anthropic cannot get your key, for example, during an outage of your key management service, requests that store data under your key fail. On the Messages API, they return a 503 error with the code `cmek_key_unreachable`, and you can retry them. The Message Batches API retries them until your key is available or the batch expires. On Claude Enterprise, these requests include messages in chat and in voice mode. * **KMS costs:** CMEK requires a key in a third-party key management service (AWS KMS, Google Cloud KMS, or Azure Key Vault), which might incur separate charges billed by your KMS provider. * **Claude Code telemetry behind a gateway:** When Claude Code connects through an LLM gateway or proxy (a custom `ANTHROPIC_BASE_URL`), CMEK does not apply to Claude Code's operational telemetry. To turn this telemetry off, set the `DISABLE_TELEMETRY` environment variable to `1`, as described under [Telemetry services](https://code.claude.com/docs/en/data-usage#telemetry-services) in the Claude Code documentation. diff --git a/content/en/manage-claude/compliance-sessions.md b/content/en/manage-claude/compliance-sessions.md index 63ff418a5f..f07cb0e895 100644 --- a/content/en/manage-claude/compliance-sessions.md +++ b/content/en/manage-claude/compliance-sessions.md @@ -113,7 +113,7 @@ curl --fail-with-body -sS -G \ Results are sorted in reverse chronological order (newest first) by `created_at`, with ties broken in a fixed server-side order, and capped at `limit` results for each response (default 100, max 500). The endpoint paginates forward only with `page` and `next_page` tokens (see [Paginate results](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed#paginate-results)): pass the response's `next_page` value back as the `page` query parameter on the next request, and stop when `next_page` is `null`. The response has no `has_more` field. Complete a list walk within 24 hours of starting it; an older list cursor is still accepted but is re-evaluated against the current retention boundary, so sessions whose oldest retained activity is about to age out of the retention period can be skipped. -In each session object, `user.id` is always set and survives account deletion; `user.email_address` is `null` when the user's account has been deleted or the user is no longer a member of an organization your key can read. `workspace_id` is `null` when the session was not associated with a workspace. A local session corresponds to one client session ID: starting a new conversation in the client, or clearing its context, begins a new session record. For Claude Science, the list can also include separate sessions for the app's own background work (for example, naming the conversation; on newer app versions also its reviewer and delegation tracks), and on older app versions some of that background work appears as extra messages inside the conversation's own transcript. A Claude Science conversation that continues across some app updates appears as two sessions. These behaviors are expected. Treat `id` values as opaque strings; the format may change without notice. +In each session object, `user.id` is always set and survives account deletion; `user.email_address` is `null` when the user's account has been deleted or the user is no longer a member of an organization your key can read. `workspace_id` is `null` when the session was not associated with a workspace. A local session corresponds to one client session ID: opening a new conversation in the client, or clearing its context, starts a new session record. For Claude Science, the list can also include separate sessions for the app's own background work (for example, naming the conversation; on newer app versions also its reviewer and delegation tracks), and on older app versions some of that background work appears as extra messages inside the conversation's own transcript. A Claude Science conversation that continues across some app updates appears as two sessions. These behaviors are expected. Treat `id` values as opaque strings; the format may change without notice. For Claude for Microsoft 365 and the Claude add-ins for Google Docs, Google Sheets, and Google Slides, deleting a conversation in the add-in occurs only on the client, so it is not reflected in the API: local sessions have no `deleted_at` field, and the session stays listed until retention removes it. @@ -299,7 +299,7 @@ Two parameters cap how many bytes of each tool block are returned: `tool_use_inp Claude Science calls connectors (MCP servers) from code that it runs through its `repl` tool, not as separately named tools, so no block in a Claude Science transcript is named after a connector. Each connector call appears in the code inside a `repl` `tool_use` block's `input` (for example, a `host.mcp("", "", ...)` call), and connector output appears in the matching `tool_result` only where that code printed it. Cowork and Claude Code sessions differ: they call each connector tool under its own `mcp____` name, which is the `name` of the `tool_use` block. To monitor connector use in Claude Science sessions, parse the `input` string and match on the code it contains rather than on a tool name. Pass `tool_use_input_max_bytes=-1` for these sessions so that a long code input is returned up to the server maximum instead of being cut at the 10,000-byte default before the connector call appears. -Transcript content honors the retention period described under [Sessions on users' machines](https://platform.claude.com/docs/en/manage-claude/compliance-sessions#retrieve-local-sessions). When the start of a session has aged past it, the transcript begins with a single `content_unavailable` placeholder with `reason` of `retention_elapsed`, and the retained messages follow. When every call in a session has aged out, the messages endpoint returns [404 Not Found](https://platform.claude.com/docs/en/manage-claude/compliance-errors#404-not-found), as it does for sessions in organizations your key cannot read, sessions that do not exist, and sessions for which zero data retention is in effect. A malformed session ID returns [400 Bad Request](https://platform.claude.com/docs/en/manage-claude/compliance-errors#400-bad-request). +Transcript content honors the retention period described under [Sessions on users' machines](https://platform.claude.com/docs/en/manage-claude/compliance-sessions#retrieve-local-sessions). When a session's earliest calls have aged past it, the transcript starts with a single `content_unavailable` placeholder with `reason` of `retention_elapsed`, and the retained messages follow. When every call in a session has aged out, the messages endpoint returns [404 Not Found](https://platform.claude.com/docs/en/manage-claude/compliance-errors#404-not-found), as it does for sessions in organizations your key cannot read, sessions that do not exist, and sessions for which zero data retention is in effect. A malformed session ID returns [400 Bad Request](https://platform.claude.com/docs/en/manage-claude/compliance-errors#400-bad-request). ## Sessions in the cloud (remote sessions) diff --git a/content/en/manage-claude/data-residency.md b/content/en/manage-claude/data-residency.md index b27350ff05..35bd7c3e9f 100644 --- a/content/en/manage-claude/data-residency.md +++ b/content/en/manage-claude/data-residency.md @@ -149,16 +149,16 @@ The `inference_geo` parameter controls where model inference runs for a specific AnthropicClient client = AnthropicOkHttpClient.fromEnv(); Message response = client.messages().create( - MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024L) - .inferenceGeo("us") - .addUserMessage("Summarize the key points of this document.") - .build()); + MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024L) + .inferenceGeo("us") + .addUserMessage("Summarize the key points of this document.") + .build()); response.content().stream() - .flatMap(block -> block.text().stream()) - .forEach(textBlock -> IO.println(textBlock.text())); + .flatMap(block -> block.text().stream()) + .forEach(textBlock -> IO.println(textBlock.text())); // Check where inference actually ran IO.println("Inference geo: " + response.usage().inferenceGeo().get()); ``` @@ -223,7 +223,7 @@ The response `usage` object includes an `inference_geo` field indicating where i The `inference_geo` parameter is supported on Claude 4.6 and later models. Requests with `inference_geo` on Claude Opus 4.5, Claude Sonnet 4.5 (deprecated), Claude Haiku 4.5, or earlier models return a 400 error. - The `inference_geo` parameter is available on the Claude API (first-party) and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws). On Amazon Bedrock and Google Cloud, the inference region is determined by the endpoint URL or inference profile, so `inference_geo` is not applicable. On [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), `inference_geo` is likewise not applicable: deployments hosted on Azure can instead use the US Data Zone Standard deployment type, which keeps inference within the United States. The `inference_geo` parameter is also not available through the [OpenAI SDK compatibility endpoint](https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/openai-sdk). + The `inference_geo` parameter is available on the Claude API (first-party), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). On Amazon Bedrock and Claude Models on Google Cloud (Google managed), the inference region is determined by the endpoint URL or inference profile, so `inference_geo` is not applicable. On [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), `inference_geo` is likewise not applicable: deployments hosted on Azure can instead use the US Data Zone Standard deployment type, which keeps inference within the United States. The `inference_geo` parameter is also not available through the [OpenAI SDK compatibility endpoint](https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/openai-sdk). ### Workspace-level restrictions @@ -235,6 +235,10 @@ Workspace settings also support restricting which inference geos are available: These settings can be configured through the Console or the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) under the `data_residency` field. + + **Claude Models on Google Cloud (Anthropic managed):** Every workspace allows all inference geos and uses `"global"` as its default inference geo. The Claude Console shows both settings as read-only. For US-only inference, set `inference_geo: "us"` on each request. + + ## Workspace geo Workspace geo is set when you create a workspace and can't be changed afterward. Currently, `"us"` is the only available workspace geo. @@ -249,6 +253,10 @@ To set workspace geo, create a new workspace in the [Console](https://platform.c **Claude Platform on AWS:** Workspace geo is not configurable. Claude Managed Agents sessions on this platform run with an effective Workspace geo of `"us"`, which is currently the only available workspace geo. See [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) for data residency considerations specific to that platform. + + **Claude Models on Google Cloud (Anthropic managed):** Workspace geo is not configurable. Every workspace uses `"us"` as its workspace geo, and the **Workspace geo** field doesn't appear in the Claude Console. + + ## Pricing Data residency pricing varies by model generation: @@ -257,7 +265,7 @@ Data residency pricing varies by model generation: * **Global routing (`inference_geo: "global"`):** Standard pricing applies. * **Older models:** Don't support `inference_geo` (see [Model availability](https://platform.claude.com/docs/en/manage-claude/data-residency#model-availability)). Standard pricing applies. Requests that include the parameter return a 400 error. -This pricing applies to the Claude API (first-party) and Claude Platform on AWS. On Claude in Microsoft Foundry, the same 1.1x multiplier applies to deployments hosted on Azure that use the US Data Zone Standard deployment type. Partner-operated platforms (Bedrock and Google Cloud) have their own regional pricing. See [Data residency pricing](https://platform.claude.com/docs/en/about-claude/pricing#data-residency-pricing) for details. +This pricing applies to the Claude API (first-party), Claude Platform on AWS, and Claude Models on Google Cloud (Anthropic managed). On Claude in Microsoft Foundry, the same 1.1x multiplier applies to deployments hosted on Azure that use the US Data Zone Standard deployment type. Partner-operated platforms, Bedrock and Claude Models on Google Cloud (Google managed), have their own regional pricing. See [Data residency pricing](https://platform.claude.com/docs/en/about-claude/pricing#data-residency-pricing) for details. The same multiplier applies to [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview): when an agent's [model configuration](https://platform.claude.com/docs/en/managed-agents/agent-setup) pins `inference_geo` to `"us"`, model requests in sessions running that agent are priced at 1.1x the standard rate. diff --git a/content/en/manage-claude/inference-hooks-endpoint.md b/content/en/manage-claude/inference-hooks-endpoint.md index 3ebb2dd949..06f347c4ae 100644 --- a/content/en/manage-claude/inference-hooks-endpoint.md +++ b/content/en/manage-claude/inference-hooks-endpoint.md @@ -709,7 +709,7 @@ The following samples are server implementations, so there is no shell tab: an A byte[] key; try { key = Base64.getDecoder().decode( - secret.startsWith("whsec_") ? secret.substring("whsec_".length()) : secret); + secret.startsWith("whsec_") ? secret.substring("whsec_".length()) : secret); } catch (IllegalArgumentException _) { return false; // misconfigured secret: reject rather than crash } @@ -720,7 +720,7 @@ The following samples are server implementations, so there is no shell tab: an A mac.init(new SecretKeySpec(key, "HmacSHA256")); mac.update((messageId + "." + timestamp + ".").getBytes(StandardCharsets.UTF_8)); expected = ("v1," + Base64.getEncoder().encodeToString(mac.doFinal(body))) - .getBytes(StandardCharsets.UTF_8); + .getBytes(StandardCharsets.UTF_8); } catch (GeneralSecurityException impossible) { // Every JVM ships HmacSHA256, so this never fires at runtime. throw new IllegalStateException(impossible); diff --git a/content/en/manage-claude/opentelemetry.md b/content/en/manage-claude/opentelemetry.md index 2d5de3ee70..787a6deac4 100644 --- a/content/en/manage-claude/opentelemetry.md +++ b/content/en/manage-claude/opentelemetry.md @@ -45,7 +45,7 @@ Set up OpenTelemetry tracing with the Claude API and Claude SDK | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | [Messages API](https://platform.claude.com/docs/en/api/messages/create) requests | ✅ | ✅ | ✅ | | [Sessions API](https://platform.claude.com/docs/en/managed-agents/sessions) requests | ✅ | ✅ | ✅ | -| [Token counts](https://platform.claude.com/docs/en/manage-claude/opentelemetry#count-tokens) | ✅ | ✅ | ✅ | +| Token usage (see [Counting tokens](https://platform.claude.com/docs/en/manage-claude/opentelemetry#count-tokens)) | ✅ | ✅ | ✅ | | Each model run within a request | — | ✅ | ✅ | | [Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) turns | — | ✅ | ✅ | | [Server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), run by the API | — | ✅ | ✅ | @@ -80,6 +80,14 @@ Send traces to any observability platform that accepts OTLP, including these par AI-powered observability and security. + + Observability built for the age of AI. + + + + Observability built on open source. + + Fully managed open observability platform. @@ -104,10 +112,18 @@ Send traces to any observability platform that accepts OTLP, including these par All-in-one platform for building successful products. + + Production-grade AI & general observability. + + Debug your broken code and misbehaving agents. + + AI Data Cloud. + + Observe, evaluate, and secure agents. diff --git a/content/en/manage-claude/opentelemetry/api.md b/content/en/manage-claude/opentelemetry/api.md index 9dd12158e8..2b3aced18c 100644 --- a/content/en/manage-claude/opentelemetry/api.md +++ b/content/en/manage-claude/opentelemetry/api.md @@ -62,16 +62,6 @@ The API emits spans for your Messages API requests and Managed Agents sessions. You can also add a destination with the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) instead of the Console. Sign in to the CLI as an admin, or use another [Admin API credential](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication), such as an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) or a service account key in `ANTHROPIC_API_KEY`. On Claude Platform on AWS, send the requests to `https://aws-external-anthropic.{region}.api.aws` instead, signed with your AWS credentials as in [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#making-requests). There, your [IAM policy](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions) determines who can manage destinations. A request can include only the workspaces of your AWS account in that Region. - ```bash CLI - # Sign in once as an admin, which opens a browser. - ant auth login --profile admin --scope "org:admin" - ant --profile admin beta:organization:telemetry-destinations create \ - --endpoint-url https://gateway.example.com/otlp \ - --headers '{authorization: "Bearer YOUR_OBSERVABILITY_API_KEY"}' \ - --traces.content-mode metadata_only \ - --workspaces.type all - ``` - ```bash cURL curl --fail-with-body -sS "https://api.anthropic.com/v1/organizations/telemetry_destinations" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ @@ -86,6 +76,16 @@ You can also add a destination with the [Admin API](https://platform.claude.com/ }' ``` + ```bash CLI + # Sign in once as an admin, which opens a browser. + ant auth login --profile admin --scope "org:admin" + ant --profile admin beta:organization:telemetry-destinations create \ + --endpoint-url https://gateway.example.com/otlp \ + --headers '{authorization: "Bearer YOUR_OBSERVABILITY_API_KEY"}' \ + --traces.content-mode metadata_only \ + --workspaces.type all + ``` + ```python Python client = anthropic.Anthropic() @@ -221,7 +221,7 @@ A destination receives the spans of the workspaces that it covers. Choose them w * **Selected:** Only the workspaces that you select. * **All except:** Like **All**, but without the workspaces that you select. -For **Selected** or **All except**, select the workspaces in the search box that appears under the options. To change a destination's workspaces later, open its **More actions** menu on the [OpenTelemetry settings page](https://platform.claude.com/settings/telemetry-destinations) in the Console while the **Workspace** filter shows **All**. Click **Edit**, then choose another **Workspaces** option or change the workspaces in the search box. +For **Selected** or **All except**, select the workspaces in the search box that appears under the options. To change a destination's workspaces later, open its **More actions** menu on the [OpenTelemetry settings page](https://platform.claude.com/settings/telemetry-destinations) in the Console while the **Workspace** filter shows **All**. Click **Edit**, then select another **Workspaces** option or change the workspaces in the search box. If you have the developer role in the organization and the Workspace Admin role in a workspace, you can add that workspace to a **Selected** destination or remove it. Set the **Workspace** filter to that workspace, then open the destination's **More actions** menu. On Claude Platform on AWS, the Console has no Workspace Admin role. There, your [IAM policy](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions) determines who can add a workspace to a destination or remove it. diff --git a/content/en/manage-claude/opentelemetry/sdk.md b/content/en/manage-claude/opentelemetry/sdk.md index 1830a0961a..c8797d3b07 100644 --- a/content/en/manage-claude/opentelemetry/sdk.md +++ b/content/en/manage-claude/opentelemetry/sdk.md @@ -11,7 +11,7 @@ featureMetadata: Claude API: beta Claude Platform on AWS: beta Amazon Bedrock: beta - Google Cloud: beta + Claude Models on Google Cloud (Google managed): beta Microsoft Foundry: beta rows: - label: Works with @@ -69,7 +69,7 @@ Install or upgrade to the latest version of the Claude SDK: ```bash - go get github.com/anthropics/anthropic-sdk-go@latest + go get github.com/anthropics/anthropic-sdk-go/v2@latest ``` If your application doesn't use the OpenTelemetry SDK yet, install it with a console exporter, which you use in the next step to print spans: @@ -215,7 +215,7 @@ The following example registers a tracer provider that prints each span to the c "context" "fmt" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/exporters/stdout/stdouttrace" "go.opentelemetry.io/otel/propagation" @@ -481,7 +481,10 @@ The following example shows how to use each option: .build(); // Turn spans off for one client. - var quietClient = AnthropicOkHttpClient.builder().fromEnv().openTelemetry(false).build(); + var quietClient = AnthropicOkHttpClient.builder() + .fromEnv() + .openTelemetry(false) + .build(); // Set a conversation ID in the request options of one call. var params = MessageCreateParams.builder() @@ -490,7 +493,9 @@ The following example shows how to use each option: .addUserMessage("Hello, Claude") .build(); var message = client.messages().create(params, RequestOptions.builder() - .openTelemetry(OpenTelemetryRequestOptions.builder().conversationId("conv_42").build()) + .openTelemetry(OpenTelemetryRequestOptions.builder() + .conversationId("conv_42") + .build()) .build()); ``` @@ -625,7 +630,9 @@ To stop the SDK from sending these headers, for example when your HTTP client in var envOptions = OpenTelemetryOptions.fromEnv(); var client = AnthropicOkHttpClient.builder() .fromEnv() - .openTelemetry(envOptions.toBuilder().propagation(false).build()) + .openTelemetry(envOptions.toBuilder() + .propagation(false) + .build()) .build(); ``` diff --git a/content/en/manage-claude/plugins-api.md b/content/en/manage-claude/plugins-api.md index 77b15dba14..ce78098823 100644 --- a/content/en/manage-claude/plugins-api.md +++ b/content/en/manage-claude/plugins-api.md @@ -40,7 +40,7 @@ This release does not include standalone skills (skills a member writes in the s * Your primary owner creates an Admin API key with the `read:plugins` scope, the `write:plugins` scope, or both in [claude.ai > Organization settings > API](https://claude.ai/admin-settings/api-access). See [Create a key for a Claude Enterprise organization](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization). * Every request carries three headers: `x-api-key`, `anthropic-version: 2023-06-01`, and `anthropic-beta: ce-plugins-2026-09-01`. -The SDK exposes these endpoints under `client.beta.organization` (csharp, go: `client.Beta.Organization`; java: `client.beta().organization()`; php: `$client->beta->organization`), and the [`ant` CLI](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart) under `ant beta:organization`; they send the `anthropic-version` and `anthropic-beta` headers for you. The examples on this page use the SDK's default client, which, like the CLI, reads the Admin API key from the `ANTHROPIC_API_KEY` environment variable; the curl examples read the key from the same variable and pass it in the `x-api-key` header. Where an SDK or the CLI fetches more pages for you, `limit` sets the page size, not the total (see [Pagination](https://platform.claude.com/docs/en/manage-claude/plugins-api#pagination)). +In Python, TypeScript, C#, Go, Java, PHP, and Ruby, the SDK exposes these endpoints under `client.beta.organization` (csharp, go: `client.Beta.Organization`; java: `client.beta().organization()`; php: `$client->beta->organization`), and the [`ant` CLI](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart) under `ant beta:organization`; they send the `anthropic-version` and `anthropic-beta` headers for you. The examples on this page use the SDK's default client, which, like the CLI, reads the Admin API key from the `ANTHROPIC_API_KEY` environment variable; the curl examples read the key from the same variable and pass it in the `x-api-key` header. Where an SDK or the CLI fetches more pages for you, `limit` sets the page size, not the total (see [Pagination](https://platform.claude.com/docs/en/manage-claude/plugins-api#pagination)). API keys belong to the organization and keep working after the person who created them leaves. Do not share them or check them into source control. @@ -762,7 +762,7 @@ Upload an archive: void main() throws Exception { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - // Build the `files[]` part by hand so the archive is sent with its filename, + // Build the `files[]` part by hand so the archive is sent with its file name, // which the upload requires. var archive = MultipartField.>builder() .value(List.of(Files.newInputStream(Path.of("dist/sales-toolkit.zip")))) @@ -944,7 +944,7 @@ Upload individual files into a named marketplace. Attach each file under its pat } defer skillMd.Close() - // anthropic.File keeps each file's path within the plugin as the part's filename; + // anthropic.File keeps each file's path within the plugin as the part's file name; // a bare *os.File would be sent under its base name and the manifest would not be found. plugin, err := client.Beta.Organization.Plugins.New(context.Background(), anthropic.BetaOrganizationPluginNewParams{ Files: []io.Reader{ @@ -968,9 +968,9 @@ Upload individual files into a named marketplace. Attach each file under its pat void main() throws Exception { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - // The `files` setters on PluginCreateParams take one filename for the whole + // The `files` setters on PluginCreateParams take one file name for the whole // list, so upload the plugin as one archive instead: a single hand-built - // part that carries the archive's filename, which the upload requires. + // part that carries the archive's file name, which the upload requires. var archive = MultipartField.>builder() .value(List.of(Files.newInputStream(Path.of("dist/sales-toolkit.zip")))) .filename("sales-toolkit.zip") @@ -1624,7 +1624,7 @@ A `{version}` that lacks the `pluginver_` prefix returns `400` (except the liter void main() throws Exception { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - // Build the `files[]` part by hand so the archive is sent with its filename, + // Build the `files[]` part by hand so the archive is sent with its file name, // which the upload requires. var archive = MultipartField.>builder() .value(List.of(Files.newInputStream(Path.of("dist/sales-toolkit.zip")))) @@ -3086,7 +3086,7 @@ Validate a local copy of the marketplace directory instead, as a `.zip`; the res void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - // Pass a Path so the `archive` part is sent with a filename, which this endpoint requires. + // Pass a Path so the `archive` part is sent with a file name, which this endpoint requires. var params = PluginMarketplaceValidateArchiveParams.builder() .archive(Path.of("marketplace.zip")) .build(); diff --git a/content/en/manage-claude/usage-cost-api.md b/content/en/manage-claude/usage-cost-api.md index a6c2f5bc24..35e61d3f53 100644 --- a/content/en/manage-claude/usage-cost-api.md +++ b/content/en/manage-claude/usage-cost-api.md @@ -28,6 +28,10 @@ Claude Enterprise organizations use an Analytics API key with a different API in **Claude Platform on AWS:** The programmatic Usage and Cost API endpoints are not currently available. View usage and cost data on the **Usage** and **Cost** pages in the Claude Console instead. + + **Claude Models on Google Cloud (Anthropic managed):** Of the Usage and Cost API endpoints, only the [usage endpoint](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#usage-api) is available. Call it through the [organization-level base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) with Google Cloud credentials instead of an Admin API key. The only predefined [IAM role](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) that allows this call is `roles/claude.admin`. View cost data on the **Cost** page in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console). + + ## Which API do you need? Anthropic provides cost and usage reporting through two APIs, depending on which Claude product your organization manages: diff --git a/content/en/manage-claude/user-profiles-verification-portal.md b/content/en/manage-claude/user-profiles-verification-portal.md index 456bec56d6..451867894b 100644 --- a/content/en/manage-claude/user-profiles-verification-portal.md +++ b/content/en/manage-claude/user-profiles-verification-portal.md @@ -192,7 +192,7 @@ To see which programs apply to a profile, [retrieve the profile](https://platfor The end customer can see the linked profile under **Linked accounts** in the portal. -If your inference runs on Claude in Amazon Bedrock or Google Cloud, you have to link your own accounts too. Programs apply to requests from an AWS account or Google Cloud project only after you link it to the Anthropic organization that creates your profiles. See [Attribute requests on Amazon Bedrock and Google Cloud](https://platform.claude.com/docs/en/manage-claude/user-profiles#attribute-requests-on-amazon-bedrock-and-google-cloud). +If your inference runs on Claude in Amazon Bedrock or Claude Models on Google Cloud (Google managed), you have to link your own accounts too. Programs apply to requests from an AWS account or Google Cloud project only after you link it to the Anthropic organization that creates your profiles. See [Attribute requests on Amazon Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/manage-claude/user-profiles#attribute-requests-on-amazon-bedrock-and-google-cloud). ## Next steps diff --git a/content/en/manage-claude/user-profiles.md b/content/en/manage-claude/user-profiles.md index 27f750efab..b69935ce4c 100644 --- a/content/en/manage-claude/user-profiles.md +++ b/content/en/manage-claude/user-profiles.md @@ -37,7 +37,7 @@ You create and manage profiles in one of the following: * An organization on [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws). The calling principal needs the [user profile IAM actions](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions#user-profiles). * A [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) deployment [hosted on Anthropic](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#hosting-options), not one hosted on Azure. You don't need an organization on the Claude API or Claude Platform on AWS. Use your Foundry endpoint, with the same base URL and authentication that you use for inference. -Amazon Bedrock and Google Cloud don't have the `/v1/user_profiles` endpoints. If your inference runs there, create your profiles in an organization on the Claude API or Claude Platform on AWS. On Amazon Bedrock, profiles work only with [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock). See [Attribute requests on Amazon Bedrock and Google Cloud](https://platform.claude.com/docs/en/manage-claude/user-profiles#attribute-requests-on-amazon-bedrock-and-google-cloud). +Amazon Bedrock and Claude Models on Google Cloud (Google managed) don't have the `/v1/user_profiles` endpoints. If your inference runs there, create your profiles in an organization on the Claude API or Claude Platform on AWS. On Amazon Bedrock, profiles work only with [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock). See [Attribute requests on Amazon Bedrock and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/manage-claude/user-profiles#attribute-requests-on-amazon-bedrock-and-google-cloud). Keep the traffic you send for your end customers in one organization and your own internal usage in another. Profiles belong to an organization, not a workspace, so separate workspaces in one organization aren't enough. Only the organization for end-customer traffic needs user profiles. To create another organization on the Claude API, see the "How to create a new organization" section of [Creating and managing Workspaces in the Claude Console](https://support.claude.com/en/articles/9796807) in the Claude Help Center. @@ -362,17 +362,17 @@ The Claude API, Claude Platform on AWS, and Microsoft Foundry deployments hosted Message Batches is the exception: creating a batch checks only the ID's format. If a well-formed ID doesn't belong to the organization that sends the batch, the batch is still created, and each request in it then fails with an `errored` result that contains the same `invalid_request_error`. -### Attribute requests on Amazon Bedrock and Google Cloud +### Attribute requests on Amazon Bedrock and Claude Models on Google Cloud (Google managed) -A profile ID of either access type also works on [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) and on Google Cloud. It doesn't work with the [earlier Amazon Bedrock integration](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) that you call with `InvokeModel` or `Converse`. You use your Anthropic organization's credentials only to create and manage profiles. Inference stays on your existing AWS or Google Cloud credentials. +A profile ID of either access type also works on [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) and on Claude Models on Google Cloud (Google managed). It doesn't work with the [earlier Amazon Bedrock integration](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) that you call with `InvokeModel` or `Converse`. You use your Anthropic organization's credentials only to create and manage profiles. Inference stays on your existing AWS or Google Cloud credentials. -| Platform | Create profiles | Send the profile ID in | -| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------- | -| Claude API | Yes | `anthropic-user-profile-id` header | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | Yes | `anthropic-user-profile-id` header | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), deployments hosted on Anthropic | Yes | `anthropic-user-profile-id` header | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | No. Create them on the Claude API or Claude Platform on AWS. | `anthropic-user-profile-id` header | -| [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | No. Create them on the Claude API or Claude Platform on AWS. | `user_profile_id` field in the request body | +| Platform | Create profiles | Send the profile ID in | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------- | +| Claude API | Yes | `anthropic-user-profile-id` header | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | Yes | `anthropic-user-profile-id` header | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), deployments hosted on Anthropic | Yes | `anthropic-user-profile-id` header | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | No. Create them on the Claude API or Claude Platform on AWS. | `anthropic-user-profile-id` header | +| [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | No. Create them on the Claude API or Claude Platform on AWS. | `user_profile_id` field in the request body | On Claude in Amazon Bedrock, put the ID at the top level of the request body: @@ -385,7 +385,7 @@ On Claude in Amazon Bedrock, put the ID at the top level of the request body: } ``` -Link each AWS account that sends requests to Claude in Amazon Bedrock, and each Google Cloud project that sends requests on Google Cloud, to the Anthropic organization that creates your profiles: +Link each AWS account that sends requests to Claude in Amazon Bedrock, and each Google Cloud project that sends requests to Claude Models on Google Cloud (Google managed), to the Anthropic organization that creates your profiles: 1. An admin or owner of that organization starts the link in the Verification Portal at `portal.anthropic.com`, under **Linked accounts**. 2. Someone who can manage IAM in the AWS account or Google Cloud project runs a command that the portal provides. @@ -393,7 +393,7 @@ Link each AWS account that sends requests to Claude in Amazon Bedrock, and each Programs that apply to a profile apply to an account's requests only after the account is linked and the portal shows it as **Linked**. Those programs include the ones an end customer's organization is approved for after the end customer [links the profile to that organization](https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal) and, for Cyber Verification Program access levels, turns them on for the profile in the portal. -Claude in Amazon Bedrock and Google Cloud check the format of the ID but don't look the profile up. They reject a malformed ID with a `400`. They accept any well-formed ID, so a successful response doesn't confirm that the ID matches a profile. A request with no ID goes through unattributed, and if it triggers an enforcement action, the action applies to your whole organization. +Claude in Amazon Bedrock and Claude Models on Google Cloud (Google managed) check the format of the ID but don't look the profile up. They reject a malformed ID with a `400`. They accept any well-formed ID, so a successful response doesn't confirm that the ID matches a profile. A request with no ID goes through unattributed, and if it triggers an enforcement action, the action applies to your whole organization. ### Identify individual users within a company @@ -671,7 +671,7 @@ Delete a profile when an end customer closes their account or asks you to erase The response repeats the ID with `"type": "user_profile_deleted"`. If a delete returns a server error, retry it. A `404` on the retry means the first delete went through. -After a delete, the profile endpoints return a `404` for that ID. For up to about 10 minutes, inference requests that carry the deleted ID can still succeed. After that, the platforms that check the ID on every request reject the request with a `400`. Claude in Amazon Bedrock and Google Cloud don't look profiles up, so they still accept it. +After a delete, the profile endpoints return a `404` for that ID. For up to about 10 minutes, inference requests that carry the deleted ID can still succeed. After that, the platforms that check the ID on every request reject the request with a `400`. Claude in Amazon Bedrock and Claude Models on Google Cloud (Google managed) don't look profiles up, so they still accept it. ## Next steps diff --git a/content/en/manage-claude/wif-providers/aws.md b/content/en/manage-claude/wif-providers/aws.md index 5251c28de5..8b85c5c5b9 100644 --- a/content/en/manage-claude/wif-providers/aws.md +++ b/content/en/manage-claude/wif-providers/aws.md @@ -95,7 +95,7 @@ Be as specific as the workload allows. Match the exact role ARN, and only broade ### Acquire and use the token -Call `GetWebIdentityToken` with `https://api.anthropic.com` as the audience, then pass the result to the SDK's federation credentials through `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider`; java: `IdentityTokenConfig`). Except in Java (see the comment in that example), that option takes a token provider, so the SDK calls STS again on each refresh. +Call `GetWebIdentityToken` with `https://api.anthropic.com` as the audience, then pass the result to the SDK's federation credentials through `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider()`; java: `IdentityTokenConfig`). Except in Java (see the comment in that example), that option takes a token provider, so the SDK calls STS again on each refresh. `GetWebIdentityToken` is available only on regional STS endpoints. If you receive `'STS' object has no attribute 'get_web_identity_token'` or a similar error, pin your STS client to a region (for example, `boto3.client("sts", region_name="us-east-1")`) and ensure your AWS SDK is recent enough to include the API. @@ -135,6 +135,23 @@ Call `GetWebIdentityToken` with `https://api.anthropic.com` as the audience, the }' ``` + ```bash CLI + export ANTHROPIC_IDENTITY_TOKEN_FILE=$(mktemp) + aws sts get-web-identity-token \ + --region us-east-1 \ + --audience "https://api.anthropic.com" \ + --signing-algorithm RS256 \ + --duration-seconds 900 \ + --query WebIdentityToken --output text > "$ANTHROPIC_IDENTITY_TOKEN_FILE" + + # ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, + # ANTHROPIC_SERVICE_ACCOUNT_ID, and ANTHROPIC_WORKSPACE_ID are read from the environment + ant messages create \ + --model claude-opus-5-5 \ + --max-tokens 1024 \ + --message '{role: user, content: "Hello from AWS"}' + ``` + ```python Python import os @@ -213,6 +230,54 @@ Call `GetWebIdentityToken` with `https://api.anthropic.com` as the audience, the } ``` + ```csharp C# + using Amazon.SecurityToken; + using Amazon.SecurityToken.Model; + // ... + using Anthropic.Credentials; + // ... + + var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions + { + FederationRuleId = Environment.GetEnvironmentVariable("ANTHROPIC_FEDERATION_RULE_ID")!, + OrganizationId = Environment.GetEnvironmentVariable("ANTHROPIC_ORGANIZATION_ID"), + ServiceAccountId = Environment.GetEnvironmentVariable("ANTHROPIC_SERVICE_ACCOUNT_ID"), + WorkspaceId = Environment.GetEnvironmentVariable("ANTHROPIC_WORKSPACE_ID"), + IdentityTokenProvider = new StsTokenProvider(), + }); + using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); + + var message = await client.Messages.Create(new() + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 1024, + Messages = [new UserMessageParam { Content = "Hello from AWS" }], + }); + foreach (var block in message.Content) + { + if (block.Value is TextBlock textBlock) + { + Console.WriteLine(textBlock.Text); + } + } + + class StsTokenProvider : IIdentityTokenProvider + { + private readonly AmazonSecurityTokenServiceClient _sts = new(Amazon.RegionEndpoint.USEast1); + + public async Task GetIdentityTokenAsync(CancellationToken ct = default) + { + var resp = await _sts.GetWebIdentityTokenAsync(new GetWebIdentityTokenRequest + { + Audience = ["https://api.anthropic.com"], + SigningAlgorithm = "RS256", + DurationSeconds = 900, + }, ct); + return resp.WebIdentityToken; + } + } + ``` + ```go Go ctx := context.TODO() cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion("us-east-1")) @@ -272,7 +337,9 @@ Call `GetWebIdentityToken` with `https://api.anthropic.com` as the audience, the import software.amazon.awssdk.services.sts.model.GetWebIdentityTokenRequest; void main() { - StsClient sts = StsClient.builder().region(Region.US_EAST_1).build(); + StsClient sts = StsClient.builder() + .region(Region.US_EAST_1) + .build(); // The Java SDK takes the token itself or a file path, not a function; with // source("value"), path(...) holds the token. The SDK sends that same token @@ -281,104 +348,39 @@ Call `GetWebIdentityToken` with `https://api.anthropic.com` as the audience, the // process, pass source("file") and write a new token to the file before // each refresh. String stsToken = sts.getWebIdentityToken( - GetWebIdentityTokenRequest.builder() - .audience("https://api.anthropic.com") - .signingAlgorithm("RS256") - .durationSeconds(900) - .build()) - .webIdentityToken(); + GetWebIdentityTokenRequest.builder() + .audience("https://api.anthropic.com") + .signingAlgorithm("RS256") + .durationSeconds(900) + .build()) + .webIdentityToken(); AnthropicClient client = AnthropicOkHttpClient.builder() - .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() - .organizationId(System.getenv("ANTHROPIC_ORGANIZATION_ID")) - .workspaceId(System.getenv("ANTHROPIC_WORKSPACE_ID")) - .authentication(AuthenticationConfig.builder() - .type(AuthenticationType.OIDC_FEDERATION) - .federationRuleId(System.getenv("ANTHROPIC_FEDERATION_RULE_ID")) - .serviceAccountId(System.getenv("ANTHROPIC_SERVICE_ACCOUNT_ID")) - .identityToken(IdentityTokenConfig.builder() - .source("value") - .path(stsToken) - .build()) - .build()) - .build())) - .build(); + .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() + .organizationId(System.getenv("ANTHROPIC_ORGANIZATION_ID")) + .workspaceId(System.getenv("ANTHROPIC_WORKSPACE_ID")) + .authentication(AuthenticationConfig.builder() + .type(AuthenticationType.OIDC_FEDERATION) + .federationRuleId(System.getenv("ANTHROPIC_FEDERATION_RULE_ID")) + .serviceAccountId(System.getenv("ANTHROPIC_SERVICE_ACCOUNT_ID")) + .identityToken(IdentityTokenConfig.builder() + .source("value") + .path(stsToken) + .build()) + .build()) + .build())) + .build(); var message = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello from AWS") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello from AWS") + .build()); IO.println(message.content()); } ``` - ```csharp C# - using Amazon.SecurityToken; - using Amazon.SecurityToken.Model; - // ... - using Anthropic.Credentials; - // ... - - var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions - { - FederationRuleId = Environment.GetEnvironmentVariable("ANTHROPIC_FEDERATION_RULE_ID")!, - OrganizationId = Environment.GetEnvironmentVariable("ANTHROPIC_ORGANIZATION_ID"), - ServiceAccountId = Environment.GetEnvironmentVariable("ANTHROPIC_SERVICE_ACCOUNT_ID"), - WorkspaceId = Environment.GetEnvironmentVariable("ANTHROPIC_WORKSPACE_ID"), - IdentityTokenProvider = new StsTokenProvider(), - }); - using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); - - var message = await client.Messages.Create(new() - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 1024, - Messages = [new UserMessageParam { Content = "Hello from AWS" }], - }); - foreach (var block in message.Content) - { - if (block.Value is TextBlock textBlock) - { - Console.WriteLine(textBlock.Text); - } - } - - class StsTokenProvider : IIdentityTokenProvider - { - private readonly AmazonSecurityTokenServiceClient _sts = new(Amazon.RegionEndpoint.USEast1); - - public async Task GetIdentityTokenAsync(CancellationToken ct = default) - { - var resp = await _sts.GetWebIdentityTokenAsync(new GetWebIdentityTokenRequest - { - Audience = ["https://api.anthropic.com"], - SigningAlgorithm = "RS256", - DurationSeconds = 900, - }, ct); - return resp.WebIdentityToken; - } - } - ``` - - ```bash CLI - export ANTHROPIC_IDENTITY_TOKEN_FILE=$(mktemp) - aws sts get-web-identity-token \ - --region us-east-1 \ - --audience "https://api.anthropic.com" \ - --signing-algorithm RS256 \ - --duration-seconds 900 \ - --query WebIdentityToken --output text > "$ANTHROPIC_IDENTITY_TOKEN_FILE" - - # ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, - # ANTHROPIC_SERVICE_ACCOUNT_ID, and ANTHROPIC_WORKSPACE_ID are read from the environment - ant messages create \ - --model claude-opus-5-5 \ - --max-tokens 1024 \ - --message '{role: user, content: "Hello from AWS"}' - ``` - ```php PHP use Anthropic\Client; use Anthropic\Lib\Credentials\CredentialResult; @@ -478,7 +480,7 @@ curl -sS https://api.anthropic.com/v1/oauth/token \ JSON ``` -A successful exchange returns an `access_token` beginning with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange); the most common AWS-side cause is an `iss` mismatch (the per-account STS issuer URL must match the registered `issuer_url` exactly). +A successful exchange returns an `access_token` starting with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange); the most common AWS-side cause is an `iss` mismatch (the per-account STS issuer URL must match the registered `issuer_url` exactly). ## Use EKS projected service-account tokens @@ -641,6 +643,15 @@ Inside the pod, the projected token is at `/var/run/secrets/anthropic.com/token` }' ``` + ```bash CLI + # Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, + # ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE + ant messages create \ + --model claude-opus-5-5 \ + --max-tokens 1024 \ + --message '{role: user, content: "Hello from EKS"}' + ``` + ```python Python import os @@ -696,6 +707,27 @@ Inside the pod, the projected token is at `/var/run/secrets/anthropic.com/token` } ``` + ```csharp C# + // Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, + // ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE + // from the pod's environment. + using var client = new AnthropicClient(); + + var message = await client.Messages.Create(new() + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 1024, + Messages = [new UserMessageParam { Content = "Hello from EKS" }], + }); + foreach (var block in message.Content) + { + if (block.Value is TextBlock textBlock) + { + Console.WriteLine(textBlock.Text); + } + } + ``` + ```go Go tokenPath := os.Getenv("ANTHROPIC_IDENTITY_TOKEN_FILE") @@ -738,44 +770,14 @@ Inside the pod, the projected token is at `/var/run/secrets/anthropic.com/token` AnthropicClient client = AnthropicOkHttpClient.fromEnv(); var message = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello from EKS") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello from EKS") + .build()); IO.println(message.content()); ``` - ```csharp C# - // Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, - // ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE - // from the pod's environment. - using var client = new AnthropicClient(); - - var message = await client.Messages.Create(new() - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 1024, - Messages = [new UserMessageParam { Content = "Hello from EKS" }], - }); - foreach (var block in message.Content) - { - if (block.Value is TextBlock textBlock) - { - Console.WriteLine(textBlock.Text); - } - } - ``` - - ```bash CLI - # Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, - # ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE - ant messages create \ - --model claude-opus-5-5 \ - --max-tokens 1024 \ - --message '{role: user, content: "Hello from EKS"}' - ``` - ```php PHP use Anthropic\Client; @@ -833,7 +835,7 @@ curl -sS https://api.anthropic.com/v1/oauth/token \ JSON ``` -A successful exchange returns an `access_token` beginning with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange); the most common EKS-side cause is the projected token's `aud` not matching the rule (project a token with `audience: https://api.anthropic.com`, not the IRSA default `sts.amazonaws.com`). +A successful exchange returns an `access_token` starting with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange); the most common EKS-side cause is the projected token's `aud` not matching the rule (project a token with `audience: https://api.anthropic.com`, not the IRSA default `sts.amazonaws.com`). ## Scope your rule diff --git a/content/en/manage-claude/wif-providers/azure.md b/content/en/manage-claude/wif-providers/azure.md index 9279fba39f..c60578db57 100644 --- a/content/en/manage-claude/wif-providers/azure.md +++ b/content/en/manage-claude/wif-providers/azure.md @@ -141,12 +141,12 @@ A longer accepted lifetime means a leaked Entra token stays exchangeable for lon ### Acquire and use the token -At runtime your workload fetches its Entra token, exchanges it at `POST /v1/oauth/token`, and uses the returned bearer token to call Claude. The Claude SDK handles the exchange and refresh loop when you supply `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider`; java: `IdentityTokenConfig`), as shown in the following examples. Except in Java (see the comment in that example), that option takes a token provider, and the SDK calls it again for each refresh. The cURL tab shows the raw flow. +At runtime your workload fetches its Entra token, exchanges it at `POST /v1/oauth/token`, and uses the returned bearer token to call Claude. The Claude SDK handles the exchange and refresh loop when you supply `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider()`; java: `IdentityTokenConfig`), as shown in the following examples. Except in Java (see the comment in that example), that option takes a token provider, and the SDK calls it again for each refresh. The cURL tab shows the raw flow. The samples fetch the managed identity token from the platform's token endpoint: IMDS on VMs and VM Scale Sets, or the `IDENTITY_ENDPOINT` service on App Service, Functions, and Container Apps. Replace `` in the `api://` resource value with the audience app registration's client ID from [Register the token audience](https://platform.claude.com/docs/en/manage-claude/wif-providers/azure#register-the-token-audience). - If your workload already uses the Azure Identity client library, get the Entra token from it (`DefaultAzureCredential` with the scope `api:///.default`) instead of calling the token endpoints directly. Supply it to `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider`; java: `IdentityTokenConfig`) the way the examples do. The library selects the correct endpoint on every Azure platform, including AKS with Entra Workload Identity. + If your workload already uses the Azure Identity client library, get the Entra token from it (`DefaultAzureCredential` with the scope `api:///.default`) instead of calling the token endpoints directly. Supply it to `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider()`; java: `IdentityTokenConfig`) the way the examples do. The library selects the correct endpoint on every Azure platform, including AKS with Entra Workload Identity. @@ -316,6 +316,67 @@ The samples fetch the managed identity token from the platform's token endpoint: } ``` + ```csharp C# + using Anthropic.Credentials; + // ... + + var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions + { + FederationRuleId = Environment.GetEnvironmentVariable("ANTHROPIC_FEDERATION_RULE_ID")!, + OrganizationId = Environment.GetEnvironmentVariable("ANTHROPIC_ORGANIZATION_ID"), + ServiceAccountId = Environment.GetEnvironmentVariable("ANTHROPIC_SERVICE_ACCOUNT_ID"), + WorkspaceId = Environment.GetEnvironmentVariable("ANTHROPIC_WORKSPACE_ID"), + IdentityTokenProvider = new EntraTokenProvider(), + }); + using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); + + var message = await client.Messages.Create(new() + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 1024, + Messages = [new UserMessageParam { Content = "Hello from Azure" }], + }); + foreach (var block in message.Content) + { + if (block.Value is TextBlock textBlock) + { + Console.WriteLine(textBlock.Text); + } + } + + class EntraTokenProvider : IIdentityTokenProvider + { + // The audience app registration's identifier URI (see Register the token audience). + private const string Audience = "api://"; + + private static readonly HttpClient httpClient = new(); + + public async Task GetIdentityTokenAsync(CancellationToken ct = default) + { + // App Service, Functions, and Container Apps inject IDENTITY_ENDPOINT; + // VMs and VM Scale Sets use IMDS. + // With multiple user-assigned identities, append &client_id=. + var identityEndpoint = Environment.GetEnvironmentVariable("IDENTITY_ENDPOINT"); + using var request = identityEndpoint is not null + ? new HttpRequestMessage(HttpMethod.Get, + $"{identityEndpoint}?api-version=2019-08-01&resource={Audience}") + { + Headers = { { "X-IDENTITY-HEADER", Environment.GetEnvironmentVariable("IDENTITY_HEADER") } }, + } + : new HttpRequestMessage(HttpMethod.Get, + $"http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource={Audience}") + { + Headers = { { "Metadata", "true" } }, + }; + using var response = await httpClient.SendAsync(request, ct); + response.EnsureSuccessStatusCode(); + using var json = await JsonDocument.ParseAsync( + await response.Content.ReadAsStreamAsync(ct), default, ct); + return json.RootElement.GetProperty("access_token").GetString()!; + } + } + ``` + ```go Go package main @@ -326,8 +387,8 @@ The samples fetch the managed identity token from the platform's token endpoint: "net/http" "os" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/option" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/option" ) // The audience app registration's identifier URI (see Register the token audience). @@ -415,12 +476,12 @@ The samples fetch the managed identity token from the platform's token endpoint: // With multiple user-assigned identities, append &client_id=. String identityEndpoint = System.getenv("IDENTITY_ENDPOINT"); HttpRequest tokenRequest = identityEndpoint != null - ? HttpRequest.newBuilder(URI.create(identityEndpoint + "?api-version=2019-08-01&resource=" + audience)) - .header("X-IDENTITY-HEADER", System.getenv("IDENTITY_HEADER")) - .build() - : HttpRequest.newBuilder(URI.create("http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=" + audience)) - .header("Metadata", "true") - .build(); + ? HttpRequest.newBuilder(URI.create(identityEndpoint + "?api-version=2019-08-01&resource=" + audience)) + .header("X-IDENTITY-HEADER", System.getenv("IDENTITY_HEADER")) + .build() + : HttpRequest.newBuilder(URI.create("http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=" + audience)) + .header("Metadata", "true") + .build(); // The Java SDK takes the token itself or a file path, not a function; with // source("value"), path(...) holds the token. The SDK sends that same token @@ -432,92 +493,31 @@ The samples fetch the managed identity token from the platform's token endpoint: String entraToken = new ObjectMapper().readTree(response.body()).get("access_token").asText(); AnthropicClient client = AnthropicOkHttpClient.builder() - .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() - .organizationId(System.getenv("ANTHROPIC_ORGANIZATION_ID")) - .workspaceId(System.getenv("ANTHROPIC_WORKSPACE_ID")) - .authentication(AuthenticationConfig.builder() - .type(AuthenticationType.OIDC_FEDERATION) - .federationRuleId(System.getenv("ANTHROPIC_FEDERATION_RULE_ID")) - .serviceAccountId(System.getenv("ANTHROPIC_SERVICE_ACCOUNT_ID")) - .identityToken(IdentityTokenConfig.builder() - .source("value") - .path(entraToken) - .build()) - .build()) - .build())) - .build(); + .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() + .organizationId(System.getenv("ANTHROPIC_ORGANIZATION_ID")) + .workspaceId(System.getenv("ANTHROPIC_WORKSPACE_ID")) + .authentication(AuthenticationConfig.builder() + .type(AuthenticationType.OIDC_FEDERATION) + .federationRuleId(System.getenv("ANTHROPIC_FEDERATION_RULE_ID")) + .serviceAccountId(System.getenv("ANTHROPIC_SERVICE_ACCOUNT_ID")) + .identityToken(IdentityTokenConfig.builder() + .source("value") + .path(entraToken) + .build()) + .build()) + .build())) + .build(); var message = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello from Azure") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello from Azure") + .build()); IO.println(message.content()); } ``` - ```csharp C# - using Anthropic.Credentials; - // ... - - var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions - { - FederationRuleId = Environment.GetEnvironmentVariable("ANTHROPIC_FEDERATION_RULE_ID")!, - OrganizationId = Environment.GetEnvironmentVariable("ANTHROPIC_ORGANIZATION_ID"), - ServiceAccountId = Environment.GetEnvironmentVariable("ANTHROPIC_SERVICE_ACCOUNT_ID"), - WorkspaceId = Environment.GetEnvironmentVariable("ANTHROPIC_WORKSPACE_ID"), - IdentityTokenProvider = new EntraTokenProvider(), - }); - using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); - - var message = await client.Messages.Create(new() - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 1024, - Messages = [new UserMessageParam { Content = "Hello from Azure" }], - }); - foreach (var block in message.Content) - { - if (block.Value is TextBlock textBlock) - { - Console.WriteLine(textBlock.Text); - } - } - - class EntraTokenProvider : IIdentityTokenProvider - { - // The audience app registration's identifier URI (see Register the token audience). - private const string Audience = "api://"; - - private static readonly HttpClient httpClient = new(); - - public async Task GetIdentityTokenAsync(CancellationToken ct = default) - { - // App Service, Functions, and Container Apps inject IDENTITY_ENDPOINT; - // VMs and VM Scale Sets use IMDS. - // With multiple user-assigned identities, append &client_id=. - var identityEndpoint = Environment.GetEnvironmentVariable("IDENTITY_ENDPOINT"); - using var request = identityEndpoint is not null - ? new HttpRequestMessage(HttpMethod.Get, - $"{identityEndpoint}?api-version=2019-08-01&resource={Audience}") - { - Headers = { { "X-IDENTITY-HEADER", Environment.GetEnvironmentVariable("IDENTITY_HEADER") } }, - } - : new HttpRequestMessage(HttpMethod.Get, - $"http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource={Audience}") - { - Headers = { { "Metadata", "true" } }, - }; - using var response = await httpClient.SendAsync(request, ct); - response.EnsureSuccessStatusCode(); - using var json = await JsonDocument.ParseAsync( - await response.Content.ReadAsStreamAsync(ct), default, ct); - return json.RootElement.GetProperty("access_token").GetString()!; - } - } - ``` - ```php PHP use Anthropic\Client; use Anthropic\Lib\Credentials\CredentialResult; @@ -614,7 +614,7 @@ The samples fetch the managed identity token from the platform's token endpoint: ### Verify the setup -From your Azure resource, run the cURL exchange shown in [Acquire and use the token](https://platform.claude.com/docs/en/manage-claude/wif-providers/azure#acquire-and-use-the-token) and confirm that `POST /v1/oauth/token` returns a `200` with an `access_token` beginning with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason, then decode the Entra token (see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange) for the command) and check the most common Azure-side causes: +From your Azure resource, run the cURL exchange shown in [Acquire and use the token](https://platform.claude.com/docs/en/manage-claude/wif-providers/azure#acquire-and-use-the-token) and confirm that `POST /v1/oauth/token` returns a `200` with an `access_token` starting with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason, then decode the Entra token (see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange) for the command) and check the most common Azure-side causes: * **Issuer mismatch:** The registered `issuer_url` must match the token's `iss` claim exactly. A v2.0 token carries `https://login.microsoftonline.com//v2.0`; if the decoded `ver` claim is `1.0`, see [If your tokens are v1.0](https://platform.claude.com/docs/en/manage-claude/wif-providers/azure#if-your-tokens-are-v1-0). * **Token lifetime:** Managed identity tokens carry up to 24 hours between `iat` and `exp`. If the issuer still has the wizard's `7500` (or the 1-hour default), raise `max_jwt_lifetime_seconds` to `86400` as described in [Configure Anthropic](https://platform.claude.com/docs/en/manage-claude/wif-providers/azure#configure-anthropic). @@ -789,12 +789,12 @@ A longer accepted lifetime means a leaked Entra token stays exchangeable for lon ### Acquire and use the token -At runtime the pod performs the two-hop exchange: it sends the Kubernetes-projected token (the file at `AZURE_FEDERATED_TOKEN_FILE`) to Entra's token endpoint as a federated `client_credentials` assertion, then exchanges the resulting Entra access token at `POST /v1/oauth/token`. The Claude SDK handles the second exchange and the refresh loop when you supply `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider`; java: `IdentityTokenConfig`), as shown in the following examples. Except in Java (see the comment in that example), that option takes your Entra fetch as a token provider, and the SDK calls it again for each refresh. The cURL tab shows the raw flow. +At runtime the pod performs the two-hop exchange: it sends the Kubernetes-projected token (the file at `AZURE_FEDERATED_TOKEN_FILE`) to Entra's token endpoint as a federated `client_credentials` assertion, then exchanges the resulting Entra access token at `POST /v1/oauth/token`. The Claude SDK handles the second exchange and the refresh loop when you supply `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider()`; java: `IdentityTokenConfig`), as shown in the following examples. Except in Java (see the comment in that example), that option takes your Entra fetch as a token provider, and the SDK calls it again for each refresh. The cURL tab shows the raw flow. Two different client IDs appear in the samples. `` is the audience app registration's client ID from [Register the token audience](https://platform.claude.com/docs/en/manage-claude/wif-providers/azure#register-the-token-audience); the scope `api:///.default` asks Entra for a token addressed to that audience. `$AZURE_CLIENT_ID` is the managed identity's client ID, injected by the webhook, and identifies the caller. Do not substitute one for the other. - If your workload already uses the Azure Identity client library, get the Entra token from it (`DefaultAzureCredential` with the scope `api:///.default`) instead of performing the two-hop exchange yourself. Supply it to `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider`; java: `IdentityTokenConfig`) the way the examples do. The library reads the same `AZURE_FEDERATED_TOKEN_FILE`, `AZURE_CLIENT_ID`, and `AZURE_TENANT_ID` environment variables and handles the Entra exchange. + If your workload already uses the Azure Identity client library, get the Entra token from it (`DefaultAzureCredential` with the scope `api:///.default`) instead of performing the two-hop exchange yourself. Supply it to `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider()`; java: `IdentityTokenConfig`) the way the examples do. The library reads the same `AZURE_FEDERATED_TOKEN_FILE`, `AZURE_CLIENT_ID`, and `AZURE_TENANT_ID` environment variables and handles the Entra exchange. @@ -951,6 +951,61 @@ Two different client IDs appear in the samples. `` is the audience app r } ``` + ```csharp C# + using Anthropic.Credentials; + // ... + + var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions + { + FederationRuleId = Environment.GetEnvironmentVariable("ANTHROPIC_FEDERATION_RULE_ID")!, + OrganizationId = Environment.GetEnvironmentVariable("ANTHROPIC_ORGANIZATION_ID"), + ServiceAccountId = Environment.GetEnvironmentVariable("ANTHROPIC_SERVICE_ACCOUNT_ID"), + WorkspaceId = Environment.GetEnvironmentVariable("ANTHROPIC_WORKSPACE_ID"), + IdentityTokenProvider = new EntraFederationTokenProvider(), + }); + using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); + + var message = await client.Messages.Create(new() + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 1024, + Messages = [new UserMessageParam { Content = "Hello from Azure" }], + }); + foreach (var block in message.Content) + { + if (block.Value is TextBlock textBlock) + { + Console.WriteLine(textBlock.Text); + } + } + + class EntraFederationTokenProvider : IIdentityTokenProvider + { + private static readonly HttpClient Http = new(); + + public async Task GetIdentityTokenAsync(CancellationToken ct = default) + { + var federatedToken = await File.ReadAllTextAsync( + Environment.GetEnvironmentVariable("AZURE_FEDERATED_TOKEN_FILE")!, ct); + var tenantId = Environment.GetEnvironmentVariable("AZURE_TENANT_ID"); + var form = new FormUrlEncodedContent(new Dictionary + { + ["client_id"] = Environment.GetEnvironmentVariable("AZURE_CLIENT_ID")!, + ["grant_type"] = "client_credentials", + ["scope"] = "api:///.default", + ["client_assertion_type"] = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", + ["client_assertion"] = federatedToken, + }); + var response = await Http.PostAsync( + $"https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token", form, ct); + response.EnsureSuccessStatusCode(); + using var json = await JsonDocument.ParseAsync( + await response.Content.ReadAsStreamAsync(ct), default, ct); + return json.RootElement.GetProperty("access_token").GetString()!; + } + } + ``` + ```go Go package main @@ -963,8 +1018,8 @@ Two different client IDs appear in the samples. `` is the audience app r "os" "strings" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/option" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/option" ) func fetchEntraTokenViaFederation(ctx context.Context) (string, error) { @@ -1048,19 +1103,19 @@ Two different client IDs appear in the samples. `` is the audience app r void main() throws Exception { var form = Map.of( - "client_id", System.getenv("AZURE_CLIENT_ID"), - "grant_type", "client_credentials", - "scope", "api:///.default", - "client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", - "client_assertion", Files.readString(Path.of(System.getenv("AZURE_FEDERATED_TOKEN_FILE")))) - .entrySet().stream() - .map(entry -> entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), UTF_8)) - .collect(Collectors.joining("&")); + "client_id", System.getenv("AZURE_CLIENT_ID"), + "grant_type", "client_credentials", + "scope", "api:///.default", + "client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", + "client_assertion", Files.readString(Path.of(System.getenv("AZURE_FEDERATED_TOKEN_FILE")))) + .entrySet().stream() + .map(entry -> entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), UTF_8)) + .collect(Collectors.joining("&")); var request = HttpRequest.newBuilder(URI.create( - "https://login.microsoftonline.com/" + System.getenv("AZURE_TENANT_ID") + "/oauth2/v2.0/token")) - .header("content-type", "application/x-www-form-urlencoded") - .POST(HttpRequest.BodyPublishers.ofString(form)) - .build(); + "https://login.microsoftonline.com/" + System.getenv("AZURE_TENANT_ID") + "/oauth2/v2.0/token")) + .header("content-type", "application/x-www-form-urlencoded") + .POST(HttpRequest.BodyPublishers.ofString(form)) + .build(); // The Java SDK takes the token itself or a file path, not a function; with // source("value"), path(...) holds the token. The SDK sends that same token @@ -1072,86 +1127,31 @@ Two different client IDs appear in the samples. `` is the audience app r String entraToken = new ObjectMapper().readTree(response.body()).get("access_token").asText(); AnthropicClient client = AnthropicOkHttpClient.builder() - .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() - .organizationId(System.getenv("ANTHROPIC_ORGANIZATION_ID")) - .workspaceId(System.getenv("ANTHROPIC_WORKSPACE_ID")) - .authentication(AuthenticationConfig.builder() - .type(AuthenticationType.OIDC_FEDERATION) - .federationRuleId(System.getenv("ANTHROPIC_FEDERATION_RULE_ID")) - .serviceAccountId(System.getenv("ANTHROPIC_SERVICE_ACCOUNT_ID")) - .identityToken(IdentityTokenConfig.builder() - .source("value") - .path(entraToken) - .build()) - .build()) - .build())) - .build(); + .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() + .organizationId(System.getenv("ANTHROPIC_ORGANIZATION_ID")) + .workspaceId(System.getenv("ANTHROPIC_WORKSPACE_ID")) + .authentication(AuthenticationConfig.builder() + .type(AuthenticationType.OIDC_FEDERATION) + .federationRuleId(System.getenv("ANTHROPIC_FEDERATION_RULE_ID")) + .serviceAccountId(System.getenv("ANTHROPIC_SERVICE_ACCOUNT_ID")) + .identityToken(IdentityTokenConfig.builder() + .source("value") + .path(entraToken) + .build()) + .build()) + .build())) + .build(); var message = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello from Azure") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello from Azure") + .build()); IO.println(message.content()); } ``` - ```csharp C# - using Anthropic.Credentials; - // ... - - var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions - { - FederationRuleId = Environment.GetEnvironmentVariable("ANTHROPIC_FEDERATION_RULE_ID")!, - OrganizationId = Environment.GetEnvironmentVariable("ANTHROPIC_ORGANIZATION_ID"), - ServiceAccountId = Environment.GetEnvironmentVariable("ANTHROPIC_SERVICE_ACCOUNT_ID"), - WorkspaceId = Environment.GetEnvironmentVariable("ANTHROPIC_WORKSPACE_ID"), - IdentityTokenProvider = new EntraFederationTokenProvider(), - }); - using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); - - var message = await client.Messages.Create(new() - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 1024, - Messages = [new UserMessageParam { Content = "Hello from Azure" }], - }); - foreach (var block in message.Content) - { - if (block.Value is TextBlock textBlock) - { - Console.WriteLine(textBlock.Text); - } - } - - class EntraFederationTokenProvider : IIdentityTokenProvider - { - private static readonly HttpClient Http = new(); - - public async Task GetIdentityTokenAsync(CancellationToken ct = default) - { - var federatedToken = await File.ReadAllTextAsync( - Environment.GetEnvironmentVariable("AZURE_FEDERATED_TOKEN_FILE")!, ct); - var tenantId = Environment.GetEnvironmentVariable("AZURE_TENANT_ID"); - var form = new FormUrlEncodedContent(new Dictionary - { - ["client_id"] = Environment.GetEnvironmentVariable("AZURE_CLIENT_ID")!, - ["grant_type"] = "client_credentials", - ["scope"] = "api:///.default", - ["client_assertion_type"] = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", - ["client_assertion"] = federatedToken, - }); - var response = await Http.PostAsync( - $"https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token", form, ct); - response.EnsureSuccessStatusCode(); - using var json = await JsonDocument.ParseAsync( - await response.Content.ReadAsStreamAsync(ct), default, ct); - return json.RootElement.GetProperty("access_token").GetString()!; - } - } - ``` - ```php PHP use Anthropic\Client; use Anthropic\Lib\Credentials\CredentialResult; @@ -1241,7 +1241,7 @@ Two different client IDs appear in the samples. `` is the audience app r ### Verify the setup -From inside a labeled pod, run the cURL exchange shown in [Acquire and use the token on AKS](https://platform.claude.com/docs/en/manage-claude/wif-providers/azure#acquire-and-use-the-token-2) and confirm that `POST /v1/oauth/token` returns a `200` with an `access_token` beginning with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason, then decode the Entra-issued token from step 1 (see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange) for the command) and check the most common Azure-side causes: +From inside a labeled pod, run the cURL exchange shown in [Acquire and use the token on AKS](https://platform.claude.com/docs/en/manage-claude/wif-providers/azure#acquire-and-use-the-token-2) and confirm that `POST /v1/oauth/token` returns a `200` with an `access_token` starting with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason, then decode the Entra-issued token from step 1 (see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange) for the command) and check the most common Azure-side causes: * **Issuer mismatch:** The registered `issuer_url` must match the token's `iss` claim exactly. A v2.0 token carries `https://login.microsoftonline.com//v2.0`; if the decoded `ver` claim is `1.0`, see [If your tokens are v1.0](https://platform.claude.com/docs/en/manage-claude/wif-providers/azure#if-your-tokens-are-v1-0). * **Token lifetime:** If a tenant token-lifetime policy or CAE extends the `client_credentials` token past 7,500 seconds, raise the issuer's `max_jwt_lifetime_seconds` as described in [Configure Anthropic for Entra Workload Identity on AKS](https://platform.claude.com/docs/en/manage-claude/wif-providers/azure#configure-anthropic-2). diff --git a/content/en/manage-claude/wif-providers/gcp.md b/content/en/manage-claude/wif-providers/gcp.md index e37954d5e8..5d563202c4 100644 --- a/content/en/manage-claude/wif-providers/gcp.md +++ b/content/en/manage-claude/wif-providers/gcp.md @@ -126,7 +126,7 @@ The wizard creates these resources for you. Use the following values whether you ## Acquire and use the token -Inside your Google Cloud workload, fetch the identity token from the metadata server, exchange it at `POST /v1/oauth/token`, and use the returned bearer token to call the Claude API. The Claude SDK handles the exchange and refresh loop for you when you supply `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider`; java: `IdentityTokenConfig`), as shown in the following examples. Except in Java (see the comment in that example), that option takes a token provider that returns a fresh identity token from the metadata server. +Inside your Google Cloud workload, fetch the identity token from the metadata server, exchange it at `POST /v1/oauth/token`, and use the returned bearer token to call the Claude API. The Claude SDK handles the exchange and refresh loop for you when you supply `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider()`; java: `IdentityTokenConfig`), as shown in the following examples. Except in Java (see the comment in that example), that option takes a token provider that returns a fresh identity token from the metadata server. ```bash cURL @@ -162,6 +162,21 @@ Inside your Google Cloud workload, fetch the identity token from the metadata se }' ``` + ```bash CLI + # Write the Google-signed identity token to a file the CLI can read + export ANTHROPIC_IDENTITY_TOKEN_FILE=$(mktemp) + curl -sS -H "Metadata-Flavor: Google" \ + "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=https://api.anthropic.com&format=full" \ + > "$ANTHROPIC_IDENTITY_TOKEN_FILE" + + # ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, + # ANTHROPIC_SERVICE_ACCOUNT_ID, and ANTHROPIC_WORKSPACE_ID are read from the environment. + ant messages create \ + --model claude-opus-5-5 \ + --max-tokens 1024 \ + --message '{role: user, content: "Hello from Cloud Run"}' + ``` + ```python Python import os import anthropic @@ -233,6 +248,51 @@ Inside your Google Cloud workload, fetch the identity token from the metadata se } ``` + ```csharp C# + using Anthropic.Credentials; + // ... + + var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions + { + FederationRuleId = Environment.GetEnvironmentVariable("ANTHROPIC_FEDERATION_RULE_ID")!, + OrganizationId = Environment.GetEnvironmentVariable("ANTHROPIC_ORGANIZATION_ID"), + ServiceAccountId = Environment.GetEnvironmentVariable("ANTHROPIC_SERVICE_ACCOUNT_ID"), + WorkspaceId = Environment.GetEnvironmentVariable("ANTHROPIC_WORKSPACE_ID"), + IdentityTokenProvider = new MetadataTokenProvider(), + }); + using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); + + var message = await client.Messages.Create(new() + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 1024, + Messages = [new UserMessageParam { Content = "Hello from Cloud Run" }], + }); + foreach (var block in message.Content) + { + if (block.Value is TextBlock textBlock) + { + Console.WriteLine(textBlock.Text); + } + } + + class MetadataTokenProvider : IIdentityTokenProvider + { + private const string METADATA_URL = + "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=https://api.anthropic.com&format=full"; + + private static readonly HttpClient httpClient = new() + { + DefaultRequestHeaders = { { "Metadata-Flavor", "Google" } }, + }; + + public async Task GetIdentityTokenAsync(CancellationToken ct = default) + { + return await httpClient.GetStringAsync(METADATA_URL, ct); + } + } + ``` + ```go Go const audience = "https://api.anthropic.com" @@ -290,9 +350,9 @@ Inside your Google Cloud workload, fetch the identity token from the metadata se void main() throws Exception { HttpClient http = HttpClient.newHttpClient(); HttpRequest metadataRequest = HttpRequest.newBuilder() - .uri(URI.create("http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=https://api.anthropic.com&format=full")) - .header("Metadata-Flavor", "Google") - .build(); + .uri(URI.create("http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=https://api.anthropic.com&format=full")) + .header("Metadata-Flavor", "Google") + .build(); // The Java SDK takes the token itself or a file path, not a function; with // source("value"), path(...) holds the token. The SDK sends that same token @@ -303,91 +363,31 @@ Inside your Google Cloud workload, fetch the identity token from the metadata se String googleIdentityToken = http.send(metadataRequest, HttpResponse.BodyHandlers.ofString()).body(); AnthropicClient client = AnthropicOkHttpClient.builder() - .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() - .organizationId(System.getenv("ANTHROPIC_ORGANIZATION_ID")) - .workspaceId(System.getenv("ANTHROPIC_WORKSPACE_ID")) - .authentication(AuthenticationConfig.builder() - .type(AuthenticationType.OIDC_FEDERATION) - .federationRuleId(System.getenv("ANTHROPIC_FEDERATION_RULE_ID")) - .serviceAccountId(System.getenv("ANTHROPIC_SERVICE_ACCOUNT_ID")) - .identityToken(IdentityTokenConfig.builder() - .source("value") - .path(googleIdentityToken) - .build()) - .build()) - .build())) - .build(); + .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() + .organizationId(System.getenv("ANTHROPIC_ORGANIZATION_ID")) + .workspaceId(System.getenv("ANTHROPIC_WORKSPACE_ID")) + .authentication(AuthenticationConfig.builder() + .type(AuthenticationType.OIDC_FEDERATION) + .federationRuleId(System.getenv("ANTHROPIC_FEDERATION_RULE_ID")) + .serviceAccountId(System.getenv("ANTHROPIC_SERVICE_ACCOUNT_ID")) + .identityToken(IdentityTokenConfig.builder() + .source("value") + .path(googleIdentityToken) + .build()) + .build()) + .build())) + .build(); var message = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello from Cloud Run") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello from Cloud Run") + .build()); IO.println(message.content()); } ``` - ```csharp C# - using Anthropic.Credentials; - // ... - - var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions - { - FederationRuleId = Environment.GetEnvironmentVariable("ANTHROPIC_FEDERATION_RULE_ID")!, - OrganizationId = Environment.GetEnvironmentVariable("ANTHROPIC_ORGANIZATION_ID"), - ServiceAccountId = Environment.GetEnvironmentVariable("ANTHROPIC_SERVICE_ACCOUNT_ID"), - WorkspaceId = Environment.GetEnvironmentVariable("ANTHROPIC_WORKSPACE_ID"), - IdentityTokenProvider = new MetadataTokenProvider(), - }); - using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); - - var message = await client.Messages.Create(new() - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 1024, - Messages = [new UserMessageParam { Content = "Hello from Cloud Run" }], - }); - foreach (var block in message.Content) - { - if (block.Value is TextBlock textBlock) - { - Console.WriteLine(textBlock.Text); - } - } - - class MetadataTokenProvider : IIdentityTokenProvider - { - private const string METADATA_URL = - "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=https://api.anthropic.com&format=full"; - - private static readonly HttpClient httpClient = new() - { - DefaultRequestHeaders = { { "Metadata-Flavor", "Google" } }, - }; - - public async Task GetIdentityTokenAsync(CancellationToken ct = default) - { - return await httpClient.GetStringAsync(METADATA_URL, ct); - } - } - ``` - - ```bash CLI - # Write the Google-signed identity token to a file the CLI can read - export ANTHROPIC_IDENTITY_TOKEN_FILE=$(mktemp) - curl -sS -H "Metadata-Flavor: Google" \ - "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=https://api.anthropic.com&format=full" \ - > "$ANTHROPIC_IDENTITY_TOKEN_FILE" - - # ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, - # ANTHROPIC_SERVICE_ACCOUNT_ID, and ANTHROPIC_WORKSPACE_ID are read from the environment. - ant messages create \ - --model claude-opus-5-5 \ - --max-tokens 1024 \ - --message '{role: user, content: "Hello from Cloud Run"}' - ``` - ```php PHP use Anthropic\Client; use Anthropic\Lib\Credentials\CredentialResult; @@ -465,7 +465,7 @@ curl -sS -H "Metadata-Flavor: Google" \ | jq -rR 'split(".")[1] | gsub("-";"+") | gsub("_";"/") | @base64d | fromjson' ``` -Check that `iss` is `https://accounts.google.com`, `aud` is `https://api.anthropic.com`, and `email` matches the value in your federation rule. Then run the exchange from the previous section. A successful exchange returns an `access_token` beginning with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange); the most common Google Cloud-side cause is the `email` claim missing (request the token with `format=full` so it is included). +Check that `iss` is `https://accounts.google.com`, `aud` is `https://api.anthropic.com`, and `email` matches the value in your federation rule. Then run the exchange from the previous section. A successful exchange returns an `access_token` starting with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange); the most common Google Cloud-side cause is the `email` claim missing (request the token with `format=full` so it is included). ## Scope your rule diff --git a/content/en/manage-claude/wif-providers/github-actions.md b/content/en/manage-claude/wif-providers/github-actions.md index 08a753a641..1cdb572ef3 100644 --- a/content/en/manage-claude/wif-providers/github-actions.md +++ b/content/en/manage-claude/wif-providers/github-actions.md @@ -170,6 +170,16 @@ Set the federation environment variables on the job and call the SDK normally. ` }' ``` + ```bash CLI + # Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, + # ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE + # from the job environment. + ant messages create \ + --model claude-opus-5-5 \ + --max-tokens 1024 \ + --message '{role: user, content: "Hello, Claude"}' + ``` + ```python Python import anthropic @@ -206,6 +216,27 @@ Set the federation environment variables on the job and call the SDK normally. ` } ``` + ```csharp C# + // Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, + // ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE + // from the job environment. + using var client = new AnthropicClient(); + + var message = await client.Messages.Create(new() + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 1024, + Messages = [new UserMessageParam { Content = "Hello, Claude" }], + }); + foreach (var block in message.Content) + { + if (block.Value is TextBlock textBlock) + { + Console.WriteLine(textBlock.Text); + } + } + ``` + ```go Go // Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, // ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE @@ -234,45 +265,14 @@ Set the federation environment variables on the job and call the SDK normally. ` AnthropicClient client = AnthropicOkHttpClient.fromEnv(); var message = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello, Claude") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello, Claude") + .build()); IO.println(message.content()); ``` - ```csharp C# - // Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, - // ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE - // from the job environment. - using var client = new AnthropicClient(); - - var message = await client.Messages.Create(new() - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 1024, - Messages = [new UserMessageParam { Content = "Hello, Claude" }], - }); - foreach (var block in message.Content) - { - if (block.Value is TextBlock textBlock) - { - Console.WriteLine(textBlock.Text); - } - } - ``` - - ```bash CLI - # Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, - # ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE - # from the job environment. - ant messages create \ - --model claude-opus-5-5 \ - --max-tokens 1024 \ - --message '{role: user, content: "Hello, Claude"}' - ``` - ```php PHP use Anthropic\Client; @@ -311,7 +311,7 @@ Each GitHub-issued identity token expires roughly 5 minutes after issuance. The ## Verify the setup -A successful exchange returns an `access_token` beginning with `sk-ant-oat01-` and an `expires_in` value in seconds. A denied exchange returns an opaque `401` `authentication_error` with the fixed message `Authentication failed`, whichever check failed; in most cases the deny reason is recorded on the attempt's entry in the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console, and [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange) walks the checks in order. The most common GitHub Actions-side cause is the `sub` claim format not matching (its trailing segment varies among `ref:...`, `environment:...`, and `pull_request` events); the history entry shows reason `match_subject_prefix`. +A successful exchange returns an `access_token` starting with `sk-ant-oat01-` and an `expires_in` value in seconds. A denied exchange returns an opaque `401` `authentication_error` with the fixed message `Authentication failed`, whichever check failed; in most cases the deny reason is recorded on the attempt's entry in the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console, and [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange) walks the checks in order. The most common GitHub Actions-side cause is the `sub` claim format not matching (its trailing segment varies among `ref:...`, `environment:...`, and `pull_request` events); the history entry shows reason `match_subject_prefix`. ## Restrict which workflows can authenticate diff --git a/content/en/manage-claude/wif-providers/kubernetes.md b/content/en/manage-claude/wif-providers/kubernetes.md index a48311f526..c4ebaa9a72 100644 --- a/content/en/manage-claude/wif-providers/kubernetes.md +++ b/content/en/manage-claude/wif-providers/kubernetes.md @@ -155,6 +155,15 @@ The pod spec in [Configure Kubernetes](https://platform.claude.com/docs/en/manag }' ``` + ```bash CLI + # Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, + # ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE + ant messages create \ + --model claude-opus-5-5 \ + --max-tokens 1024 \ + --message '{role: user, content: "Hello, Claude"}' + ``` + ```python Python import anthropic @@ -191,6 +200,27 @@ The pod spec in [Configure Kubernetes](https://platform.claude.com/docs/en/manag } ``` + ```csharp C# + // Reads ANTHROPIC_IDENTITY_TOKEN_FILE, ANTHROPIC_FEDERATION_RULE_ID, + // ANTHROPIC_ORGANIZATION_ID, ANTHROPIC_SERVICE_ACCOUNT_ID, and ANTHROPIC_WORKSPACE_ID + // from the pod's environment. + using var client = new AnthropicClient(); + + var message = await client.Messages.Create(new() + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 1024, + Messages = [new UserMessageParam { Content = "Hello, Claude" }], + }); + foreach (var block in message.Content) + { + if (block.Value is TextBlock textBlock) + { + Console.WriteLine(textBlock.Text); + } + } + ``` + ```go Go // Reads ANTHROPIC_IDENTITY_TOKEN_FILE, ANTHROPIC_FEDERATION_RULE_ID, // ANTHROPIC_ORGANIZATION_ID, ANTHROPIC_SERVICE_ACCOUNT_ID, and ANTHROPIC_WORKSPACE_ID @@ -219,44 +249,14 @@ The pod spec in [Configure Kubernetes](https://platform.claude.com/docs/en/manag AnthropicClient client = AnthropicOkHttpClient.fromEnv(); var message = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello, Claude") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello, Claude") + .build()); IO.println(message.content()); ``` - ```csharp C# - // Reads ANTHROPIC_IDENTITY_TOKEN_FILE, ANTHROPIC_FEDERATION_RULE_ID, - // ANTHROPIC_ORGANIZATION_ID, ANTHROPIC_SERVICE_ACCOUNT_ID, and ANTHROPIC_WORKSPACE_ID - // from the pod's environment. - using var client = new AnthropicClient(); - - var message = await client.Messages.Create(new() - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 1024, - Messages = [new UserMessageParam { Content = "Hello, Claude" }], - }); - foreach (var block in message.Content) - { - if (block.Value is TextBlock textBlock) - { - Console.WriteLine(textBlock.Text); - } - } - ``` - - ```bash CLI - # Reads ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, - # ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE - ant messages create \ - --model claude-opus-5-5 \ - --max-tokens 1024 \ - --message '{role: user, content: "Hello, Claude"}' - ``` - ```php PHP use Anthropic\Client; @@ -291,7 +291,7 @@ The pod spec in [Configure Kubernetes](https://platform.claude.com/docs/en/manag ## Verify the setup -A successful exchange returns an `access_token` beginning with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange); the most common Kubernetes-side cause is a JWKS key mismatch (for `inline` mode, re-fetch with `kubectl get --raw /openid/v1/jwks` and update the issuer). +A successful exchange returns an `access_token` starting with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange); the most common Kubernetes-side cause is a JWKS key mismatch (for `inline` mode, re-fetch with `kubectl get --raw /openid/v1/jwks` and update the issuer). ## Scope your rule diff --git a/content/en/manage-claude/wif-providers/okta.md b/content/en/manage-claude/wif-providers/okta.md index cd11472c76..7b6c49c13c 100644 --- a/content/en/manage-claude/wif-providers/okta.md +++ b/content/en/manage-claude/wif-providers/okta.md @@ -113,6 +113,25 @@ Unlike platform-native providers (AWS, Google Cloud, Kubernetes), which make a t }' ``` + ```bash CLI + # 1. Request an access token from Okta and write it to a temp file. + export ANTHROPIC_IDENTITY_TOKEN_FILE=$(mktemp) + curl -sS "$OKTA_ISSUER/v1/token" \ + -d grant_type=client_credentials \ + -d scope=anthropic.access \ + -d client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer \ + --data-urlencode client_assertion="$SIGNED_CLIENT_ASSERTION" \ + | jq -r .access_token > "$ANTHROPIC_IDENTITY_TOKEN_FILE" + + # 2. Call the Claude API. The CLI reads ANTHROPIC_FEDERATION_RULE_ID, + # ANTHROPIC_ORGANIZATION_ID, ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and + # ANTHROPIC_IDENTITY_TOKEN_FILE and performs the exchange. + ant messages create \ + --model claude-opus-5-5 \ + --max-tokens 1024 \ + --message '{role: user, content: "Hello, Claude"}' + ``` + ```python Python import os import httpx2 @@ -197,6 +216,58 @@ Unlike platform-native providers (AWS, Google Cloud, Kubernetes), which make a t } ``` + ```csharp C# + using Anthropic.Credentials; + // ... + + var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions + { + FederationRuleId = Environment.GetEnvironmentVariable("ANTHROPIC_FEDERATION_RULE_ID")!, + OrganizationId = Environment.GetEnvironmentVariable("ANTHROPIC_ORGANIZATION_ID"), + ServiceAccountId = Environment.GetEnvironmentVariable("ANTHROPIC_SERVICE_ACCOUNT_ID"), + WorkspaceId = Environment.GetEnvironmentVariable("ANTHROPIC_WORKSPACE_ID"), + IdentityTokenProvider = new OktaTokenProvider(), + }); + using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); + + var message = await client.Messages.Create(new() + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 1024, + Messages = [new UserMessageParam { Content = "Hello, Claude" }], + }); + foreach (var block in message.Content) + { + if (block.Value is TextBlock textBlock) + { + Console.WriteLine(textBlock.Text); + } + } + + class OktaTokenProvider : IIdentityTokenProvider + { + private static readonly HttpClient Http = new(); + + public async Task GetIdentityTokenAsync(CancellationToken ct = default) + { + var form = new FormUrlEncodedContent(new Dictionary + { + ["grant_type"] = "client_credentials", + ["scope"] = "anthropic.access", + ["client_assertion_type"] = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", + // Build the RFC 7523 client_assertion JWT signed with your Okta app's private key + ["client_assertion"] = BuildSignedClientAssertion(), + }); + var response = await Http.PostAsync( + $"{Environment.GetEnvironmentVariable("OKTA_ISSUER")}/v1/token", form, ct); + response.EnsureSuccessStatusCode(); + using var json = await JsonDocument.ParseAsync( + await response.Content.ReadAsStreamAsync(ct), default, ct); + return json.RootElement.GetProperty("access_token").GetString()!; + } + } + ``` + ```go Go package main @@ -209,8 +280,8 @@ Unlike platform-native providers (AWS, Google Cloud, Kubernetes), which make a t "os" "strings" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/option" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/option" ) func fetchOktaToken(ctx context.Context) (string, error) { @@ -288,18 +359,18 @@ Unlike platform-native providers (AWS, Google Cloud, Kubernetes), which make a t void main() throws Exception { var form = Map.of( - "grant_type", "client_credentials", - "scope", "anthropic.access", - "client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", - // Build the RFC 7523 client_assertion JWT signed with your Okta app's private key - "client_assertion", buildSignedClientAssertion()) - .entrySet().stream() - .map(entry -> entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), UTF_8)) - .collect(Collectors.joining("&")); + "grant_type", "client_credentials", + "scope", "anthropic.access", + "client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", + // Build the RFC 7523 client_assertion JWT signed with your Okta app's private key + "client_assertion", buildSignedClientAssertion()) + .entrySet().stream() + .map(entry -> entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), UTF_8)) + .collect(Collectors.joining("&")); var request = HttpRequest.newBuilder(URI.create(System.getenv("OKTA_ISSUER") + "/v1/token")) - .header("content-type", "application/x-www-form-urlencoded") - .POST(HttpRequest.BodyPublishers.ofString(form)) - .build(); + .header("content-type", "application/x-www-form-urlencoded") + .POST(HttpRequest.BodyPublishers.ofString(form)) + .build(); // The Java SDK takes the token itself or a file path, not a function; with // source("value"), path(...) holds the token. The SDK sends that same token @@ -311,102 +382,31 @@ Unlike platform-native providers (AWS, Google Cloud, Kubernetes), which make a t String oktaToken = new ObjectMapper().readTree(response.body()).get("access_token").asText(); AnthropicClient client = AnthropicOkHttpClient.builder() - .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() - .organizationId(System.getenv("ANTHROPIC_ORGANIZATION_ID")) - .workspaceId(System.getenv("ANTHROPIC_WORKSPACE_ID")) - .authentication(AuthenticationConfig.builder() - .type(AuthenticationType.OIDC_FEDERATION) - .federationRuleId(System.getenv("ANTHROPIC_FEDERATION_RULE_ID")) - .serviceAccountId(System.getenv("ANTHROPIC_SERVICE_ACCOUNT_ID")) - .identityToken(IdentityTokenConfig.builder() - .source("value") - .path(oktaToken) - .build()) - .build()) - .build())) - .build(); + .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() + .organizationId(System.getenv("ANTHROPIC_ORGANIZATION_ID")) + .workspaceId(System.getenv("ANTHROPIC_WORKSPACE_ID")) + .authentication(AuthenticationConfig.builder() + .type(AuthenticationType.OIDC_FEDERATION) + .federationRuleId(System.getenv("ANTHROPIC_FEDERATION_RULE_ID")) + .serviceAccountId(System.getenv("ANTHROPIC_SERVICE_ACCOUNT_ID")) + .identityToken(IdentityTokenConfig.builder() + .source("value") + .path(oktaToken) + .build()) + .build()) + .build())) + .build(); var message = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello, Claude") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello, Claude") + .build()); IO.println(message.content()); } ``` - ```csharp C# - using Anthropic.Credentials; - // ... - - var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions - { - FederationRuleId = Environment.GetEnvironmentVariable("ANTHROPIC_FEDERATION_RULE_ID")!, - OrganizationId = Environment.GetEnvironmentVariable("ANTHROPIC_ORGANIZATION_ID"), - ServiceAccountId = Environment.GetEnvironmentVariable("ANTHROPIC_SERVICE_ACCOUNT_ID"), - WorkspaceId = Environment.GetEnvironmentVariable("ANTHROPIC_WORKSPACE_ID"), - IdentityTokenProvider = new OktaTokenProvider(), - }); - using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); - - var message = await client.Messages.Create(new() - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 1024, - Messages = [new UserMessageParam { Content = "Hello, Claude" }], - }); - foreach (var block in message.Content) - { - if (block.Value is TextBlock textBlock) - { - Console.WriteLine(textBlock.Text); - } - } - - class OktaTokenProvider : IIdentityTokenProvider - { - private static readonly HttpClient Http = new(); - - public async Task GetIdentityTokenAsync(CancellationToken ct = default) - { - var form = new FormUrlEncodedContent(new Dictionary - { - ["grant_type"] = "client_credentials", - ["scope"] = "anthropic.access", - ["client_assertion_type"] = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", - // Build the RFC 7523 client_assertion JWT signed with your Okta app's private key - ["client_assertion"] = BuildSignedClientAssertion(), - }); - var response = await Http.PostAsync( - $"{Environment.GetEnvironmentVariable("OKTA_ISSUER")}/v1/token", form, ct); - response.EnsureSuccessStatusCode(); - using var json = await JsonDocument.ParseAsync( - await response.Content.ReadAsStreamAsync(ct), default, ct); - return json.RootElement.GetProperty("access_token").GetString()!; - } - } - ``` - - ```bash CLI - # 1. Request an access token from Okta and write it to a temp file. - export ANTHROPIC_IDENTITY_TOKEN_FILE=$(mktemp) - curl -sS "$OKTA_ISSUER/v1/token" \ - -d grant_type=client_credentials \ - -d scope=anthropic.access \ - -d client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer \ - --data-urlencode client_assertion="$SIGNED_CLIENT_ASSERTION" \ - | jq -r .access_token > "$ANTHROPIC_IDENTITY_TOKEN_FILE" - - # 2. Call the Claude API. The CLI reads ANTHROPIC_FEDERATION_RULE_ID, - # ANTHROPIC_ORGANIZATION_ID, ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_WORKSPACE_ID, and - # ANTHROPIC_IDENTITY_TOKEN_FILE and performs the exchange. - ant messages create \ - --model claude-opus-5-5 \ - --max-tokens 1024 \ - --message '{role: user, content: "Hello, Claude"}' - ``` - ```php PHP use Anthropic\Client; use Anthropic\Lib\Credentials\CredentialResult; @@ -492,11 +492,11 @@ Unlike platform-native providers (AWS, Google Cloud, Kubernetes), which make a t ``` -Except in Java (see the comment in that example), the SDK example passes your Okta token fetch to `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider`; java: `IdentityTokenConfig`) as a token provider. The Claude SDK calls it each time the Anthropic access token approaches expiry, so your Okta fetcher should return a fresh token on each call rather than caching one indefinitely. The `ant` CLI re-reads `ANTHROPIC_IDENTITY_TOKEN_FILE` on each exchange, so refresh that file on a timer for long-running shells. +Except in Java (see the comment in that example), the SDK example passes your Okta token fetch to `identity_token_provider` (typescript: `identityTokenProvider`; php: `identityProvider`; csharp: `IdentityTokenProvider`; go: `option.WithFederationTokenProvider()`; java: `IdentityTokenConfig`) as a token provider. The Claude SDK calls it each time the Anthropic access token approaches expiry, so your Okta fetcher should return a fresh token on each call rather than caching one indefinitely. The `ant` CLI re-reads `ANTHROPIC_IDENTITY_TOKEN_FILE` on each exchange, so refresh that file on a timer for long-running shells. ## Verify the setup -A successful exchange returns an `access_token` beginning with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange); the most common Okta-side cause is an `issuer_url` mismatch (it must include the `/oauth2/` path; the Okta org authorization server is not usable). +A successful exchange returns an `access_token` starting with `sk-ant-oat01-` and an `expires_in` value in seconds. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange); the most common Okta-side cause is an `issuer_url` mismatch (it must include the `/oauth2/` path; the Okta org authorization server is not usable). ## Scope your rule diff --git a/content/en/manage-claude/wif-providers/spiffe.md b/content/en/manage-claude/wif-providers/spiffe.md index c319cfebdb..3c043d358d 100644 --- a/content/en/manage-claude/wif-providers/spiffe.md +++ b/content/en/manage-claude/wif-providers/spiffe.md @@ -298,10 +298,10 @@ The Claude SDK can read the JWT-SVID from the file that spiffe-helper maintains AnthropicClient client = AnthropicOkHttpClient.fromEnv(); var message = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello, Claude") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello, Claude") + .build()); IO.println(message.content()); ``` @@ -386,8 +386,8 @@ The Claude SDK can read the JWT-SVID from the file that spiffe-helper maintains "fmt" "os" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/option" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/option" "github.com/spiffe/go-spiffe/v2/svid/jwtsvid" "github.com/spiffe/go-spiffe/v2/workloadapi" ) @@ -460,7 +460,7 @@ spire-agent api fetch jwt \ | jq -rR 'split(".")[1] | gsub("-";"+") | gsub("_";"/") | @base64d | fromjson' ``` -The `-output json` flag returns the SVID response and bundle response as a two-element JSON array, so `jq -r '.[0].svids[0].svid'` extracts the bare token. On older SPIRE versions without `-output`, the command prints a labeled block instead. In that case, pipe the default output through `awk '/^[[:space:]]*eyJ/{print $1; exit}'` to extract the token line. Check that `iss` is the OIDC Discovery Provider URL you registered, `sub` is the workload's SPIFFE ID, and `aud` contains `https://api.anthropic.com`. Then run the cURL example from [Acquire and use the token](https://platform.claude.com/docs/en/manage-claude/wif-providers/spiffe#acquire-and-use-the-token). A successful exchange returns an `access_token` beginning with `sk-ant-oat01-`. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange). The most common SPIRE-side cause is a mismatch between SPIRE Server's `jwt_issuer` and the URL registered as the federation issuer. +The `-output json` flag returns the SVID response and bundle response as a two-element JSON array, so `jq -r '.[0].svids[0].svid'` extracts the bare token. On older SPIRE versions without `-output`, the command prints a labeled block instead. In that case, pipe the default output through `awk '/^[[:space:]]*eyJ/{print $1; exit}'` to extract the token line. Check that `iss` is the OIDC Discovery Provider URL you registered, `sub` is the workload's SPIFFE ID, and `aud` contains `https://api.anthropic.com`. Then run the cURL example from [Acquire and use the token](https://platform.claude.com/docs/en/manage-claude/wif-providers/spiffe#acquire-and-use-the-token). A successful exchange returns an `access_token` starting with `sk-ant-oat01-`. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange). The most common SPIRE-side cause is a mismatch between SPIRE Server's `jwt_issuer` and the URL registered as the federation issuer. ## Scope your rule diff --git a/content/en/manage-claude/wif-reference.md b/content/en/manage-claude/wif-reference.md index 14f4542bda..a1a0e9870c 100644 --- a/content/en/manage-claude/wif-reference.md +++ b/content/en/manage-claude/wif-reference.md @@ -62,6 +62,8 @@ The SDK resolves credentials in this order. The first source that yields a crede | 4 | Federation environment variables | `ANTHROPIC_FEDERATION_RULE_ID` + `ANTHROPIC_ORGANIZATION_ID` + `ANTHROPIC_SERVICE_ACCOUNT_ID` + `ANTHROPIC_IDENTITY_TOKEN[_FILE]`. | | 5 | Active profile | Resolved from `/active_config`, falling back to a profile named `default`. | +In the `ant` CLI, the settings for [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication) rank after the federation environment variables and before the active profile. The settings are the project, the workspace ID, and the location. You set them with the `--google-cloud-*` flags or the `ANTHROPIC_GOOGLE_CLOUD_*` variables. The CLI uses these settings when any one of them is set. With these settings, the CLI gets its credential from Google Application Default Credentials. + When a profile is loaded, environment variables fill any fields the profile omits but never override fields the profile sets explicitly. For example, `ANTHROPIC_WORKSPACE_ID` fills `workspace_id` only when the active profile does not set it. ## Profile configuration file @@ -128,7 +130,7 @@ The `oauth_scope` you set on a federation rule determines which Claude API endpo | `workspace:manage_tunnels` | The [MCP tunnels API](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/reference#tunnels-api): create, list, and get tunnels, register and archive CA certificates, reveal and rotate the tunnel token, and archive tunnels. The Console's create-tunnel modal window locks this scope when you create a rule from it. | | `org:admin` | Full access to the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) (organization members, invites, workspaces, API keys, and the rest). An OAuth `org:admin` token can only create or modify rules scoped to `workspace:developer` or `workspace:inference`, and cannot update an issuer that backs a rule with any other scope; see [Permissions and constraints](https://platform.claude.com/docs/en/manage-claude/wif-admin-api#permissions-and-constraints). | -A request to an endpoint outside the token's scope returns HTTP 403. Finer-grained scopes (per resource, or read versus write) are not currently available. +A request to an endpoint outside the token's scope returns HTTP 403. Finer-grained scopes (by resource, or read versus write) are not available. ### Permission boundaries diff --git a/content/en/manage-claude/workload-identity-federation.md b/content/en/manage-claude/workload-identity-federation.md index 27554c218a..0ee67fd01c 100644 --- a/content/en/manage-claude/workload-identity-federation.md +++ b/content/en/manage-claude/workload-identity-federation.md @@ -188,6 +188,35 @@ You can construct the client with explicit credentials or with no arguments. Wit } ``` + ```csharp C# + using Anthropic.Credentials; + // ... + + var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions + { + FederationRuleId = "fdrl_...", + OrganizationId = "00000000-0000-0000-0000-000000000000", + ServiceAccountId = "svac_...", + WorkspaceId = "wrkspc_...", + IdentityTokenProvider = new FileIdentityTokenProvider("/var/run/secrets/anthropic.com/token"), + }); + using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); + + var message = await client.Messages.Create(new() + { + Model = Model.ClaudeOpus5_5, + MaxTokens = 1024, + Messages = [new UserMessageParam { Content = "Hello, Claude" }], + }); + foreach (var block in message.Content) + { + if (block.Value is TextBlock textBlock) + { + Console.WriteLine(textBlock.Text); + } + } + ``` + ```go Go client := anthropic.NewClient( option.WithFederationTokenProvider( @@ -232,61 +261,32 @@ You can construct the client with explicit credentials or with no arguments. Wit void main() { AnthropicClient client = AnthropicOkHttpClient.builder() - .fromEnv() - .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() - .organizationId("00000000-0000-0000-0000-000000000000") - .workspaceId("wrkspc_...") - .authentication(AuthenticationConfig.builder() - .type(AuthenticationType.OIDC_FEDERATION) - .federationRuleId("fdrl_...") - .serviceAccountId("svac_...") - .identityToken(IdentityTokenConfig.builder() - .source("file") - .path("/var/run/secrets/anthropic.com/token") - .build()) - .build()) - .build())) - .build(); + .fromEnv() + .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder() + .organizationId("00000000-0000-0000-0000-000000000000") + .workspaceId("wrkspc_...") + .authentication(AuthenticationConfig.builder() + .type(AuthenticationType.OIDC_FEDERATION) + .federationRuleId("fdrl_...") + .serviceAccountId("svac_...") + .identityToken(IdentityTokenConfig.builder() + .source("file") + .path("/var/run/secrets/anthropic.com/token") + .build()) + .build()) + .build())) + .build(); var message = client.messages().create(MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_5_5) - .maxTokens(1024) - .addUserMessage("Hello, Claude") - .build()); + .model(Model.CLAUDE_OPUS_5_5) + .maxTokens(1024) + .addUserMessage("Hello, Claude") + .build()); IO.println(message.content()); } ``` - ```csharp C# - using Anthropic.Credentials; - // ... - - var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions - { - FederationRuleId = "fdrl_...", - OrganizationId = "00000000-0000-0000-0000-000000000000", - ServiceAccountId = "svac_...", - WorkspaceId = "wrkspc_...", - IdentityTokenProvider = new FileIdentityTokenProvider("/var/run/secrets/anthropic.com/token"), - }); - using var client = new AnthropicClient(new ClientOptions { Credentials = credentials }); - - var message = await client.Messages.Create(new() - { - Model = Model.ClaudeOpus5_5, - MaxTokens = 1024, - Messages = [new UserMessageParam { Content = "Hello, Claude" }], - }); - foreach (var block in message.Content) - { - if (block.Value is TextBlock textBlock) - { - Console.WriteLine(textBlock.Text); - } - } - ``` - ```php PHP use Anthropic\Client; use Anthropic\Lib\Credentials\CredentialResult; diff --git a/content/en/manage-claude/workspaces.md b/content/en/manage-claude/workspaces.md index fa5be5ab5a..39b6510cb2 100644 --- a/content/en/manage-claude/workspaces.md +++ b/content/en/manage-claude/workspaces.md @@ -842,7 +842,7 @@ Some resources are managed differently: To look up your organization's workspace IDs, call the [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) endpoint (pass `include_default=true` to include the Default Workspace) or find them on the [Workspaces](https://platform.claude.com/settings/workspaces) page in the Claude Console. - [Prompt caches](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) are also isolated per workspace on the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). On Amazon Bedrock and Google Cloud, prompt caches are isolated per organization. + [Prompt caches](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) are also isolated by workspace on the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). On Amazon Bedrock and Claude Models on Google Cloud (Google managed), prompt caches are isolated by organization. ## Identify the workspace behind an API response diff --git a/content/en/managed-agents/agent-setup.md b/content/en/managed-agents/agent-setup.md index 5824082d9a..334217c5da 100644 --- a/content/en/managed-agents/agent-setup.md +++ b/content/en/managed-agents/agent-setup.md @@ -110,9 +110,7 @@ The examples use curl, the `ant` CLI, or the SDK. If you haven't set one up, the }, System: anthropic.String("You are a helpful coding agent."), Tools: []anthropic.BetaAgentNewParamsToolUnion{{ - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }}, }) if err != nil { diff --git a/content/en/managed-agents/budgets.md b/content/en/managed-agents/budgets.md index 7eec9b07f5..7f3f125234 100644 --- a/content/en/managed-agents/budgets.md +++ b/content/en/managed-agents/budgets.md @@ -85,7 +85,6 @@ Pass the optional `budget` (csharp, go: `Budget`) field when you create the sess }, EnvironmentID: environment.ID, Budget: anthropic.BetaManagedAgentsBudgetLimitParam{ - Type: anthropic.BetaManagedAgentsBudgetLimitTypeLimit, MaxListCost: anthropic.BetaMonetaryAmountParam{ Amount: "125", Currency: anthropic.BetaCurrencyUsd, @@ -251,7 +250,6 @@ Update the session with a new `max_list_cost` (java, php: `maxListCost`; csharp, ```go Go updatedSession, err := client.Beta.Sessions.Update(ctx, session.ID, anthropic.BetaSessionUpdateParams{ Budget: anthropic.BetaManagedAgentsBudgetLimitParam{ - Type: anthropic.BetaManagedAgentsBudgetLimitTypeLimit, MaxListCost: anthropic.BetaMonetaryAmountParam{ Amount: "500", Currency: anthropic.BetaCurrencyUsd, @@ -335,7 +333,7 @@ Pass `"budget": null` (python: `budget=None`; typescript: `budget: null`; ruby: ```go Go // A zero-value Budget is omitted from the request; param.NullStruct (from - // github.com/anthropics/anthropic-sdk-go/packages/param) sends an explicit null. + // github.com/anthropics/anthropic-sdk-go/v2/packages/param) sends an explicit null. unbudgetedSession, err := client.Beta.Sessions.Update(ctx, session.ID, anthropic.BetaSessionUpdateParams{ Budget: param.NullStruct[anthropic.BetaManagedAgentsBudgetLimitParam](), }) diff --git a/content/en/managed-agents/choosing-an-environment.md b/content/en/managed-agents/choosing-an-environment.md index e2a6b69345..f41a1b2c66 100644 --- a/content/en/managed-agents/choosing-an-environment.md +++ b/content/en/managed-agents/choosing-an-environment.md @@ -63,12 +63,18 @@ You also give up these cloud environment features: If you use Claude Managed Agents through Claude Platform on AWS, Anthropic still operates the service. There, a self-hosted sandbox can't use memory stores, workers don't use an environment key, and MCP tunnels aren't available. See [Claude Managed Agents on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#claude-managed-agents) and [Features not supported](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported). +## Differences on Claude Models on Google Cloud (Anthropic managed) + +If you use Claude Managed Agents through Claude Models on Google Cloud (Anthropic managed), Anthropic still operates the service. There, memory stores aren't supported in a self-hosted sandbox, and MCP tunnels aren't available. Workers authenticate with Google Cloud credentials, not an environment key, and you write your own, because the pre-built workers in the `ant` CLI and the Python, TypeScript, and Go SDKs don't work there. See [Feature support](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#feature-support) in the Claude Models on Google Cloud (Anthropic managed) guide. + ## Switch from a cloud environment to a self-hosted sandbox To switch to a self-hosted sandbox, you keep the agent, create a `self_hosted` environment, and reference its ID in new sessions and deployments. -* **What carries over:** The agent definition, the API key or AWS credentials your application uses, your skills, your MCP servers, and your [memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory). +* **What carries over:** The agent definition, the API key, Google Cloud credentials, or AWS credentials your application uses, your skills, your MCP servers, and your [memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory). * **What is new:** A `self_hosted` environment, an environment key that you generate in the Claude Console, and a worker that you run. The [self-hosted sandboxes quickstart](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#quickstart) covers all three. * **What stops working:** The features listed in [What you take on and give up with a self-hosted sandbox](https://platform.claude.com/docs/en/managed-agents/choosing-an-environment#what-you-take-on-and-give-up-with-a-self-hosted-sandbox). On Claude Platform on AWS, memory stores don't carry over to a self-hosted sandbox, and the worker doesn't use an environment key. See [Differences on Claude Platform on AWS](https://platform.claude.com/docs/en/managed-agents/choosing-an-environment#differences-on-claude-platform-on-aws). + +On Claude Models on Google Cloud (Anthropic managed), memory stores aren't supported in a self-hosted sandbox, and you write your own worker, which doesn't use an environment key. See [Differences on Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/managed-agents/choosing-an-environment#differences-on-claude-models-on-google-cloud-anthropic-managed). diff --git a/content/en/managed-agents/define-outcomes.md b/content/en/managed-agents/define-outcomes.md index b2f3461d7a..d142f9d60e 100644 --- a/content/en/managed-agents/define-outcomes.md +++ b/content/en/managed-agents/define-outcomes.md @@ -156,7 +156,7 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w "os" "time" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) const rubric = `# DCF Model Rubric @@ -393,7 +393,7 @@ The following examples create a [session](https://platform.claude.com/docs/en/ma Title = "Financial analysis on Costco", }); - // Define the outcome — agent starts working on receipt + // Define the outcome. The agent starts working on receipt. await client.Beta.Sessions.Events.Send(session.ID, new() { Events = @@ -422,20 +422,17 @@ The following examples create a [session](https://platform.claude.com/docs/en/ma panic(err) } - // Define the outcome — agent starts working on receipt + // Define the outcome. The agent starts working on receipt. _, err = client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserDefineOutcome: &anthropic.BetaManagedAgentsUserDefineOutcomeEventParams{ - Type: anthropic.BetaManagedAgentsUserDefineOutcomeEventParamsTypeUserDefineOutcome, Description: "Build a DCF model for Costco in .xlsx", Rubric: anthropic.BetaManagedAgentsUserDefineOutcomeEventParamsRubricUnion{ OfText: &anthropic.BetaManagedAgentsTextRubricParams{ - Type: anthropic.BetaManagedAgentsTextRubricParamsTypeText, Content: rubric, }, }, - // or: OfFile: &anthropic.BetaManagedAgentsFileRubricParams{ - // Type: anthropic.BetaManagedAgentsFileRubricParamsTypeFile, FileID: uploaded.ID}, + // or: OfFile: &anthropic.BetaManagedAgentsFileRubricParams{FileID: uploaded.ID}, MaxIterations: anthropic.Int(5), // optional; default 3, max 20 }, }}, @@ -454,7 +451,7 @@ The following examples create a [session](https://platform.claude.com/docs/en/ma .title("Financial analysis on Costco") .build()); - // Define the outcome — agent starts working on receipt + // Define the outcome. The agent starts working on receipt. client.beta().sessions().events().send( session.id(), EventSendParams.builder() @@ -477,7 +474,7 @@ The following examples create a [session](https://platform.claude.com/docs/en/ma title: 'Financial analysis on Costco', ); - // Define the outcome — agent starts working on receipt + // Define the outcome. The agent starts working on receipt. $client->beta->sessions->events->send( $session->id, events: [ diff --git a/content/en/managed-agents/dreams.md b/content/en/managed-agents/dreams.md index 48d23050c0..a8aee37f2d 100644 --- a/content/en/managed-agents/dreams.md +++ b/content/en/managed-agents/dreams.md @@ -373,7 +373,6 @@ When `status` (csharp, go: `Status`) reaches `completed`, the `memory_store` ent EnvironmentID: environmentID, Resources: []anthropic.BetaSessionNewParamsResourceUnion{{ OfMemoryStore: &anthropic.BetaManagedAgentsMemoryStoreResourceParam{ - Type: anthropic.BetaManagedAgentsMemoryStoreResourceParamTypeMemoryStore, MemoryStoreID: outputStoreID, }, }}, @@ -589,7 +588,9 @@ Returns all non-archived dreams in the workspace, newest first. Use `limit` (csh ```java Java for (var listedDream : client.beta().dreams().list( - DreamListParams.builder().limit(20).build() + DreamListParams.builder() + .limit(20) + .build() ).autoPager()) { IO.println(listedDream.id() + " " + listedDream.status()); } diff --git a/content/en/managed-agents/environments.md b/content/en/managed-agents/environments.md index 0780fbc341..ba91c1f7fe 100644 --- a/content/en/managed-agents/environments.md +++ b/content/en/managed-agents/environments.md @@ -613,7 +613,7 @@ When `allow_package_managers` (java, php: `allowPackageManagers`; csharp, go: `A | Containers | `registry-1.docker.io`, `auth.docker.io`, `production.cloudflare.docker.com`, `download.docker.com`, `ghcr.io` | - Network access is granted per host, not per operation. The sandbox can send any request to an allowed host, including uploads such as `git push` and package publishing, with any credential the command supplies. If the agent processes untrusted input (repository files, fetched web content, or third-party tool output), a successful prompt injection could use an allowed host to copy files out of the sandbox. To reduce this risk, set the `bash` tool's [permission policy](https://platform.claude.com/docs/en/managed-agents/permission-policies) to `always_ask` or `auto`. If the environment does not specify `packages` (csharp, go: `Packages`), you can instead leave `allow_package_managers` (java, php: `allowPackageManagers`; csharp, go: `AllowPackageManagers`) set to `false` and list only the hosts your agent needs in `allowed_hosts` (java, php: `allowedHosts`; csharp, go: `AllowedHosts`). + Network access is granted for each host, not for each operation. The sandbox can send any request to an allowed host, including uploads such as `git push` and package publishing, with any credential the command supplies. If the agent processes untrusted input (repository files, fetched web content, or third-party tool output), a successful prompt injection could use an allowed host to copy files out of the sandbox. To reduce this risk, set the `bash` tool's [permission policy](https://platform.claude.com/docs/en/managed-agents/permission-policies) to `always_ask` or `auto`. If the environment does not specify `packages` (csharp, go: `Packages`), you can instead leave `allow_package_managers` (java, php: `allowPackageManagers`; csharp, go: `AllowPackageManagers`) set to `false` and list only the hosts your agent needs in `allowed_hosts` (java, php: `allowedHosts`; csharp, go: `AllowedHosts`). #### Risks of unrestricted networking diff --git a/content/en/managed-agents/event-deltas.md b/content/en/managed-agents/event-deltas.md index df6f77939d..d911e1b114 100644 --- a/content/en/managed-agents/event-deltas.md +++ b/content/en/managed-agents/event-deltas.md @@ -117,7 +117,7 @@ The following examples opt in to `agent.message` previews and reconcile them wit ```python Python - # Preview snapshots, keyed by event id. accumulate_managed_agents_event folds each + # Preview snapshots, keyed by event ID. accumulate_managed_agents_event folds each # event_start / event_delta into an agent.message snapshot; the buffered # agent.message replaces it. previews: dict[str, BetaManagedAgentsAgentMessageEvent] = {} @@ -171,7 +171,7 @@ The following examples opt in to `agent.message` previews and reconcile them wit ``` ```typescript TypeScript - // Preview snapshots, keyed by event id. `accumulateManagedAgentsEvent` + // Preview snapshots, keyed by event ID. `accumulateManagedAgentsEvent` // folds event_start / event_delta previews into an agent.message snapshot. const previews = new Map(); @@ -191,8 +191,8 @@ The following examples opt in to `agent.message` previews and reconcile them wit deltas: for await (const event of stream) { switch (event.type) { case "event_start": { - // 1. Note the announced id and open the snapshot. Deltas and the - // buffered event carry the same id. + // 1. Note the announced ID and open the snapshot. Deltas and the + // buffered event carry the same ID. const preview = accumulateManagedAgentsEvent(undefined, event); if (preview) { previews.set(event.event.id, preview); @@ -256,7 +256,7 @@ The following examples opt in to `agent.message` previews and reconcile them wit ], }); - // Accumulate preview fragments per (event id, content index). The buffered + // Accumulate preview fragments for each (event ID, content index). The buffered // agent.message that follows carries the complete content, so it replaces the // accumulated preview rather than appending to it. Dictionary> previews = []; @@ -265,7 +265,7 @@ The following examples opt in to `agent.message` previews and reconcile them wit { if (streamEvent.TryPickStartEvent(out var start)) { - // A preview opened for the event with this id. This stream only opts in + // A preview opened for the event with this ID. This stream only opts in // to agent.message deltas; TryPick* returns false instead of throwing, // so other preview types (including ones added later) are skipped. if (start.Event.TryPickAgentMessage(out var preview)) @@ -319,10 +319,8 @@ The following examples opt in to `agent.message` previews and reconcile them wit if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "Write a haiku about the ocean.", }, }}, @@ -333,7 +331,7 @@ The following examples opt in to `agent.message` previews and reconcile them wit } // The accumulator folds event_start / event_delta fragments into - // per-event-id agent.message snapshots. The zero value is ready to use. + // agent.message snapshots, one for each event ID. The zero value is ready to use. var previews anthropic.BetaManagedAgentsEventAccumulator deltas: @@ -438,7 +436,7 @@ The following examples opt in to `agent.message` previews and reconcile them wit use Anthropic\Beta\Sessions\Events\ManagedAgentsTextBlock; use Anthropic\Lib\Sessions\EventAccumulator; - // Preview snapshots, keyed by event id. EventAccumulator::accumulate() adds each + // Preview snapshots, keyed by event ID. EventAccumulator::accumulate() adds each // event_start / event_delta to an agent.message snapshot; the buffered // agent.message replaces it. $previews = []; @@ -525,7 +523,7 @@ The following examples opt in to `agent.message` previews and reconcile them wit # Accumulate preview fragments by (event_id, index) into explicitly mutable # (`+""`) buffers so `<<` can append in place. The buffered agent.message with - # the same id is authoritative and replaces whatever the deltas built up. + # the same ID is authoritative and replaces whatever the deltas built up. buffers = Hash.new do |by_event, event_id| by_event[event_id] = Hash.new { |fragments, index| fragments[index] = +"" } end @@ -608,7 +606,7 @@ A thread stream's path ends in `/threads/{thread_id}/stream`. `/events/stream` e case "event_delta": print(event.delta.content.text, end="") case "agent.message": - # The buffered event is the authoritative record; render its content + # The buffered event is the authoritative record; render its content. print() for block in event.content: if block.type == "text": @@ -710,7 +708,7 @@ A thread stream's path ends in `/threads/{thread_id}/stream`. `/events/stream` e } // The child thread's stream takes the same event_deltas parameter as the - // session stream; run one read loop per stream connection. + // session stream; run one read loop for each stream connection. stream := client.Beta.Sessions.Threads.Events.StreamEvents(ctx, childThreadID, anthropic.BetaSessionThreadEventStreamParams{ SessionID: session.ID, EventDeltas: []anthropic.BetaManagedAgentsDeltaType{ @@ -808,7 +806,7 @@ A thread stream's path ends in `/threads/{thread_id}/stream`. `/events/stream` e echo $event->delta->content->text; break; case $event instanceof ManagedAgentsAgentMessageEvent: - // The buffered event is the authoritative record; render its content + // The buffered event is the authoritative record; render its content. echo "\n"; foreach ($event->content as $block) { if ($block instanceof ManagedAgentsTextBlock) { diff --git a/content/en/managed-agents/events-and-streaming.md b/content/en/managed-agents/events-and-streaming.md index 049b95272d..b9deb143c5 100644 --- a/content/en/managed-agents/events-and-streaming.md +++ b/content/en/managed-agents/events-and-streaming.md @@ -146,10 +146,8 @@ Stream events from the session to receive real-time updates as the agent works. if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "Summarize the repo README", }, }}, @@ -329,7 +327,7 @@ To reconnect to an existing session without missing events, combine a new stream // Tail live events, skipping anything already seen tail: for await (const event of stream) { - // Preview events (event_start/event_delta) carry no top-level id + // Preview events (event_start/event_delta) carry no top-level `id` if (event.type === "event_start" || event.type === "event_delta") { continue; } @@ -588,10 +586,8 @@ Send a `user.message` event to start or continue the agent's work: if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "Analyze the performance of the sort function in utils.py", }, }}, @@ -696,7 +692,7 @@ The following example answers each call as it arrives: for event in stream: match event.type: case "agent.custom_tool_use": - # Execute the tool + # Run the tool result = call_tool(event.name, event.input) # Send the result back @@ -721,7 +717,7 @@ The following example answers each call as it arrives: loop: for await (const event of stream) { switch (event.type) { case "agent.custom_tool_use": { - // Execute the tool + // Run the tool const result = await callTool(event.name, event.input); // Send the result back @@ -750,7 +746,7 @@ The following example answers each call as it arrives: { if (streamEvent.Value is BetaManagedAgentsAgentCustomToolUseEvent toolUse) { - // Execute the tool + // Run the tool var result = await CallTool(toolUse.Name, toolUse.Input); // Send the result back @@ -782,17 +778,15 @@ The following example answers each call as it arrives: for stream.Next() { switch event := stream.Current().AsAny().(type) { case anthropic.BetaManagedAgentsAgentCustomToolUseEvent: - // Execute the tool + // Run the tool result := callTool(event.Name, event.Input) // Send the result back if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserCustomToolResult: &anthropic.BetaManagedAgentsUserCustomToolResultEventParams{ - Type: anthropic.BetaManagedAgentsUserCustomToolResultEventParamsTypeUserCustomToolResult, CustomToolUseID: event.ID, Content: []anthropic.BetaManagedAgentsUserCustomToolResultEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: result, }, }}, @@ -818,7 +812,7 @@ The following example answers each call as it arrives: for (var event : (Iterable) stream.stream()::iterator) { switch (event.type().value()) { case AGENT_CUSTOM_TOOL_USE -> { - // Execute the tool + // Run the tool var toolUse = event.asAgentCustomToolUse(); var result = callTool(toolUse.name(), toolUse.input()); @@ -848,7 +842,7 @@ The following example answers each call as it arrives: foreach ($stream as $event) { switch (true) { case $event instanceof \Anthropic\Beta\Sessions\Events\ManagedAgentsAgentCustomToolUseEvent: - // Execute the tool + // Run the tool $result = callTool($event->name, $event->input); // Send the result back @@ -876,7 +870,7 @@ The following example answers each call as it arrives: client.beta.sessions.events.stream_events(session.id).each do |event| case event when Anthropic::Beta::Sessions::BetaManagedAgentsAgentCustomToolUseEvent - # Execute the tool + # Run the tool result = call_tool.call(event.name, event.input) # Send the result back client.beta.sessions.events.send_( @@ -1011,7 +1005,6 @@ The following example approves every pending call: if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserToolConfirmation: &anthropic.BetaManagedAgentsUserToolConfirmationEventParams{ - Type: anthropic.BetaManagedAgentsUserToolConfirmationEventParamsTypeUserToolConfirmation, ToolUseID: eventID, Result: anthropic.BetaManagedAgentsUserToolConfirmationEventParamsResultAllow, }, @@ -1202,10 +1195,8 @@ Sessions persist between interactions. To resume a session, send a `user.message if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "Now run the tests against the changes you made earlier.", }, }}, @@ -1376,16 +1367,12 @@ Send a `user.interrupt` event to stop the agent while it runs, then follow up wi if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{ { - OfUserInterrupt: &anthropic.BetaManagedAgentsUserInterruptEventParams{ - Type: anthropic.BetaManagedAgentsUserInterruptEventParamsTypeUserInterrupt, - }, + OfUserInterrupt: &anthropic.BetaManagedAgentsUserInterruptEventParams{}, }, { OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "Instead, focus on fixing the bug in line 42.", }, }}, @@ -1714,9 +1701,7 @@ The event's `content` (csharp, go: `Content`) accepts 1–1,000 text items. The if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfSystemMessage: &anthropic.BetaManagedAgentsSystemMessageEventParams{ - Type: anthropic.BetaManagedAgentsSystemMessageEventParamsTypeSystemMessage, Content: []anthropic.BetaManagedAgentsSystemContentBlockParam{{ - Type: anthropic.BetaManagedAgentsSystemContentBlockTypeText, Text: "The user's current timezone is America/New_York.", }}, }, diff --git a/content/en/managed-agents/files.md b/content/en/managed-agents/files.md index 811b0005c5..391b7a03a5 100644 --- a/content/en/managed-agents/files.md +++ b/content/en/managed-agents/files.md @@ -65,7 +65,9 @@ First, upload a file using the [Files API](https://platform.claude.com/docs/en/b ```java Java var file = client.files().upload( - FileUploadParams.builder().file(dataCsv).build() + FileUploadParams.builder() + .file(dataCsv) + .build() ); IO.println("File ID: " + file.id()); ``` @@ -174,7 +176,6 @@ Mount uploaded files into the sandbox by adding them to the `resources` (csharp, EnvironmentID: environment.ID, Resources: []anthropic.BetaSessionNewParamsResourceUnion{{ OfFile: &anthropic.BetaManagedAgentsFileResourceParams{ - Type: anthropic.BetaManagedAgentsFileResourceParamsTypeFile, FileID: file.ID, MountPath: anthropic.String("/data.csv"), }, @@ -324,11 +325,17 @@ Mount multiple files by adding entries to the `resources` (csharp, go: `Resource var resources = List.of( BetaManagedAgentsFileResourceParams.builder() - .fileId("file_abc123").mountPath("/data.csv").build(), + .fileId("file_abc123") + .mountPath("/data.csv") + .build(), BetaManagedAgentsFileResourceParams.builder() - .fileId("file_def456").mountPath("/config.json").build(), + .fileId("file_def456") + .mountPath("/config.json") + .build(), BetaManagedAgentsFileResourceParams.builder() - .fileId("file_ghi789").mountPath("/src/main.py").build() + .fileId("file_ghi789") + .mountPath("/src/main.py") + .build() ); ``` @@ -406,7 +413,6 @@ You can add or remove files from a session after creation using the session reso ```go Go resource, err := client.Beta.Sessions.Resources.Add(ctx, session.ID, anthropic.BetaSessionResourceAddParams{ BetaManagedAgentsFileResourceParams: anthropic.BetaManagedAgentsFileResourceParams{ - Type: anthropic.BetaManagedAgentsFileResourceParamsTypeFile, FileID: file.ID, }, }) @@ -535,7 +541,9 @@ List all resources on a session with `GET /v1/sessions/{session_id}/resources` ( client.beta().sessions().resources().delete( resource.id(), - ResourceDeleteParams.builder().sessionId(session.id()).build() + ResourceDeleteParams.builder() + .sessionId(session.id()) + .build() ); ``` diff --git a/content/en/managed-agents/github.md b/content/en/managed-agents/github.md index 1f5ecef099..ac77a116d6 100644 --- a/content/en/managed-agents/github.md +++ b/content/en/managed-agents/github.md @@ -142,20 +142,16 @@ First, create an agent that declares the GitHub MCP server. The agent definition System: anthropic.String("You are a code review assistant with access to GitHub."), MCPServers: []anthropic.BetaManagedAgentsURLMCPServerParams{ { - Type: anthropic.BetaManagedAgentsURLMCPServerParamsTypeURL, Name: "github", URL: "https://api.githubcopilot.com/mcp/", }, }, Tools: []anthropic.BetaAgentNewParamsToolUnion{ { - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }, { OfMCPToolset: &anthropic.BetaManagedAgentsMCPToolsetParams{ - Type: anthropic.BetaManagedAgentsMCPToolsetParamsTypeMCPToolset, MCPServerName: "github", }, }, @@ -318,7 +314,6 @@ Then create a session that mounts the GitHub repository. With a `limited` [envir Resources: []anthropic.BetaSessionNewParamsResourceUnion{ { OfGitHubRepository: &anthropic.BetaManagedAgentsGitHubRepositoryResourceParams{ - Type: anthropic.BetaManagedAgentsGitHubRepositoryResourceParamsTypeGitHubRepository, URL: "https://github.com/org/repo", MountPath: anthropic.String("/workspace/repo"), AuthorizationToken: "ghp_your_github_token", @@ -506,7 +501,6 @@ Mount multiple repositories by adding entries to the `resources` (csharp, go: `R resources := []anthropic.BetaSessionNewParamsResourceUnion{ { OfGitHubRepository: &anthropic.BetaManagedAgentsGitHubRepositoryResourceParams{ - Type: anthropic.BetaManagedAgentsGitHubRepositoryResourceParamsTypeGitHubRepository, URL: "https://github.com/org/frontend", MountPath: anthropic.String("/workspace/frontend"), AuthorizationToken: "ghp_your_github_token", @@ -514,7 +508,6 @@ Mount multiple repositories by adding entries to the `resources` (csharp, go: `R }, { OfGitHubRepository: &anthropic.BetaManagedAgentsGitHubRepositoryResourceParams{ - Type: anthropic.BetaManagedAgentsGitHubRepositoryResourceParamsTypeGitHubRepository, URL: "https://github.com/org/backend", MountPath: anthropic.String("/workspace/backend"), AuthorizationToken: "ghp_your_github_token", @@ -806,11 +799,9 @@ With the GitHub MCP server, the agent can create branches, commit changes, and p Events: []anthropic.BetaManagedAgentsEventParamsUnion{ { OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{ { OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "Fix the type error in src/utils.ts, commit it to a new branch, and push it.", }, }, diff --git a/content/en/managed-agents/mcp-connector.md b/content/en/managed-agents/mcp-connector.md index fea88e6635..a3e0a35b9d 100644 --- a/content/en/managed-agents/mcp-connector.md +++ b/content/en/managed-agents/mcp-connector.md @@ -132,19 +132,15 @@ Each declared server also needs a matching `mcp_toolset` entry in the `tools` (c ID: anthropic.BetaManagedAgentsModelClaudeOpus5_5, }, MCPServers: []anthropic.BetaManagedAgentsURLMCPServerParams{{ - Type: anthropic.BetaManagedAgentsURLMCPServerParamsTypeURL, Name: "github", URL: "https://api.githubcopilot.com/mcp/", }}, Tools: []anthropic.BetaAgentNewParamsToolUnion{ { - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }, { OfMCPToolset: &anthropic.BetaManagedAgentsMCPToolsetParams{ - Type: anthropic.BetaManagedAgentsMCPToolsetParamsTypeMCPToolset, MCPServerName: "github", }, }, @@ -179,7 +175,7 @@ Each declared server also needs a matching `mcp_toolset` entry in the `tools` (c ```php PHP $agent = $client->beta->agents->create( name: 'GitHub Assistant', - model: 'claude-opus-5-5', + model: BetaManagedAgentsModel::CLAUDE_OPUS_5_5, mcpServers: [ BetaManagedAgentsURLMCPServerParams::with( name: 'github', diff --git a/content/en/managed-agents/memory.md b/content/en/managed-agents/memory.md index 41b66710fe..280e0c323c 100644 --- a/content/en/managed-agents/memory.md +++ b/content/en/managed-agents/memory.md @@ -34,7 +34,10 @@ Give the store a `name` (csharp, go: `Name`) and a `description` (csharp, go: `D -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: agent-memory-2026-07-22" \ -H "content-type: application/json" \ - -d '{"name": "User Preferences", "description": "Per-user preferences and project context."}' + -d '{ + "name": "User Preferences", + "description": "Per-user preferences and project context." + }' ``` @@ -135,7 +138,10 @@ Pre-load a store with reference material before any agent runs: -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: agent-memory-2026-07-22" \ -H "content-type: application/json" \ - -d '{"path": "/formatting_standards.md", "content": "All reports use GAAP formatting. Dates are ISO-8601..."}' + -d '{ + "path": "/formatting_standards.md", + "content": "All reports use GAAP formatting. Dates are ISO-8601..." + }' ``` ```bash CLI @@ -305,7 +311,6 @@ You can configure `access` (csharp, go: `Access`) as well. It defaults to `read_ EnvironmentID: environment.ID, Resources: []anthropic.BetaSessionNewParamsResourceUnion{{ OfMemoryStore: &anthropic.BetaManagedAgentsMemoryStoreResourceParam{ - Type: anthropic.BetaManagedAgentsMemoryStoreResourceParamTypeMemoryStore, MemoryStoreID: store.ID, Access: anthropic.BetaManagedAgentsMemoryStoreResourceParamAccessReadWrite, Instructions: anthropic.String("User preferences and project context. Check before starting any task."), @@ -438,7 +443,9 @@ List the memories in a store. Results are returned in a stable, server-defined o }); await foreach (var item in page.Paginate()) { - var line = item.Match(m => $"memory {m.Path}", p => $"memory_prefix {p.Path}"); + var line = item.Match( + memoryItem => $"memory {memoryItem.Path}", + prefixItem => $"memory_prefix {prefixItem.Path}"); Console.WriteLine(line); } ``` @@ -463,8 +470,8 @@ List the memories in a store. Results are returned in a stable, server-defined o .build() ); for (var item : page.data()) { - item.memory().ifPresent(m -> IO.println("memory " + m.path())); - item.memoryPrefix().ifPresent(p -> IO.println("memory_prefix " + p.path())); + item.memory().ifPresent(memoryItem -> IO.println("memory " + memoryItem.path())); + item.memoryPrefix().ifPresent(prefixItem -> IO.println("memory_prefix " + prefixItem.path())); } ``` @@ -545,7 +552,9 @@ Fetching an individual memory returns the full content. ```java Java var retrieved = client.beta().memoryStores().memories().retrieve( mem.id(), - MemoryRetrieveParams.builder().memoryStoreId(store.id()).build() + MemoryRetrieveParams.builder() + .memoryStoreId(store.id()) + .build() ); IO.println(retrieved.content().orElseThrow()); ``` @@ -577,7 +586,10 @@ See the [Retrieve a memory](https://platform.claude.com/docs/en/api/beta/memory_ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: agent-memory-2026-07-22" \ -H "content-type: application/json" \ - -d '{"path": "/preferences/formatting.md", "content": "Always use tabs, not spaces."}' + -d '{ + "path": "/preferences/formatting.md", + "content": "Always use tabs, not spaces." + }' ``` ```bash CLI @@ -788,7 +800,6 @@ To avoid overwriting a concurrent write, pass a `content_sha256` precondition. T MemoryStoreID: store.ID, Content: anthropic.String("CORRECTED: Always use 2-space indentation."), Precondition: anthropic.BetaManagedAgentsPreconditionParam{ - Type: anthropic.BetaManagedAgentsPreconditionTypeContentSha256, ContentSha256: anthropic.String(mem.ContentSha256), }, }) @@ -879,7 +890,9 @@ To avoid overwriting a concurrent write, pass a `content_sha256` precondition. T ```java Java client.beta().memoryStores().memories().delete( mem.id(), - MemoryDeleteParams.builder().memoryStoreId(store.id()).build() + MemoryDeleteParams.builder() + .memoryStoreId(store.id()) + .build() ); ``` @@ -954,10 +967,10 @@ List version history for a store, newest first. The example filters to a single MemoryID = mem.ID, }); var versionIds = new List(); - await foreach (var v in versions.Paginate()) + await foreach (var memoryVersion in versions.Paginate()) { - Console.WriteLine($"{v.ID}: {v.Operation.Raw()}"); - versionIds.Add(v.ID); + Console.WriteLine($"{memoryVersion.ID}: {memoryVersion.Operation.Raw()}"); + versionIds.Add(memoryVersion.ID); } var versionId = versionIds[1]; @@ -968,8 +981,8 @@ List version history for a store, newest first. The example filters to a single MemoryID: anthropic.String(mem.ID), }) for versions.Next() { - v := versions.Current() - fmt.Printf("%s: %s\n", v.ID, v.Operation) + memoryVersion := versions.Current() + fmt.Printf("%s: %s\n", memoryVersion.ID, memoryVersion.Operation) } if err := versions.Err(); err != nil { panic(err) @@ -987,10 +1000,12 @@ List version history for a store, newest first. The example filters to a single ```java Java var versions = client.beta().memoryStores().memoryVersions().list( store.id(), - MemoryVersionListParams.builder().memoryId(mem.id()).build() + MemoryVersionListParams.builder() + .memoryId(mem.id()) + .build() ); - for (var v : versions.autoPager()) { - IO.println(v.id() + ": " + v.operation()); + for (var memoryVersion : versions.autoPager()) { + IO.println(memoryVersion.id() + ": " + memoryVersion.operation()); } var versionId = versions.data().get(1).id(); @@ -1001,8 +1016,8 @@ List version history for a store, newest first. The example filters to a single $store->id, memoryID: $mem->id, ); - foreach ($versions->pagingEachItem() as $v) { - echo "{$v->id}: {$v->operation}\n"; + foreach ($versions->pagingEachItem() as $memoryVersion) { + echo "{$memoryVersion->id}: {$memoryVersion->operation}\n"; } $versionId = $versions->data[1]->id; @@ -1077,7 +1092,9 @@ Fetching an individual version returns the same fields as the list response plus ```java Java var version = client.beta().memoryStores().memoryVersions().retrieve( versionId, - MemoryVersionRetrieveParams.builder().memoryStoreId(store.id()).build() + MemoryVersionRetrieveParams.builder() + .memoryStoreId(store.id()) + .build() ); IO.println(version.content().orElseThrow()); ``` @@ -1155,7 +1172,9 @@ A version that is the current head of a live memory cannot be redacted. Write a ```java Java client.beta().memoryStores().memoryVersions().redact( versionId, - MemoryVersionRedactParams.builder().memoryStoreId(store.id()).build() + MemoryVersionRedactParams.builder() + .memoryStoreId(store.id()) + .build() ); ``` @@ -1209,9 +1228,9 @@ List stores in the workspace. Archived stores are excluded by default; set `incl ```csharp C# var stores = await client.Beta.MemoryStores.List(new() { IncludeArchived = true }); - await foreach (var s in stores.Paginate()) + await foreach (var memoryStore in stores.Paginate()) { - Console.WriteLine($"{s.ID} {s.Name} {s.ArchivedAt}"); + Console.WriteLine($"{memoryStore.ID} {memoryStore.Name} {memoryStore.ArchivedAt}"); } ``` @@ -1220,8 +1239,8 @@ List stores in the workspace. Archived stores are excluded by default; set `incl IncludeArchived: anthropic.Bool(true), }) for stores.Next() { - s := stores.Current() - fmt.Println(s.ID, s.Name, s.ArchivedAt) + memoryStore := stores.Current() + fmt.Println(memoryStore.ID, memoryStore.Name, memoryStore.ArchivedAt) } if err := stores.Err(); err != nil { panic(err) @@ -1229,18 +1248,20 @@ List stores in the workspace. Archived stores are excluded by default; set `incl ``` ```java Java - for (var s : client.beta().memoryStores().list( - MemoryStoreListParams.builder().includeArchived(true).build() + for (var memoryStore : client.beta().memoryStores().list( + MemoryStoreListParams.builder() + .includeArchived(true) + .build() ).autoPager()) { - IO.println(s.id() + " " + s.name() + " " + s.archivedAt()); + IO.println(memoryStore.id() + " " + memoryStore.name() + " " + memoryStore.archivedAt()); } ``` ```php PHP - foreach ($client->beta->memoryStores->list(includeArchived: true)->pagingEachItem() as $s) { + foreach ($client->beta->memoryStores->list(includeArchived: true)->pagingEachItem() as $memoryStore) { // archivedAt is only set on archived stores. - $archivedAt = isset($s->archivedAt) ? $s->archivedAt->format(DATE_ATOM) : ''; - echo "{$s->id} {$s->name} {$archivedAt}\n"; + $archivedAt = isset($memoryStore->archivedAt) ? $memoryStore->archivedAt->format(DATE_ATOM) : ''; + echo "{$memoryStore->id} {$memoryStore->name} {$archivedAt}\n"; } ``` diff --git a/content/en/managed-agents/migration.md b/content/en/managed-agents/migration.md index 181e77c7fd..5757a41e36 100644 --- a/content/en/managed-agents/migration.md +++ b/content/en/managed-agents/migration.md @@ -349,9 +349,7 @@ If you built an agent by calling `client.messages.create()` (csharp: `client.Mes ID: anthropic.BetaManagedAgentsModelClaudeOpus5_5, }, Tools: []anthropic.BetaAgentNewParamsToolUnion{{ - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }}, }) if err != nil { @@ -361,7 +359,6 @@ If you built an agent by calling `client.messages.create()` (csharp: `client.Mes session, err := client.Beta.Sessions.New(ctx, anthropic.BetaSessionNewParams{ Agent: anthropic.BetaSessionNewParamsAgentUnion{ OfBetaManagedAgentsAgents: &anthropic.BetaManagedAgentsAgentParams{ - Type: anthropic.BetaManagedAgentsAgentParamsTypeAgent, ID: agent.ID, Version: anthropic.Int(agent.Version), }, @@ -378,10 +375,8 @@ If you built an agent by calling `client.messages.create()` (csharp: `client.Mes _, err = client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: task, }, }}, @@ -853,7 +848,6 @@ If you built with the [Claude Agent SDK](https://code.claude.com/docs/en/agent-s System: anthropic.String("You are a concise weather assistant."), Tools: []anthropic.BetaAgentNewParamsToolUnion{{ OfCustom: &anthropic.BetaManagedAgentsCustomToolParams{ - Type: anthropic.BetaManagedAgentsCustomToolParamsTypeCustom, Name: "get_weather", Description: "Get the current weather for a city.", InputSchema: anthropic.BetaManagedAgentsCustomToolInputSchemaParam{ @@ -887,7 +881,6 @@ If you built with the [Claude Agent SDK](https://code.claude.com/docs/en/agent-s session, err := client.Beta.Sessions.New(ctx, anthropic.BetaSessionNewParams{ Agent: anthropic.BetaSessionNewParamsAgentUnion{ OfBetaManagedAgentsAgents: &anthropic.BetaManagedAgentsAgentParams{ - Type: anthropic.BetaManagedAgentsAgentParamsTypeAgent, ID: agent.ID, Version: anthropic.Int(agent.Version), }, @@ -908,10 +901,8 @@ If you built with the [Claude Agent SDK](https://code.claude.com/docs/en/agent-s _, err = client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "What's the weather in Tokyo?", }, }}, @@ -938,11 +929,9 @@ If you built with the [Claude Agent SDK](https://code.claude.com/docs/en/agent-s if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserCustomToolResult: &anthropic.BetaManagedAgentsUserCustomToolResultEventParams{ - Type: anthropic.BetaManagedAgentsUserCustomToolResultEventParamsTypeUserCustomToolResult, CustomToolUseID: toolUse.ID, Content: []anthropic.BetaManagedAgentsUserCustomToolResultEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: result, }, }}, diff --git a/content/en/managed-agents/multiagent-orchestration.md b/content/en/managed-agents/multiagent-orchestration.md index 64ca4c1298..eddae7db0e 100644 --- a/content/en/managed-agents/multiagent-orchestration.md +++ b/content/en/managed-agents/multiagent-orchestration.md @@ -251,9 +251,7 @@ When [defining your agent](https://platform.claude.com/docs/en/managed-agents/ag Model: anthropic.BetaManagedAgentsModelConfigParams{ID: anthropic.BetaManagedAgentsModelClaudeOpus5_5}, System: anthropic.String("You coordinate engineering work. Delegate code review to the reviewer agent and test writing to the test agent."), Tools: []anthropic.BetaAgentNewParamsToolUnion{{ - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }}, Multiagent: anthropic.BetaManagedAgentsMultiagentParamsUnion{ OfMultiagent20261001: &anthropic.BetaManagedAgentsMultiagent20261001Params{ @@ -598,13 +596,11 @@ Create the researcher, which declares the GitHub MCP server, and the agent that Name: "researcher", Model: anthropic.BetaManagedAgentsModelConfigParams{ID: anthropic.BetaManagedAgentsModelClaudeHaiku5_5}, MCPServers: []anthropic.BetaManagedAgentsURLMCPServerParams{{ - Type: anthropic.BetaManagedAgentsURLMCPServerParamsTypeURL, Name: "github", URL: "https://api.githubcopilot.com/mcp/", }}, Tools: []anthropic.BetaAgentNewParamsToolUnion{{ OfMCPToolset: &anthropic.BetaManagedAgentsMCPToolsetParams{ - Type: anthropic.BetaManagedAgentsMCPToolsetParamsTypeMCPToolset, MCPServerName: "github", }, }}, @@ -617,9 +613,7 @@ Create the researcher, which declares the GitHub MCP server, and the agent that Name: "lead", Model: anthropic.BetaManagedAgentsModelConfigParams{ID: anthropic.BetaManagedAgentsModelClaudeOpus5_5}, Tools: []anthropic.BetaAgentNewParamsToolUnion{{ - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }}, Multiagent: anthropic.BetaManagedAgentsMultiagentParamsUnion{ OfMultiagent20261001: &anthropic.BetaManagedAgentsMultiagent20261001Params{ @@ -627,8 +621,7 @@ Create the researcher, which declares the GitHub MCP server, and the agent that OfEnabled: &anthropic.BetaManagedAgentsMultiagentSubagentsEnabledParams{ PredefinedAgents: []anthropic.BetaManagedAgentsMultiagentPredefinedAgentParamsUnion{{ OfBetaManagedAgentsAgents: &anthropic.BetaManagedAgentsAgentParams{ - Type: anthropic.BetaManagedAgentsAgentParamsTypeAgent, - ID: researcher.ID, + ID: researcher.ID, }, }}, }, @@ -930,9 +923,7 @@ Before you change an existing agent's `multiagent.type`, see [how to move an age Model: anthropic.BetaManagedAgentsModelConfigParams{ID: anthropic.BetaManagedAgentsModelClaudeOpus5_5}, System: anthropic.String("You review contracts. When you're asked to review more than a few contracts, start a workflow run that reads them in parallel and combines the findings. Review one or two contracts yourself, without a run."), Tools: []anthropic.BetaAgentNewParamsToolUnion{{ - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }}, Multiagent: anthropic.BetaManagedAgentsMultiagentParamsUnion{ OfMultiagent20261001: &anthropic.BetaManagedAgentsMultiagent20261001Params{ @@ -964,7 +955,7 @@ Before you change an existing agent's `multiagent.type`, see [how to move an age ```php PHP $agent = $client->beta->agents->create( name: 'Contract Reviewer', - model: 'claude-opus-5-5', + model: BetaManagedAgentsModel::CLAUDE_OPUS_5_5, system: "You review contracts. When you're asked to review more than a few contracts, start a workflow run that reads them in parallel and combines the findings. Review one or two contracts yourself, without a run.", tools: [ ['type' => 'agent_toolset_20260401'], @@ -1184,7 +1175,7 @@ An enabled `advisor` (csharp, go: `Advisor`) setting in the agent's `multiagent` ```php PHP $agent = $client->beta->agents->create( name: 'Backend engineer', - model: 'claude-sonnet-5', + model: BetaManagedAgentsModel::CLAUDE_SONNET_5, system: 'You implement backend features end to end. Consult the advisor before major backend design decisions.', multiagent: [ 'type' => 'multiagent_20261001', diff --git a/content/en/managed-agents/overview.md b/content/en/managed-agents/overview.md index 76c7f1cfbe..46e73928fa 100644 --- a/content/en/managed-agents/overview.md +++ b/content/en/managed-agents/overview.md @@ -20,7 +20,7 @@ Anthropic offers two ways to build with Claude, each suited to different use cas Claude Managed Agents provides the harness and infrastructure for running Claude as an autonomous agent. Instead of building your own agent loop, tool execution, and runtime, you get a fully managed environment where Claude can read files, run commands, browse the web, and run code securely. The harness supports built-in prompt caching, compaction, and other performance optimizations for high-quality, efficient agent outputs. To build your own agent loop with direct model access instead, see [Using the Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). - Claude Managed Agents is also available on Claude Platform on AWS, with some differences in feature availability and session behavior. See [Claude Managed Agents](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#claude-managed-agents) in the Claude Platform on AWS guide. + Claude Managed Agents is also available on Claude Platform on AWS and Claude Models on Google Cloud (Anthropic managed), with some differences in feature availability and session behavior. See [Claude Managed Agents](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#claude-managed-agents) in the Claude Platform on AWS guide or the [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#claude-managed-agents) guide. diff --git a/content/en/managed-agents/permission-policies.md b/content/en/managed-agents/permission-policies.md index 070b39b1d3..619746b938 100644 --- a/content/en/managed-agents/permission-policies.md +++ b/content/en/managed-agents/permission-policies.md @@ -131,12 +131,9 @@ When creating an agent, you can apply a policy to every tool in `agent_toolset_2 }, Tools: []anthropic.BetaAgentNewParamsToolUnion{{ OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, DefaultConfig: anthropic.BetaManagedAgentsAgentToolsetDefaultConfigParams{ PermissionPolicy: anthropic.BetaManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion{ - OfAlwaysAsk: &anthropic.BetaManagedAgentsAlwaysAskPolicyParam{ - Type: anthropic.BetaManagedAgentsAlwaysAskPolicyTypeAlwaysAsk, - }, + OfAlwaysAsk: &anthropic.BetaManagedAgentsAlwaysAskPolicyParam{}, }, }, }, @@ -339,25 +336,19 @@ This example connects a GitHub MCP server and allows its tools to run without co ID: anthropic.BetaManagedAgentsModelClaudeOpus5_5, }, MCPServers: []anthropic.BetaManagedAgentsURLMCPServerParams{{ - Type: anthropic.BetaManagedAgentsURLMCPServerParamsTypeURL, Name: "github", URL: "https://mcp.example.com/github", }}, Tools: []anthropic.BetaAgentNewParamsToolUnion{ { - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }, { OfMCPToolset: &anthropic.BetaManagedAgentsMCPToolsetParams{ - Type: anthropic.BetaManagedAgentsMCPToolsetParamsTypeMCPToolset, MCPServerName: "github", DefaultConfig: anthropic.BetaManagedAgentsMCPToolsetDefaultConfigParams{ PermissionPolicy: anthropic.BetaManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion{ - OfAlwaysAllow: &anthropic.BetaManagedAgentsAlwaysAllowPolicyParam{ - Type: anthropic.BetaManagedAgentsAlwaysAllowPolicyTypeAlwaysAllow, - }, + OfAlwaysAllow: &anthropic.BetaManagedAgentsAlwaysAllowPolicyParam{}, }, }, }, @@ -562,20 +553,15 @@ Use the `configs` (csharp, go: `Configs`) array to override the default for indi ```go Go tools := []anthropic.BetaAgentNewParamsToolUnion{{ OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, DefaultConfig: anthropic.BetaManagedAgentsAgentToolsetDefaultConfigParams{ PermissionPolicy: anthropic.BetaManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion{ - OfAlwaysAllow: &anthropic.BetaManagedAgentsAlwaysAllowPolicyParam{ - Type: anthropic.BetaManagedAgentsAlwaysAllowPolicyTypeAlwaysAllow, - }, + OfAlwaysAllow: &anthropic.BetaManagedAgentsAlwaysAllowPolicyParam{}, }, }, Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{{ OfBash: &anthropic.BetaManagedAgentsBashToolConfigParams{ PermissionPolicy: anthropic.BetaManagedAgentsBashToolConfigParamsPermissionPolicyUnion{ - OfAlwaysAsk: &anthropic.BetaManagedAgentsAlwaysAskPolicyParam{ - Type: anthropic.BetaManagedAgentsAlwaysAskPolicyTypeAlwaysAsk, - }, + OfAlwaysAsk: &anthropic.BetaManagedAgentsAlwaysAskPolicyParam{}, }, }, }}, @@ -828,14 +814,12 @@ The following example sets `auto` as the default for the agent toolset and for t ID: anthropic.BetaManagedAgentsModelClaudeOpus5_5, }, MCPServers: []anthropic.BetaManagedAgentsURLMCPServerParams{{ - Type: anthropic.BetaManagedAgentsURLMCPServerParamsTypeURL, Name: "github", URL: "https://mcp.example.com/github", }}, Tools: []anthropic.BetaAgentNewParamsToolUnion{ { OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, DefaultConfig: anthropic.BetaManagedAgentsAgentToolsetDefaultConfigParams{ PermissionPolicy: anthropic.BetaManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion{ OfAuto: &anthropic.BetaManagedAgentsAutoPolicyParam{}, @@ -844,9 +828,7 @@ The following example sets `auto` as the default for the agent toolset and for t Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{{ OfBash: &anthropic.BetaManagedAgentsBashToolConfigParams{ PermissionPolicy: anthropic.BetaManagedAgentsBashToolConfigParamsPermissionPolicyUnion{ - OfAlwaysAsk: &anthropic.BetaManagedAgentsAlwaysAskPolicyParam{ - Type: anthropic.BetaManagedAgentsAlwaysAskPolicyTypeAlwaysAsk, - }, + OfAlwaysAsk: &anthropic.BetaManagedAgentsAlwaysAskPolicyParam{}, }, }, }}, @@ -854,7 +836,6 @@ The following example sets `auto` as the default for the agent toolset and for t }, { OfMCPToolset: &anthropic.BetaManagedAgentsMCPToolsetParams{ - Type: anthropic.BetaManagedAgentsMCPToolsetParamsTypeMCPToolset, MCPServerName: "github", DefaultConfig: anthropic.BetaManagedAgentsMCPToolsetDefaultConfigParams{ PermissionPolicy: anthropic.BetaManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion{ @@ -1064,7 +1045,7 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve ```bash cURL - # Allow the tool to execute + # Allow the tool to run curl -fsSL "https://api.anthropic.com/v1/sessions/$SESSION_ID/events" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ @@ -1099,7 +1080,7 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve ``` ```bash CLI - # Allow the tool to execute + # Allow the tool to run ant beta:sessions:events send \ --session-id "$SESSION_ID" \ --event "{type: user.tool_confirmation, tool_use_id: $AGENT_TOOL_USE_EVENT_ID, result: allow}" @@ -1112,7 +1093,7 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve ``` ```python Python - # Allow the tool to execute + # Allow the tool to run client.beta.sessions.events.send( session.id, events=[ @@ -1139,7 +1120,7 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve ``` ```typescript TypeScript - // Allow the tool to execute + // Allow the tool to run await client.beta.sessions.events.send(session.id, { events: [ { @@ -1164,7 +1145,7 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve ``` ```csharp C# - // Allow the tool to execute + // Allow the tool to run await client.Beta.Sessions.Events.Send(session.ID, new() { Events = @@ -1193,11 +1174,10 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve ``` ```go Go - // Allow the tool to execute + // Allow the tool to run _, err = client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserToolConfirmation: &anthropic.BetaManagedAgentsUserToolConfirmationEventParams{ - Type: anthropic.BetaManagedAgentsUserToolConfirmationEventParamsTypeUserToolConfirmation, ToolUseID: agentToolUseEvent.ID, Result: anthropic.BetaManagedAgentsUserToolConfirmationEventParamsResultAllow, }, @@ -1211,7 +1191,6 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve _, err = client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserToolConfirmation: &anthropic.BetaManagedAgentsUserToolConfirmationEventParams{ - Type: anthropic.BetaManagedAgentsUserToolConfirmationEventParamsTypeUserToolConfirmation, ToolUseID: mcpToolUseEvent.ID, Result: anthropic.BetaManagedAgentsUserToolConfirmationEventParamsResultDeny, DenyMessage: anthropic.String("Don't create issues in the production project. Use the staging project."), @@ -1224,7 +1203,7 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve ``` ```java Java - // Allow the tool to execute + // Allow the tool to run client.beta().sessions().events().send( session.id(), EventSendParams.builder() @@ -1255,7 +1234,7 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve ```php PHP use Anthropic\Beta\Sessions\Events\ManagedAgentsUserToolConfirmationEventParams; - // Allow the tool to execute + // Allow the tool to run $client->beta->sessions->events->send( $session->id, events: [ @@ -1280,7 +1259,7 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve ``` ```ruby Ruby - # Allow the tool to execute + # Allow the tool to run client.beta.sessions.events.send_( session.id, events: [ @@ -1309,7 +1288,7 @@ In the following examples, the tool-use event IDs come from the `stop_reason.eve ## Custom tools -Permission policies do not apply to custom tools. When the agent calls a custom tool, your application receives an `agent.custom_tool_use` event and is responsible for deciding whether to run it before sending back a `user.custom_tool_result`. See [Answer tool calls that pause the session](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#answer-tool-calls-that-pause-the-session) for the full flow. +Permission policies do not apply to custom tools. When the agent calls a custom tool, your application receives an `agent.custom_tool_use` event and is responsible for determining whether to run it before sending back a `user.custom_tool_result`. See [Answer tool calls that pause the session](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#answer-tool-calls-that-pause-the-session) for the full flow. ## Next steps diff --git a/content/en/managed-agents/quickstart.md b/content/en/managed-agents/quickstart.md index d5e5e2aa08..6cbe1fd19d 100644 --- a/content/en/managed-agents/quickstart.md +++ b/content/en/managed-agents/quickstart.md @@ -106,7 +106,7 @@ ant --version ```bash - go get github.com/anthropics/anthropic-sdk-go + go get github.com/anthropics/anthropic-sdk-go/v2 ``` @@ -255,7 +255,7 @@ export ANTHROPIC_API_KEY="your-api-key-here" "context" "fmt" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) func main() { @@ -269,9 +269,7 @@ export ANTHROPIC_API_KEY="your-api-key-here" }, System: anthropic.String("You are a helpful coding assistant. Write clean, well-documented code."), Tools: []anthropic.BetaAgentNewParamsToolUnion{{ - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }}, }) if err != nil { @@ -316,13 +314,14 @@ export ANTHROPIC_API_KEY="your-api-key-here" ```php PHP + use Anthropic\Beta\Agents\BetaManagedAgentsModel; use Anthropic\Client; $client = new Client(); $agent = $client->beta->agents->create( name: 'Coding Assistant', - model: 'claude-opus-5-5', + model: BetaManagedAgentsModel::CLAUDE_OPUS_5_5, system: 'You are a helpful coding assistant. Write clean, well-documented code.', tools: [ ['type' => 'agent_toolset_20260401'], @@ -738,9 +737,9 @@ export ANTHROPIC_API_KEY="your-api-key-here" }); // Process streaming events - await foreach (var ev in stream) + await foreach (var streamEvent in stream) { - if (ev.Value is BetaManagedAgentsAgentMessageEvent message) + if (streamEvent.Value is BetaManagedAgentsAgentMessageEvent message) { foreach (var block in message.Content) { @@ -750,11 +749,11 @@ export ANTHROPIC_API_KEY="your-api-key-here" } } } - else if (ev.Value is BetaManagedAgentsAgentToolUseEvent toolUse) + else if (streamEvent.Value is BetaManagedAgentsAgentToolUseEvent toolUse) { Console.WriteLine($"\n[Using tool: {toolUse.Name}]"); } - else if (ev.Value is BetaManagedAgentsSessionStatusIdleEvent) + else if (streamEvent.Value is BetaManagedAgentsSessionStatusIdleEvent) { Console.WriteLine("\n\nAgent finished."); break; @@ -770,10 +769,8 @@ export ANTHROPIC_API_KEY="your-api-key-here" _, err = client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "Create a Python script that generates the first 20 Fibonacci numbers and saves them to fibonacci.txt", }, }}, diff --git a/content/en/managed-agents/scheduled-deployments.md b/content/en/managed-agents/scheduled-deployments.md index c248086384..310bd3f1fa 100644 --- a/content/en/managed-agents/scheduled-deployments.md +++ b/content/en/managed-agents/scheduled-deployments.md @@ -142,17 +142,14 @@ When creating a deployment, you pass the [session configurations](https://platfo EnvironmentID: environment.ID, InitialEvents: []anthropic.BetaManagedAgentsDeploymentInitialEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "Run the weekly compliance scan.", }, }}, }, }}, Schedule: anthropic.BetaManagedAgentsScheduleParams{ - Type: anthropic.BetaManagedAgentsScheduleParamsTypeCron, Expression: "0 20 * * 5", Timezone: "America/New_York", }, @@ -344,7 +341,6 @@ The following example sets a budget on an existing deployment: ```go Go updatedDeployment, err := client.Beta.Deployments.Update(ctx, deployment.ID, anthropic.BetaDeploymentUpdateParams{ Budget: anthropic.BetaManagedAgentsBudgetLimitParam{ - Type: anthropic.BetaManagedAgentsBudgetLimitTypeLimit, MaxListCost: anthropic.BetaMonetaryAmountParam{ Amount: "2000", Currency: anthropic.BetaCurrencyUsd, diff --git a/content/en/managed-agents/secure-deployment-risks.md b/content/en/managed-agents/secure-deployment-risks.md index 04f09c1006..a1195f73bf 100644 --- a/content/en/managed-agents/secure-deployment-risks.md +++ b/content/en/managed-agents/secure-deployment-risks.md @@ -31,14 +31,14 @@ These settings lower the risk but do not remove it, so do not put data in the sa Managed Agents keeps the agent loop, session history, and vault secrets outside the sandbox by design. For the design background, see [Scaling Managed Agents](https://www.anthropic.com/engineering/managed-agents). -| Part | Where it runs | What limits it | -| ---------------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Agent loop | Anthropic's servers | The tool set, permission policies, and budget that you set | -| `bash` and file tools | The sandbox. In a cloud environment, each session gets its own isolated Linux container | Environment networking, the tool set, and permission policies | -| `web_search` and `web_fetch` | Anthropic's servers | The tool's own domain list and, in a `limited` cloud environment, the environment's allowed hosts. `web_fetch` also opens only URLs that have already appeared in the session | -| Vault secret | Outside the sandbox. MCP credentials never enter it. For an environment variable credential, code sees a placeholder | For an MCP credential, the MCP server URL it is for. For an environment variable credential, the hosts the credential allows, its injection location, and the environment's allowed hosts | -| Session history | Anthropic's servers, until you delete the session | The API keys for the workspace, the Developer and Admin roles in the Claude Console, and session deletion | -| Custom tools | Your application | Your code | +| Part | Where it runs | What limits it | +| ---------------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Agent loop | Anthropic's servers | The tool set, permission policies, and budget that you set | +| `bash` and file tools | The sandbox. In a cloud environment, each session gets its own isolated Linux container | Environment networking, the tool set, and permission policies | +| `web_search` and `web_fetch` | Anthropic's servers | The tool's own domain list, your organization's web search and web fetch settings in the Claude Console, and, in a `limited` cloud environment, the environment's allowed hosts. `web_fetch` also opens only URLs that have already appeared in the session | +| Vault secret | Outside the sandbox. MCP credentials never enter it. For an environment variable credential, code sees a placeholder | For an MCP credential, the MCP server URL it is for. For an environment variable credential, the hosts the credential allows, its injection location, and the environment's allowed hosts | +| Session history | Anthropic's servers, until you delete the session | The API keys for the workspace, the Developer and Admin roles in the Claude Console, and session deletion | +| Custom tools | Your application | Your code | In a cloud environment, sessions do not share filesystem state. A memory store attached to more than one session is shared between them. diff --git a/content/en/managed-agents/secure-deployment.md b/content/en/managed-agents/secure-deployment.md index 474be96945..cb0d81ae01 100644 --- a/content/en/managed-agents/secure-deployment.md +++ b/content/en/managed-agents/secure-deployment.md @@ -255,6 +255,8 @@ Set `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains` A `blocked_domains` (java, php: `blockedDomains`; csharp, go: `BlockedDomains`) list blocks the hosts you list and their subdomains, and no other host. The same content can still reach the agent from web archives, caches, mirrors, or related domains you did not list. Do not rely on `blocked_domains` (java, php: `blockedDomains`; csharp, go: `BlockedDomains`) for security. Use `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) and name the hosts you trust. +An administrator can turn off web search or web fetch, or restrict their domains, on the [**Capabilities**](https://platform.claude.com/settings/capabilities) page of the Claude Console. These settings also apply in a session. With a tool turned off, its calls return an error result to the agent, and the session continues. With domain restrictions set, a search result or a fetched URL must pass both the organization's restrictions and the tool's own domain lists. See [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions). + In a `limited` environment, the `allowed_hosts` (java, php: `allowedHosts`; csharp, go: `AllowedHosts`) list from [Limit the network](https://platform.claude.com/docs/en/managed-agents/secure-deployment#limit-the-network) also limits the web tools. An `unrestricted` environment or a self-hosted sandbox does not limit the web tools. | In a `limited` environment | Result | @@ -568,22 +570,17 @@ The following sample limits `web_fetch` to `help.example.com` with `allowed_doma ```go Go tools := []anthropic.BetaAgentNewParamsToolUnion{{ OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, DefaultConfig: anthropic.BetaManagedAgentsAgentToolsetDefaultConfigParams{ Enabled: anthropic.Bool(false), PermissionPolicy: anthropic.BetaManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion{ - OfAlwaysAsk: &anthropic.BetaManagedAgentsAlwaysAskPolicyParam{ - Type: anthropic.BetaManagedAgentsAlwaysAskPolicyTypeAlwaysAsk, - }, + OfAlwaysAsk: &anthropic.BetaManagedAgentsAlwaysAskPolicyParam{}, }, }, Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{ {OfRead: &anthropic.BetaManagedAgentsReadToolConfigParams{ Enabled: anthropic.Bool(true), PermissionPolicy: anthropic.BetaManagedAgentsReadToolConfigParamsPermissionPolicyUnion{ - OfAlwaysAllow: &anthropic.BetaManagedAgentsAlwaysAllowPolicyParam{ - Type: anthropic.BetaManagedAgentsAlwaysAllowPolicyTypeAlwaysAllow, - }, + OfAlwaysAllow: &anthropic.BetaManagedAgentsAlwaysAllowPolicyParam{}, }, }}, {OfWrite: &anthropic.BetaManagedAgentsWriteToolConfigParams{ @@ -603,7 +600,6 @@ The following sample limits `web_fetch` to `help.example.com` with `allowed_doma }, }, { OfCustom: &anthropic.BetaManagedAgentsCustomToolParams{ - Type: anthropic.BetaManagedAgentsCustomToolParamsTypeCustom, Name: "lookup_order", Description: "Look up one order by its ID. Returns the status, the items, and the delivery date.", InputSchema: anthropic.BetaManagedAgentsCustomToolInputSchemaParam{ diff --git a/content/en/managed-agents/self-hosted-sandboxes-custom-tools.md b/content/en/managed-agents/self-hosted-sandboxes-custom-tools.md index 84ee044125..f22a77c6f0 100644 --- a/content/en/managed-agents/self-hosted-sandboxes-custom-tools.md +++ b/content/en/managed-agents/self-hosted-sandboxes-custom-tools.md @@ -123,11 +123,11 @@ The environment key authorizes posting custom tool results, so your Claude API k "os/signal" "syscall" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/lib/environments" - "github.com/anthropics/anthropic-sdk-go/option" - "github.com/anthropics/anthropic-sdk-go/toolrunner" - "github.com/anthropics/anthropic-sdk-go/tools/agenttoolset" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/lib/environments" + "github.com/anthropics/anthropic-sdk-go/v2/option" + "github.com/anthropics/anthropic-sdk-go/v2/toolrunner" + "github.com/anthropics/anthropic-sdk-go/v2/tools/agenttoolset" ) type orderStatusInput struct { @@ -207,7 +207,7 @@ At runtime the model calls a wrapped tool like any other custom tool: The SDK's [Client-side MCP helpers](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector#client-side-mcp-helpers) convert the server's tools into the runnable tools the worker accepts. Install an MCP SDK alongside the Anthropic SDK: `pip install "anthropic[mcp]" "mcp>=1.24"` (typescript: `npm install @modelcontextprotocol/sdk`; go: `go get github.com/modelcontextprotocol/go-sdk`; csharp: `dotnet add package ModelContextProtocol`; java: `com.anthropic:anthropic-java-mcp`; php: `composer require mcp/sdk`; ruby: `bundle add mcp faraday event_stream_parser`). -The examples connect without authentication. To send credentials, configure the `http_client` (typescript: `requestInit`; go: `HTTPClient`; csharp: `AdditionalHeaders`; java: `customizeRequest`; php, ruby: `headers`) you hand to the MCP transport. +The examples connect without authentication. To send credentials, configure the `http_client` (typescript: `requestInit`; go: `HTTPClient`; csharp: `AdditionalHeaders`; java: `.customizeRequest()`; php, ruby: `headers`) you hand to the MCP transport. ### Declare and serve the tools @@ -356,7 +356,7 @@ The examples connect without authentication. To send credentials, configure the "fmt" "log" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp" ) @@ -402,7 +402,6 @@ The examples connect without authentication. To send credentials, configure the } return anthropic.BetaAgentNewParamsToolUnion{ OfCustom: &anthropic.BetaManagedAgentsCustomToolParams{ - Type: anthropic.BetaManagedAgentsCustomToolParamsTypeCustom, Name: tool.Name, Description: description, InputSchema: inputSchema, @@ -430,9 +429,7 @@ The examples connect without authentication. To send credentials, configure the } tools := []anthropic.BetaAgentNewParamsToolUnion{ - {OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }}, + {OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}}, } for _, tool := range listed.Tools { custom, err := toCustomTool(tool) @@ -468,7 +465,7 @@ The examples connect without authentication. To send credentials, configure the // The MCP fields map one to one onto a custom tool declaration. The MCP Java // SDK keeps only these top-level keywords of a tool's input schema: type, - // properties, required, additionalProperties, $defs and definitions. + // properties, required, additionalProperties, $defs, and definitions. BetaManagedAgentsCustomToolParams toCustomTool(McpSchema.Tool tool) { var description = tool.description(); if (description == null || description.isEmpty()) { @@ -589,7 +586,7 @@ The examples connect without authentication. To send credentials, configure the - Connect to the same MCP server at startup, convert its tools with `async_mcp_tool` (typescript: `mcpTools`; go: `mcp.NewBetaTools`), and register them alongside `beta_agent_toolset_20260401` (typescript: `betaAgentToolset20260401`; go: `agenttoolset.BetaAgentToolset20260401`). Keep one MCP session open for the life of the worker. + Connect to the same MCP server at startup, convert its tools with `async_mcp_tool()` (typescript: `mcpTools()`; go: `mcp.NewBetaTools()`), and register them alongside `beta_agent_toolset_20260401()` (typescript: `betaAgentToolset20260401()`; go: `agenttoolset.BetaAgentToolset20260401()`). Keep one MCP session open for the life of the worker. ```python Python @@ -692,11 +689,11 @@ The examples connect without authentication. To send credentials, configure the "os/signal" "syscall" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/lib/environments" - "github.com/anthropics/anthropic-sdk-go/mcp" - "github.com/anthropics/anthropic-sdk-go/option" - "github.com/anthropics/anthropic-sdk-go/tools/agenttoolset" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/lib/environments" + "github.com/anthropics/anthropic-sdk-go/v2/mcp" + "github.com/anthropics/anthropic-sdk-go/v2/option" + "github.com/anthropics/anthropic-sdk-go/v2/tools/agenttoolset" mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp" ) diff --git a/content/en/managed-agents/self-hosted-sandboxes-memory.md b/content/en/managed-agents/self-hosted-sandboxes-memory.md index 51d3bf6c64..d468c2e1bb 100644 --- a/content/en/managed-agents/self-hosted-sandboxes-memory.md +++ b/content/en/managed-agents/self-hosted-sandboxes-memory.md @@ -23,6 +23,8 @@ The difference is who materializes the store. On a self-hosted environment your Memory stores cannot be attached to sessions on self-hosted environments on [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws). + + On [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), memory stores aren't supported for sessions on self-hosted environments. ## Prepare the host diff --git a/content/en/managed-agents/self-hosted-sandboxes-operations.md b/content/en/managed-agents/self-hosted-sandboxes-operations.md index 0fd8c2875b..b236cd0449 100644 --- a/content/en/managed-agents/self-hosted-sandboxes-operations.md +++ b/content/en/managed-agents/self-hosted-sandboxes-operations.md @@ -80,7 +80,7 @@ The monitoring calls on this page run from your monitoring or operations tooling "fmt" "os" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) func main() { @@ -226,7 +226,7 @@ Because these calls run from your operations tooling rather than the worker host "fmt" "os" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) func main() { diff --git a/content/en/managed-agents/self-hosted-sandboxes-security.md b/content/en/managed-agents/self-hosted-sandboxes-security.md index 6c0ae36755..87416793aa 100644 --- a/content/en/managed-agents/self-hosted-sandboxes-security.md +++ b/content/en/managed-agents/self-hosted-sandboxes-security.md @@ -19,7 +19,7 @@ Anthropic secures the control plane across all environments: session and work qu * **Service key storage and rotation.** The environment service key (`ANTHROPIC_ENVIRONMENT_KEY`) authorizes polling your environment's work queue and submitting results back to sessions. Store it in a secrets manager, not in environment files or sandbox images. Rotate it immediately if you suspect exposure. * **Isolating untrusted workloads.** The environment service key is scoped to one environment's work queue. If you run untrusted code inside your sandbox, consider provisioning a separate workspace and environment for each trust boundary. This limits each key to a single user's sessions instead of a shared pool. * **Per-session credentials.** Each work item your worker claims can carry a per-session `secret` (csharp, go: `Secret`), which the worker uses in place of the environment service key. Access to [memory stores](https://platform.claude.com/docs/en/managed-agents/memory) requires the `secret` (csharp, go: `Secret`): the memory store endpoints reject the environment key (see [Forward the work item's secret](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-workers#forward-the-work-items-secret)). Pass the `secret` (csharp, go: `Secret`) only into the sandbox that serves that session, keep it out of images and shared volumes, and never log it. -* **Tool permissions.** Tools run inside your sandbox with whatever permissions your process has. Apply least privilege to the process user and mount only the directories your tools require. +* **Tool-execution blast radius.** Tools run inside your sandbox with whatever permissions your process has. Apply least privilege to the process user and mount only the directories your tools require. * **Log retention and session content.** Conversation content and tool outputs pass through your worker and stay in your environment. You are responsible for retaining, redacting, or deleting that data in compliance with your own policies. Anthropic has no visibility into what your worker does with session content once delivered. * **Memory store contents.** [Memory stores](https://platform.claude.com/docs/en/managed-agents/memory) remain hosted by Anthropic, including their version history. When a session attaches one, the worker keeps a working copy under `/mnt/memory/` in your sandbox for the session's duration and syncs changes back. The worker deletes that copy when the session ends, but a worker that exits without running its teardown leaves it behind. Cleanup of leftover copies, the permissions on that path, and isolation between sessions that share a filesystem are your responsibility. * **Read-only memory stores.** A store attached with `read_only` access is protected from upload, not from local modification. The worker's `write` and `edit` tools refuse to write under its directory, nothing there syncs back, and the memory store endpoints reject writes to it made with the session's `secret` (csharp, go: `Secret`). Other processes in the sandbox can still change the local copy: commands the agent runs through the `bash` tool, and [custom tools](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-custom-tools) or MCP servers you serve from the sandbox, which run with the worker's permissions. Later tool calls in that session read the changed copy until that memory next changes in the store. If the agent must not be able to alter even its local view of such a store, disable the `bash` tool for that agent and give it no custom tool that writes to the sandbox's filesystem. diff --git a/content/en/managed-agents/self-hosted-sandboxes-workers.md b/content/en/managed-agents/self-hosted-sandboxes-workers.md index 48c674345f..b7f19a7398 100644 --- a/content/en/managed-agents/self-hosted-sandboxes-workers.md +++ b/content/en/managed-agents/self-hosted-sandboxes-workers.md @@ -115,9 +115,9 @@ Start a worker that polls the queue continuously. It authenticates with the [env "os/signal" "syscall" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/lib/environments" - "github.com/anthropics/anthropic-sdk-go/option" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/lib/environments" + "github.com/anthropics/anthropic-sdk-go/v2/option" ) func main() { @@ -312,10 +312,10 @@ Start a worker that polls the queue continuously. It authenticates with the [env "os/signal" "syscall" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/lib/environments" - "github.com/anthropics/anthropic-sdk-go/option" - "github.com/anthropics/anthropic-sdk-go/packages/param" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/lib/environments" + "github.com/anthropics/anthropic-sdk-go/v2/option" + "github.com/anthropics/anthropic-sdk-go/v2/packages/param" ) var ( @@ -618,10 +618,10 @@ To claim work from your own code instead of `ant beta:worker poll --on-work`, us "os" "os/exec" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/lib/environments" - "github.com/anthropics/anthropic-sdk-go/option" - "github.com/anthropics/anthropic-sdk-go/packages/param" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/lib/environments" + "github.com/anthropics/anthropic-sdk-go/v2/option" + "github.com/anthropics/anthropic-sdk-go/v2/packages/param" ) var sandboxEnv = []string{ @@ -759,9 +759,9 @@ Replace the `ant beta:worker run` entrypoint with an SDK entrypoint when the san "os/signal" "syscall" - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/lib/environments" - "github.com/anthropics/anthropic-sdk-go/option" + "github.com/anthropics/anthropic-sdk-go/v2" + "github.com/anthropics/anthropic-sdk-go/v2/lib/environments" + "github.com/anthropics/anthropic-sdk-go/v2/option" ) func main() { diff --git a/content/en/managed-agents/self-hosted-sandboxes.md b/content/en/managed-agents/self-hosted-sandboxes.md index 9c3dd8f626..5fb1540aab 100644 --- a/content/en/managed-agents/self-hosted-sandboxes.md +++ b/content/en/managed-agents/self-hosted-sandboxes.md @@ -39,6 +39,8 @@ This quickstart runs one always-on worker with the `ant` CLI, sends it a session On [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), the worker authenticates with AWS IAM (SigV4) or an [API key generated in the AWS Console](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#api-key-authentication), not an environment key. Attach the [`AnthropicSelfHostedEnvironmentAccess`](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions#managed-policies) managed policy to the IAM principal your worker runs as. Environment keys generated in the Claude Console don't work with the Claude Platform on AWS endpoint. + + On [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), the worker authenticates with [Google Cloud credentials](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication), not an environment key. Grant the Google Cloud identity your worker uses `roles/claude.user` or `roles/claude.admin` on the project. Both roles include [`environments.processWork`](https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions#environments), which the worker needs to poll for and manage work items, and the session and skill permissions it needs to run a session. Environment keys generated in the Claude Console don't work with the Claude Models on Google Cloud (Anthropic managed) endpoint. The pre-built workers in the `ant` CLI and in the Python, TypeScript, and Go SDKs don't support Claude Models on Google Cloud (Anthropic managed), so implement your own worker that calls the [Environments Work endpoints](https://platform.claude.com/docs/en/api/beta/environments/work) directly. See [Features not supported](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#features-not-supported). ### Run your first session @@ -430,10 +432,8 @@ This quickstart runs one always-on worker with the `ant` CLI, sends it a session _, err = client.Beta.Sessions.Events.Send(context.Background(), session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "Write the output of \"uname -a\" to hello.txt in your working directory.", }, }}, diff --git a/content/en/managed-agents/session-operations.md b/content/en/managed-agents/session-operations.md index 0fe95f862f..12bc043c26 100644 --- a/content/en/managed-agents/session-operations.md +++ b/content/en/managed-agents/session-operations.md @@ -121,20 +121,16 @@ The session must be `idle` to update the agent. To update the agent while the se Agent: anthropic.BetaManagedAgentsSessionAgentUpdateParam{ Tools: []anthropic.BetaManagedAgentsSessionAgentUpdateToolUnionParam{ { - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }, { OfMCPToolset: &anthropic.BetaManagedAgentsMCPToolsetParams{ - Type: anthropic.BetaManagedAgentsMCPToolsetParamsTypeMCPToolset, MCPServerName: "linear", }, }, }, MCPServers: []anthropic.BetaManagedAgentsURLMCPServerParams{ { - Type: anthropic.BetaManagedAgentsURLMCPServerParamsTypeURL, Name: "linear", URL: "https://mcp.linear.app/sse", }, @@ -420,11 +416,15 @@ A `page` cursor is opaque and encodes the `order` of the request that produced i // Advance by passing next_page as the page cursor. var nextCursor = firstPage.response().nextPage().orElseThrow(); - var secondPage = client.beta().sessions().list(params.toBuilder().page(nextCursor).build()); + var secondPage = client.beta().sessions().list(params.toBuilder() + .page(nextCursor) + .build()); // Go back by passing prev_page as the same page cursor. var prevCursor = secondPage.response().prevPage().orElseThrow(); - var previousPage = client.beta().sessions().list(params.toBuilder().page(prevCursor).build()); + var previousPage = client.beta().sessions().list(params.toBuilder() + .page(prevCursor) + .build()); // Back on the first page, so prev_page is empty again. IO.println("prev_page: " + previousPage.response().prevPage()); // For forward-only iteration, page.autoPager() returns an Iterable that auto-follows next_page. diff --git a/content/en/managed-agents/session-threads.md b/content/en/managed-agents/session-threads.md index 916c1276e6..cf41f590ff 100644 --- a/content/en/managed-agents/session-threads.md +++ b/content/en/managed-agents/session-threads.md @@ -154,7 +154,6 @@ Send `user.interrupt` with `session_thread_id` (java: `sessionThreadId`; php: `s if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserInterrupt: &anthropic.BetaManagedAgentsUserInterruptEventParams{ - Type: anthropic.BetaManagedAgentsUserInterruptEventParamsTypeUserInterrupt, SessionThreadID: anthropic.String(thread.ID), }, }}, @@ -321,7 +320,6 @@ Archive only succeeds if the thread is `idle`. A thread parked on `requires_acti if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserInterrupt: &anthropic.BetaManagedAgentsUserInterruptEventParams{ - Type: anthropic.BetaManagedAgentsUserInterruptEventParamsTypeUserInterrupt, SessionThreadID: anthropic.String(thread.ID), }, }}, @@ -505,7 +503,9 @@ A thread's stream doesn't replay earlier events. Right after `session.thread_cre ```java Java try (var streamResponse = client.beta().sessions().threads().events().streamStreaming( thread.id(), - EventStreamParams.builder().sessionId(session.id()).build() + EventStreamParams.builder() + .sessionId(session.id()) + .build() )) { loop: for (var event : (Iterable) streamResponse.stream()::iterator) { @@ -616,8 +616,10 @@ A thread's stream doesn't replay earlier events. Right after `session.thread_cre ```java Java for (var event : client.beta().sessions().threads().events().list( thread.id(), - EventListParams.builder().sessionId(session.id()).build() - ).autoPager()) { + EventListParams.builder() + .sessionId(session.id()) + .build() + ).autoPager()) { var type = event._json().orElseThrow() instanceof JsonObject json ? json.values().get("type").asStringOrThrow() : "unknown"; @@ -731,7 +733,6 @@ The following example goes inside the event loop of the [tool confirmation handl ```go Go for _, eventID := range stopReason.EventIDs { params := anthropic.BetaManagedAgentsUserToolConfirmationEventParams{ - Type: anthropic.BetaManagedAgentsUserToolConfirmationEventParamsTypeUserToolConfirmation, ToolUseID: eventID, Result: anthropic.BetaManagedAgentsUserToolConfirmationEventParamsResultAllow, } diff --git a/content/en/managed-agents/sessions.md b/content/en/managed-agents/sessions.md index e447cf5f40..e878b2f850 100644 --- a/content/en/managed-agents/sessions.md +++ b/content/en/managed-agents/sessions.md @@ -144,7 +144,6 @@ To pin a session to a specific agent version, pass an object. This lets you cont pinnedSession, err := client.Beta.Sessions.New(ctx, anthropic.BetaSessionNewParams{ Agent: anthropic.BetaSessionNewParamsAgentUnion{ OfBetaManagedAgentsAgents: &anthropic.BetaManagedAgentsAgentParams{ - Type: anthropic.BetaManagedAgentsAgentParamsTypeAgent, ID: agent.ID, Version: anthropic.Int(1), }, @@ -310,10 +309,8 @@ The following example creates a session with a single `user.message` in `initial EnvironmentID: environment.ID, InitialEvents: []anthropic.BetaSessionNewParamsInitialEventUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "List the files in the working directory.", }, }}, @@ -531,8 +528,7 @@ The following example starts a session that overrides the model and clears the s overrideSession, err := client.Beta.Sessions.New(ctx, anthropic.BetaSessionNewParams{ Agent: anthropic.BetaSessionNewParamsAgentUnion{ OfBetaManagedAgentsAgentWithOverridess: &anthropic.BetaManagedAgentsAgentWithOverridesParams{ - Type: anthropic.BetaManagedAgentsAgentWithOverridesParamsTypeAgentWithOverrides, - ID: agent.ID, + ID: agent.ID, Model: anthropic.BetaManagedAgentsModelConfigParams{ ID: anthropic.BetaManagedAgentsModelClaudeSonnet5_5, }, @@ -571,7 +567,7 @@ The following example starts a session that overrides the model and clears the s id: $agent->id, model: ['id' => 'claude-sonnet-5-5'], ); - // Clear the system prompt for this session. Array access is load-bearing here: + // Clear the system prompt for this session. Array access is required here: // create() strips nulls from raw arrays and ::with() treats null args as omitted. $overrides['system'] = null; @@ -687,8 +683,7 @@ The following example starts a session from an agent whose model has no geo pin, session, err := client.Beta.Sessions.New(ctx, anthropic.BetaSessionNewParams{ Agent: anthropic.BetaSessionNewParamsAgentUnion{ OfBetaManagedAgentsAgentWithOverridess: &anthropic.BetaManagedAgentsAgentWithOverridesParams{ - Type: anthropic.BetaManagedAgentsAgentWithOverridesParamsTypeAgentWithOverrides, - ID: agent.ID, + ID: agent.ID, // Replaces the agent's `model` in full: restate `id`, add `inference_geo` to pin. Model: anthropic.BetaManagedAgentsModelConfigParams{ ID: anthropic.BetaManagedAgentsModelClaudeOpus5_5, @@ -827,7 +822,6 @@ The following example creates a session with a $1.25 USD budget: }, EnvironmentID: environment.ID, Budget: anthropic.BetaManagedAgentsBudgetLimitParam{ - Type: anthropic.BetaManagedAgentsBudgetLimitTypeLimit, MaxListCost: anthropic.BetaMonetaryAmountParam{ Amount: "125", Currency: anthropic.BetaCurrencyUsd, @@ -973,7 +967,7 @@ If your agent uses MCP tools that require authentication, pass `vault_ids` (java ## Starting the session -Creating a session without `initial_events` (java, php: `initialEvents`; csharp, go: `InitialEvents`) registers the session but does not start any work; the environment's sandbox begins provisioning as soon as the session is created, so the first tool call does not wait on it. To delegate a task, send events to the session using a [user event](https://platform.claude.com/docs/en/managed-agents/reference#event-types). To supply the first event in the create request instead, see [Seed the session with initial events](https://platform.claude.com/docs/en/managed-agents/sessions#seed-the-session-with-initial-events). The session acts as a state machine that tracks progress while events drive the actual execution. +Creating a session without `initial_events` (java, php: `initialEvents`; csharp, go: `InitialEvents`) registers the session but does not start any work; the environment's sandbox starts provisioning as soon as the session is created, so the first tool call does not wait on it. To delegate a task, send events to the session using a [user event](https://platform.claude.com/docs/en/managed-agents/reference#event-types). To supply the first event in the create request instead, see [Seed the session with initial events](https://platform.claude.com/docs/en/managed-agents/sessions#seed-the-session-with-initial-events). The session acts as a state machine that tracks progress while events drive the actual execution. ```bash cURL @@ -1050,10 +1044,8 @@ Creating a session without `initial_events` (java, php: `initialEvents`; csharp, if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "List the files in the working directory.", }, }}, diff --git a/content/en/managed-agents/skills.md b/content/en/managed-agents/skills.md index 4341c45168..4c6d448e70 100644 --- a/content/en/managed-agents/skills.md +++ b/content/en/managed-agents/skills.md @@ -113,7 +113,7 @@ These examples omit the optional `display_name` (java, php: `displayName`; cshar "log" "os" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) func main() { @@ -320,11 +320,9 @@ Each entry in the `skills` (csharp, go: `Skills`) array uses the following field Skills: []anthropic.BetaManagedAgentsSkillParamsUnion{ {OfAnthropic: &anthropic.BetaManagedAgentsAnthropicSkillParams{ SkillID: "xlsx", - Type: anthropic.BetaManagedAgentsAnthropicSkillParamsTypeAnthropic, }}, {OfCustom: &anthropic.BetaManagedAgentsCustomSkillParams{ SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", - Type: anthropic.BetaManagedAgentsCustomSkillParamsTypeCustom, Version: anthropic.String("latest"), }}, }, @@ -515,7 +513,6 @@ To load skills from a repository, create a session that mounts it. This is the s Resources: []anthropic.BetaSessionNewParamsResourceUnion{ { OfGitHubRepository: &anthropic.BetaManagedAgentsGitHubRepositoryResourceParams{ - Type: anthropic.BetaManagedAgentsGitHubRepositoryResourceParamsTypeGitHubRepository, URL: "https://github.com/org/repo", MountPath: anthropic.String("/workspace/repo"), AuthorizationToken: "ghp_your_github_token", diff --git a/content/en/managed-agents/tools-web-restrictions.md b/content/en/managed-agents/tools-web-restrictions.md index fd7694e499..d9bd69fdce 100644 --- a/content/en/managed-agents/tools-web-restrictions.md +++ b/content/en/managed-agents/tools-web-restrictions.md @@ -221,7 +221,6 @@ The following example creates an agent that limits `web_search` to two sites and }, Tools: []anthropic.BetaAgentNewParamsToolUnion{{ OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{ {OfWebSearch: &anthropic.BetaManagedAgentsWebSearchToolConfigParams{ AllowedDomains: []string{"docs.example.com", "arxiv.org"}, @@ -392,7 +391,7 @@ For the types the SDK uses for these entries, see [Config entry types in the SDK These rules apply to `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) and `blocked_domains` (java, php: `blockedDomains`; csharp, go: `BlockedDomains`) alike. A request that breaks one is rejected, as [Validation errors](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions#validation-errors) describes. -* **One list for each entry:** Set either `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) or `blocked_domains` (java, php: `blockedDomains`; csharp, go: `BlockedDomains`) on an entry, not both. +* **At most one list on an entry:** Set either `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) or `blocked_domains` (java, php: `blockedDomains`; csharp, go: `BlockedDomains`) on an entry, not both. * **List size:** Each list holds 1 to 64 domains, each 1 to 255 characters. * **No empty lists:** To apply no restriction, omit the field or send `null`. * **No duplicates:** A domain can appear only once in a list. `www.example.com` and `example.com` count as different domains. @@ -481,7 +480,7 @@ A listed agent can therefore narrow what a tool reaches but never widen it: A `{"type": "self"}` entry in the `predefined_agents` (java, php: `predefinedAgents`; csharp, go: `PredefinedAgents`) list of `subagents` (csharp, go: `Subagents`) has no web settings of its own and follows the current settings of the session's agent. -If the combined `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) lists have no domain in common, the tool stays available to that agent, but every call fails. Each call returns a `url_not_allowed` error stating that no domain is allowed. The tool description tells the model the same. To avoid this, keep each listed agent's `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) inside the `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) of the session's agent. +If the combined `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) lists have no domain in common, the tool stays available to that agent, but every call fails. Each call returns a `url_not_allowed` error whose text includes `no domain is permitted`. The tool description tells the model the same. To avoid this, keep each listed agent's `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) inside the `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) of the session's agent. The grader in [outcome-driven sessions](https://platform.claude.com/docs/en/managed-agents/define-outcomes) runs without `web_search` and `web_fetch`, regardless of these settings. diff --git a/content/en/managed-agents/tools.md b/content/en/managed-agents/tools.md index 329da6a0da..974981d047 100644 --- a/content/en/managed-agents/tools.md +++ b/content/en/managed-agents/tools.md @@ -136,7 +136,6 @@ The following example enables the toolset and disables `web_fetch`: }, Tools: []anthropic.BetaAgentNewParamsToolUnion{{ OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{{ OfWebFetch: &anthropic.BetaManagedAgentsWebFetchToolConfigParams{ Enabled: anthropic.Bool(false), @@ -387,12 +386,9 @@ The following example creates an agent with the built-in toolset and one custom ID: anthropic.BetaManagedAgentsModelClaudeOpus5_5, }, Tools: []anthropic.BetaAgentNewParamsToolUnion{{ - OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ - Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - }, + OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{}, }, { OfCustom: &anthropic.BetaManagedAgentsCustomToolParams{ - Type: anthropic.BetaManagedAgentsCustomToolParamsTypeCustom, Name: "get_weather", Description: "Get current weather for a location", InputSchema: anthropic.BetaManagedAgentsCustomToolInputSchemaParam{ diff --git a/content/en/managed-agents/vaults.md b/content/en/managed-agents/vaults.md index 77f33a93a2..ab82530bde 100644 --- a/content/en/managed-agents/vaults.md +++ b/content/en/managed-agents/vaults.md @@ -273,7 +273,6 @@ To get the same behavior with a self-hosted sandbox, you can run your own proxy DisplayName: anthropic.String("Alice's Slack"), Auth: anthropic.BetaVaultCredentialNewParamsAuthUnion{ OfMCPOAuth: &anthropic.BetaManagedAgentsMCPOAuthCreateParams{ - Type: anthropic.BetaManagedAgentsMCPOAuthCreateParamsTypeMCPOAuth, MCPServerURL: "https://mcp.slack.com/mcp", AccessToken: "xoxp-...", ExpiresAt: anthropic.Time(time.Date(2099, time.December, 31, 23, 59, 59, 0, time.UTC)), @@ -284,7 +283,6 @@ To get the same behavior with a self-hosted sandbox, you can run your own proxy RefreshToken: "xoxe-1-...", TokenEndpointAuth: anthropic.BetaManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion{ OfClientSecretPost: &anthropic.BetaManagedAgentsTokenEndpointAuthPostParam{ - Type: anthropic.BetaManagedAgentsTokenEndpointAuthPostParamTypeClientSecretPost, ClientSecret: "abc123...", }, }, @@ -436,7 +434,6 @@ To get the same behavior with a self-hosted sandbox, you can run your own proxy DisplayName: anthropic.String("Linear API key"), Auth: anthropic.BetaVaultCredentialNewParamsAuthUnion{ OfStaticBearer: &anthropic.BetaManagedAgentsStaticBearerCreateParams{ - Type: anthropic.BetaManagedAgentsStaticBearerCreateParamsTypeStaticBearer, MCPServerURL: "https://mcp.linear.app/mcp", Token: "lin_api_your_linear_key", }, @@ -604,12 +601,10 @@ To get the same behavior with a self-hosted sandbox, you can run your own proxy DisplayName: anthropic.String("Notion API key for sandbox"), Auth: anthropic.BetaVaultCredentialNewParamsAuthUnion{ OfEnvironmentVariable: &anthropic.BetaManagedAgentsEnvironmentVariableCreateParams{ - Type: anthropic.BetaManagedAgentsEnvironmentVariableCreateParamsTypeEnvironmentVariable, SecretName: "NOTION_API_KEY", SecretValue: "ntn_your-secret-here", Networking: anthropic.BetaManagedAgentsCredentialNetworkingParamsUnion{ OfLimited: &anthropic.BetaManagedAgentsLimitedCredentialNetworkingParams{ - Type: anthropic.BetaManagedAgentsLimitedCredentialNetworkingParamsTypeLimited, AllowedHosts: []string{"api.notion.com"}, }, }, @@ -911,7 +906,6 @@ Secret values, `display_name` (java, php: `displayName`; csharp, go: `DisplayNam VaultID: vault.ID, Auth: anthropic.BetaVaultCredentialUpdateParamsAuthUnion{ OfMCPOAuth: &anthropic.BetaManagedAgentsMCPOAuthUpdateParams{ - Type: anthropic.BetaManagedAgentsMCPOAuthUpdateParamsTypeMCPOAuth, AccessToken: anthropic.String("xoxp-new-..."), ExpiresAt: anthropic.Time(time.Date(2099, time.December, 31, 23, 59, 59, 0, time.UTC)), Refresh: anthropic.BetaManagedAgentsMCPOAuthRefreshUpdateParams{ diff --git a/content/en/managed-agents/webhooks.md b/content/en/managed-agents/webhooks.md index c9164eb815..df583b4075 100644 --- a/content/en/managed-agents/webhooks.md +++ b/content/en/managed-agents/webhooks.md @@ -213,7 +213,7 @@ Set `ANTHROPIC_WEBHOOK_SIGNING_KEY` to the `whsec_`-prefixed secret shown at end "io" "net/http" - "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/v2" ) var client = anthropic.NewClient() // reads ANTHROPIC_WEBHOOK_SIGNING_KEY from env diff --git a/content/en/managed-agents/workflow-runs.md b/content/en/managed-agents/workflow-runs.md index 3622af5c0e..4276e2292b 100644 --- a/content/en/managed-agents/workflow-runs.md +++ b/content/en/managed-agents/workflow-runs.md @@ -59,7 +59,7 @@ Run events arrive on the session's event stream, which is the primary thread's s | Event | When it arrives | What to do | | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `workflow_run.created` | The agent started a run. Includes `workflow_run_id` (java: `workflowRunId`; php: `workflowRunID`; csharp, go: `WorkflowRunID`) (`wrun_…`), the run's `name` (csharp, go: `Name`) and `description` (csharp, go: `Description`), and `phases` (csharp, go: `Phases`), the phases the workflow declares, each with an `id` (csharp, go: `ID`), a `name` (csharp, go: `Name`), and a `description` (csharp, go: `Description`). A `description` (csharp, go: `Description`) is `null` (python: `None`; ruby: `nil`; java: `Optional.empty()`; go: `""`) when the workflow gives none. `phases` (csharp, go: `Phases`) is always present and can be empty. The run's and phases' `name` (csharp, go: `Name`) and `description` (csharp, go: `Description`) are text the model wrote, so they can repeat words from your request. A run's `name` (csharp, go: `Name`) can also be one the server assigned. | Track the run as open. Show its `name` (csharp, go: `Name`), and progress against `phases` (csharp, go: `Phases`). | -| `workflow_run.status_running` | When the run starts running, which can be a while after `created`, and each time it resumes after a pause at the budget. A resume after an interrupt might not send it. A run that starts idle might get `workflow_run.status_idle` first. | Show the run as running. | +| `workflow_run.status_running` | When the run starts its work, which can be a while after `created`, and each time it resumes after a pause at the budget. A resume after an interrupt might not send it. A run that starts idle might get `workflow_run.status_idle` first. | Show the run as running. | | `workflow_run.status_idle` | The run was paused, for example at the session's budget. The event doesn't say why. A pause after an interrupt might not send it. | To continue, see [Cost and budgets](https://platform.claude.com/docs/en/managed-agents/workflow-runs#cost-and-budgets) or [Interrupt a session with runs open](https://platform.claude.com/docs/en/managed-agents/workflow-runs#interrupt-a-session-with-runs-open). | | `workflow_run.phase_started`, `workflow_run.phase_ended` | The workflow entered or left a phase, or the run's end closed a phase that was still open. The end event doesn't say whether the phase's work completed. Both include `workflow_run_phase_id` (java: `workflowRunPhaseId`; php: `workflowRunPhaseID`; csharp, go: `WorkflowRunPhaseID`). The end also has `phase_started_id` (java: `phaseStartedId`; php: `phaseStartedID`; csharp, go: `PhaseStartedID`), the `id` (csharp, go: `ID`) of the start event it closes. Neither has the phase's name: look it up by `workflow_run_phase_id` (java: `workflowRunPhaseId`; php: `workflowRunPhaseID`; csharp, go: `WorkflowRunPhaseID`) in the `phases` (csharp, go: `Phases`) of `workflow_run.created`. | Update progress. Phases run one at a time, in the order of `phases` (csharp, go: `Phases`), each at most once, but the API doesn't guarantee it. Match a phase's end to its start by `phase_started_id` (java: `phaseStartedId`; php: `phaseStartedID`; csharp, go: `PhaseStartedID`). Handle more than one open phase, a phase that isn't in `phases` (csharp, go: `Phases`), and a listed phase that never starts, even in a run that completes. Every phase that starts also ends, before the run's `workflow_run.status_ended`. | | `workflow_run.status_ended` | The run ended. Always the last of the run's `workflow_run.*` events. Includes `result` (csharp, go: `Result`). | Read `result` (csharp, go: `Result`) (next table). The agent then gets a turn to read how the run ended. At the budget, or while the primary thread waits on your client, that turn comes later. After an interrupt, that turn might not come: send a `user.message`, or read `result` (csharp, go: `Result`) yourself. After an archive or termination, it doesn't come. | @@ -444,10 +444,8 @@ This sample follows a session from your message to the agent's answer. It opens if _, err := client.Beta.Sessions.Events.Send(ctx, sessionID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{ - Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage, Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: "Which contracts in /contracts have a change-of-control clause?", }, }}, @@ -486,11 +484,9 @@ This sample follows a session from your message to the agent's answer. It opens if _, err := client.Beta.Sessions.Events.Send(ctx, sessionID, anthropic.BetaSessionEventSendParams{ Events: []anthropic.BetaManagedAgentsEventParamsUnion{{ OfUserCustomToolResult: &anthropic.BetaManagedAgentsUserCustomToolResultEventParams{ - Type: anthropic.BetaManagedAgentsUserCustomToolResultEventParamsTypeUserCustomToolResult, CustomToolUseID: event.ID, Content: []anthropic.BetaManagedAgentsUserCustomToolResultEventParamsContentUnion{{ OfText: &anthropic.BetaManagedAgentsTextBlockParam{ - Type: anthropic.BetaManagedAgentsTextBlockTypeText, Text: result, }, }}, diff --git a/content/en/models/fable-5-1/migration-guide.md b/content/en/models/fable-5-1/migration-guide.md index 3af989f2fc..a06f62a3a1 100644 --- a/content/en/models/fable-5-1/migration-guide.md +++ b/content/en/models/fable-5-1/migration-guide.md @@ -20,7 +20,7 @@ description: Switch to Claude Fable 5.1 and Claude Mythos 5.1 from Claude Fable The skill applies the model ID swap and, as needed, breaking parameter changes, prefill replacement, and effort calibration for your target model across your code base, then produces a checklist of items to verify manually. It asks you to confirm the migration scope (entire working directory, a subdirectory, or a specific file list) before editing any files. The skill also detects Amazon Bedrock and Claude Platform on AWS clients and adjusts model ID formats and feature changes for those platforms. -[Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1) succeeds Claude Fable 5 at the same input and output prices, with cache reads at a quarter of the cost. It's available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview) shares the same capabilities and is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). For behavioral differences and prompting patterns, see [Prompting Claude Fable 5.1](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1). +[Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1) succeeds Claude Fable 5 at the same input and output prices, with cache reads at a quarter of the cost. It's available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview) shares the same capabilities and is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). For behavioral differences and prompting patterns, see [Prompting Claude Fable 5.1](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1). The baseline settings shared by `claude-fable-5-1` and `claude-mythos-5-1`: @@ -28,9 +28,9 @@ The baseline settings shared by `claude-fable-5-1` and `claude-mythos-5-1`: * **Prefill:** Prefilling the assistant message returns a 400 error, unchanged from Claude Fable 5. Use system prompt instructions instead. * **Tool choice:** `{type: "auto"}` (the default) and `{type: "none"}` are supported. Forcing a tool call with `{type: "any"}` or `{type: "tool", name: "..."}` returns a 400 error. See [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes). * **Preserved thinking across models:** Claude Fable 5.1 reads thinking blocks from Claude Opus 5, Claude Fable 5, Claude Mythos 5, and earlier Claude models. None of those models can read Claude Fable 5.1's blocks. See [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes). -* **Context window and output:** A [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, and up to 128k output tokens per request. +* **Context window and output:** A [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, and up to 128k output tokens for each request. * **Pricing:** $10 USD per million input tokens and $50 USD per million output tokens, the same as Claude Fable 5. Prompt cache reads are $0.25 USD per million tokens, a quarter of the Claude Fable 5 rate. See [Claude pricing](https://platform.claude.com/docs/en/about-claude/pricing). -* **Data retention:** Both models require 30-day data retention, aren't available under zero data retention (ZDR) arrangements unless expressly authorized by Anthropic, and are designated Covered Models, the same as Claude Fable 5 and Claude Mythos 5. On the Claude API, a request from an organization or workspace without 30-day retention returns a 400 `invalid_request_error`. Organizations with a ZDR arrangement should contact their Anthropic account team, or configure retention per workspace. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements) for per-platform details. +* **Data retention:** Both models require 30-day data retention, aren't available under zero data retention (ZDR) arrangements unless expressly authorized by Anthropic, and are designated Covered Models, the same as Claude Fable 5 and Claude Mythos 5. On the Claude API, a request from an organization or workspace without 30-day retention returns a 400 `invalid_request_error`. Organizations with a ZDR arrangement should contact their Anthropic account team, or configure retention for individual workspaces. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements) for per-platform details. * **Priority Tier:** Neither model is supported on [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models). Claude Fable 5 is. Where the two models diverge: @@ -254,7 +254,7 @@ model = "claude-mythos-5-1" # After messages: [ ['role' => 'user', 'content' => 'Summarize: The meeting moved to Thursday.'] ], - model: 'claude-fable-5', + model: Model::CLAUDE_FABLE_5, toolChoice: ['type' => 'tool', 'name' => 'record_summary'], tools: [ [ @@ -794,12 +794,11 @@ model = "claude-mythos-5-1" # After // The application requires a help center lookup before any policy // answer. Appending the requirement as a system message leaves the // earlier turns unchanged. - { - Role: anthropic.MessageParamRoleSystem, - Content: []anthropic.ContentBlockParamUnion{ - anthropic.NewTextBlock("Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."), + {OfSystem: &anthropic.SystemMessageParam{ + Content: []anthropic.TextBlockParam{ + {Text: "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."}, }, - }, + }}, }, }) if err != nil { @@ -1373,10 +1372,9 @@ These changes aren't required, but each one lowers cost or latency or removes a }, Messages: []anthropic.BetaMessageParam{ anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Plan a migration from SQLite to PostgreSQL in three short steps.")), - { - Role: anthropic.BetaMessageParamRoleAssistant, + {OfAssistant: &anthropic.BetaAssistantMessageParam{ Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")}, - }, + }}, // Effort-only system message: the new level takes effect from the next user turn. anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{ Effort: anthropic.BetaSystemMessageOutputConfigEffortLow, @@ -1493,9 +1491,9 @@ These changes aren't required, but each one lowers cost or latency or removes a Placed between an `assistant` turn and the next `user` turn, as here, the message takes effect from that `user` turn. Placed directly after a `user` turn with new input, it sets the level for Claude's reply to that turn. A `user` turn that holds only tool results doesn't count as new input: the change waits for the next `user` turn with new input. The level then holds until another `role: "system"` message changes it. Only the named levels are accepted (`low`, `medium`, `high`, `xhigh`, `max`), and the `mid-conversation-output-config-2026-07-01` beta header is required. See [Per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta). -2. **Change instructions and tools with mid-conversation system messages:** To change instructions or tools partway through a session, append a [`role: "system"` message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), with `tool_addition` and `tool_removal` blocks for tool changes (beta header `inline-tools-2026-09-15` on the Claude API). A `tool_addition` block can name a tool declared in `tools` at session start or [carry the tool's full definition](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#define-tools-in-a-message-beta), so a tool that is unknown at session start doesn't need to be in `tools`. This preserves prompt cache hits on earlier turns and keeps the conversation history append-only. The older `mid-conversation-tool-changes-2026-07-01` header still works for changes that name a tool by reference, on the Claude API, Amazon Bedrock, and Google Cloud. The same message replaces forced `tool_choice` when a specific tool must run on the current turn (see [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes)). For a reminder that applies to one turn only, send it as a separate text-only `role: "system"` message with `clear_at: "next_user_message"` ([turn-scoped system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages), beta header `mid-conversation-system-clear-at-2026-08-21`) and leave it in the history: it stops rendering after the next user message and costs no tokens once cleared. A message that carries `tool_addition` or `tool_removal` blocks can't be turn-scoped. +2. **Change instructions and tools with mid-conversation system messages:** To change instructions or tools partway through a session, append a [`role: "system"` message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), with `tool_addition` and `tool_removal` blocks for tool changes (beta header `inline-tools-2026-09-15` on the Claude API). A `tool_addition` block can name a tool declared in `tools` at session start or [carry the tool's full definition](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#define-tools-in-a-message-beta), so a tool that is unknown at session start doesn't need to be in `tools`. This preserves prompt cache hits on earlier turns and keeps the conversation history append-only. The older `mid-conversation-tool-changes-2026-07-01` header still works for changes that name a tool by reference, on the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed). The same message replaces forced `tool_choice` when a specific tool must run on the current turn (see [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes)). For a reminder that applies to one turn only, send it as a separate text-only `role: "system"` message with `clear_at: "next_user_message"` ([turn-scoped system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages), beta header `mid-conversation-system-clear-at-2026-08-21`) and leave it in the history: it stops rendering after the next user message and costs no tokens once cleared. A message that carries `tool_addition` or `tool_removal` blocks can't be turn-scoped. -3. **Use `fallbacks: "default"` for refusals:** Keep handling `stop_reason: "refusal"` and reading `stop_details.category` before response content. To re-run refused requests on another model automatically, set `fallbacks: "default"` (beta, `server-side-fallback-2026-07-01` header). `"default"` retries a declined request on the model Anthropic recommends for that category. The permitted fallback targets for Claude Fable 5.1 are Claude Opus 4.8 (`claude-opus-4-8`) and Claude Opus 5 (`claude-opus-5`). An explicit `fallbacks` list may name either. The fallback model doesn't receive Claude Fable 5.1's thinking blocks. The `fallbacks` parameter isn't available on Amazon Bedrock, Google Cloud, or Microsoft Foundry. On those platforms, use [client-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) instead. If you build the retry yourself, [fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) applies on the same terms as Claude Fable 5. See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback). +3. **Use `fallbacks: "default"` for refusals:** Keep handling `stop_reason: "refusal"` and reading `stop_details.category` before response content. To re-run refused requests on another model automatically, set `fallbacks: "default"` (beta, `server-side-fallback-2026-07-01` header). `"default"` retries a declined request on the model Anthropic recommends for that category. The permitted fallback targets for Claude Fable 5.1 are Claude Opus 4.8 (`claude-opus-4-8`) and Claude Opus 5 (`claude-opus-5`). An explicit `fallbacks` list may name either. The fallback model doesn't receive Claude Fable 5.1's thinking blocks. The `fallbacks` parameter isn't available on Amazon Bedrock, Claude Models on Google Cloud (Google managed), or Microsoft Foundry. On those platforms, use [client-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) instead. If you build the retry yourself, [fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) applies on the same terms as Claude Fable 5. See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback). 4. **Start at `high` effort and sweep:** The [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) default is `high`, and all five levels are supported. Keep the Claude Fable 5 guidance: `high` for most work, and `medium` as a cost control worth testing. Claude Fable 5.1's gains over Claude Fable 5 are largest at `xhigh` and `max`, but those levels also add thinking time and time-to-first-response, so step up to them for the most capability-sensitive tasks and where your evals show the gain. Run a fresh sweep on your own evals rather than carrying over a setting tuned for Claude Fable 5. See [Recommended effort levels for Claude Fable 5.1](https://platform.claude.com/docs/en/build-with-claude/effort#recommended-effort-levels-for-claude-fable-5-1). diff --git a/content/en/models/fable-5-1/overview.md b/content/en/models/fable-5-1/overview.md index ff09e21576..5f84b107e5 100644 --- a/content/en/models/fable-5-1/overview.md +++ b/content/en/models/fable-5-1/overview.md @@ -47,13 +47,14 @@ If you already call Claude Fable 5, four changes are breaking: [forced tool use ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :--------------------------- | -| Claude API | `claude-fable-5-1` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5-1` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-fable-5-1` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5-1` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5-1` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------- | +| Claude API | `claude-fable-5-1` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5-1` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-fable-5-1` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5-1` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5-1` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-fable-5-1` | ### Pricing @@ -83,12 +84,12 @@ If you already call Claude Fable 5, four changes are breaking: [forced tool use ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (latest) | -| Released | September 1, 2026 | -| Retirement | Not sooner than September 1, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (latest) | +| Released | September 1, 2026 | +| Retirement | Not sooner than September 1, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Resources diff --git a/content/en/models/fable-5-1/whats-new-fable-5-1.md b/content/en/models/fable-5-1/whats-new-fable-5-1.md index 3800cca7cf..4a524d0b41 100644 --- a/content/en/models/fable-5-1/whats-new-fable-5-1.md +++ b/content/en/models/fable-5-1/whats-new-fable-5-1.md @@ -69,7 +69,7 @@ With the [advisor tool](https://platform.claude.com/docs/en/agents-and-tools/too ### Change effort mid-conversation (beta) -On Claude Fable 5.1 you can change the [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level mid-conversation without invalidating the prompt cache. Raise it for a hard step and lower it for routine ones. Per-message effort is in beta: include the `mid-conversation-output-config-2026-07-01` beta header. Claude Fable 5.1 and Claude Mythos 5.1 support it on the Claude API, Google Cloud, and Amazon Bedrock. To use it with Claude Fable 5.1 through the Amazon Bedrock [InvokeModel API](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), send that value in the `anthropic_beta` array of the request body instead. For the other models that support it and the platforms for each, see [Change effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#changing-effort-mid-conversation). +On Claude Fable 5.1 you can change the [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level mid-conversation without invalidating the prompt cache. Raise it for a hard step and lower it for routine ones. Per-message effort is in beta: include the `mid-conversation-output-config-2026-07-01` beta header. Claude Fable 5.1 and Claude Mythos 5.1 support it on the Claude API, Claude Models on Google Cloud (Google managed), and Amazon Bedrock. To use it with Claude Fable 5.1 through the Amazon Bedrock [InvokeModel API](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), send that value in the `anthropic_beta` array of the request body instead. For the other models that support it and the platforms for each, see [Change effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#changing-effort-mid-conversation). ```bash cURL @@ -220,10 +220,9 @@ On Claude Fable 5.1 you can change the [effort](https://platform.claude.com/docs }, Messages: []anthropic.BetaMessageParam{ anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Plan a migration from SQLite to PostgreSQL in three short steps.")), - { - Role: anthropic.BetaMessageParamRoleAssistant, + {OfAssistant: &anthropic.BetaAssistantMessageParam{ Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")}, - }, + }}, // Effort-only system message: the new level takes effect from the next user turn. anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{ Effort: anthropic.BetaSystemMessageOutputConfigEffortLow, @@ -399,7 +398,7 @@ Claude Fable 5.1 improves on Claude Fable 5, and the gap is widest at higher [ef * **Long-context work**, reasoning over and connecting details across the full [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) * **Computer use**, operating a browser and desktop applications more reliably and recovering from failed steps -Multilingual performance is comparable to Claude Fable 5. +Multilingual performance is at the same level as Claude Fable 5's. ## Refusals, fallback, and billing @@ -425,10 +424,10 @@ Cache reads (hits and refreshes) cost 0.025 times the base input price on these Claude Fable 5.1 is available on: -* **Claude API:** all customers, as `claude-fable-5-1`. -* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-fable-5-1`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-fable-5-1`. -* **Google Cloud:** [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), as `claude-fable-5-1`. -* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), on Anthropic infrastructure. +* **Claude API:** all customers, as `claude-fable-5-1` +* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-fable-5-1`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-fable-5-1` +* **Google Cloud:** [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), as `claude-fable-5-1`, and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), as `claude-fable-5-1` +* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), on Anthropic infrastructure Claude Mythos 5.1 is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). To request access, apply to the program that covers your use case, or contact your Anthropic, AWS, or Google Cloud account team. diff --git a/content/en/models/fable-5/overview.md b/content/en/models/fable-5/overview.md index df02fc4988..f522df7165 100644 --- a/content/en/models/fable-5/overview.md +++ b/content/en/models/fable-5/overview.md @@ -39,13 +39,14 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $10 / MTo ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :------------------------- | -| Claude API | `claude-fable-5` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-fable-5` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------- | +| Claude API | `claude-fable-5` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-fable-5` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-fable-5` | ### Pricing @@ -74,12 +75,12 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $10 / MTo ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | -| Released | June 9, 2026 | -| Retirement | Not sooner than June 9, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | +| Released | June 9, 2026 | +| Retirement | Not sooner than June 9, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Resources diff --git a/content/en/models/haiku-4-5/overview.md b/content/en/models/haiku-4-5/overview.md index 34d0c94e68..f8fc7f2201 100644 --- a/content/en/models/haiku-4-5/overview.md +++ b/content/en/models/haiku-4-5/overview.md @@ -35,15 +35,16 @@ Context window: 200K tokens · Max output: 64K tokens · Input pricing: $1 / MTo ### Model IDs -| Platform | Model ID | -| :-------------------------------------------------------------------------------------------------------------------- | :----------------------------------------- | -| Claude API | `claude-haiku-4-5-20251001` | -| Claude API alias | `claude-haiku-4-5` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-haiku-4-5` | -| [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | `anthropic.claude-haiku-4-5-20251001-v1:0` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-haiku-4-5@20251001` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-haiku-4-5` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-haiku-4-5` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------- | +| Claude API | `claude-haiku-4-5-20251001` | +| Claude API alias | `claude-haiku-4-5` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-haiku-4-5` | +| [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | `anthropic.claude-haiku-4-5-20251001-v1:0` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-haiku-4-5@20251001` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-haiku-4-5` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-haiku-4-5` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-haiku-4-5-20251001` | ### Pricing @@ -72,12 +73,12 @@ Context window: 200K tokens · Max output: 64K tokens · Input pricing: $1 / MTo ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | -| Released | October 15, 2025 | -| Retirement | Not sooner than October 15, 2026 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | +| Released | October 15, 2025 | +| Retirement | Not sooner than October 15, 2026 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Good to know diff --git a/content/en/models/haiku-5-5/migration-guide.md b/content/en/models/haiku-5-5/migration-guide.md index 779dced829..19c2b1fd06 100644 --- a/content/en/models/haiku-5-5/migration-guide.md +++ b/content/en/models/haiku-5-5/migration-guide.md @@ -34,7 +34,7 @@ Work down the groups and stop after the one that names your current model. If yo 4. If your code reads the first content block as the answer, select blocks by `type` instead. See [Configure thinking](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#configure-thinking). 5. Remove `temperature`, `top_p`, and `top_k` from your requests. See [Remove sampling parameters](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#remove-sampling-parameters). 6. If your requests end `messages` with an assistant turn for the model to continue, end them with a user turn instead. See [Replace assistant prefill](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#replace-assistant-prefill). -7. If you use computer use, replace `computer_20250124`: on the Claude API and Google Cloud, with the `computer_toolset_20260801` toolset; on Amazon Bedrock, with `computer_20251124` and the `computer-use-2025-11-24` beta header. See [Move computer use to the toolset](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#computer-use-toolset). +7. If you use computer use, replace `computer_20250124`: on the Claude API and Claude Models on Google Cloud (Google managed), with the `computer_toolset_20260801` toolset; on Amazon Bedrock, with `computer_20251124` and the `computer-use-2025-11-24` beta header. See [Move computer use to the toolset](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#computer-use-toolset). 8. If you replay stored conversations through a different account, replay each one through the account that produced it. See [Replay thinking blocks through the account that produced them](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#replay-thinking-blocks-through-the-producing-account). 9. If your code changes `system`, `tools`, or earlier `messages` between requests in a conversation and sends thinking blocks back, keep the conversation append-only. See [Keep earlier turns unchanged](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#keep-earlier-turns-unchanged). 10. Handle `stop_reason: "refusal"`. Claude Haiku 5.5 runs safety classifiers that can decline a request, and it has no server-side fallback. See [Safeguard refusals](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5#safeguard-refusals). @@ -54,13 +54,13 @@ If your organization has a [Priority Tier](https://platform.claude.com/docs/en/a Replace the Claude Haiku 4.5 model ID with the Claude Haiku 5.5 ID for your platform. -| Platform | Claude Haiku 4.5 | Claude Haiku 5.5 | -| ---------------------- | ------------------------------------------------- | ---------------------------- | -| Claude API | `claude-haiku-4-5-20251001` or `claude-haiku-4-5` | `claude-haiku-5-5` | -| Amazon Bedrock | `anthropic.claude-haiku-4-5` | `anthropic.claude-haiku-5-5` | -| Claude Platform on AWS | `claude-haiku-4-5` | `claude-haiku-5-5` | -| Google Cloud | `claude-haiku-4-5@20251001` | `claude-haiku-5-5` | -| Microsoft Foundry | `claude-haiku-4-5` | `claude-haiku-5-5` | +| Platform | Claude Haiku 4.5 | Claude Haiku 5.5 | +| ---------------------------------------------- | ------------------------------------------------- | ---------------------------- | +| Claude API | `claude-haiku-4-5-20251001` or `claude-haiku-4-5` | `claude-haiku-5-5` | +| Amazon Bedrock | `anthropic.claude-haiku-4-5` | `anthropic.claude-haiku-5-5` | +| Claude Platform on AWS | `claude-haiku-4-5` | `claude-haiku-5-5` | +| Claude Models on Google Cloud (Google managed) | `claude-haiku-4-5@20251001` | `claude-haiku-5-5` | +| Microsoft Foundry | `claude-haiku-4-5` | `claude-haiku-5-5` | `claude-haiku-5-5` is a fixed model ID with no date suffix and no separate alias. @@ -114,7 +114,7 @@ By default, Claude Haiku 5.5 returns each `thinking` block with an empty `thinki Claude Haiku 5.5 accepts a forced `tool_choice` (`any` or a named tool), but the response starts with the tool call and has no `thinking` block. To let the model think before it calls a tool, use `tool_choice: {"type": "auto"}` and say in the prompt when to use the tool. -Claude Haiku 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, so a conversation you switch from Claude Haiku 4.5 onto Claude Haiku 5.5 keeps its reasoning. It doesn't read blocks from Claude Opus 5, Claude Opus 5.5, Claude Sonnet 5.5, or any Claude Fable or Claude Mythos model; the API drops those without an error. On the Claude API and Google Cloud, Claude Opus 5.5 and Claude Sonnet 5.5 read Claude Haiku 5.5's blocks. See [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models). +Claude Haiku 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, so a conversation you switch from Claude Haiku 4.5 onto Claude Haiku 5.5 keeps its reasoning. It doesn't read blocks from Claude Opus 5, Claude Opus 5.5, Claude Sonnet 5.5, or any Claude Fable or Claude Mythos model; the API drops those without an error. On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 and Claude Sonnet 5.5 read Claude Haiku 5.5's blocks. See [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models). ## Remove sampling parameters @@ -131,11 +131,11 @@ A prefill is a final assistant turn in `messages` that the model continues. Clau ## Move computer use to the toolset -Claude Haiku 4.5 supports [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) through the `computer_20250124` tool, with the `computer-use-2025-01-24` beta header. On the Claude API and Google Cloud, Claude Haiku 5.5 supports computer use only through the `computer_toolset_20260801` toolset, and a request that declares `computer_20250124` returns a 400 error. On Amazon Bedrock, Claude Haiku 5.5 doesn't accept `computer_20250124` either; use the `computer_20251124` tool version with the `computer-use-2025-11-24` beta header. +Claude Haiku 4.5 supports [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) through the `computer_20250124` tool, with the `computer-use-2025-01-24` beta header. On the Claude API and Claude Models on Google Cloud (Google managed), Claude Haiku 5.5 supports computer use only through the `computer_toolset_20260801` toolset, and a request that declares `computer_20250124` returns a 400 error. On Amazon Bedrock, Claude Haiku 5.5 doesn't accept `computer_20250124` either; use the `computer_20251124` tool version with the `computer-use-2025-11-24` beta header. To move an integration to the toolset, drop the `computer-use-2025-01-24` beta header and replace the `tools` entry with `{"type": "computer_toolset_20260801"}`. Then make the other request and agent-loop changes in [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124): dispatch on each member `tool_use` block's `name` and `toolset_name` rather than on `input.action`, handle every such block in a turn, and echo `toolset_name` on results. Zoom is on by default in the toolset; if your environment doesn't implement it, add `"configs": {"zoom": {"enabled": false}}`. If you send the `fine-grained-tool-streaming-2025-05-14` beta header, remove it. Alongside a toolset entry, it returns a 400 error. For other platforms, see the computer use tool's [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) section. -On the Claude API and Google Cloud, Claude Haiku 5.5 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) (`browser_toolset_20260801`) for tasks inside webpages. Claude Haiku 4.5 doesn't support it. +On the Claude API and Claude Models on Google Cloud (Google managed), Claude Haiku 5.5 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) (`browser_toolset_20260801`) for tasks inside webpages. Claude Haiku 4.5 doesn't support it. ## Replay thinking blocks through the account that produced them @@ -147,11 +147,11 @@ A Claude Haiku 5.5 thinking block stays valid only while everything sent before ## Migrating to Claude Haiku 5.5 from Claude Haiku 3.5 and earlier Haiku models -Claude Haiku 3.5 is retired on the Claude API and Amazon Bedrock, and Claude Haiku 3 is retired on the Claude API and Google Cloud. Requests to a retired model fail. Google Cloud lists Claude Haiku 3.5 as deprecated and available only to existing customers. See [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations). +Claude Haiku 3.5 is retired on the Claude API and Amazon Bedrock, and Claude Haiku 3 is retired on the Claude API and Claude Models on Google Cloud (Google managed). Requests to a retired model fail. Claude Models on Google Cloud (Google managed) lists Claude Haiku 3.5 as deprecated and available only to existing customers. See [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations). From either model, first apply every preceding section, then these changes: -* **Model ID:** Replace `claude-3-5-haiku-20241022`, its alias `claude-3-5-haiku-latest`, or `claude-3-haiku-20240307` with `claude-haiku-5-5`. On Google Cloud, replace `claude-3-5-haiku@20241022` with `claude-haiku-5-5`. On Amazon Bedrock, use the Claude Haiku 5.5 ID from [Use the Claude Haiku 5.5 model ID](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#use-the-claude-haiku-5-5-model-id). +* **Model ID:** Replace `claude-3-5-haiku-20241022`, its alias `claude-3-5-haiku-latest`, or `claude-3-haiku-20240307` with `claude-haiku-5-5`. On Claude Models on Google Cloud (Google managed), replace `claude-3-5-haiku@20241022` with `claude-haiku-5-5`. On Amazon Bedrock, use the Claude Haiku 5.5 ID from [Use the Claude Haiku 5.5 model ID](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#use-the-claude-haiku-5-5-model-id). * **Code execution:** Claude Haiku 5.5 accepts `code_execution_20250825` and later versions. If you use the legacy Python-only `code_execution_20250522`, move to one of them. See [Upgrade to latest tool version](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#upgrade-to-latest-tool-version). * **Text editor:** If you use the text editor tool, move to `text_editor_20250728` (tool name `str_replace_based_edit_tool`), which has no `undo_edit` command. See [Text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool). * **Stop reasons:** Handle `refusal` and `model_context_window_exceeded`. See [Handling stop reasons](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons). diff --git a/content/en/models/haiku-5-5/overview.md b/content/en/models/haiku-5-5/overview.md index f3912fd5ea..3893843419 100644 --- a/content/en/models/haiku-5-5/overview.md +++ b/content/en/models/haiku-5-5/overview.md @@ -43,13 +43,14 @@ For code changes, see the [migration guide](https://platform.claude.com/docs/en/ ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :--------------------------- | -| Claude API | `claude-haiku-5-5` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-haiku-5-5` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-haiku-5-5` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-haiku-5-5` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-haiku-5-5` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------- | +| Claude API | `claude-haiku-5-5` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-haiku-5-5` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-haiku-5-5` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-haiku-5-5` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-haiku-5-5` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-haiku-5-5` | ### Pricing @@ -80,12 +81,12 @@ For code changes, see the [migration guide](https://platform.claude.com/docs/en/ ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (latest) | -| Released | October 7, 2026 | -| Retirement | Not sooner than October 7, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (latest) | +| Released | October 7, 2026 | +| Retirement | Not sooner than October 7, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Good to know diff --git a/content/en/models/haiku-5-5/whats-new-haiku-5-5.md b/content/en/models/haiku-5-5/whats-new-haiku-5-5.md index 972150b08b..11b8546dd0 100644 --- a/content/en/models/haiku-5-5/whats-new-haiku-5-5.md +++ b/content/en/models/haiku-5-5/whats-new-haiku-5-5.md @@ -12,24 +12,24 @@ For code changes, see the [migration guide](https://platform.claude.com/docs/en/ Each row names one change, whether it is new, changed, or breaking, and what your code has to do. -| Change | Type | Action needed | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [Adaptive thinking and effort](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#adaptive-thinking-and-effort) | New | Optional: set `effort` to trade response quality against speed and cost. | -| [Larger context window and output](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#larger-context-window-and-output) | New | None. Existing `max_tokens` values stay valid, but thinking tokens count toward them. Long prompts are billed at higher prices; see [Long context pricing](https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing). | -| [Browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) | New | None. Available on the Claude API and Google Cloud. | -| [Safety classifiers can decline a request](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#refusal-response) | New | Handle `stop_reason: "refusal"` in your client. Server-side fallback isn't available. | -| [Manual extended thinking returns an error](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#configure-thinking) | Breaking | Replace `budget_tokens` with adaptive thinking. | -| [Sampling parameters can return an error](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#remove-sampling-parameters) | Breaking | Omit `temperature`, `top_p`, and `top_k`. | -| [Assistant message prefill returns an error](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#replace-assistant-prefill) | Breaking | End `messages` with a user turn. | -| [`computer_20250124` returns an error on the Claude API, Google Cloud, and Amazon Bedrock](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#computer-use-toolset) | Breaking | Replace it with `computer_toolset_20260801` on the Claude API and Google Cloud, or with `computer_20251124` on Amazon Bedrock. | -| [Changing earlier turns invalidates thinking blocks](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#keep-earlier-turns-unchanged) | Breaking | Keep conversations append-only if you send thinking blocks back. | -| [Responses can start with thinking blocks](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#responses-can-begin-with-thinking-blocks) | Changed | Select content blocks by `type`, not by position. | -| [Thinking text is omitted by default](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#configure-thinking) | Changed | To receive summarized thinking, set `thinking.display` to `"summarized"`. | -| [Same text counts as more tokens](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#same-text-counts-as-more-tokens) | Changed | Recount prompts and revisit `max_tokens` and cost estimates. | -| [Replaying thinking blocks across accounts](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#replaying-thinking-blocks-across-accounts) | Changed | If you replay stored conversations through a different account, replay each through the account that produced it. | -| [Earlier thinking blocks stay in context](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#earlier-thinking-blocks-stay-in-context) | Changed | Expect more input tokens in multi-turn conversations. To remove older blocks, use [thinking block clearing](https://platform.claude.com/docs/en/build-with-claude/context-editing#thinking-block-clearing). | -| [Shorter prompts can be cached](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#cache-limitations) | Changed | None. The minimum cacheable prompt length is 512 tokens, down from 4,096 on Claude Haiku 4.5, so a prompt in between that sets `cache_control` is cached on Claude Haiku 5.5. | -| [Context awareness tags aren't injected](https://platform.claude.com/docs/en/build-with-claude/context-windows#context-awareness) | Changed | To give the model an explicit budget for an agentic loop, use [task budgets](https://platform.claude.com/docs/en/build-with-claude/task-budgets) (beta). | +| Change | Type | Action needed | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [Adaptive thinking and effort](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#adaptive-thinking-and-effort) | New | Optional: set `effort` to trade response quality against speed and cost. | +| [Larger context window and output](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#larger-context-window-and-output) | New | None. Existing `max_tokens` values stay valid, but thinking tokens count toward them. Long prompts are billed at higher prices; see [Long context pricing](https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing). | +| [Browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) | New | None. Available on the Claude API and Claude Models on Google Cloud (Google managed). | +| [Safety classifiers can decline a request](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#refusal-response) | New | Handle `stop_reason: "refusal"` in your client. Server-side fallback isn't available. | +| [Manual extended thinking returns an error](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#configure-thinking) | Breaking | Replace `budget_tokens` with adaptive thinking. | +| [Sampling parameters can return an error](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#remove-sampling-parameters) | Breaking | Omit `temperature`, `top_p`, and `top_k`. | +| [Assistant message prefill returns an error](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#replace-assistant-prefill) | Breaking | End `messages` with a user turn. | +| [`computer_20250124` returns an error](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#computer-use-toolset) on the Claude API, Claude Models on Google Cloud (Google managed), and Amazon Bedrock | Breaking | Replace it with `computer_toolset_20260801` on the Claude API and Claude Models on Google Cloud (Google managed), or with `computer_20251124` on Amazon Bedrock. | +| [Changing earlier turns invalidates thinking blocks](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#keep-earlier-turns-unchanged) | Breaking | Keep conversations append-only if you send thinking blocks back. | +| [Responses can start with thinking blocks](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#responses-can-begin-with-thinking-blocks) | Changed | Select content blocks by `type`, not by position. | +| [Thinking text is omitted by default](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide#configure-thinking) | Changed | To receive summarized thinking, set `thinking.display` to `"summarized"`. | +| [Same text counts as more tokens](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#same-text-counts-as-more-tokens) | Changed | Recount prompts and revisit `max_tokens` and cost estimates. | +| [Replaying thinking blocks across accounts](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#replaying-thinking-blocks-across-accounts) | Changed | If you replay stored conversations through a different account, replay each through the account that produced it. | +| [Earlier thinking blocks stay in context](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5#earlier-thinking-blocks-stay-in-context) | Changed | Expect more input tokens in multi-turn conversations. To remove older blocks, use [thinking block clearing](https://platform.claude.com/docs/en/build-with-claude/context-editing#thinking-block-clearing). | +| [Shorter prompts can be cached](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#cache-limitations) | Changed | None. The minimum cacheable prompt length is 512 tokens, down from 4,096 on Claude Haiku 4.5, so a prompt in between that sets `cache_control` is cached on Claude Haiku 5.5. | +| [Context awareness tags aren't injected](https://platform.claude.com/docs/en/build-with-claude/context-windows#context-awareness) | Changed | To give the model an explicit budget for an agentic loop, use [task budgets](https://platform.claude.com/docs/en/build-with-claude/task-budgets) (beta). | ## New capabilities diff --git a/content/en/models/mythos-5-1/overview.md b/content/en/models/mythos-5-1/overview.md index fea26cbfee..d44a3128d6 100644 --- a/content/en/models/mythos-5-1/overview.md +++ b/content/en/models/mythos-5-1/overview.md @@ -38,12 +38,12 @@ Claude Mythos 5.1 is available only to organizations verified through Anthropic ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :---------------------------- | -| Claude API | `claude-mythos-5-1` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-mythos-5-1` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-mythos-5-1` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-mythos-5-1` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- | +| Claude API | `claude-mythos-5-1` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-mythos-5-1` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-mythos-5-1` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-mythos-5-1` | ### Pricing @@ -73,12 +73,12 @@ Claude Mythos 5.1 is available only to organizations verified through Anthropic ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (verification required) | -| Released | September 1, 2026 | -| Retirement | Not sooner than September 1, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (verification required) | +| Released | September 1, 2026 | +| Retirement | Not sooner than September 1, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | ## Reference diff --git a/content/en/models/mythos-5/overview.md b/content/en/models/mythos-5/overview.md index f6022868f0..4ff6cd8273 100644 --- a/content/en/models/mythos-5/overview.md +++ b/content/en/models/mythos-5/overview.md @@ -37,12 +37,12 @@ Claude Mythos 5 is available only to organizations verified through Anthropic’ ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :-------------------------- | -| Claude API | `claude-mythos-5` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-mythos-5` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-mythos-5` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-mythos-5` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------- | +| Claude API | `claude-mythos-5` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-mythos-5` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-mythos-5` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-mythos-5` | ### Pricing @@ -71,12 +71,12 @@ Claude Mythos 5 is available only to organizations verified through Anthropic’ ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (verification required) | -| Released | June 9, 2026 | -| Retirement | Not sooner than June 9, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (verification required) | +| Released | June 9, 2026 | +| Retirement | Not sooner than June 9, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | ## Resources diff --git a/content/en/models/opus-4-5/overview.md b/content/en/models/opus-4-5/overview.md index ec38dccbe0..d2a4e02834 100644 --- a/content/en/models/opus-4-5/overview.md +++ b/content/en/models/opus-4-5/overview.md @@ -35,14 +35,15 @@ Context window: 200K tokens · Max output: 64K tokens · Input pricing: $5 / MTo ### Model IDs -| Platform | Model ID | -| :-------------------------------------------------------------------------------------------------------------------- | :---------------------------------------- | -| Claude API | `claude-opus-4-5-20251101` | -| Claude API alias | `claude-opus-4-5` | -| [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | `anthropic.claude-opus-4-5-20251101-v1:0` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-opus-4-5@20251101` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-4-5` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-4-5` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------- | +| Claude API | `claude-opus-4-5-20251101` | +| Claude API alias | `claude-opus-4-5` | +| [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | `anthropic.claude-opus-4-5-20251101-v1:0` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-opus-4-5@20251101` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-4-5` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-4-5` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-opus-4-5-20251101` | ### Pricing @@ -71,12 +72,12 @@ Context window: 200K tokens · Max output: 64K tokens · Input pricing: $5 / MTo ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | -| Released | November 24, 2025 | -| Retirement | Not sooner than November 24, 2026 | -| Platforms | Claude API, [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | +| Released | November 24, 2025 | +| Retirement | Not sooner than November 24, 2026 | +| Platforms | Claude API, [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Resources diff --git a/content/en/models/opus-4-6/overview.md b/content/en/models/opus-4-6/overview.md index 4fc46f20f5..40f5e6ee29 100644 --- a/content/en/models/opus-4-6/overview.md +++ b/content/en/models/opus-4-6/overview.md @@ -35,13 +35,14 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $5 / MTok ### Model IDs -| Platform | Model ID | -| :-------------------------------------------------------------------------------------------------------------------- | :----------------------------- | -| Claude API | `claude-opus-4-6` | -| [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | `anthropic.claude-opus-4-6-v1` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-opus-4-6` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-4-6` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-4-6` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------- | +| Claude API | `claude-opus-4-6` | +| [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | `anthropic.claude-opus-4-6-v1` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-opus-4-6` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-4-6` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-4-6` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-opus-4-6` | ### Pricing @@ -71,12 +72,12 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $5 / MTok ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | -| Released | February 5, 2026 | -| Retirement | Not sooner than February 5, 2027 | -| Platforms | Claude API, [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | +| Released | February 5, 2026 | +| Retirement | Not sooner than February 5, 2027 | +| Platforms | Claude API, [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Resources diff --git a/content/en/models/opus-4-7/overview.md b/content/en/models/opus-4-7/overview.md index 1683e9601e..96624295a1 100644 --- a/content/en/models/opus-4-7/overview.md +++ b/content/en/models/opus-4-7/overview.md @@ -35,13 +35,14 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $5 / MTok ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :-------------------------- | -| Claude API | `claude-opus-4-7` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-opus-4-7` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-opus-4-7` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-4-7` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-4-7` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------- | +| Claude API | `claude-opus-4-7` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-opus-4-7` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-opus-4-7` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-4-7` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-4-7` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-opus-4-7` | ### Pricing @@ -71,12 +72,12 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $5 / MTok ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | -| Released | April 16, 2026 | -| Retirement | Not sooner than April 16, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | +| Released | April 16, 2026 | +| Retirement | Not sooner than April 16, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Resources diff --git a/content/en/models/opus-4-8/overview.md b/content/en/models/opus-4-8/overview.md index 783dd4e0fc..7dbafbb557 100644 --- a/content/en/models/opus-4-8/overview.md +++ b/content/en/models/opus-4-8/overview.md @@ -33,13 +33,14 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $5 / MTok ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :-------------------------- | -| Claude API | `claude-opus-4-8` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-opus-4-8` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-opus-4-8` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-4-8` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-4-8` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------- | +| Claude API | `claude-opus-4-8` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-opus-4-8` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-opus-4-8` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-4-8` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-4-8` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-opus-4-8` | ### Pricing @@ -69,12 +70,12 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $5 / MTok ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | -| Released | May 28, 2026 | -| Retirement | Not sooner than May 28, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | +| Released | May 28, 2026 | +| Retirement | Not sooner than May 28, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Resources diff --git a/content/en/models/opus-5-5/migration-guide.md b/content/en/models/opus-5-5/migration-guide.md index 7f7b3cb154..ccd88abb6e 100644 --- a/content/en/models/opus-5-5/migration-guide.md +++ b/content/en/models/opus-5-5/migration-guide.md @@ -28,13 +28,13 @@ Claude Opus 5.5 costs less than Claude Opus 5 ($4 / $20 USD per million input / Whichever model you are coming from, a request to `claude-opus-5-5` must meet the following. Where an item says a setting is rejected, the API returns a 400 error. -* **Model ID:** Use `claude-opus-5-5`, a fixed model ID with no date suffix. On Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry, use that platform's model ID; see [Availability](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#availability). +* **Model ID:** Use `claude-opus-5-5`, a fixed model ID with no date suffix. On Amazon Bedrock, Claude Platform on AWS, Claude Models on Google Cloud (Google managed), and Microsoft Foundry, use that platform's model ID; see [Availability](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#availability). * **Thinking:** Send no `thinking` field, or send `thinking: {"type": "adaptive"}`, which is equivalent: [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) is always on. `thinking: {"type": "disabled"}` and manual thinking budgets (`thinking: {"type": "enabled", "budget_tokens": N}`) are rejected. See the [before and after for thinking](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#thinking-cant-be-disabled). * **Effort:** Control thinking depth with the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort), the only request parameter that controls it. All five levels (`low`, `medium`, `high`, `xhigh`, `max`) are supported, and the default is `medium`. See [Recommended effort levels for Claude Opus 5.5](https://platform.claude.com/docs/en/build-with-claude/effort#recommended-effort-levels-for-claude-opus-5-5). * **Tool choice:** Use `tool_choice` `{"type": "auto"}` (the default) or `{"type": "none"}`. Forcing a tool call with `{"type": "any"}` or `{"type": "tool", "name": "..."}` is rejected. See the [before and after for tool choice](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#forced-tool-use). * **Sampling parameters:** Omit `temperature`, `top_p`, and `top_k`. Use prompting to guide the model's behavior. * **Prefill:** Don't end `messages` with a prefilled assistant turn: it is rejected. Use [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) or system prompt instructions instead. -* **Computer use:** On the Claude API and Google Cloud, declare computer use as the `computer_toolset_20260801` toolset; the earlier `computer_20251124` tool is rejected there. See the [computer use breaking change](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#computer-use-toolset). +* **Computer use:** On the Claude API and Claude Models on Google Cloud (Google managed), declare computer use as the `computer_toolset_20260801` toolset; the earlier `computer_20251124` tool is rejected there. See the [computer use breaking change](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#computer-use-toolset). * **Context window:** No context-window beta header is needed. The [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) is the default, and a header sent for older models has no effect. The following request satisfies every item in the list: effort is set, and there is no `thinking` field. Where the example prints text, it finds the text block by its type, because `thinking` blocks come first. @@ -115,7 +115,8 @@ The following request satisfies every item in the list: effort is set, and there Model = Model.ClaudeOpus5_5, MaxTokens = 4096, Messages = [ - new UserMessageParam { + new UserMessageParam + { Content = "Analyze the trade-offs between microservices and monolithic architectures" } ], @@ -284,8 +285,8 @@ Work down the groups and stop after the one that names your current model: every * Remove `thinking: {"type": "disabled"}` and `thinking: {"type": "enabled", ...}`; choose an effort level instead. * Set `effort` explicitly: the default is `medium`, where Claude Opus 5's is `high`. * Replace `tool_choice` types `any` and `tool` with `auto` plus strict tool use or structured outputs. -* If you use computer use on the Claude API or Google Cloud, declare `computer_toolset_20260801` (no beta header) instead of `computer_20251124` and update your agent loop for the toolset. On Amazon Bedrock, keep `computer_20251124`; check the computer use tool's [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) section for other platforms. -* If a router or fallback can move a conversation from Claude Opus 5.5 to another model, expect that model to run without Claude Opus 5.5's thinking blocks (Claude Fable 5.1 and Claude Mythos 5.1 on the Claude API are the exception and keep them). Claude Opus 5.5 itself reads thinking from Claude Opus 5, from earlier Opus, Sonnet, and Haiku models, and, on the Claude API and Google Cloud, from Claude Sonnet 5.5 and Claude Haiku 5.5, but not from Claude Fable or Claude Mythos models. +* If you use computer use on the Claude API or Claude Models on Google Cloud (Google managed), declare `computer_toolset_20260801` (no beta header) instead of `computer_20251124` and update your agent loop for the toolset. On Amazon Bedrock, keep `computer_20251124`; check the computer use tool's [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) section for other platforms. +* If a router or fallback can move a conversation from Claude Opus 5.5 to another model, expect that model to run without Claude Opus 5.5's thinking blocks (Claude Fable 5.1 and Claude Mythos 5.1 on the Claude API are the exception and keep them). Claude Opus 5.5 itself reads thinking from Claude Opus 5, from earlier Opus, Sonnet, and Haiku models, and, on the Claude API and Claude Models on Google Cloud (Google managed), from Claude Sonnet 5.5 and Claude Haiku 5.5, but not from Claude Fable or Claude Mythos models. * Read content blocks by `type`, and pass `thinking` blocks back unmodified in tool-use loops. * If your interface renders text between tool calls, set `display: "updates"` (beta) or `"summarized"` and render the non-empty `thinking` blocks. * If your code edits earlier turns, the `system` prompt, or `tools` mid-conversation, follow [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking). @@ -358,7 +359,7 @@ model = "claude-opus-5" # Before model = "claude-opus-5-5" # After ``` -`claude-opus-5-5` is a fixed model ID with no date suffix, the same scheme as `claude-opus-5`. On Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry, use that platform's model ID; see [Availability](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#availability). +`claude-opus-5-5` is a fixed model ID with no date suffix, the same scheme as `claude-opus-5`. On Amazon Bedrock, Claude Platform on AWS, Claude Models on Google Cloud (Google managed), and Microsoft Foundry, use that platform's model ID; see [Availability](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#availability). ### Breaking changes @@ -836,7 +837,9 @@ After: // strict tool use: every call matches the tool's input_schema .tools(tools.stream() .map(tool -> tool.tool() - .map(customTool -> customTool.toBuilder().strict(true).build()) + .map(customTool -> customTool.toBuilder() + .strict(true) + .build()) .map(ToolUnion::ofTool) .orElse(tool)) .toList()) @@ -879,13 +882,13 @@ After: #### Thinking blocks are tied to the model and the conversation -On the Claude API, Claude Fable 5.1 and Claude Mythos 5.1 read Claude Opus 5.5 thinking blocks; no other model does. A router or fallback that moves a conversation from Claude Opus 5.5 to any other model runs those turns without them. In the other direction, Claude Opus 5.5 reads thinking blocks from Claude Opus 5, from earlier Opus, Sonnet, and Haiku models, and, on the Claude API and Google Cloud, from Claude Sonnet 5.5 and Claude Haiku 5.5, but not from Claude Fable or Claude Mythos models. Keep the conversation append-only (no edits to the `system` prompt, `tools`, or earlier messages mid-conversation) so the blocks stay valid; Claude Code, claude.ai, Claude Managed Agents, and the Claude Agent SDK already do. Enforcement matches Claude Fable 5.1 on every platform: for accounts created on or after August 31, 2026, 00:00 UTC, replaying a thinking block after such an edit returns a 400 error by default. There is no code change for append-only integrations. See [Thinking blocks are tied to the model and the conversation](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them) and [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking). +On the Claude API, Claude Fable 5.1 and Claude Mythos 5.1 read Claude Opus 5.5 thinking blocks; no other model does. A router or fallback that moves a conversation from Claude Opus 5.5 to any other model runs those turns without them. In the other direction, Claude Opus 5.5 reads thinking blocks from Claude Opus 5, from earlier Opus, Sonnet, and Haiku models, and, on the Claude API and Claude Models on Google Cloud (Google managed), from Claude Sonnet 5.5 and Claude Haiku 5.5, but not from Claude Fable or Claude Mythos models. Keep the conversation append-only (no edits to the `system` prompt, `tools`, or earlier messages mid-conversation) so the blocks stay valid; Claude Code, claude.ai, Claude Managed Agents, and the Claude Agent SDK already do. Enforcement matches Claude Fable 5.1 on every platform: for accounts created on or after August 31, 2026, 00:00 UTC, replaying a thinking block after such an edit returns a 400 error by default. There is no code change for append-only integrations. See [Thinking blocks are tied to the model and the conversation](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them) and [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking). -#### The `computer_20251124` computer use tool is not supported on the Claude API and Google Cloud +#### The `computer_20251124` computer use tool is not supported on the Claude API and Claude Models on Google Cloud (Google managed) -On the Claude API and Google Cloud, a `tools` entry of type `computer_20251124` returns a 400 error (`'claude-opus-5-5' does not support tool types: computer_20251124.`, followed by the tool types the model accepts). Declare the `computer_toolset_20260801` toolset instead: drop the beta header and send the entry with no `name` or display dimensions. In your agent loop, handle member `tool_use` blocks (the action is the block's `name`, not `input.action`), several of them per turn, and echo `toolset_name` on every result. The request change is shown below; the agent-loop changes are listed in [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). On Amazon Bedrock, the earlier `computer_20251124` tool continues to work on Claude Opus 5.5 as it does on Claude Opus 5, so no change is needed there; for other platforms, see the computer use tool's [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) section. See [The `computer_20251124` computer use tool is not supported on the Claude API and Google Cloud](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported). +On the Claude API and Claude Models on Google Cloud (Google managed), a `tools` entry of type `computer_20251124` returns a 400 error (`'claude-opus-5-5' does not support tool types: computer_20251124.`, followed by the tool types the model accepts). Declare the `computer_toolset_20260801` toolset instead: drop the beta header and send the entry with no `name` or display dimensions. In your agent loop, handle member `tool_use` blocks (the action is the block's `name`, not `input.action`), several of them per turn, and echo `toolset_name` on every result. The request change is shown below; the agent-loop changes are listed in [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). On Amazon Bedrock, the earlier `computer_20251124` tool continues to work on Claude Opus 5.5 as it does on Claude Opus 5, so no change is needed there; for other platforms, see the computer use tool's [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) section. See [The `computer_20251124` computer use tool is not supported on the Claude API and Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported). -Before. Claude Opus 5 accepts this request, and on the Claude API and Google Cloud, Claude Opus 5.5 rejects it with a 400 error: +Before. Claude Opus 5 accepts this request, and on the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 rejects it with a 400 error: ```bash cURL @@ -1179,7 +1182,7 @@ These are not required but will improve your experience: 1. **Consider task budgets (beta):** For agentic workloads, [task budgets](https://platform.claude.com/docs/en/build-with-claude/task-budgets) tell the model how many tokens it has for a full agentic loop. They require the `task-budgets-2026-03-13` beta header. -2. **Consider mid-conversation tool changes (beta):** Mid-conversation tool changes let you add or remove tools between turns of a conversation without invalidating [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) hits on earlier turns. Changing the `tools` array itself invalidates the cached prefix. On the Claude API, send the `inline-tools-2026-09-15` beta header. The older `mid-conversation-tool-changes-2026-07-01` header still works for changes that name a tool by reference, on the Claude API, Amazon Bedrock, and Google Cloud. +2. **Consider mid-conversation tool changes (beta):** Mid-conversation tool changes let you add or remove tools between turns of a conversation without invalidating [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) hits on earlier turns. Changing the `tools` array itself invalidates the cached prefix. On the Claude API, send the `inline-tools-2026-09-15` beta header. The older `mid-conversation-tool-changes-2026-07-01` header still works for changes that name a tool by reference, on the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed). ## Migrating to Claude Opus 5.5 from Claude Opus 4.7 @@ -1195,13 +1198,13 @@ None of these items adds a breaking change to those in the earlier sections; the 2. **1M context window is the default:** Claude Opus 5.5 serves the full 1M token [context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default with no beta header. If your client passes a context-window beta header for compatibility with older models, remove it. -3. **Mid-conversation system messages:** On the Claude API, Amazon Bedrock, and Google Cloud, Claude Opus 5.5 accepts `role: "system"` messages immediately after a user turn in the `messages` array (subject to [placement rules](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#limitations)). Use the top-level `system` field for instructions that apply from the start. Claude Opus 4.7 rejects `role: "system"` in `messages` with a 400 error. If you maintain code paths that rebuild the full message history to update instructions, you can simplify them and preserve [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) hits on earlier turns. +3. **Mid-conversation system messages:** On the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 accepts `role: "system"` messages immediately after a user turn in the `messages` array (subject to [placement rules](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#limitations)). Use the top-level `system` field for instructions that apply from the start. Claude Opus 4.7 rejects `role: "system"` in `messages` with a 400 error. If you maintain code paths that rebuild the full message history to update instructions, you can simplify them and preserve [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) hits on earlier turns. 4. **Refusal stop details:** When the model declines a request, Claude Opus 5.5 returns a `stop_details` object that names the category of refusal, alongside the `refusal` stop reason. Claude Opus 4.7 returns the same object, so this matters only if your stop-reason handling does not read it yet. No beta header is required, and there is no opt-out. If your stop-reason handling doesn't read it yet, see [Handling stop reasons](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons). Claude Opus 5.5 declines in more categories; see [Safety classifiers and fallback](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#safety-classifiers-and-fallback). 5. **Fast mode:** Claude Opus 5.5 supports [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) on the Claude API. Fast mode is not available on Claude Opus 4.7, where requests with `speed: "fast"` return an error. Set `speed: "fast"` on your requests. Claude Opus 5.5 doesn't need a beta header. -6. **Computer use toolset and browser use tool:** On the Claude API and Google Cloud, Claude Opus 5.5 supports [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) as the `computer_toolset_20260801` toolset and the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) for tasks inside webpages. Claude Opus 4.7 supports neither. On those platforms Claude Opus 5.5 doesn't accept the earlier `computer_20251124` tool; see the [computer use breaking change](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#computer-use-toolset). +6. **Computer use toolset and browser use tool:** On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 supports [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) as the `computer_toolset_20260801` toolset and the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) for tasks inside webpages. Claude Opus 4.7 supports neither. On those platforms Claude Opus 5.5 doesn't accept the earlier `computer_20251124` tool; see the [computer use breaking change](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#computer-use-toolset). ## Migrating to Claude Opus 5.5 from Claude Opus 4.6 and earlier Opus models @@ -1469,7 +1472,7 @@ This section adds what changed in Claude Opus 4.7, with `claude-opus-4-6` as the $message = $client->messages->create( maxTokens: 16000, messages: [['role' => 'user', 'content' => '...']], - model: 'claude-opus-5-5', + model: Model::CLAUDE_OPUS_5_5, thinking: ['type' => 'adaptive'], outputConfig: ['effort' => 'high'], // or 'max', 'xhigh', 'medium', 'low' ); @@ -1520,7 +1523,7 @@ Claude Opus 4.7 introduced behavioral differences from Claude Opus 4.6 that are High-resolution support is automatic and requires no beta header or client-side opt-in. Two things to plan for: - * Full-resolution images can use up to approximately 3x more image tokens than on prior models (up to 4,784 tokens per image, compared to the previous cap of roughly 1,600 tokens per image). Re-budget `max_tokens` and cost expectations for image-heavy workloads, or downsample before sending if you do not need the additional fidelity. + * Full-resolution images can use up to approximately 3x more image tokens than on prior models (up to 4,784 tokens for each image, compared to the previous cap of roughly 1,600 tokens). Re-budget `max_tokens` and cost expectations for image-heavy workloads, or downsample before sending if you do not need the additional fidelity. * Pointing and bounding-box coordinates returned by the model are 1:1 with actual image pixels on Claude Opus 4.7, so no scale-factor conversion is required. See [High-resolution image support on Claude Opus 4.7](https://platform.claude.com/docs/en/build-with-claude/vision#high-resolution-image-support-on-claude-opus-4-7) for details. @@ -1535,7 +1538,7 @@ If you are migrating from Claude Opus 4.5, Claude Opus 4.1, or an earlier model 1. **Prefill removal** is covered in the [breaking changes for migrating from Claude Opus 4.6](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#opus-46-breaking-changes). -2. **Tool parameter quoting:** Claude Opus 4.6 and later models might produce slightly different JSON string escaping in tool call arguments (for example, different handling of Unicode escapes or forward slash escaping). If you parse tool call `input` as a raw string rather than using a JSON parser, verify your parsing logic. Standard JSON parsers (such as `json.loads()` or `JSON.parse()`) handle these differences automatically. +2. **Tool parameter quoting:** Claude Opus 4.6 and later models might produce slightly different JSON string escaping in tool call arguments (for example, different handling of Unicode escapes or forward slash escaping). If you parse tool call `input` as a raw string rather than using a JSON parser, check your parsing logic. Standard JSON parsers (such as `json.loads()` or `JSON.parse()`) handle these differences automatically. #### Recommended changes @@ -1632,9 +1635,9 @@ If you're migrating from Claude Opus 4.1 or earlier models directly to Claude Op ``` - * **Text editor:** Use `text_editor_20250728` and `str_replace_based_edit_tool`. See [Text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) documentation for details. - * **Code execution:** Upgrade to `code_execution_20260521`. See [Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#upgrade-to-latest-tool-version) documentation for migration instructions. - * **Computer use:** On the Claude API and Google Cloud, Claude Opus 5.5 accepts computer use only as the `computer_toolset_20260801` toolset: the earlier `computer_20250124` and `computer_20251124` tools are rejected there. See the [computer use breaking change](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#computer-use-toolset). + * **Text editor:** Use `text_editor_20250728` and `str_replace_based_edit_tool`. See the [Text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) documentation for details. + * **Code execution:** Upgrade to `code_execution_20260521`. See the [Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#upgrade-to-latest-tool-version) documentation for migration instructions. + * **Computer use:** On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 accepts computer use only as the `computer_toolset_20260801` toolset: the earlier `computer_20250124` and `computer_20251124` tools are rejected there. See the [computer use breaking change](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#computer-use-toolset). 3. **Handle the `refusal` stop reason** @@ -1789,6 +1792,6 @@ Manual extended thinking, sampling parameters, and assistant prefill return a 40 ### What changed -1. **Mid-conversation system messages:** On the Claude API, Amazon Bedrock, and Google Cloud, Claude Opus 5.5 accepts `role: "system"` messages immediately after a user turn in the `messages` array (subject to [placement rules](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#limitations)). This feature is not available on Claude Sonnet 5. If you maintain code paths that rebuild the full message history to update instructions, you can simplify them and preserve [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) hits on earlier turns. +1. **Mid-conversation system messages:** On the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 accepts `role: "system"` messages immediately after a user turn in the `messages` array (subject to [placement rules](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#limitations)). This feature is not available on Claude Sonnet 5. If you maintain code paths that rebuild the full message history to update instructions, you can simplify them and preserve [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) hits on earlier turns. 2. **Lower prompt caching minimum:** The minimum cacheable prompt length on Claude Opus 5.5 is 512 tokens, down from 1,024 tokens on Claude Sonnet 5. Prompts that were too short to cache on Claude Sonnet 5 can create cache entries, with no code changes required. See [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#cache-limitations) for per-model minimums. diff --git a/content/en/models/opus-5-5/overview.md b/content/en/models/opus-5-5/overview.md index df1b3d7263..b878312655 100644 --- a/content/en/models/opus-5-5/overview.md +++ b/content/en/models/opus-5-5/overview.md @@ -16,7 +16,7 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $4 / MTok ## Overview -Claude Opus 5.5 is built for long-running agentic coding and knowledge work, priced at $4 / $20 USD per million input / output tokens. Four breaking changes affect code already running on Claude Opus 5: [thinking can't be disabled](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#thinking-cant-be-disabled), [forced tool use returns an error](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#forced-tool-use-is-not-supported), [thinking blocks are tied to the model and the conversation](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them), and, on the Claude API and Google Cloud, [the earlier `computer_20251124` computer use tool is not accepted](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported). The first three also apply on Claude Fable 5.1. A further change alters the response shape without failing any request: [text between tool calls comes back in `thinking` blocks](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#text-between-tool-calls) whose text is empty at the default `display` setting. An application that streams that text to its users as progress updates goes quiet between tool calls until it sets a `display` value that returns the text. +Claude Opus 5.5 is built for long-running agentic coding and knowledge work, priced at $4 / $20 USD per million input / output tokens. Four breaking changes affect code already running on Claude Opus 5: [thinking can't be disabled](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#thinking-cant-be-disabled), [forced tool use returns an error](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#forced-tool-use-is-not-supported), [thinking blocks are tied to the model and the conversation](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them), and, on the Claude API and Claude Models on Google Cloud (Google managed), [the earlier `computer_20251124` computer use tool is not accepted](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported). The first three also apply on Claude Fable 5.1. A further change alters the response shape without failing any request: [text between tool calls comes back in `thinking` blocks](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#text-between-tool-calls) whose text is empty at the default `display` setting. An application that streams that text to its users as progress updates goes quiet between tool calls until it sets a `display` value that returns the text. [What's new in Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5) @@ -41,13 +41,14 @@ Claude Opus 5.5 is built for long-running agentic coding and knowledge work, pri ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :-------------------------- | -| Claude API | `claude-opus-5-5` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-opus-5-5` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-opus-5-5` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-5-5` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-5-5` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------- | +| Claude API | `claude-opus-5-5` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-opus-5-5` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-opus-5-5` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-5-5` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-5-5` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-opus-5-5` | ### Pricing @@ -78,12 +79,12 @@ Claude Opus 5.5 is built for long-running agentic coding and knowledge work, pri ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (latest) | -| Released | September 22, 2026 | -| Retirement | Not sooner than September 22, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (latest) | +| Released | September 22, 2026 | +| Retirement | Not sooner than September 22, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Good to know diff --git a/content/en/models/opus-5-5/whats-new-opus-5-5.md b/content/en/models/opus-5-5/whats-new-opus-5-5.md index 7cb59696f4..b069f56167 100644 --- a/content/en/models/opus-5-5/whats-new-opus-5-5.md +++ b/content/en/models/opus-5-5/whats-new-opus-5-5.md @@ -4,7 +4,7 @@ url: https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5 description: Overview of breaking changes, feature support, and behavior differences in Claude Opus 5.5. --- -Claude Opus 5.5 is built for long-running agentic coding and knowledge work, priced at $4 / $20 USD per million input / output tokens. Four breaking changes affect code already running on Claude Opus 5: [thinking can't be disabled](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#thinking-cant-be-disabled), [forced tool use returns an error](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#forced-tool-use-is-not-supported), [thinking blocks are tied to the model and the conversation](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them), and, on the Claude API and Google Cloud, [the earlier `computer_20251124` computer use tool is not accepted](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported). The first three also apply on Claude Fable 5.1. A further change alters the response shape without failing any request: [text between tool calls comes back in `thinking` blocks](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#text-between-tool-calls) whose text is empty at the default `display` setting. An application that streams that text to its users as progress updates goes quiet between tool calls until it sets a `display` value that returns the text. +Claude Opus 5.5 is built for long-running agentic coding and knowledge work, priced at $4 / $20 USD per million input / output tokens. Four breaking changes affect code already running on Claude Opus 5: [thinking can't be disabled](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#thinking-cant-be-disabled), [forced tool use returns an error](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#forced-tool-use-is-not-supported), [thinking blocks are tied to the model and the conversation](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them), and, on the Claude API and Claude Models on Google Cloud (Google managed), [the earlier `computer_20251124` computer use tool is not accepted](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported). The first three also apply on Claude Fable 5.1. A further change alters the response shape without failing any request: [text between tool calls comes back in `thinking` blocks](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#text-between-tool-calls) whose text is empty at the default `display` setting. An application that streams that text to its users as progress updates goes quiet between tool calls until it sets a `display` value that returns the text. ## New model @@ -44,27 +44,27 @@ tool_choice: type "tool" and "any" are not supported for this model. ### Thinking blocks are tied to the model and the conversation -Every thinking block records which model produced it, and each model reads its own blocks and only some other models'. Claude Opus 5.5 reads thinking blocks from Claude Opus 5, from earlier Opus, Sonnet, and Haiku models, and, on the Claude API and Google Cloud, from Claude Sonnet 5.5 and Claude Haiku 5.5, but not from Claude Fable or Claude Mythos models. On the Claude API, Claude Fable 5.1 and Claude Mythos 5.1 read thinking blocks from Claude Opus 5.5; no other model does. A conversation that moves from Claude Opus 5 onto Claude Opus 5.5, or from Claude Opus 5.5 up to Claude Fable 5.1 or Claude Mythos 5.1 on the Claude API, keeps its reasoning. One that moves from Claude Opus 5.5 to any model other than those two, or onto it from a Claude Fable or Claude Mythos model, runs the turns after the switch without the previous model's reasoning. When a request carries a block the target model can't read, the API drops it before the model sees it: the request succeeds, and dropped blocks aren't billed. With the `thinking-binding-controls-2026-08-01` beta header the drop is reported in a top-level `input_transformations` array. See [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models). +Every thinking block records which model produced it, and each model reads its own blocks and only some other models'. Claude Opus 5.5 reads thinking blocks from Claude Opus 5, from earlier Opus, Sonnet, and Haiku models, and, on the Claude API and Claude Models on Google Cloud (Google managed), from Claude Sonnet 5.5 and Claude Haiku 5.5, but not from Claude Fable or Claude Mythos models. On the Claude API, Claude Fable 5.1 and Claude Mythos 5.1 read thinking blocks from Claude Opus 5.5; no other model does. A conversation that moves from Claude Opus 5 onto Claude Opus 5.5, or from Claude Opus 5.5 up to Claude Fable 5.1 or Claude Mythos 5.1 on the Claude API, keeps its reasoning. One that moves from Claude Opus 5.5 to any model other than those two, or onto it from a Claude Fable or Claude Mythos model, runs the turns after the switch without the previous model's reasoning. When a request carries a block the target model can't read, the API drops it before the model sees it: the request succeeds, and dropped blocks aren't billed. With the `thinking-binding-controls-2026-08-01` beta header the drop is reported in a top-level `input_transformations` array. See [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models). The API also checks whether anything before a Claude Opus 5.5 thinking block (the `system` prompt, the `tools`, or an earlier message) has changed since the block was produced. As on Claude Fable 5.1, it enforces that check by default for accounts created on or after August 31, 2026, 00:00 UTC, on the Claude API and on cloud platforms. On those accounts, a request that replays a block after such a change returns a 400 error. To drop the affected blocks instead, send the `thinking-binding-controls-2026-08-01` beta header and set `thinking.block_binding.prefix_mismatch_behavior` to `"drop_block"`. On older accounts, setting that field to either value opts the request in. Keep the conversation append-only so the question never arises: change instructions or tools with [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) rather than edits. See [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking) and the migration guide's [note on thinking blocks](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#thinking-blocks). -### The `computer_20251124` computer use tool is not supported on the Claude API and Google Cloud +### The `computer_20251124` computer use tool is not supported on the Claude API and Claude Models on Google Cloud (Google managed) -Claude Opus 5 accepts [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) both as the `computer_toolset_20260801` toolset and, with the `computer-use-2025-11-24` beta header, as the earlier `computer_20251124` tool. On the Claude API and Google Cloud, Claude Opus 5.5 supports only the toolset: a request that declares a `computer_20251124` tool returns a 400 `invalid_request_error`. The message names the rejected type, then lists the tool types the model does accept (`computer_toolset_20260801` among them) after `Did you mean one of`; it begins: +Claude Opus 5 accepts [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) both as the `computer_toolset_20260801` toolset and, with the `computer-use-2025-11-24` beta header, as the earlier `computer_20251124` tool. On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 supports only the toolset: a request that declares a `computer_20251124` tool returns a 400 `invalid_request_error`. The message names the rejected type, then lists the tool types the model does accept (`computer_toolset_20260801` among them) after `Did you mean one of`; it begins: ```text wrap 'claude-opus-5-5' does not support tool types: computer_20251124. ``` -To move an existing integration on the Claude API or Google Cloud, follow [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124): drop the beta header, replace the `tools` entry with `{"type": "computer_toolset_20260801"}`, and update your agent loop for member `tool_use` blocks, batch actions, and `toolset_name` on results. On Amazon Bedrock, the earlier `computer_20251124` tool continues to work on Claude Opus 5.5 as it does on Claude Opus 5, so no change is needed there. For other platforms, see the computer use tool's [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) section. Integrations that already use the toolset, and the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool), need no change. The migration guide shows the request [before and after](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#computer-use-toolset). +To move an existing integration on the Claude API or Claude Models on Google Cloud (Google managed), follow [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124): drop the beta header, replace the `tools` entry with `{"type": "computer_toolset_20260801"}`, and update your agent loop for member `tool_use` blocks, batch actions, and `toolset_name` on results. On Amazon Bedrock, the earlier `computer_20251124` tool continues to work on Claude Opus 5.5 as it does on Claude Opus 5, so no change is needed there. For other platforms, see the computer use tool's [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) section. Integrations that already use the toolset, and the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool), need no change. The migration guide shows the request [before and after](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#computer-use-toolset). ## Feature support -Claude Opus 5.5 supports [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta), [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), [task budgets](https://platform.claude.com/docs/en/build-with-claude/task-budgets), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) with a 512-token minimum cacheable prompt, [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). On the Claude API and Google Cloud, computer use requires the `computer_toolset_20260801` toolset (see the [breaking change](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported)). See each feature's page for model availability. +Claude Opus 5.5 supports [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta), [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), [task budgets](https://platform.claude.com/docs/en/build-with-claude/task-budgets), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) with a 512-token minimum cacheable prompt, [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). On the Claude API and Claude Models on Google Cloud (Google managed), computer use requires the `computer_toolset_20260801` toolset (see the [computer use breaking change](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported)). See each feature's page for model availability. ### Fast mode -[Fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) is available for Claude Opus 5.5 on the Claude API and on [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) for deployments hosted on Azure, but not for deployments hosted on Anthropic; it is not available on Amazon Bedrock, Claude Platform on AWS, or Google Cloud. On the Claude API, set `speed: "fast"` on your request. Claude Opus 5.5 doesn't need a beta header. See [Fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for supported models, rate limits, and pricing. +[Fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) is available for Claude Opus 5.5 on the Claude API, on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), and on [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) for deployments hosted on Azure. On the Claude API and on Claude Models on Google Cloud (Anthropic managed), set `speed: "fast"` on your request. Claude Opus 5.5 doesn't need a beta header. See [Fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for supported models, rate limits, and pricing. ### Define tools in a message (beta) @@ -98,10 +98,10 @@ Claude Opus 5.5 costs $4 USD per million input tokens and $20 USD per million ou Claude Opus 5.5 is available on: -* **Claude API:** all customers, as `claude-opus-5-5`. -* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-opus-5-5`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-opus-5-5`. -* **Google Cloud:** [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), as `claude-opus-5-5`. -* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), as `claude-opus-5-5`. +* **Claude API:** all customers, as `claude-opus-5-5` +* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-opus-5-5`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-opus-5-5` +* **Google Cloud:** [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), as `claude-opus-5-5`, and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), as `claude-opus-5-5` +* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), as `claude-opus-5-5` ## Migrate from Claude Opus 5 @@ -144,7 +144,7 @@ Update your model ID: ``` -Then remove any `thinking: {"type": "disabled"}` or `thinking: {"type": "enabled", ...}` settings and choose an [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level instead. Replace `tool_choice` types `any` and `tool` with `auto` plus [strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use). If you use computer use through `computer_20251124` on the Claude API or Google Cloud, [move to the toolset](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). If your interface shows the text between tool calls, also set `thinking.display`; see [Text between tool calls is returned in thinking blocks](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#text-between-tool-calls). See the [migration guide](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide) for step-by-step instructions from Claude Opus 5 and earlier models, and the full checklist. +Then remove any `thinking: {"type": "disabled"}` or `thinking: {"type": "enabled", ...}` settings and choose an [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level instead. Replace `tool_choice` types `any` and `tool` with `auto` plus [strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use). If you use computer use through `computer_20251124` on the Claude API or Claude Models on Google Cloud (Google managed), [move to the toolset](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). If your interface shows the text between tool calls, also set `thinking.display`; see [Text between tool calls is returned in thinking blocks](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#text-between-tool-calls). See the [migration guide](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide) for step-by-step instructions from Claude Opus 5 and earlier models, and the full checklist. ## Next steps diff --git a/content/en/models/opus-5/overview.md b/content/en/models/opus-5/overview.md index 55f8b111d2..b471693826 100644 --- a/content/en/models/opus-5/overview.md +++ b/content/en/models/opus-5/overview.md @@ -35,13 +35,14 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $5 / MTok ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :------------------------ | -| Claude API | `claude-opus-5` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-opus-5` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-opus-5` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-5` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-5` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------ | +| Claude API | `claude-opus-5` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-opus-5` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-opus-5` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-opus-5` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-opus-5` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-opus-5` | ### Pricing @@ -71,12 +72,12 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $5 / MTok ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | -| Released | July 24, 2026 | -| Retirement | Not sooner than July 24, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | +| Released | July 24, 2026 | +| Retirement | Not sooner than July 24, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Good to know diff --git a/content/en/models/overview.md b/content/en/models/overview.md index f6b35bc166..e0fe033914 100644 --- a/content/en/models/overview.md +++ b/content/en/models/overview.md @@ -24,25 +24,26 @@ Claude is a family of state-of-the-art large language models developed by Anthro If you're unsure which model to use, start with [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) for most workloads. Use [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) for demanding reasoning and long-horizon agentic work, or when your evals on Claude Opus 5.5 at higher effort still fall short. All current models support text and image input, text output, multilingual capabilities, vision, and tool use. Each model's page lists the platforms it's available on. -| Feature | Claude Fable 5.1 | Claude Opus 5.5 | Claude Sonnet 5.5 | Claude Haiku 5.5 | -| :-------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------- | :------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | -| Description | For demanding reasoning and long-horizon agentic work | For long-running agentic coding and knowledge work | The best combination of speed and intelligence | For high-volume, latency-sensitive tasks such as classification, extraction, and routing | -| Model page | [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) | [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) | [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview) | [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview) | -| Comparative latency | Slower | Moderate | Fast | Fastest | -| [Pricing](https://platform.claude.com/docs/en/about-claude/pricing) | $10 / input MTok, $50 / output MTok | $4 / input MTok, $20 / output MTok | $2 / input MTok, $10 / output MTok | From $0.10 / input MTok, From $0.50 / output MTok | -| Claude API ID | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | -| [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | Adaptive (always on) | Adaptive (always on) | Adaptive | Adaptive | -| [Default effort](https://platform.claude.com/docs/en/build-with-claude/effort) | `high` | `medium` | `high` | `medium` | -| [Context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) | 1M tokens | 1M tokens | 1M tokens | 1M tokens | -| Max output | 128K tokens | 128K tokens | 128K tokens | 128K tokens | -| Reliable knowledge cutoff | Jun 2026 | Jun 2026 | Jun 2026 | Jun 2026 | -| Training data cutoff | Jun 2026 | Jun 2026 | Jun 2026 | Jun 2026 | -| [Retirement](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Not sooner than September 1, 2027 | Not sooner than September 22, 2027 | Not sooner than September 28, 2027 | Not sooner than October 7, 2027 | -| Claude API alias | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | -| [Amazon Bedrock ID](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5-1` | `anthropic.claude-opus-5-5` | `anthropic.claude-sonnet-5-5` | `anthropic.claude-haiku-5-5` | -| [Google Cloud ID](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | -| [Microsoft Foundry ID](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | -| [Claude Platform on AWS ID](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | +| Feature | Claude Fable 5.1 | Claude Opus 5.5 | Claude Sonnet 5.5 | Claude Haiku 5.5 | +| :------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------- | :------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | +| Description | For demanding reasoning and long-horizon agentic work | For long-running agentic coding and knowledge work | The best combination of speed and intelligence | For high-volume, latency-sensitive tasks such as classification, extraction, and routing | +| Model page | [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) | [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) | [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview) | [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview) | +| Comparative latency | Slower | Moderate | Fast | Fastest | +| [Pricing](https://platform.claude.com/docs/en/about-claude/pricing) | $10 / input MTok, $50 / output MTok | $4 / input MTok, $20 / output MTok | $2 / input MTok, $10 / output MTok | From $0.10 / input MTok, From $0.50 / output MTok | +| Claude API ID | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | +| [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | Adaptive (always on) | Adaptive (always on) | Adaptive | Adaptive | +| [Default effort](https://platform.claude.com/docs/en/build-with-claude/effort) | `high` | `medium` | `high` | `medium` | +| [Context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) | 1M tokens | 1M tokens | 1M tokens | 1M tokens | +| Max output | 128K tokens | 128K tokens | 128K tokens | 128K tokens | +| Reliable knowledge cutoff | Jun 2026 | Jun 2026 | Jun 2026 | Jun 2026 | +| Training data cutoff | Jun 2026 | Jun 2026 | Jun 2026 | Jun 2026 | +| [Retirement](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Not sooner than September 1, 2027 | Not sooner than September 22, 2027 | Not sooner than September 28, 2027 | Not sooner than October 7, 2027 | +| Claude API alias | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | +| [Amazon Bedrock ID](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5-1` | `anthropic.claude-opus-5-5` | `anthropic.claude-sonnet-5-5` | `anthropic.claude-haiku-5-5` | +| [Claude Models on Google Cloud (Google managed) ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | +| [Microsoft Foundry ID](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | +| [Claude Platform on AWS ID](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | +| [Claude Models on Google Cloud (Anthropic managed) ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` | * **Comparative latency:** Relative to the current lineup. Actual latency depends on prompt length, output length, and thinking effort. * **Pricing:** Base price per million tokens. Batch API requests are 50% off; prompt cache reads cost 10% of the base input price (2.5% on Claude Fable 5.1 and Claude Mythos 5.1, 5% on Claude Opus 5.5 and Claude Sonnet 5.5). See Pricing for cache writes, long-context, and per-platform pricing. @@ -52,10 +53,10 @@ If you're unsure which model to use, start with [Claude Opus 5.5](https://platfo * **Context window:** 1M tokens is roughly 555k words or 2.5M Unicode characters on the current tokenizer (introduced with Claude Opus 4.7); models before it fit about 750k words in 1M tokens. 200k tokens is roughly 150k words. * **Max output:** Synchronous Messages API limit. On the Message Batches API, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, Claude Haiku 5.5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6 support up to 300k output tokens with the output-300k-2026-03-24 beta header. * **Reliable knowledge cutoff:** The date through which the model’s knowledge is most extensive and reliable. Training data cutoff (under Additional details) is the broader range of data used. See Anthropic’s Transparency Hub for details. -* **Retirement:** Anthropic’s commitment for the platforms that Anthropic operates. Amazon Bedrock and Google Cloud set their own dates. +* **Retirement:** Anthropic’s commitment for the platforms that Anthropic operates. Partner-operated platforms set their own dates. * **Claude API alias:** For models before the 4.6 generation, the alias is a convenience pointer that resolves to the dated ID. Dateless IDs are their own pinned snapshot; the alias row repeats them. * **Amazon Bedrock ID:** The ID on Bedrock’s Messages-API endpoint (Claude Opus 4.7 and later, plus Claude Haiku 4.5); a model offered only through Bedrock’s InvokeModel integration shows that ID instead. Bedrock offers global endpoints (dynamic routing) and regional endpoints (guaranteed data routing) for Claude Sonnet 4.5 and later, and sets its own lifecycle dates. -* **Google Cloud ID:** Google Cloud offers global, multi-region, and regional endpoints, and sets its own lifecycle dates. +* **Claude Models on Google Cloud (Google managed) ID:** Claude Models on Google Cloud (Google managed) offers global, multi-region, and regional endpoints, and sets its own lifecycle dates. * **Microsoft Foundry ID:** Foundry deployments default to the Claude API model ID (the alias, where one exists); the deployment name is what you send. Foundry follows the Claude API lifecycle schedule. * **Claude Platform on AWS ID:** Claude Platform on AWS uses the Claude API model IDs (the dateless form where the Claude API has an alias), not Bedrock-style IDs, and follows Anthropic’s first-party model lifecycle. diff --git a/content/en/models/sonnet-4-5/overview.md b/content/en/models/sonnet-4-5/overview.md index df147d3cd5..af773b62dc 100644 --- a/content/en/models/sonnet-4-5/overview.md +++ b/content/en/models/sonnet-4-5/overview.md @@ -35,14 +35,15 @@ Context window: 200K tokens · Max output: 64K tokens · Input pricing: $3 / MTo ### Model IDs -| Platform | Model ID | -| :-------------------------------------------------------------------------------------------------------------------- | :------------------------------------------ | -| Claude API | `claude-sonnet-4-5-20250929` | -| Claude API alias | `claude-sonnet-4-5` | -| [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | `anthropic.claude-sonnet-4-5-20250929-v1:0` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-sonnet-4-5@20250929` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-sonnet-4-5` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-sonnet-4-5` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------ | +| Claude API | `claude-sonnet-4-5-20250929` | +| Claude API alias | `claude-sonnet-4-5` | +| [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | `anthropic.claude-sonnet-4-5-20250929-v1:0` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-sonnet-4-5@20250929` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-sonnet-4-5` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-sonnet-4-5` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-sonnet-4-5-20250929` | ### Pricing @@ -71,13 +72,13 @@ Context window: 200K tokens · Max output: 64K tokens · Input pricing: $3 / MTo ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Deprecated | -| Released | September 29, 2025 | -| Deprecated | September 30, 2026 | -| Retires | November 30, 2026 | -| Platforms | Claude API, [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Deprecated | +| Released | September 29, 2025 | +| Deprecated | September 30, 2026 | +| Retires | November 30, 2026 | +| Platforms | Claude API, [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Resources diff --git a/content/en/models/sonnet-4-6/overview.md b/content/en/models/sonnet-4-6/overview.md index 37bbf2f3d7..cdb79f257e 100644 --- a/content/en/models/sonnet-4-6/overview.md +++ b/content/en/models/sonnet-4-6/overview.md @@ -35,13 +35,14 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $3 / MTok ### Model IDs -| Platform | Model ID | -| :-------------------------------------------------------------------------------------------------------------------- | :---------------------------- | -| Claude API | `claude-sonnet-4-6` | -| [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | `anthropic.claude-sonnet-4-6` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-sonnet-4-6` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-sonnet-4-6` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-sonnet-4-6` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- | +| Claude API | `claude-sonnet-4-6` | +| [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) | `anthropic.claude-sonnet-4-6` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-sonnet-4-6` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-sonnet-4-6` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-sonnet-4-6` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-sonnet-4-6` | ### Pricing @@ -71,12 +72,12 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $3 / MTok ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | -| Released | February 17, 2026 | -| Retirement | Not sooner than February 17, 2027 | -| Platforms | Claude API, [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | +| Released | February 17, 2026 | +| Retirement | Not sooner than February 17, 2027 | +| Platforms | Claude API, [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Resources diff --git a/content/en/models/sonnet-5-5/migration-guide.md b/content/en/models/sonnet-5-5/migration-guide.md index 4ddbbfd0aa..8c238fbe76 100644 --- a/content/en/models/sonnet-5-5/migration-guide.md +++ b/content/en/models/sonnet-5-5/migration-guide.md @@ -26,7 +26,7 @@ Claude Sonnet 5.5 has the same prices as Claude Sonnet 5, except for prompt cach ## Send a request to Claude Sonnet 5.5 -This request works on Claude Sonnet 5.5 as written. The example sets an effort level and, in the SDK, reads the reply by block type. It leaves out five settings that return a 400 error: [thinking budgets](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#sonnet-46-breaking-changes), [sampling parameters](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#sonnet-46-breaking-changes), [assistant prefill](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#migrating-from-sonnet-45), [forced tool choice](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#forced-tool-use), and [`thinking: {"type": "disabled"}`](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#turn-off-up-front-thinking). +This request works on Claude Sonnet 5.5 as written. It sets an effort level, and the SDK example reads the reply by block type. It leaves out five settings that return a 400 error: [thinking budgets](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#sonnet-46-breaking-changes), [sampling parameters](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#sonnet-46-breaking-changes), [assistant prefill](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#migrating-from-sonnet-45), [forced tool choice](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#forced-tool-use), and [`thinking: {"type": "disabled"}`](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#turn-off-up-front-thinking). ```bash cURL @@ -106,7 +106,8 @@ This request works on Claude Sonnet 5.5 as written. The example sets an effort l Model = Model.ClaudeSonnet5_5, MaxTokens = 4096, Messages = [ - new UserMessageParam { + new UserMessageParam + { Content = "Analyze the trade-offs between microservices and monolithic architectures" } ], @@ -475,8 +476,8 @@ Work down the groups and stop after the one that names your model. On Claude Hai * To keep running without up-front thinking, send the [lowest thinking setting](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#turn-off-up-front-thinking) at `high` effort or below. * Replace [forced tool use](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#forced-tool-use) with `auto` and strict tools. * Keep conversations [append-only](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#thinking-blocks). -* On the Claude API and Google Cloud, move computer use to the [toolset](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#computer-use-toolset), without the `fine-grained-tool-streaming-2025-05-14` beta header. -* Pair the [advisor tool](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#advisor-tool) with a supported advisor, and expect encrypted advice. +* On the Claude API and Claude Models on Google Cloud (Google managed), move computer use to the [toolset](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#computer-use-toolset), without the `fine-grained-tool-streaming-2025-05-14` beta header. +* [Pair the advisor tool](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#advisor-tool) with a supported advisor, and expect encrypted advice. * Read [text between tool calls](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#text-between-tool-calls) from `thinking` blocks. * [Handle refusals](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#safety-classifiers-and-fallback), and configure fallback. * [Re-run your effort sweep](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#recommended-changes), and re-baseline cost. @@ -797,7 +798,9 @@ After (Claude Sonnet 5.5): // strict tool use: every call matches the tool's input_schema .tools(tools.stream() .map(tool -> tool.tool() - .map(customTool -> customTool.toBuilder().strict(true).build()) + .map(customTool -> customTool.toBuilder() + .strict(true) + .build()) .map(ToolUnion::ofTool) .orElse(tool)) .toList()) @@ -842,18 +845,18 @@ The example marks every tool in the list strict. A request can have at most 20 s ### Thinking blocks are tied to the model and the conversation -Claude Sonnet 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, and, on the Claude API and Google Cloud, from Claude Haiku 5.5. It doesn't read blocks from Claude Opus 5, Claude Opus 5.5, or any Claude Fable or Claude Mythos model. The API drops blocks the model can't read. The request still returns 200, and dropped blocks aren't billed. See [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models). +Claude Sonnet 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, and, on the Claude API and Claude Models on Google Cloud (Google managed), from Claude Haiku 5.5. It doesn't read blocks from Claude Opus 5, Claude Opus 5.5, or any Claude Fable or Claude Mythos model. The API drops blocks the model can't read. The request still returns 200, and dropped blocks aren't billed. See [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models). -Each Claude Sonnet 5.5 thinking block is also signed over the conversation before it. For accounts created on or after August 31, 2026, 00:00 UTC, the API enforces this by default, on the Claude API, Amazon Bedrock, and Google Cloud. On those accounts, a request that replays a block after an edit to earlier history returns a 400 error. Keep conversations append-only, and change instructions or tools with [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages). Thinking blocks that Claude Sonnet 5.5 produces work only in the account that produced them, or in an account linked to it. See [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#account-bound-thinking). +Each Claude Sonnet 5.5 thinking block is also signed over the conversation before it. For accounts created on or after August 31, 2026, 00:00 UTC, the API enforces this by default, on the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed). On those accounts, a request that replays a block after an edit to earlier history returns a 400 error. Keep conversations append-only, and change instructions or tools with [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages). Thinking blocks that Claude Sonnet 5.5 produces work only in the account that produced them, or in an account linked to it. See [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#account-bound-thinking). -### Computer use needs the toolset on the Claude API and Google Cloud +### Computer use needs the toolset on the Claude API and Claude Models on Google Cloud (Google managed) -On the Claude API and Google Cloud, Claude Sonnet 5.5 supports computer use only through the `computer_toolset_20260801` toolset. There, `computer_20251124` returns a 400 error. Claude Sonnet 5.5 doesn't accept `computer_20250124` on any platform. Find the version you send today: +On the Claude API and Claude Models on Google Cloud (Google managed), Claude Sonnet 5.5 supports computer use only through the `computer_toolset_20260801` toolset. There, `computer_20251124` returns a 400 error. Claude Sonnet 5.5 doesn't accept `computer_20250124` on any platform. Find the version you send today: -| Version you send today | Starting models that send it | Send on the Claude API and Google Cloud | Send on Amazon Bedrock | -| ---------------------- | ---------------------------------------------------- | --------------------------------------- | ---------------------- | -| `computer_20251124` | Claude Sonnet 5, Claude Sonnet 4.6 | `computer_toolset_20260801` | `computer_20251124` | -| `computer_20250124` | Claude Sonnet 4.5, Claude Haiku 4.5, Claude Sonnet 4 | `computer_toolset_20260801` | `computer_20251124` | +| Version you send today | Starting models that send it | Send on the Claude API and Claude Models on Google Cloud (Google managed) | Send on Amazon Bedrock | +| ---------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------- | ---------------------- | +| `computer_20251124` | Claude Sonnet 5, Claude Sonnet 4.6 | `computer_toolset_20260801` | `computer_20251124` | +| `computer_20250124` | Claude Sonnet 4.5, Claude Haiku 4.5, Claude Sonnet 4 | `computer_toolset_20260801` | `computer_20251124` | If you send the `fine-grained-tool-streaming-2025-05-14` beta header, remove it when you move to the toolset. Alongside a toolset entry, it returns a 400 error. Set `eager_input_streaming: true` on each tool that needs it instead. @@ -879,7 +882,7 @@ Claude Sonnet 5.5 declines in more categories than Claude Sonnet 5. A decline re * **`"reasoning_extraction"`:** The request asks the model to reproduce its internal reasoning in the response text. * **`"general_harms"`:** The request falls under another usage-policy area. Benign work can also trigger this category. -[Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) (`fallbacks: "default"`, beta, Claude API only) retries `"cyber"` and `"frontier_llm"` declines on Claude Sonnet 5. It doesn't retry `"bio"`, `"reasoning_extraction"`, or `"general_harms"` declines. See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback) and [How refusals are billed](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#how-refusals-are-billed). +[Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) (`fallbacks: "default"`), in beta on the Claude API and on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), retries `"cyber"` and `"frontier_llm"` declines on Claude Sonnet 5. It doesn't retry `"bio"`, `"reasoning_extraction"`, or `"general_harms"` declines. See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback) and [How refusals are billed](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#how-refusals-are-billed). Real-time cyber safeguards are new for code from Claude Sonnet 4.6, Claude Sonnet 4.5, and Claude Haiku 4.5. For legitimate security work, apply to the [Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet). @@ -1164,7 +1167,7 @@ After (Claude Sonnet 5.5): $message = $client->messages->create( maxTokens: 16000, messages: [['role' => 'user', 'content' => '...']], - model: 'claude-sonnet-5-5', + model: Model::CLAUDE_SONNET_5_5, thinking: ['type' => 'adaptive'], outputConfig: ['effort' => 'high'], // or 'max', 'xhigh', 'medium', 'low' ); @@ -1231,7 +1234,7 @@ Replace each prefill according to what it was for: ### Migrating from Claude Sonnet 4 or earlier -Claude Sonnet 4 is retired on the Claude API and still available on Amazon Bedrock and Google Cloud. Claude 3.7 Sonnet is retired. From either model, first apply every preceding section, then these changes: +Claude Sonnet 4 is retired on the Claude API and still available on Amazon Bedrock and Claude Models on Google Cloud (Google managed). Claude 3.7 Sonnet is retired. From either model, first apply every preceding section, then these changes: * **Tool versions:** Use `text_editor_20250728`, with the tool name `str_replace_based_edit_tool` and no `undo_edit` command. Use `code_execution_20260521`. See the [text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) and the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#upgrade-to-latest-tool-version). * **Stop reasons:** Handle `refusal`. Claude 4.5 and later models also stop with `model_context_window_exceeded` at the context window limit. See [Handling stop reasons](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons). diff --git a/content/en/models/sonnet-5-5/overview.md b/content/en/models/sonnet-5-5/overview.md index 2284725db2..878c65ff0f 100644 --- a/content/en/models/sonnet-5-5/overview.md +++ b/content/en/models/sonnet-5-5/overview.md @@ -21,8 +21,8 @@ Claude Sonnet 5.5 offers the best combination of speed and intelligence. Five br * [Turn off up-front thinking with `between_tools`](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#turn-off-up-front-thinking). * [Forced tool use returns an error](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#forced-tool-use-is-not-supported). * [Thinking blocks are tied to the model and the conversation](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them). -* [On the Claude API and Google Cloud, the earlier `computer_20251124` computer use tool is not accepted](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#computer-20251124-is-not-supported). -* [The advisor tool rejects Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, and Claude Haiku 5.5 as advisors](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#advisor-tool-pairings). +* On the Claude API and Claude Models on Google Cloud (Google managed), [the earlier `computer_20251124` computer use tool is not accepted](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#computer-20251124-is-not-supported). +* [The advisor tool rejects four models as advisors](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#advisor-tool-pairings): Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, and Claude Haiku 5.5. One more change alters the response shape without failing any request: [text between tool calls comes back in `thinking` blocks](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#text-between-tool-calls). An application that streams that text to its users goes quiet between tool calls until it sets a `display` value that returns the text, or turns off up-front thinking with `between_tools`. @@ -49,13 +49,14 @@ One more change alters the response shape without failing any request: [text bet ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :---------------------------- | -| Claude API | `claude-sonnet-5-5` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-sonnet-5-5` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-sonnet-5-5` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-sonnet-5-5` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-sonnet-5-5` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- | +| Claude API | `claude-sonnet-5-5` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-sonnet-5-5` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-sonnet-5-5` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-sonnet-5-5` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-sonnet-5-5` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-sonnet-5-5` | ### Pricing @@ -86,12 +87,12 @@ One more change alters the response shape without failing any request: [text bet ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (latest) | -| Released | September 28, 2026 | -| Retirement | Not sooner than September 28, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (latest) | +| Released | September 28, 2026 | +| Retirement | Not sooner than September 28, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Good to know diff --git a/content/en/models/sonnet-5-5/whats-new-sonnet-5-5.md b/content/en/models/sonnet-5-5/whats-new-sonnet-5-5.md index 3bad1d9819..5719015332 100644 --- a/content/en/models/sonnet-5-5/whats-new-sonnet-5-5.md +++ b/content/en/models/sonnet-5-5/whats-new-sonnet-5-5.md @@ -9,8 +9,8 @@ Claude Sonnet 5.5 offers the best combination of speed and intelligence. Five br * [Turn off up-front thinking with `between_tools`](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#turn-off-up-front-thinking). * [Forced tool use returns an error](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#forced-tool-use-is-not-supported). * [Thinking blocks are tied to the model and the conversation](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them). -* [On the Claude API and Google Cloud, the earlier `computer_20251124` computer use tool is not accepted](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#computer-20251124-is-not-supported). -* [The advisor tool rejects Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, and Claude Haiku 5.5 as advisors](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#advisor-tool-pairings). +* On the Claude API and Claude Models on Google Cloud (Google managed), [the earlier `computer_20251124` computer use tool is not accepted](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#computer-20251124-is-not-supported). +* [The advisor tool rejects four models as advisors](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#advisor-tool-pairings): Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, and Claude Haiku 5.5. One more change alters the response shape without failing any request: [text between tool calls comes back in `thinking` blocks](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#text-between-tool-calls). An application that streams that text to its users goes quiet between tool calls until it sets a `display` value that returns the text, or turns off up-front thinking with `between_tools`. @@ -48,17 +48,17 @@ tool_choice: type "tool" and "any" are not supported for this model. ### Thinking blocks are tied to the model and the conversation -Every thinking block records which model produced it. Each model reads its own blocks and only some other models' blocks. Claude Sonnet 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, and, on the Claude API and Google Cloud, from Claude Haiku 5.5, but not from Claude Opus 5, Claude Opus 5.5, or any Claude Fable or Claude Mythos model. On the Claude API and Google Cloud, Claude Opus 5.5 reads Claude Sonnet 5.5 thinking blocks; no other model does. +Every thinking block records which model produced it. Each model reads its own blocks and only some other models' blocks. Claude Sonnet 5.5 reads thinking blocks from Claude Sonnet 5, Claude Opus 4.8, Claude Haiku 4.5, and earlier models, and, on the Claude API and Claude Models on Google Cloud (Google managed), from Claude Haiku 5.5, but not from Claude Opus 5, Claude Opus 5.5, or any Claude Fable or Claude Mythos model. On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 reads Claude Sonnet 5.5 thinking blocks; no other model does. -So a conversation that moves from Claude Sonnet 5 onto Claude Sonnet 5.5, or from Claude Sonnet 5.5 up to Claude Opus 5.5 on the Claude API and Google Cloud, keeps its reasoning, and any other move away from Claude Sonnet 5.5 runs the turns after the switch without it. When a request carries a block the target model can't read, the API drops it before the model sees it: the request succeeds, and dropped blocks aren't billed. With the `thinking-binding-controls-2026-08-01` beta header, the drop is reported in a top-level `input_transformations` array. See [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models). +So a conversation that moves from Claude Sonnet 5 onto Claude Sonnet 5.5, or from Claude Sonnet 5.5 up to Claude Opus 5.5 on the Claude API and Claude Models on Google Cloud (Google managed), keeps its reasoning, and any other move away from Claude Sonnet 5.5 runs the turns after the switch without it. When a request carries a block the target model can't read, the API drops it before the model sees it: the request succeeds, and dropped blocks aren't billed. With the `thinking-binding-controls-2026-08-01` beta header, the drop is reported in a top-level `input_transformations` array. See [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models). -The API also checks whether anything before a Claude Sonnet 5.5 thinking block has changed since the block was produced: the `system` prompt, the `tools`, or an earlier message. It enforces that check by default for accounts created on or after August 31, 2026, 00:00 UTC, on the Claude API, Amazon Bedrock, and Google Cloud. On those accounts, a request that replays a block after such a change returns a 400 error. To drop the affected blocks instead, send the `thinking-binding-controls-2026-08-01` beta header and set `thinking.block_binding.prefix_mismatch_behavior` to `"drop_block"`. On older accounts, setting that field to either value opts the request in. `block_binding` works only with `thinking: {"type": "adaptive"}`. With `between_tools`, keep the history append-only, or strip the thinking blocks from the edited turn on. +The API also checks whether anything before a Claude Sonnet 5.5 thinking block has changed since the block was produced: the `system` prompt, the `tools`, or an earlier message. It enforces that check by default for accounts created on or after August 31, 2026, 00:00 UTC, on the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed). On those accounts, a request that replays a block after such a change returns a 400 error. To drop the affected blocks instead, send the `thinking-binding-controls-2026-08-01` beta header and set `thinking.block_binding.prefix_mismatch_behavior` to `"drop_block"`. On older accounts, setting that field to either value opts the request in. `block_binding` works only with `thinking: {"type": "adaptive"}`. With `between_tools`, keep the history append-only, or strip the thinking blocks from the edited turn on. Keep the conversation append-only so the check never fails: change instructions or tools with [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) rather than edits. See [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking) and the migration guide's [note on thinking blocks](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#thinking-blocks). -### The `computer_20251124` computer use tool is not supported on the Claude API and Google Cloud +### The `computer_20251124` computer use tool is not supported on the Claude API and Claude Models on Google Cloud (Google managed) -On the Claude API and Google Cloud, Claude Sonnet 5.5 supports [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) only through the `computer_toolset_20260801` toolset. A request that declares the earlier `computer_20251124` tool returns a 400 `invalid_request_error`. On the Claude API, the message names the rejected type, then lists the tool types the model does accept. It begins: +On the Claude API and Claude Models on Google Cloud (Google managed), Claude Sonnet 5.5 supports [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) only through the `computer_toolset_20260801` toolset. A request that declares the earlier `computer_20251124` tool returns a 400 `invalid_request_error`. On the Claude API, the message names the rejected type, then lists the tool types the model does accept. It begins: ```text wrap 'claude-sonnet-5-5' does not support tool types: computer_20251124. @@ -66,7 +66,7 @@ On the Claude API and Google Cloud, Claude Sonnet 5.5 supports [computer use](ht On Amazon Bedrock, Claude Sonnet 5.5 accepts the earlier `computer_20251124` tool. -To move an existing integration on the Claude API or Google Cloud, follow [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124), which shows the request before and after. Drop the beta header, replace the `tools` entry with `{"type": "computer_toolset_20260801"}`, and update your agent loop for member `tool_use` blocks, batch actions, and `toolset_name` on results. The toolset is available on the Claude API and Google Cloud. For other platforms, see the computer use tool's [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) section. Integrations that already use the toolset, and the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool), need no change. +To move an existing integration on the Claude API or Claude Models on Google Cloud (Google managed), follow [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124), which shows the request before and after. Drop the beta header, replace the `tools` entry with `{"type": "computer_toolset_20260801"}`, and update your agent loop for member `tool_use` blocks, batch actions, and `toolset_name` on results. The toolset is available on both the Claude API and Claude Models on Google Cloud (Google managed). For other platforms, see the computer use tool's [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) section. Integrations that already use the toolset, and the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool), need no change. ### Some advisor tool pairings are not supported @@ -74,7 +74,7 @@ With the [advisor tool](https://platform.claude.com/docs/en/agents-and-tools/too ## Feature support -Claude Sonnet 5.5 supports [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta), [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), [mid-conversation tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes) (beta), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) with a 512-token minimum cacheable prompt, [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). Per-message effort, mid-conversation system messages, and mid-conversation tool changes aren't available on Claude Sonnet 5, whose minimum cacheable prompt is 1,024 tokens. On the Claude API and Google Cloud, computer use requires the `computer_toolset_20260801` toolset (see the [breaking change](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#computer-20251124-is-not-supported)). See each feature's page for model availability. +Claude Sonnet 5.5 supports [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta), [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), [mid-conversation tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes) (beta), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) with a 512-token minimum cacheable prompt, [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). Per-message effort, mid-conversation system messages, and mid-conversation tool changes aren't available on Claude Sonnet 5, whose minimum cacheable prompt is 1,024 tokens. On the Claude API and Claude Models on Google Cloud (Google managed), computer use requires the `computer_toolset_20260801` toolset (see the [computer use breaking change](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#computer-20251124-is-not-supported)). See each feature's page for model availability. ### Compact on demand (beta) @@ -86,7 +86,7 @@ With the `inline-tools-2026-09-15` beta header, a `tool_addition` block in a mid ### Thinking blocks stay with the account that produced them -Thinking blocks that Claude Sonnet 5.5 produces work only in the account that produced them, or in an account linked to it. When another account sends one of these blocks, the API drops the block before the model sees it, and the request succeeds. On the Claude API and Google Cloud, with the `thinking-binding-controls-2026-08-01` beta header, the response lists each dropped block in `input_transformations` with `reason: "organization_binding_mismatch"`. Blocks from earlier models aren't affected. See [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#account-bound-thinking). +Thinking blocks that Claude Sonnet 5.5 produces work only in the account that produced them, or in an account linked to it. When another account sends one of these blocks, the API drops the block before the model receives it, and the request succeeds. On the Claude API and Claude Models on Google Cloud (Google managed), with the `thinking-binding-controls-2026-08-01` beta header, the response lists each dropped block in `input_transformations` with `reason: "organization_binding_mismatch"`. Blocks from earlier models aren't affected. See [thinking blocks from another account](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#account-bound-thinking) in Preserved thinking. ## Behavior differences @@ -98,7 +98,7 @@ Claude Sonnet 5.5 differs from Claude Sonnet 5 in several ways that show up with ## Refusals, fallback, and billing -Everything in [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback) applies to Claude Sonnet 5.5. A declined request returns HTTP 200 with `stop_reason: "refusal"` and a [`stop_details`](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#refusal-response) object naming the policy area. Handle refusals and configure fallback. [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) (`fallbacks: "default"`, in beta, on the Claude API) retries `"cyber"` and `"frontier_llm"` declines on Claude Sonnet 5. It doesn't retry `"bio"`, `"reasoning_extraction"`, or `"general_harms"` declines. You can also use the [SDK middleware](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) or your own retry. Whether a refusal that arrives before any output is billed depends on its refusal category, and it counts against your rate limits either way. See [How refusals are billed](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#how-refusals-are-billed). +Everything in [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback) applies to Claude Sonnet 5.5. A declined request returns HTTP 200 with `stop_reason: "refusal"` and a [`stop_details`](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#refusal-response) object naming the policy area. Handle refusals and configure fallback. [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) (`fallbacks: "default"`), in beta on the Claude API and on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), retries `"cyber"` and `"frontier_llm"` declines on Claude Sonnet 5. It doesn't retry `"bio"`, `"reasoning_extraction"`, or `"general_harms"` declines. You can also use the [SDK middleware](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) or your own retry. Whether a refusal that arrives before any output is billed depends on its refusal category, and it counts against your rate limits either way. See [How refusals are billed](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#how-refusals-are-billed). ## Pricing @@ -108,10 +108,10 @@ Claude Sonnet 5.5 has the same prices as Claude Sonnet 5, except for prompt cach Claude Sonnet 5.5 is available on: -* **Claude API:** all customers, as `claude-sonnet-5-5`. -* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-sonnet-5-5`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-sonnet-5-5`. -* **Google Cloud:** [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), as `claude-sonnet-5-5`. -* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), as `claude-sonnet-5-5`. +* **Claude API:** all customers, as `claude-sonnet-5-5` +* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-sonnet-5-5`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-sonnet-5-5` +* **Google Cloud:** [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), as `claude-sonnet-5-5`, and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), as `claude-sonnet-5-5` +* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), as `claude-sonnet-5-5` ## Migrate from Claude Sonnet 5 @@ -159,7 +159,7 @@ Then check six things: 1. If your code turns thinking off with `disabled`, send `between_tools` instead, at `high` effort or below. 2. Replace `tool_choice` types `any` and `tool` with `auto` plus [strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use). 3. Keep conversations append-only. A request that replays a Claude Sonnet 5.5 thinking block after an edit to earlier history can return a 400 error. See [Thinking blocks are tied to the model and the conversation](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them). -4. If you use computer use through `computer_20251124` on the Claude API or Google Cloud, [move to the toolset](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). +4. If you use computer use through `computer_20251124` on the Claude API or Claude Models on Google Cloud (Google managed), [move to the toolset](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). 5. If you use the advisor tool with a Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, or Claude Haiku 5.5 advisor, [switch to an advisor that Claude Sonnet 5.5 accepts](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#advisor-tool-pairings). 6. If your interface shows the text between tool calls, set `thinking.display` when you use adaptive thinking. With `between_tools`, the text comes back without it. See [Text between tool calls is returned in thinking blocks](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#text-between-tool-calls). diff --git a/content/en/models/sonnet-5/overview.md b/content/en/models/sonnet-5/overview.md index a79444881b..b3769b2c93 100644 --- a/content/en/models/sonnet-5/overview.md +++ b/content/en/models/sonnet-5/overview.md @@ -35,13 +35,14 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $2 / MTok ### Model IDs -| Platform | Model ID | -| :----------------------------------------------------------------------------------------------------- | :-------------------------- | -| Claude API | `claude-sonnet-5` | -| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-sonnet-5` | -| [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-sonnet-5` | -| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-sonnet-5` | -| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-sonnet-5` | +| Platform | Model ID | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------- | +| Claude API | `claude-sonnet-5` | +| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-sonnet-5` | +| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-sonnet-5` | +| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-sonnet-5` | +| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-sonnet-5` | +| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-sonnet-5` | ### Pricing @@ -71,12 +72,12 @@ Context window: 1M tokens · Max output: 128K tokens · Input pricing: $2 / MTok ### Availability -| Feature | Value | -| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | -| Released | June 30, 2026 | -| Retirement | Not sooner than June 30, 2027 | -| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | +| Feature | Value | +| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) | +| Released | June 30, 2026 | +| Retirement | Not sooner than June 30, 2027 | +| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | ## Good to know diff --git a/content/en/release-notes/overview.md b/content/en/release-notes/overview.md index 09b022d07f..db08ad01ad 100644 --- a/content/en/release-notes/overview.md +++ b/content/en/release-notes/overview.md @@ -12,6 +12,12 @@ The Claude Platform release notes list changes to the Claude API, the client SDK For updates to Claude Code, see the [complete CHANGELOG.md](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md) in the `claude-code` repository. +### October 22, 2026 + +* We've launched [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), the Claude API operated by Anthropic and reached through your Google Cloud project. Google Cloud IAM controls access. Google Cloud Marketplace handles billing. + +- [Fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) is available for Claude Opus 5.5 on Claude Models on Google Cloud (Anthropic managed). + ### October 21, 2026 * We've released API version `2026-10-21`. [Migrating to API version 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21) shows how to upgrade. @@ -52,7 +58,7 @@ The Claude Platform release notes list changes to the Claude API, the client SDK ### October 7, 2026 * We've lowered the price of prompt cache reads on Claude Sonnet 5.5 from $0.20 USD to $0.10 USD per million tokens: 0.05x the base input price instead of 0.1x. Cache writes and all other prices are unchanged. See [Prompt caching pricing](https://platform.claude.com/docs/en/about-claude/pricing#prompt-caching). -* We've launched **Claude Haiku 5.5** (`claude-haiku-5-5`), our most capable model tuned for high-volume and latency-sensitive work. It has a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows), 128k max output tokens, and [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) with the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort). It's available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). See [What's new in Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5). +* We've launched **Claude Haiku 5.5** (`claude-haiku-5-5`), our most capable model tuned for high-volume and latency-sensitive work. It has a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows), 128k max output tokens, and [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) with the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort). It's available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). See [What's new in Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5). * Code written for Claude Haiku 4.5 can break on Claude Haiku 5.5. Manual extended thinking (`budget_tokens`), the sampling parameters `temperature`, `top_p`, and `top_k`, and assistant message prefill can each return a 400 error. `computer_20250124` also returns a 400 error: use the `computer_toolset_20260801` toolset on the Claude API and Google Cloud, or `computer_20251124` on Amazon Bedrock. A request that sends thinking blocks back after a change to `system`, `tools`, or earlier turns can also return a 400 error. Adaptive thinking is on by default, so a response can begin with `thinking` blocks, and their text is omitted unless you set `thinking.display` to `"summarized"`. The same text also counts as more tokens. See the [migration guide](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide) for each change. For model-specific prompting patterns, see [Prompting Claude Haiku 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5). * The Python and TypeScript SDKs now include classes, in beta, for the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) and the [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool). You subclass one and write one method per tool against your own browser or desktop automation. The SDK runs the tool loop, the URL and file policies you set for the browser, and your approval callback. See [Browser and computer use with the SDK toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-sdk). * Claude Max and Team plans now include monthly API credits. To learn how to claim them, see [API credits for Max and Team plans](https://platform.claude.com/docs/en/about-claude/api-credits-for-subscribers). @@ -80,7 +86,7 @@ The Claude Platform release notes list changes to the Claude API, the client SDK ### September 28, 2026 -* We've launched **Claude Sonnet 5.5** (`claude-sonnet-5-5`). It's available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). For its context window, output limits, and prices, see the [Claude Sonnet 5.5 model page](https://platform.claude.com/docs/en/models/sonnet-5-5/overview). +* We've launched **Claude Sonnet 5.5** (`claude-sonnet-5-5`). It's available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). For its context window, output limits, and prices, see the [Claude Sonnet 5.5 model page](https://platform.claude.com/docs/en/models/sonnet-5-5/overview). * Code written for Claude Sonnet 5 can break on Claude Sonnet 5.5 in five ways. To turn off up-front thinking, send `thinking: {"type": "between_tools"}` instead of `"disabled"`, at `high` effort or below. Forced tool use (`tool_choice` types `any` and `tool`) returns a 400 error. Thinking blocks are tied to the model and the conversation. On the Claude API and Google Cloud, the earlier `computer_20251124` computer use tool isn't accepted. The advisor tool rejects Claude Opus 4.8, Claude Opus 4.7, and Claude Sonnet 5 as advisors. See [What's new in Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5) for each change and the [migration guide](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide) for before-and-after requests. For model-specific prompting patterns, see [Prompting Claude Sonnet 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5). * Thinking blocks that Claude Sonnet 5.5 produces work only in the account that produced them, or in an account linked to it. When another account sends one of these blocks, the API drops the block before the model sees it, and the request succeeds. Blocks from earlier models aren't affected. See [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#account-bound-thinking). @@ -96,7 +102,7 @@ The Claude Platform release notes list changes to the Claude API, the client SDK ### September 22, 2026 -* We've launched **Claude Opus 5.5** (`claude-opus-5-5`), a model for long-running agentic coding and knowledge work. It has a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, 128k max output tokens, and always-on [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), at $4 / $20 USD per MTok (Claude Opus 5 is $5 / $25). Claude Opus 5.5 is available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). See [What's new in Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5) for capabilities, API changes, and migration guidance. +* We've launched **Claude Opus 5.5** (`claude-opus-5-5`), a model for long-running agentic coding and knowledge work. It has a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, 128k max output tokens, and always-on [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), at $4 / $20 USD per MTok (Claude Opus 5 is $5 / $25). Claude Opus 5.5 is available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). See [What's new in Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5) for capabilities, API changes, and migration guidance. * On Claude Opus 5.5, thinking can't be disabled: `thinking: {"type": "disabled"}` and `thinking: {"type": "enabled", ...}` return a 400 error. Omit the `thinking` field and control thinking depth with the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort). `tool_choice` types `any` and `tool` also return a 400 error, as on Claude Fable 5.1; use `auto` with [strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use). On the Claude API and Google Cloud, [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) on this model requires the `computer_toolset_20260801` toolset and the earlier `computer_20251124` tool returns a 400 error; on Amazon Bedrock, `computer_20251124` keeps working. See the [migration guide](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#migrating-from-claude-opus-5). * [Fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) (research preview) is available for Claude Opus 5.5 on the Claude API. * Tools can now be defined inside a [mid-conversation system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#define-tools-in-a-message-beta), in beta on the Claude API with the `inline-tools-2026-09-15` beta header. A `tool_addition` block can carry the tool's full definition (`tool: {"type": "tool_definition", "definition": {...}}`), so you can add a tool, change its schema, or move a server tool to a newer version without editing `tools` or invalidating the prompt cache. The same header covers adding and removing tools by reference. With the MCP connector's `mcp-client-2026-09-15` beta header as well, the definition can be an MCP toolset, and a response records each server's fetched tool list in an `mcp_tool_listing` block, which pins that list when you send it back. @@ -123,11 +129,11 @@ The Claude Platform release notes list changes to the Claude API, the client SDK ### September 3, 2026 * Version 1.30.0 of the `ant` CLI adds `ant apply`, which creates and updates agents, environments, skills, memory stores, and deployments from files in your repository. Describe each resource in a file, run `ant apply`, and approve the plan it prints. Commit the `claude-lock.json` lockfile it writes so that later runs, on your machine or in CI, update the same resources instead of creating new ones. See [Manage resources as code with ant apply](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/apply). -* [Per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) changes, in beta, are also available on [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) for Claude Fable 5.1, Claude Mythos 5.1, and Claude Opus 5, with the same `mid-conversation-output-config-2026-07-01` beta header. +* [Per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) changes, in beta, are also available on [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) for Claude Fable 5.1, Claude Mythos 5.1, and Claude Opus 5, with the same `mid-conversation-output-config-2026-07-01` beta header. ### September 1, 2026 -* We've launched **Claude Fable 5.1** (`claude-fable-5-1`), the successor to Claude Fable 5 for long-running agentic coding, knowledge work, and research, alongside **Claude Mythos 5.1** (`claude-mythos-5-1`) for Project Glasswing participants. Both models support a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, 128k max output tokens, and always-on [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), at $10 / $50 USD per MTok, the same as Claude Fable 5, with cache reads cut to $0.25 per MTok. Claude Fable 5.1 is available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). See [What's new in Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1) for capabilities, API changes, and migration guidance. +* We've launched **Claude Fable 5.1** (`claude-fable-5-1`), the successor to Claude Fable 5 for long-running agentic coding, knowledge work, and research, alongside **Claude Mythos 5.1** (`claude-mythos-5-1`) for Project Glasswing participants. Both models support a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, 128k max output tokens, and always-on [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), at $10 / $50 USD per MTok, the same as Claude Fable 5, with cache reads cut to $0.25 per MTok. Claude Fable 5.1 is available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). See [What's new in Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1) for capabilities, API changes, and migration guidance. * Prompt cache reads on Claude Fable 5.1 and Claude Mythos 5.1 cost $0.25 USD per million tokens: 0.025x the base input price, compared with 0.1x on other models. Cache writes are unchanged. See [Prompt caching pricing](https://platform.claude.com/docs/en/about-claude/pricing#prompt-caching). * On Claude Fable 5.1 and Claude Mythos 5.1, `tool_choice` types `any` and `tool` aren't supported and return a 400 error. `auto` and `none` are unchanged. To guarantee schema-conformant tool inputs, use [strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use) or [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs). * Thinking blocks produced by Claude Fable 5.1 and Claude Mythos 5.1 are preserved only for the model that produced them or a newer one: earlier models can't read them, and the API drops one replayed to an earlier model. Claude Fable 5.1 accepts thinking blocks from Claude Opus 5, Claude Fable 5, Claude Mythos 5, and earlier Claude models. On Claude Fable 5.1, the API also [checks that nothing before a block has changed](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-in-conversation): for new accounts created on or after August 31, 2026, replaying one after the `system` prompt, `tools`, or an earlier message changed returns a 400 error. With the `thinking-binding-controls-2026-08-01` beta header, dropped blocks are reported in an `input_transformations` response field, and `thinking.block_binding.prefix_mismatch_behavior` chooses between rejecting and dropping blocks whose history changed. See [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-thinking). @@ -153,7 +159,7 @@ The Claude Platform release notes list changes to the Claude API, the client SDK ### August 20, 2026 * We've released **v1.0 of the [Python SDK](https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/python)**. The SDK's HTTP layer moves from `httpx` to [httpx2](https://httpx2.pydantic.dev), a maintained, API-compatible fork: build custom `http_client`, `Timeout`, and transport objects from `httpx2` (the `DefaultHttpxClient` helpers are unchanged), and call `httpx2.alias_httpx()` at startup if you rely on tracing or mocking libraries that patch `httpx`. v1.0 requires Python 3.10 or later and removes long-deprecated surface, including the legacy Text Completions API, the `temperature`, `top_p`, and `top_k` parameters on Messages methods, and the tool runner's client-side `compaction_control`. On the async client, `.with_raw_response` results now need `await response.parse()`, and `AnthropicBedrock` now raises an error when no AWS region is configured instead of defaulting to `us-east-1`. See the [v1 migration guide](https://github.com/anthropics/anthropic-sdk-python/blob/main/MIGRATION.md) for every change with before-and-after snippets. -* The [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolsets (`computer_toolset_20260801` and `browser_toolset_20260801`) are now available on [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) for Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Sonnet 5, and Claude Opus 4.8. Requests use the same `tools` entries as on the Claude API. +* The [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolsets (`computer_toolset_20260801` and `browser_toolset_20260801`) are now available on [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) for Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Sonnet 5, and Claude Opus 4.8. Requests use the same `tools` entries as on the Claude API. ### August 19, 2026 @@ -202,7 +208,7 @@ The Claude Platform release notes list changes to the Claude API, the client SDK ### July 24, 2026 -* We've launched **Claude Opus 5** (`claude-opus-5`), a step-change improvement over Claude Opus 4.8. Claude Opus 5 supports a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) (both the default and the maximum), 128k max output tokens, and [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) on by default, at $5 / $25 USD per MTok, the same pricing as Claude Opus 4.8. It's available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). See [What's new in Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview) for new features, behavior changes, and migration guidance, and the [models overview](https://platform.claude.com/docs/en/models/overview) for complete specs. +* We've launched **Claude Opus 5** (`claude-opus-5`), a step-change improvement over Claude Opus 4.8. Claude Opus 5 supports a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) (both the default and the maximum), 128k max output tokens, and [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) on by default, at $5 / $25 USD per MTok, the same pricing as Claude Opus 4.8. It's available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). See [What's new in Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview) for new features, behavior changes, and migration guidance, and the [models overview](https://platform.claude.com/docs/en/models/overview) for complete specs. * On Claude Opus 5, disabling thinking is allowed only at effort `high` or below: `thinking: {"type": "disabled"}` with effort `xhigh` or `max` returns a 400 error, a breaking change from Claude Opus 4.8. See [What's new in Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview). * [Effort](https://platform.claude.com/docs/en/build-with-claude/effort) is the primary control for steering Claude Opus 5: the model supports the full ladder (`low`, `medium`, `high`, `xhigh`, `max`), with `max` for capability-critical work. * Mid-conversation tool changes are now in beta on Claude Fable 5, Claude Mythos 5, Claude Opus 4.8, and Claude Opus 5: add or remove tools between turns of a conversation while preserving the prompt cache. Include the `mid-conversation-tool-changes-2026-07-01` beta header in your requests. @@ -224,7 +230,7 @@ The Claude Platform release notes list changes to the Claude API, the client SDK ### July 15, 2026 -* [Mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) are available on Claude Fable 5, Claude Mythos 5, and Claude Opus 4.8, on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai). No beta header is required. This corrects earlier availability notes. +* [Mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) are available on Claude Fable 5, Claude Mythos 5, and Claude Opus 4.8, on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed). No beta header is required. This corrects earlier availability notes. ### July 14, 2026 @@ -580,7 +586,7 @@ The Claude Platform release notes list changes to the Claude API, the client SDK ### August 26, 2025 * We've increased rate limits on the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) for Claude Sonnet 4 on the Claude API. -* The 1M token context window is now available on Vertex AI. For more information, see [Claude on Vertex AI](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai). +* The 1M token context window is now available on Vertex AI. For more information, see [Claude on Vertex AI](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed). ### August 19, 2025 diff --git a/content/en/test-and-evaluate/develop-tests.md b/content/en/test-and-evaluate/develop-tests.md index 3b1e00f904..74c6c9dd0f 100644 --- a/content/en/test-and-evaluate/develop-tests.md +++ b/content/en/test-and-evaluate/develop-tests.md @@ -1118,7 +1118,7 @@ Most use cases need multidimensional evaluation along several success criteria. // ROUGE-L measures the longest common subsequence (LCS) of words between the // candidate and reference summaries, reported here as an F1 score. Tokenization - // is simplified to whitespace words; scores may differ from the Python rouge library. + // is simplified to whitespace words; scores might differ from the Python rouge library. function rougeL(candidate: string, reference: string): number { const candidateWords = candidate.toLowerCase().trim().split(/\s+/); const referenceWords = reference.toLowerCase().trim().split(/\s+/); @@ -1187,7 +1187,7 @@ Most use cases need multidimensional evaluation along several success criteria. // ROUGE-L measures the longest common subsequence (LCS) of words between the // candidate and reference summaries, reported here as an F1 score. Tokenization - // is simplified to whitespace words; scores may differ from the Python rouge library. + // is simplified to whitespace words; scores might differ from the Python rouge library. double RougeL(string candidate, string reference) { var candidateWords = Regex.Split(candidate.ToLowerInvariant().Trim(), @"\s+"); @@ -1290,7 +1290,7 @@ Most use cases need multidimensional evaluation along several success criteria. // ROUGE-L measures the longest common subsequence (LCS) of words between the // candidate and reference summaries, reported here as an F1 score. Tokenization - // is simplified to whitespace words; scores may differ from the Python rouge library. + // is simplified to whitespace words; scores might differ from the Python rouge library. func rougeL(candidate, reference string) float64 { candidateWords := strings.Fields(strings.ToLower(candidate)) referenceWords := strings.Fields(strings.ToLower(reference)) @@ -1371,7 +1371,7 @@ Most use cases need multidimensional evaluation along several success criteria. // ROUGE-L measures the longest common subsequence (LCS) of words between the // candidate and reference summaries, reported here as an F1 score. Tokenization - // is simplified to whitespace words; scores may differ from the Python rouge library. + // is simplified to whitespace words; scores might differ from the Python rouge library. double rougeL(String candidate, String reference) { var candidateWords = candidate.toLowerCase().strip().split("\\s+"); var referenceWords = reference.toLowerCase().strip().split("\\s+"); @@ -1443,7 +1443,7 @@ Most use cases need multidimensional evaluation along several success criteria. // ROUGE-L measures the longest common subsequence (LCS) of words between the // candidate and reference summaries, reported here as an F1 score. Tokenization - // is simplified to whitespace words; scores may differ from the Python rouge library. + // is simplified to whitespace words; scores might differ from the Python rouge library. function rougeL(string $candidate, string $reference): float { $candidateWords = preg_split('/\s+/', strtolower(trim($candidate))); @@ -1527,7 +1527,7 @@ Most use cases need multidimensional evaluation along several success criteria. # ROUGE-L measures the longest common subsequence (LCS) of words between the # candidate and reference summaries, reported here as an F1 score. Tokenization - # is simplified to whitespace words; scores may differ from the Python rouge library. + # is simplified to whitespace words; scores might differ from the Python rouge library. def rouge_l(candidate, reference) candidate_words = candidate.downcase.split reference_words = reference.downcase.split @@ -1602,7 +1602,7 @@ Most use cases need multidimensional evaluation along several success criteria. 5: Perfectly {target_tone} Output only the number.""" - # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + # Generally best practice to evaluate with a different model from the one used to generate the evaluated output response = client.messages.create( model="claude-opus-5-5", max_tokens=1024, @@ -1660,7 +1660,7 @@ Most use cases need multidimensional evaluation along several success criteria. 5: Perfectly ${targetTone} Output only the number.`; - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output const response = await client.messages.create({ model: "claude-opus-5-5", max_tokens: 1024, @@ -1721,7 +1721,7 @@ Most use cases need multidimensional evaluation along several success criteria. Output only the number. """; - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output var response = await client.Messages.Create(new MessageCreateParams { Model = Model.ClaudeOpus5_5, @@ -1804,7 +1804,7 @@ Most use cases need multidimensional evaluation along several success criteria. 5: Perfectly %[1]s Output only the number.`, targetTone, modelOutput) - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5_5, MaxTokens: 1024, @@ -1873,7 +1873,7 @@ Most use cases need multidimensional evaluation along several success criteria. 5: Perfectly %1$s Output only the number.""".formatted(targetTone, modelOutput); - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output var params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5_5) .maxTokens(1024L) @@ -1931,7 +1931,7 @@ Most use cases need multidimensional evaluation along several success criteria. Output only the number. PROMPT; - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output $response = $client->messages->create( model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, @@ -2008,7 +2008,7 @@ Most use cases need multidimensional evaluation along several success criteria. Output only the number. PROMPT - # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + # Generally best practice to evaluate with a different model from the one used to generate the evaluated output response = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5_5, max_tokens: 1024, @@ -2082,7 +2082,7 @@ Most use cases need multidimensional evaluation along several success criteria. {model_output} Output only 'yes' or 'no'.""" - # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + # Generally best practice to evaluate with a different model from the one used to generate the evaluated output response = client.messages.create( model="claude-opus-5-5", max_tokens=1024, @@ -2159,7 +2159,7 @@ Most use cases need multidimensional evaluation along several success criteria. ${modelOutput} Output only 'yes' or 'no'.`; - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output const response = await client.messages.create({ model: "claude-opus-5-5", max_tokens: 1024, @@ -2227,7 +2227,7 @@ Most use cases need multidimensional evaluation along several success criteria. Output only 'yes' or 'no'. """; - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output var response = await client.Messages.Create(new MessageCreateParams { Model = Model.ClaudeOpus5_5, @@ -2324,7 +2324,7 @@ Most use cases need multidimensional evaluation along several success criteria. %s Output only 'yes' or 'no'.`, modelOutput) - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5_5, MaxTokens: 1024, @@ -2401,7 +2401,7 @@ Most use cases need multidimensional evaluation along several success criteria. %s Output only 'yes' or 'no'.""".formatted(modelOutput); - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output var params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5_5) .maxTokens(1024L) @@ -2472,7 +2472,7 @@ Most use cases need multidimensional evaluation along several success criteria. Output only 'yes' or 'no'. PROMPT; - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output $response = $client->messages->create( model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, @@ -2558,7 +2558,7 @@ Most use cases need multidimensional evaluation along several success criteria. Output only 'yes' or 'no'. PROMPT - # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + # Generally best practice to evaluate with a different model from the one used to generate the evaluated output response = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5_5, max_tokens: 1024, @@ -2656,7 +2656,7 @@ Most use cases need multidimensional evaluation along several success criteria. 5: Perfectly utilizes context Output only the number and nothing else.""" - # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + # Generally best practice to evaluate with a different model from the one used to generate the evaluated output response = client.messages.create( model="claude-opus-5-5", max_tokens=1024, @@ -2748,7 +2748,7 @@ Most use cases need multidimensional evaluation along several success criteria. 5: Perfectly utilizes context Output only the number and nothing else.`; - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output const response = await client.messages.create({ model: "claude-opus-5-5", max_tokens: 1024, @@ -2829,7 +2829,7 @@ Most use cases need multidimensional evaluation along several success criteria. Output only the number and nothing else. """; - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output var response = await client.Messages.Create(new MessageCreateParams { Model = Model.ClaudeOpus5_5, @@ -2940,7 +2940,7 @@ Most use cases need multidimensional evaluation along several success criteria. 5: Perfectly utilizes context Output only the number and nothing else.`, conversationText.String(), modelOutput) - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5_5, MaxTokens: 1024, @@ -3029,7 +3029,7 @@ Most use cases need multidimensional evaluation along several success criteria. 5: Perfectly utilizes context Output only the number and nothing else.""".formatted(conversationText, modelOutput); - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output var params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5_5) .maxTokens(1024L) @@ -3100,7 +3100,7 @@ Most use cases need multidimensional evaluation along several success criteria. Output only the number and nothing else. PROMPT; - // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + // Generally best practice to evaluate with a different model from the one used to generate the evaluated output $response = $client->messages->create( model: Model::CLAUDE_OPUS_5_5, maxTokens: 1024, @@ -3187,7 +3187,7 @@ Most use cases need multidimensional evaluation along several success criteria. Output only the number and nothing else. PROMPT - # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output + # Generally best practice to evaluate with a different model from the one used to generate the evaluated output response = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5_5, max_tokens: 1024, diff --git a/content/en/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals.md b/content/en/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals.md index e870bc1729..e61105234c 100644 --- a/content/en/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals.md +++ b/content/en/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals.md @@ -236,7 +236,8 @@ Here's how to detect and handle streaming refusals in your application: $client = new Client(); $messages = []; - function resetConversation(&$messages) { + function resetConversation(&$messages) + { $messages = []; echo "Conversation reset due to refusal\n"; } @@ -257,7 +258,7 @@ Here's how to detect and handle streaming refusals in your application: } } } catch (\Exception $e) { - echo "Error: " . $e->getMessage() . "\n"; + echo 'Error: ' . $e->getMessage() . "\n"; } ``` diff --git a/content/github/claude-plugins-official/.claude-plugin/marketplace.json b/content/github/claude-plugins-official/.claude-plugin/marketplace.json index 783b9b98c3..536ff754c5 100644 --- a/content/github/claude-plugins-official/.claude-plugin/marketplace.json +++ b/content/github/claude-plugins-official/.claude-plugin/marketplace.json @@ -1314,7 +1314,7 @@ "url": "https://github.com/databricks/databricks-agent-skills.git", "path": "plugins/databricks/claude", "ref": "main", - "sha": "e77e37e8a4dabbe2662b680c180bb72a05eca48d" + "sha": "c1964266c7aa6063d89036691d0594420ffa0129" }, "homepage": "https://developers.databricks.com/" }, diff --git a/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md b/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md index a6351d22c4..dee965426d 100644 --- a/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md +++ b/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md @@ -38,7 +38,7 @@ To regain access to your account on any device, you'll need to authenticate agai If you used your Claude account to authenticate into Claude Code, you can manage your authorization tokens by navigating to **[Settings > Claude Code](https://claude.ai/settings/claude-code)**. To remove a token and log out of Claude Code, click the trash can icon. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1608263923/b4fa7d6f6f08f2adffb4ea63bc58/image+%287%29.png?expires=1792699200&signature=0e486531b5be716e5c46460852262df9d1d6854b20867cf2b26271c86b6c0875&req=dSYnHst4nohdWvMW1HO4zVuHix773265AQofdwM8qVfZPZ5t9lZWvn2qLrb7%0Aisr9twhaQ4hjj4iE7LU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1608263923/b4fa7d6f6f08f2adffb4ea63bc58/image+%287%29.png?expires=1792735200&signature=fdb92a361f776cb57ff94c44d15c9bca7f07b015063a13efa3cafcca8e6f05e6&req=dSYnHst4nohdWvMW1HO4zVuHix761WK5AQofdwM8qVesiR9mqjNWje5LvOtB%0AUuv%2BiLbybKBfDFDTpZw%3D%0A) ## Unable to access your account? diff --git a/content/support/10440198-configure-custom-data-retention-controls-for-enterprise-plans.md b/content/support/10440198-configure-custom-data-retention-controls-for-enterprise-plans.md index 6c37bce0f0..a1982177e5 100644 --- a/content/support/10440198-configure-custom-data-retention-controls-for-enterprise-plans.md +++ b/content/support/10440198-configure-custom-data-retention-controls-for-enterprise-plans.md @@ -1,10 +1,10 @@ # Configure custom data retention controls for Enterprise plans -This feature is available to Enterprise plan customers. To set custom retention periods for your organization, you must have either a Primary Owner or Owner role. - *This article is about our commercial products, specifically Claude Enterprise. For our consumer products such as Claude Free, Pro, Max and when accounts from those plans use Claude Code, see **[here](https://privacy.claude.com/en/collections/10663362-consumers)**.* -Custom data retention controls allow organizations to manage how long Claude stores conversation and project data. This article explains how to set up and manage data retention periods for your organization. +Custom data retention controls allow organizations to manage how long Claude stores conversation, project, and artifact data. This article explains how to set up and manage data retention periods for your organization. + +This feature is available to Enterprise plan customers. A retention period set on an Enterprise plan still applies to artifacts if your organization later changes to a Team plan. To set custom retention periods for your organization, you must have either a Primary Owner or Owner role. ## How data retention works @@ -38,15 +38,19 @@ Data retention is based on the last observed activity: - Project retention always takes precedence over chat retention for chats inside a project. This applies even if you haven’t set a custom project retention period: by default, projects are retained indefinitely, so chats inside projects are not deleted by your chat retention period. +- **For artifacts:** Retention period starts from the last time someone opened or edited the artifact. + The minimum retention period is 30 days, and each month is counted as 30 days. For example, a three-month retention period equals 90 days. ## What gets deleted When data reaches the end of its retention period: -- **For chats:** All standalone chats (chats not inside a project) and any artifacts within those chats will be deleted. Chats inside a project follow the project’s retention period. Moving a chat into a project places it under the project’s retention period; moving a chat out of a project makes it standalone again, and it becomes eligible for deletion under the chat retention period based on its last activity. +- **For chats:** All standalone chats (chats not inside a project) will be deleted. Chats inside a project follow the project’s retention period. Moving a chat into a project places it under the project’s retention period; moving a chat out of a project makes it standalone again, and it becomes eligible for deletion under the chat retention period based on its last activity. + +- **For projects:** All projects will be deleted, including any chats within those projects. -- **For projects:** All projects will be deleted, including any chats and artifacts within those projects. +- **For artifacts:** Artifacts are deleted under a retention period that covers artifacts, not with the chat or project they were made in. This includes artifacts Claude creates in chats, with some exceptions. For example, Research reports and artifacts in some older chats are deleted with their chat, along with any link published from them. A retention period that covers artifacts doesn't delete artifacts published with a public link. ## Important considerations @@ -60,9 +64,9 @@ When data reaches the end of its retention period: - If your chat is flagged by our automated trust and safety systems as violating our Usage Policy, we retain inputs and outputs as described here: **[How long do you store my organization’s data?](https://privacy.claude.com/en/articles/7996866)** -## Setting up data retention +## Set up data retention -## To set custom retention periods: +To set custom retention periods: 1. Log in to your Owner Enterprise plan account. @@ -72,12 +76,12 @@ When data reaches the end of its retention period: 4. Save your changes. -**Important:** Custom retention periods apply to content in chats and projects. They do not apply to **[Claude Design](https://support.claude.com/en/articles/14604416-get-started-with-claude-design)**, **[Claude Tag](https://support.claude.com/en/articles/15594475-what-is-claude-tag)**, **[Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview)**, or any other feature that runs **[Claude Code in the cloud](https://support.claude.com/en/articles/12618689)**. +**Important:** Custom retention periods apply to content in chats, projects, and artifacts. They don't apply to standalone **[Claude Design](https://support.claude.com/en/articles/14604416-get-started-with-claude-design)** at claude.ai/design,[**Claude Tag**](https://support.claude.com/en/articles/15594475-what-is-claude-tag), **[Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview)**, or any other feature that runs **[Claude Code in the cloud](https://support.claude.com/en/articles/12618689)**. A Claude Design project or design system that moves, or has already moved, to Claude becomes an artifact. If your organization has a retention period that covers artifacts (a single period for all data, or the private or shared artifact period if you use separate periods), that artifact can be permanently deleted if nobody opens it for that period. The period starts on the day of the move and restarts when someone opens or edits the artifact. ## Example retention calculation If a conversation’s last message is at 3PM UTC on March 1 with a 30-day retention period, the deletion will occur at midnight UTC on March 31. -## Monitoring retention-related activities +## Monitor retention-related activities All retention-related actions and changes are automatically tracked in **[audit logs](https://support.claude.com/en/articles/9970975-how-to-access-audit-logs)**. You can access these logs to monitor changes to retention settings and data deletion events. \ No newline at end of file diff --git a/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md b/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md index cfd6e26b51..1f59508d56 100644 --- a/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md +++ b/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md @@ -6,6 +6,6 @@ As a Primary Owner or Owner of a Team or Enterprise plan, you can manage the abi 2. Use the toggle to change the **Rate chats** setting for your organization: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2058292603/75752add0bed6a9f3ab217f01708/CleanShot%2B2026-02-12%2Bat%2B08_55_14-402x.png?expires=1792699200&signature=f8f41ab677ec7b46dbad78f4b8a7fb093bdcf343f3b3459d7f34fd541552d7c3&req=diAiHst3n4dfWvMW1HO4zYGm8yUaGaHO085gFtEpvcTWhadz5StAH2%2BmXGdD%0AtN8%2BZe5hsWAXolzKeYc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2058292603/75752add0bed6a9f3ab217f01708/CleanShot%2B2026-02-12%2Bat%2B08_55_14-402x.png?expires=1792735200&signature=7d036c0df7a62f6fa03a55bfea35d0145be931acbf8a1405388ef970858a3f44&req=diAiHst3n4dfWvMW1HO4zYGm8yUbE63O085gFtEpvcQEC4xRDuJ1pbNCSj8Z%0A9ZllyoJS1s5%2FPbJ%2BQxA%3D%0A) More information on how Anthropic collects, uses, and stores feedback data can be found in our Privacy Center: **[How long do you store my organization’s data?](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data)** \ No newline at end of file diff --git a/content/support/10593882-share-and-unshare-chats.md b/content/support/10593882-share-and-unshare-chats.md index a732faf2ec..2fb07e951a 100644 --- a/content/support/10593882-share-and-unshare-chats.md +++ b/content/support/10593882-share-and-unshare-chats.md @@ -38,12 +38,12 @@ To unshare a chat: Users on free, Pro, or Max plans can review a log of shared chats by navigating to **[Settings > Privacy](https://claude.ai/settings/data-privacy-controls)**. Find the **Privacy settings** section and click “Manage” next to **Shared chats:** -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1921669913/7cc7be48cfc7a18f9f469d6cd83c/CleanShot+2026-01-08+at+10_20_43%402x.png?expires=1792699200&signature=85eebc84de597755468497f3612740996f7ee00b36e6587dda49824785b4d817&req=dSklF894lIheWvMW1HO4zWn5HjEba0xpc9cNIYuX0GHtiiTkWcMFnFL78mLh%0AXWdQ3C84n7CqknmMdnA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1921669913/7cc7be48cfc7a18f9f469d6cd83c/CleanShot+2026-01-08+at+10_20_43%402x.png?expires=1792735200&signature=dafd5158e7969afcfc03df5f94286014b56f94db9a9026cae89b9c17f5d026a2&req=dSklF894lIheWvMW1HO4zWn5HjEaYUBpc9cNIYuX0GEb7fpQoUm5bNwd5Nm%2F%0ArC5jBFImTp6HgtPjVxc%3D%0A) This will open a **Shared chats** modal listing the title, date shared, and link to each chat, allowing you to easily review and access all your previously-shared content. From here, you also have the option to click “Unshare” next to each listed chat to revoke access to the last snapshot you shared: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243810/e6fe1d262597446c7fe21dff9f10/AD_4nXdW-GhByF8uKV7fCq9lTbkVB91FglSL6TSyXAOUk_MLcTV9YsEMBMkm9rgm1oXqv0k3sJh1JhlzZP6tHVkKbDJJ71pDRRtM3aVNG64MDuKDIzgmknh-XDZdNa7biTsTdwGoPr5GRg?expires=1792699200&signature=85278c4b61402edc757822831fe5273450118e49f0ed82e5d7c94c9b61d1ea91&req=dSYlEst6noleWfMW1HO4ze44eSVnnRs8guvTv9woD7ZTykfs4EkfpyEB%2BjUj%0AMDw0ybgDXonDQapBLUc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243810/e6fe1d262597446c7fe21dff9f10/AD_4nXdW-GhByF8uKV7fCq9lTbkVB91FglSL6TSyXAOUk_MLcTV9YsEMBMkm9rgm1oXqv0k3sJh1JhlzZP6tHVkKbDJJ71pDRRtM3aVNG64MDuKDIzgmknh-XDZdNa7biTsTdwGoPr5GRg?expires=1792735200&signature=b0713e386e1b98d94f1f7c1ce91f844b2a46ff86f6cc6842a4873b6150f378f3&req=dSYlEst6noleWfMW1HO4ze44eSVmlxc8guvTv9woD7bFMShCgqLX1emDRxAw%0AhbmWRWYUCcBbvcRc8iA%3D%0A) If you don’t have any shared chat snapshots, the **Shared chats** modal will show “No shared content found”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243808/b025db8e598f0c88fb16d83d48d5/AD_4nXeUwCKnmFzzrjMHhfr5By4zk5pJlkEn3wbJ8-aNfu13Yl99IjBywpqPx9G07QRzpH1EwRY7uG7Q9m9fib98Gql1cIV7XwUCTzEgBNu79Ey8tCOS5CEVmwveIcEOxJ4fonBhe3g9MA?expires=1792699200&signature=ac2fb19d340017cb4bdeafaf5913752194a275be1c2cadb4618a1c691b18cfe8&req=dSYlEst6nolfUfMW1HO4zdaFnMdyiICzDeZsm0Gz1HuIoJtKWokaxK6RUmTx%0ABFBBFwmrIBfJqQga1DA%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243808/b025db8e598f0c88fb16d83d48d5/AD_4nXeUwCKnmFzzrjMHhfr5By4zk5pJlkEn3wbJ8-aNfu13Yl99IjBywpqPx9G07QRzpH1EwRY7uG7Q9m9fib98Gql1cIV7XwUCTzEgBNu79Ey8tCOS5CEVmwveIcEOxJ4fonBhe3g9MA?expires=1792735200&signature=eb2bfedc02b372fc71a0d0d16b05869ae86f579e2d22c6713863918deec68fee&req=dSYlEst6nolfUfMW1HO4zdaFnMdzgoyzDeZsm0Gz1HsH4ETHTvqkY50VIXpS%0AvLNzdVpMf1kpybFk%2BTo%3D%0A) \ No newline at end of file diff --git a/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md b/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md index 13e960af74..639c11346f 100644 --- a/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md +++ b/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md @@ -48,7 +48,7 @@ for specific instructions. Custom desktop extensions uploads allow Team and Enterprise plans to leverage organization-specific workflows that aren’t available in the public directory. After creating a custom desktop extension, Owners and Primary Owners can navigate to Settings > Extensions within Claude Desktop and click “Advanced settings” to access the **Extension Developer** section: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1681607607/ba6e379d2769d190f0970a0adaed/AD_4nXd4aZkqjJFpiXMPF28Pih7HmSJ9pPsnoWAfVgiLdFRFiTkO92YtXteIjvDHaPl7T0tjfpRTBOlyrMbQ_aciCNDgfIuEvV3szmKvt72x5O51DMSClXOYWk1JIRIzylwkj3joXqZcLw?expires=1792699200&signature=f386e7f54d4b150c3bcc06e30f562c2835c7f0093dd7c2e10338fdd0c68e8f64&req=dSYvF89%2BmodfXvMW1HO4zWbPxUJ5PjQwHn9K2IaIG2LxwtCqtDdUUTyogHtz%0AI%2FsA0eD0Ky0715YRpOs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1681607607/ba6e379d2769d190f0970a0adaed/AD_4nXd4aZkqjJFpiXMPF28Pih7HmSJ9pPsnoWAfVgiLdFRFiTkO92YtXteIjvDHaPl7T0tjfpRTBOlyrMbQ_aciCNDgfIuEvV3szmKvt72x5O51DMSClXOYWk1JIRIzylwkj3joXqZcLw?expires=1792735200&signature=bd3cf766e115e4e8682177a3e7b45e022947fa0337a016d248901a9c9221dbb4&req=dSYvF89%2BmodfXvMW1HO4zWbPxUJ4NDgwHn9K2IaIG2IbOvgW%2BgOsZscxTNhk%0AofAZcCquX984c7daiao%3D%0A) Click “Install Extension…” and select the .mcpb file. Follow the prompts to install and configure your custom desktop extension. For more in-depth information, please refer to our [desktop extension developer documentation](https://github.com/anthropics/mcpb). diff --git a/content/support/11101966-use-voice-mode.md b/content/support/11101966-use-voice-mode.md index c10d5230fe..43ce1b23a6 100644 --- a/content/support/11101966-use-voice-mode.md +++ b/content/support/11101966-use-voice-mode.md @@ -24,7 +24,7 @@ Voice mode transforms how you interact with Claude by: 2. Tap the sound wave symbol in the lower right corner of the chat window to activate voice mode: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042358620/1bf2311353615c1c494da1312a17/124b93a8-0a9b-4c84-9d1f-ede6ca3498dd?expires=1792699200&signature=35f633a9a76679096e5ad9964bc8208262acd0c7ea68309115bcedbad308e309&req=diAjFMp7lYddWfMW1HO4zZyGr8x0sl4SF6uXnTLMvvDmm0Agj4MftDDWDqJu%0ABna%2B%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042358620/1bf2311353615c1c494da1312a17/124b93a8-0a9b-4c84-9d1f-ede6ca3498dd?expires=1792735200&signature=6956dfec0778fd3ab7294596cb042d67ccaaca26ab419335390466968c8658c2&req=diAjFMp7lYddWfMW1HO4zZyGr8x1uFISF6uXnTLMvvC6DQ7zxgKpHxbeJwjn%0ApxRv%0A) 3. Start talking and see your prompt automatically populate in the chat input. @@ -32,7 +32,7 @@ Voice mode transforms how you interact with Claude by: 5. Claude will remain in voice mode until you click the “Stop” button in the lower right corner of the chat window: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352060/162f9e61f7fbeb689201dfc1cac1/6a7fafb2-31df-43be-a43f-0059d735e3c4?expires=1792699200&signature=1326b405237155426cf369ec009b21b7fbb607896b7899e6a0ca754de612ec0c&req=diAjFMp7n4FZWfMW1HO4zU6VRP%2FMQbVrxNdRzYWrfF4EY0SjYFN5CkdK%2FikH%0AUR8xwdDuijBT0YvSdjI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352060/162f9e61f7fbeb689201dfc1cac1/6a7fafb2-31df-43be-a43f-0059d735e3c4?expires=1792735200&signature=df295ffb16a983459438ed20bb6f5d879ba45f1c8c090a812e6c15882e7e5773&req=diAjFMp7n4FZWfMW1HO4zU6VRP%2FNS7lrxNdRzYWrfF4ndfBY0nMcL8RgLIzO%0AYR3r2IjKo2XsV26V8Ok%3D%0A) ### On mobile (iOS and Android) @@ -40,7 +40,7 @@ Voice mode transforms how you interact with Claude by: 2. Tap the voice mode icon (sound wave symbol next to the microphone icon) in the text input field: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042359690/68879db64559ecf87991f73ce058/671ff972-9e08-4686-bc04-955dab4b2de3?expires=1792699200&signature=4ae62637b0e90b73fcad141df4167a4a29dca81f5ef0d285e40596d906c5e019&req=diAjFMp7lIdWWfMW1HO4zQTUIPZ8mdFMD%2FRXAPlQ7LaHDwsFrtia8AIstzXT%0AHlR2%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042359690/68879db64559ecf87991f73ce058/671ff972-9e08-4686-bc04-955dab4b2de3?expires=1792735200&signature=97fde2a16c4283b9313e55a85695332fda7da4d6b491906ea9b8ded59873b473&req=diAjFMp7lIdWWfMW1HO4zQTUIPZ9k91MD%2FRXAPlQ7La5ylvCI1YHj9PWqspe%0AGwCE%0A) 3. Choose a voice to personalize your experience. @@ -78,7 +78,7 @@ To change the voice later: - **On mobile:** Click the settings button in the bottom left corner while chatting with Claude in voice mode, then tap your preferred voice and pace: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352063/25eca25bcfd573ecab30dd53158c/074454a6-fa5a-4c49-8b19-02d434b4ca50?expires=1792699200&signature=0ccdc58e37743a0db416ca52315cfd117d80467998a75cd557a8f10737c4969e&req=diAjFMp7n4FZWvMW1HO4zZ3%2FGWiTaVkIy8OQfYsvK3ySzHTSXzg%2FF3iQY4%2Bo%0A%2BrZxiexFXVbyczrKW40%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352063/25eca25bcfd573ecab30dd53158c/074454a6-fa5a-4c49-8b19-02d434b4ca50?expires=1792735200&signature=2b85eab29802146d232a2392e21bf08bca8e6ddd4d99d99d1faacfbd18849a48&req=diAjFMp7n4FZWvMW1HO4zZ3%2FGWiSY1UIy8OQfYsvK3zLyZ4ygoXpEDypbBGT%0A8rQMXGVsXVBby9zcGn8%3D%0A) ## Choose a model diff --git a/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md b/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md index 6881350617..7e5171ecca 100644 --- a/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md +++ b/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md @@ -44,7 +44,7 @@ This article provides information on how to enable the Claude LTI integration in 5. Click "Install" and refresh the course page. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1611422430/c8e0875feac1f2c7cb033be74fc9/AD_4nXfLU_bui3EXcCjQ0qm70HD97neqjGayKeDer_t76utlci8gZSUjYRhw6ZSOlDdqSEcwXBzd_shAh7pQEJ-8OoE0O21DM5coOgxmO_WD5hlwiuwtS2iYXcTavhIRyQT5zKFWvfn3NA?expires=1792699200&signature=3e89f32b470bec595e506c7dd5641e4d88ddaf21588387c2df1cfc4fe6e389d6&req=dSYmF818n4VcWfMW1HO4zTEDa%2BkYkvqDEv2ojHLMylbdTNRAQKID%2Bf%2BcBpyh%0AfUfzc0o4NIPYIfttSUA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1611422430/c8e0875feac1f2c7cb033be74fc9/AD_4nXfLU_bui3EXcCjQ0qm70HD97neqjGayKeDer_t76utlci8gZSUjYRhw6ZSOlDdqSEcwXBzd_shAh7pQEJ-8OoE0O21DM5coOgxmO_WD5hlwiuwtS2iYXcTavhIRyQT5zKFWvfn3NA?expires=1792735200&signature=b25435c4cfe3702efb209b60fe58216d657fbe462e1ad5e596b4e8b7c77af2b4&req=dSYmF818n4VcWfMW1HO4zTEDa%2BkZmPaDEv2ojHLMylbCtHxvVmZc2HXEAP6r%0A0EngmZQrrMbfDHk1ZeQ%3D%0A) ## Turn on the Claude LTI Integration in Claude for Education organization settings diff --git a/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md b/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md index 995a176e2c..3008598aec 100644 --- a/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md +++ b/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md @@ -2,7 +2,7 @@ If you see the following pop-up when you log in to your Claude account, you’ll need to click the “Verify now” button to verify your payment method: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1631413861/42c3b13d7fc44a11a88ec2b9cd03/AD_4nXeMx8QXpeZZCkfAnVSwx8KZ9n4Vr2rvPdQddyE6ZNxch__F6ZqFs1G4ZmU52Wvb7gRlwRqquTLdw8IQv-gICDyP-MXqiQK_Oe7gX3SKsCKKt2IEpMx4qDeMeeZufMaJfv16XgOH5g?expires=1792699200&signature=47fb317838b85788592ab66d4cfc7bc1c406f1ec7446c29141e462bdbe0544cc&req=dSYkF81%2FnolZWPMW1HO4zf7%2BjUbo4Ynwn6MrEicvimCIDzyslxtRSNDh3q4Y%0Ab3f1aht61TNa36GbwWM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1631413861/42c3b13d7fc44a11a88ec2b9cd03/AD_4nXeMx8QXpeZZCkfAnVSwx8KZ9n4Vr2rvPdQddyE6ZNxch__F6ZqFs1G4ZmU52Wvb7gRlwRqquTLdw8IQv-gICDyP-MXqiQK_Oe7gX3SKsCKKt2IEpMx4qDeMeeZufMaJfv16XgOH5g?expires=1792735200&signature=e3ae9014a860be6ea127087721976d92bfc37c3d4efb8b36fd928ef0cda2018f&req=dSYkF81%2FnolZWPMW1HO4zf7%2BjUbp64Xwn6MrEicvimAlivTHrVJUQVDUX2L4%0AksgPZ%2FbfvBL9ROLyk70%3D%0A) ## What happens if I click “Remind me later?” diff --git a/content/support/11869629-use-claude-with-android-apps.md b/content/support/11869629-use-claude-with-android-apps.md index c727d478af..b451d26949 100644 --- a/content/support/11869629-use-claude-with-android-apps.md +++ b/content/support/11869629-use-claude-with-android-apps.md @@ -222,7 +222,7 @@ Permission requirements vary by feature: For features requiring permissions (like location or calendar access), Claude will request permission contextually with clear explanations of why the access is needed. You’ll be prompted to approve the action with three options: Allow once, Always allow, or Don't allow. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1707351614/ccb910e4b87b1e96ad9a11bbd835/b57b2130-d8d6-4499-89f6-6c12de236fd4?expires=1792699200&signature=246d4884dcfc02d2ddc1a24d2835d090c47791f0c7920885e5e7a93a6a7c8a81&req=dScnEcp7nIdeXfMW1HO4zQe5G12J0iz2S5x65TIld%2FBxIyQO9elpRbcal0%2BN%0Af2uiy8BMpHbw1dDzjr0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1707351614/ccb910e4b87b1e96ad9a11bbd835/b57b2130-d8d6-4499-89f6-6c12de236fd4?expires=1792735200&signature=2f629beeda850fb9440e40efa69414e88e0986645faa1bd30599f14a9f7ab34f&req=dScnEcp7nIdeXfMW1HO4zQe5G12I2CD2S5x65TIld%2FCIXuy35wxLate%2BE0B%2B%0ASz9YReALVYyH99eOx0M%3D%0A) These permissions can be managed at any time in your device settings by going to Settings > Apps > Claude > Permissions. Click into each permission listed under **Allowed** and **Not allowed** to make changes. You can toggle between “Allow only while using the app” or “Ask every time” to change Claude’s access, or remove permissions by choosing “Don’t allow.” Claude will only request permissions if needed for specific features, and you can always choose to decline while still using other capabilities. diff --git a/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md b/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md index e068b6a3cc..3275c2c709 100644 --- a/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md +++ b/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md @@ -70,7 +70,7 @@ After navigating to **[Organization settings > Usage](https://claude.ai/admin-se The **Usage and spend limits** section will show the current limit (if any) or **Unlimited**. Clicking on "Adjust limit" opens a modal where you can either input an amount and click "Set spend limit," or click "Set to unlimited" to remove the organization-wide monthly spend limit. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149347604/936ac4eb025d3ef1f00c3b8a26b0/image.png?expires=1792699200&signature=579b581c12cd3e540c89d1a843a5b2e7a974b7c9a6976a66ac2485956ae56524&req=diEjH8p6modfXfMW1HO4zQHwgqPRnyek6DwhVVpk1mDR4Ww3NBPFGYhrjw3E%0A8NrDFLgPpvbXEo21Isk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149347604/936ac4eb025d3ef1f00c3b8a26b0/image.png?expires=1792735200&signature=061599cdbc20834be2eaa7dab9b551c1d8a93d2aa60c71814ca5801b6456fb43&req=diEjH8p6modfXfMW1HO4zQHwgqPQlSuk6DwhVVpk1mB7%2Bpq2B3quXNPUr2pO%0Az%2Fg7%2BzuNnO43xIW1IWE%3D%0A) Changes to your organization’s overall spend limit go into effect immediately. @@ -78,11 +78,11 @@ Changes to your organization’s overall spend limit go into effect immediately. Owners and Primary Owners on **seat-based Enterprise plans only** can set spend limits that apply to all users within a specific seat tier. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149351600/c5b979c366ac2738f60ea84e85b3/CleanShot+2026-03-10+at+15_37_41%402x.png?expires=1792699200&signature=38d0223fa2d894fa59ba5d52155588a019a1eb85563b78f09d6b7a28f51289d8&req=diEjH8p7nIdfWfMW1HO4zYnqMYeSKnmL0wfO62ivdG%2B8uo1PQBRdCHlq95iJ%0AwBVCSN800otb1Cu8Bag%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149351600/c5b979c366ac2738f60ea84e85b3/CleanShot+2026-03-10+at+15_37_41%402x.png?expires=1792735200&signature=4ae2859d0e0edc56b2b07e741060a8aaccb01f1acbccede5adab0e3543f585b1&req=diEjH8p7nIdfWfMW1HO4zYnqMYeTIHWL0wfO62ivdG84II6C5FQtZchCzfr4%0A%2B1b46ZyXOCPUHSFtZjM%3D%0A) Select the "By group" tab to see **Standard seats** and **Premium seats** groups. Click the "..." icon next to the current limit, then "Edit limit." This opens a modal where you can either select "Set dollar amount" and input an amount, or click "Unlimited" to remove the limit for that seat type. Click "Set limit" to save your changes. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149362056/44993661ca2db771fe924d0346f6/image.png?expires=1792699200&signature=b77d688099b2d2b1f90062b1a77e91b5c904c7d66486bac8d5bc119d62224568&req=diEjH8p4n4FaX%2FMW1HO4zRzvvYcNeUREq7nEDCGq9G7DWBPRxhXmlfadq0vv%0A7sTv8LG3CJMbJ9wiHWc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149362056/44993661ca2db771fe924d0346f6/image.png?expires=1792735200&signature=9f93212e070dc6355e077eef2aaabfc4b58b52ba4d7eea94e96b5060313faa4b&req=diEjH8p4n4FaX%2FMW1HO4zRzvvYcMc0hEq7nEDCGq9G7g8e5MrPDxADy%2FA9NA%0AUGRkgs9DG%2BSHv6gFM00%3D%0A) --- @@ -90,11 +90,11 @@ Select the "By group" tab to see **Standard seats** and **Premium seats** groups Owners and Primary Owners can also set individual monthly spend limits for each member by finding **Spend limits by user** and clicking the "..." button next to the user, then "Edit limit." -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149370853/db66f5cd03683b9cc119d0dcd6b8/image.png?expires=1792699200&signature=d191507f7366d45eb65a98acfaa2a343246b8b583901651486aee94f8d6c8a54&req=diEjH8p5nYlaWvMW1HO4zaPdGAVRXCZEe9HwvwG7ubigEplRYXhxrwAvhzUF%0Ajd1Z9PdNbyacRc9yYQQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149370853/db66f5cd03683b9cc119d0dcd6b8/image.png?expires=1792735200&signature=917e20405d2a379b17ada1c4611d39f03924a9c28120ac62c9d085b3d1289af7&req=diEjH8p5nYlaWvMW1HO4zaPdGAVQVipEe9HwvwG7ubi4JmlTAB1EN4nvmpo3%0AGzPGKyYZ2rEfH5C1tBs%3D%0A) Enter the amount and click "Set limit." Alternatively, selecting "Set to unlimited" will remove that member's monthly spend limit (they will still be subject to any organization or seat-level spend limits). -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149374028/97813fe3b515c2e839d8d92abd79/image.png?expires=1792699200&signature=8bcf943d6a9ea08c1fad8695c0126b011a9d033c9c918d7ed145f1ffb5a5f0b9&req=diEjH8p5mYFdUfMW1HO4zevsA%2FWMOuKIw6z2wGSwkbs%2F5BSBm6qluupenYUz%0A5pLGvdVc%2BBaaDH0c29M%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149374028/97813fe3b515c2e839d8d92abd79/image.png?expires=1792735200&signature=7b49924704feac20a741c75858a4d6720f4e1f5a9e72eb4dcd62df903ce22b8d&req=diEjH8p5mYFdUfMW1HO4zevsA%2FWNMO6Iw6z2wGSwkbuOBfVPWKlP5Az4Ec1l%0ARBO1yUDQnGL5bnuys8w%3D%0A) This allows owners fine control over usage credits, so you can set limits for different members based on their roles or individual needs. Once a user reaches their defined spend limit, this will automatically pause their usage credits until the end of the month. They will need to wait for their usage limits to reset before using Claude again. diff --git a/content/support/12012173-get-started-with-claude-in-chrome.md b/content/support/12012173-get-started-with-claude-in-chrome.md index e1f0553626..302ca990b8 100644 --- a/content/support/12012173-get-started-with-claude-in-chrome.md +++ b/content/support/12012173-get-started-with-claude-in-chrome.md @@ -38,7 +38,7 @@ Follow these steps to connect Claude in Chrome in your desktop app: 4. Toggle the connector on, then download and install the extension if you haven’t already. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2604933811/ae37c41fc808dbdf48d135338334/6cc9ba4b-9d31-43a2-ab80-8048b5f9d791?expires=1792699200&signature=4664ded2338bf2470772d5e7b3caf863110b9919665f7186b09ee099f10320c7&req=diYnEsB9noleWPMW1HO4zUOPbf7An%2BuPnt%2F2nPMwUPguC7mfJ7OtsWf%2Bi5kQ%0Aj14Ul3r8zDTv1X9S2es%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2604933811/ae37c41fc808dbdf48d135338334/6cc9ba4b-9d31-43a2-ab80-8048b5f9d791?expires=1792735200&signature=dccbd94dbf00b1957045d5b3c5854f0cf32d7e42aa537a11285aec103d7e00c2&req=diYnEsB9noleWPMW1HO4zUOPbf7BleePnt%2F2nPMwUPhwcPRofe7VaeL7okIf%0AYIZZyWmcjw%2BifF5La80%3D%0A) Completing these steps will add Claude in Chrome to the “Connectors” drop-down on your chats with Claude. This is disabled by default, so you’ll need to enable it manually for each conversation. diff --git a/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md b/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md index 03370d2903..1a1a33a2f4 100644 --- a/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md +++ b/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md @@ -8,11 +8,11 @@ Owners and Primary Owners of Team plans with monthly subscriptions can switch fr 3. Or from /upgrade, click the “Switch to Annual plan” button: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1690325734/d47f714680d78408d6022d06b8d1/image.png?expires=1792800000&signature=aa9e98f1d11ed59266e92ef2ee41f826b4455926db87ad5aaf74794f4b7726fd&req=dSYuFsp8mIZcXfMW3Hu4gZzas%2FXsuzdSnWrRiVwqPzbRZJJpnOrc%2FU8UC3Qd%0Ahg%3D%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1690325734/d47f714680d78408d6022d06b8d1/image.png?expires=1792854000&signature=06019bd66e95abb7a3a53c3aeaa862c09dba2f76c8d1522ad96f71b2d53beb4a&req=dSYuFsp8mIZcXfMW3Hu4gZzas%2FXsuzdXmWrRiVwqPzZdd8SHzUVGHOQaaSuz%0AiA%3D%3D%0A) 4. The confirmation screen will display the total cost for your upgrade from monthly to annual billing: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1690326039/3a91cdc5fff57d188a18ecc6273f/image.png?expires=1792800000&signature=d016790ec433b5103f423e59e8cf8bf06e19c7c4c6610c08a2aadc96fca4d48c&req=dSYuFsp8m4FcUPMW3Hu4gbNj%2Bk79XgXhi%2B5vzcg6znWMbRNRc%2FwfHm61ou4J%0AZQ%3D%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1690326039/3a91cdc5fff57d188a18ecc6273f/image.png?expires=1792854000&signature=a9f09458c9269e456bb97237af6b194bb71028e879579d77dc633bde0f106428&req=dSYuFsp8m4FcUPMW3Hu4gbNj%2Bk79XgXkj%2B5vzcg6znUJckwdhWXOPCjZHAtk%0A2g%3D%3D%0A) 5. Click “Confirm subscription.” diff --git a/content/support/12111783-create-and-edit-files-with-claude.md b/content/support/12111783-create-and-edit-files-with-claude.md index 63a32782eb..3b632ec405 100644 --- a/content/support/12111783-create-and-edit-files-with-claude.md +++ b/content/support/12111783-create-and-edit-files-with-claude.md @@ -48,7 +48,7 @@ These capabilities make it easy to produce professional documents by simply chat To give Claude access to external data sources, toggle **Allow network egress** on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2054774005/25bcfffba6c249cd128d6c3f6d52/CleanShot+2026-02-11+at+16_34_47%402x.png?expires=1792699200&signature=964d6d5b814958b8780206c5cdb9e42c30969c43b31787a0ca4b50357e41ec59&req=diAiEs55mYFfXPMW1HO4zYFJyg9DBZDMPQVowIiib2m4xQKEv7PMsua4yTHC%0A8gqO5khXW0aog%2BRDDJk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2054774005/25bcfffba6c249cd128d6c3f6d52/CleanShot+2026-02-11+at+16_34_47%402x.png?expires=1792735200&signature=538e2b5ad8000726d769b971eb76dede96eb8b57e96ed22d6cda6d980cc83795&req=diAiEs55mYFfXPMW1HO4zYFJyg9CD5zMPQVowIiib2mFU0b3GWoWTvCb1%2BYZ%0AnJjWUgV5bff8Zu7rGXA%3D%0A) ### Enabling on Claude Mobile @@ -66,11 +66,11 @@ Team and Enterprise organization owners can control network access settings in * - **Allow network egress to package managers and specific domains:** Claude can access package managers plus additional domains you specify. Add domains individually to whitelist specific resources your organization needs: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945362/ad72504d5429960f369b8b91b43c/86f06c0e-6eaa-4574-a4cb-2c38b273613a?expires=1792699200&signature=005d0e6b0ea01c3152bd9781182eb82cf6d55d1dc348c036e03e4ed92f93cf66&req=dScvH8B6mIJZW%2FMW1HO4zXJcB29FnCBJpMW6Iph6YZdALIcuv365Qb7%2FIgfl%0A1Tbi7L5qxn2EqIXLq8c%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945362/ad72504d5429960f369b8b91b43c/86f06c0e-6eaa-4574-a4cb-2c38b273613a?expires=1792735200&signature=32885b613df12044c3cbfc1cf146cdbcc3d16d9dcc3fe80c2dba96f53cb63395&req=dScvH8B6mIJZW%2FMW1HO4zXJcB29ElixJpMW6Iph6YZeLergLlApTDrRR9R6h%0ARyjTeq%2BvGRFP%2BIXfbkE%3D%0A) **All domains:** Claude has full internet access except for domains on Anthropic's legal blocklist. While this provides maximum flexibility for file creation and analysis tasks, it’s also the riskiest option. Please review the **[security considerations below](#h_0ee9d698a1)** before enabling “All domains”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945361/e3188cb8edb9ca7c303615da6378/f1c99a7d-5956-48d5-9ec7-b7ae6c8c3d28?expires=1792699200&signature=36ba73572632d7d78a751c02663e3ad3a43489f3ba489f43a08ac6c6da359fcf&req=dScvH8B6mIJZWPMW1HO4zdnseRaU5zagqgKIA6CM1tryv%2BYk%2F3tnqyshcsjL%0AszKry4G%2Fi%2FA2sGTAAy8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945361/e3188cb8edb9ca7c303615da6378/f1c99a7d-5956-48d5-9ec7-b7ae6c8c3d28?expires=1792735200&signature=e5cc9aadd586d21e1aeae00c481b4fc9099a0fe1b861c39d070f887bcf8c6b6b&req=dScvH8B6mIJZWPMW1HO4zdnseRaV7TqgqgKIA6CM1tpO%2BndhY9IWQyItwCdH%0AfRLWyZM7Gh7WUrgy0%2Fg%3D%0A) --- diff --git a/content/support/12157520-claude-code-usage-analytics.md b/content/support/12157520-claude-code-usage-analytics.md index 99a4f64c0f..36f823ee43 100644 --- a/content/support/12157520-claude-code-usage-analytics.md +++ b/content/support/12157520-claude-code-usage-analytics.md @@ -46,7 +46,7 @@ The **Usage** tab displays the following metrics for your organization. Data on - **Top commands**: The Claude Code commands used most often across your organization. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1717579277/46c512f4b3ed05c359cecd78ed5c/e0ce2c19-39e2-411f-9a1f-cb1d46439a42?expires=1792699200&signature=17af90ca82893b9cc75e227a15966655e43af456c04919a14b6e158486e6ef7b&req=dScmEcx5lINYXvMW1HO4zfiEPqRWhnDMCX9h5MbdDjPIlJg5VcHB5MUQq%2F1V%0Adoujy9tnUt4ZmM7qD9U%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1717579277/46c512f4b3ed05c359cecd78ed5c/e0ce2c19-39e2-411f-9a1f-cb1d46439a42?expires=1792735200&signature=e0bf3874b121c7d78aeba7db75df292ce5743f754fc650a06851f971b0dbd61a&req=dScmEcx5lINYXvMW1HO4zfiEPqRXjHzMCX9h5MbdDjOtwCmEYtnw1DDWe2J0%0AQa1gtRzmTGaM3YN8o0s%3D%0A) ### User-level metrics diff --git a/content/support/12260368-use-incognito-chats.md b/content/support/12260368-use-incognito-chats.md index d9042c41e6..5fbce7f0b4 100644 --- a/content/support/12260368-use-incognito-chats.md +++ b/content/support/12260368-use-incognito-chats.md @@ -34,7 +34,7 @@ These differ from regular chats in several ways: When starting a new chat with Claude outside of a project, you'll see a ghost icon in the upper right corner of your screen: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719768744/c7a2fa56cf284e48472f3b9c4dbf/030563f8-9f97-4891-a749-9ae95968a063?expires=1792699200&signature=f33b978b9f324a5f826c99c5f1d93c0ef2b531e2ea7f498c6ababe68fa1b93c0&req=dScmH854lYZbXfMW1HO4zeUcugC7Z%2ByJDCAt3Cx%2FSO3XkfsBQpB7ddA9AbIV%0ATVTL1Qozf4PTQnpf6bY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719768744/c7a2fa56cf284e48472f3b9c4dbf/030563f8-9f97-4891-a749-9ae95968a063?expires=1792735200&signature=8a33a4764942ba4b81a45cb43c76d9cdbccd07a6835e894d34787184eb5d8e20&req=dScmH854lYZbXfMW1HO4zeUcugC6beCJDCAt3Cx%2FSO2DZ6OTh31uawXaj6ng%0A8tw0T4OW%2FCF66aGrXmA%3D%0A) 1. Click the ghost icon to enable incognito mode. diff --git a/content/support/12293051-use-claude-in-xcode.md b/content/support/12293051-use-claude-in-xcode.md index 0e9a74c242..23b6683f19 100644 --- a/content/support/12293051-use-claude-in-xcode.md +++ b/content/support/12293051-use-claude-in-xcode.md @@ -34,7 +34,7 @@ To start using Claude in Xcode: 3. Log in with your Claude account. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1727371585/b18ca03a6357c52d12d10386f28e/dab2dcb2-f670-4173-b77d-38767a34cec1?expires=1792699200&signature=7334a6b1eda9f4878701035391da00bddcb748728e32e1d12adb4a1d5f876920&req=dSclEcp5nIRXXPMW1HO4zUAXIs4EW6HWFalhp3bugHKv9JA6ZymaEbEmYho0%0AvLRWA5ciP%2Fhvam0ycM4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1727371585/b18ca03a6357c52d12d10386f28e/dab2dcb2-f670-4173-b77d-38767a34cec1?expires=1792735200&signature=c7e52585f1c045af00037ba71e7a08d31bbf8a12ee9efc60341a9ae427b0f688&req=dSclEcp5nIRXXPMW1HO4zUAXIs4FUa3WFalhp3bugHLKAInFAfgM79zQW8a8%0Af1ij3NlxgsUci5xwkLw%3D%0A) ## Usage limits diff --git a/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md b/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md index 34e009a130..c0dcbcbffa 100644 --- a/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md +++ b/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md @@ -50,7 +50,7 @@ To enable usage credits on your paid Claude plan: 8. You can also enable auto-reload to automatically make a purchase when your balance falls below a threshold you set: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1805819785/5e203c38e6ba3f76bfd1dab0d5ce/fe062e7c-18cb-48cc-a7e2-754ac6e6c4be?expires=1792699200&signature=e33f33f4e13e33b2853c87f1514bfc23d00c88f488327844fcfbac3b5c5e0a8f&req=dSgnE8F%2FlIZXXPMW1HO4zYj2ABCfrPk6opE7m38YdfeGfq9bI8qwUbNHPjaN%0AXtYAtzL8Qvn%2FPiOFgwo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1805819785/5e203c38e6ba3f76bfd1dab0d5ce/fe062e7c-18cb-48cc-a7e2-754ac6e6c4be?expires=1792735200&signature=85c4a11f57ecfc8cb469687a37616688e84263224028085357be8f8df8811ddd&req=dSgnE8F%2FlIZXXPMW1HO4zYj2ABCepvU6opE7m38Ydfep9vCcJ%2F5X9SKwFz3X%0ASvC1cLz3420iD6r%2FTpY%3D%0A) --- diff --git a/content/support/12466728-troubleshoot-claude-error-messages.md b/content/support/12466728-troubleshoot-claude-error-messages.md index 78e84a314a..5ac953ad6d 100644 --- a/content/support/12466728-troubleshoot-claude-error-messages.md +++ b/content/support/12466728-troubleshoot-claude-error-messages.md @@ -60,4 +60,4 @@ Capacity issues will not appear on our status page because they represent normal Service incidents are disruptions where Claude is unavailable or significantly degraded for all or most users. These represent actual technical problems with our systems. To check for confirmed incidents, visit status.claude.com, where you'll find real-time updates on scope, impact, and resolution progress for any active incidents. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1753796247/e6a8c6ef8653b229c5758e881242/c2fc6fc0-d163-4119-93e0-394104d86bc9?expires=1792699200&signature=ab10eb7a5d830a733fa0b6c23387c40502221926eb66f9b97d7c8e67da26e834&req=dSciFc53m4NbXvMW1HO4za4BX60l27vG7y68oYp%2BYg%2FPTtTGxsDkwFpoEcRB%0A2M4mmExXTvJ%2BfAbolfc%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1753796247/e6a8c6ef8653b229c5758e881242/c2fc6fc0-d163-4119-93e0-394104d86bc9?expires=1792735200&signature=847ec47e2785b099e2fa61bacac8dae7f8fadde396ba3ade638e374df9cb1585&req=dSciFc53m4NbXvMW1HO4za4BX60k0bfG7y68oYp%2BYg8itt2g0mL7WfWwD%2B7Q%0AfRhQHMZCLXnH%2Fa7JZbE%3D%0A) \ No newline at end of file diff --git a/content/support/12512180-use-skills-in-claude.md b/content/support/12512180-use-skills-in-claude.md index a72a1ae31f..380e968a1d 100644 --- a/content/support/12512180-use-skills-in-claude.md +++ b/content/support/12512180-use-skills-in-claude.md @@ -202,7 +202,7 @@ To remove a custom skill you've uploaded: 4. To delete the custom skill entirely, click the "..." button next to the toggle, then select "Delete": - ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2105391273/8359cbf8be20dce0f1cd3fd40e6f/CleanShot-2B2026-02-25-2Bat-2B15_50_16.png?expires=1792699200&signature=020b3cf8e55820347c77fb06c9a7ee206c87eb993dc47cbb7b00f16d51b5c1ad&req=diEnE8p3nINYWvMW1HO4zSOgDikuy%2B%2BvH%2BdCnFXB0ugkXxHqgzU6Eu0UYjPP%0Aheca%0A) + ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2105391273/8359cbf8be20dce0f1cd3fd40e6f/CleanShot-2B2026-02-25-2Bat-2B15_50_16.png?expires=1792735200&signature=24a09a84c052494ff3ecdfcfef5c3f994ce9564805cc35ab3ac4fac1d5593be5&req=diEnE8p3nINYWvMW1HO4zSOgDikvweOvH%2BdCnFXB0ui%2BxcgN0XJtcsKPfBoB%0AHdlS%0A) 5. Click "Delete" in the confirmation prompt. diff --git a/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md b/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md index a24baaedfa..ad582e477c 100644 --- a/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md +++ b/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md @@ -20,11 +20,11 @@ The desktop extension allowlist is disabled by default, so an organization Owner 4. Switch to the "Desktop" tab: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755172/63c92550571842577ad435860ec5/6f5cc4e1-ff7d-48de-863a-c4e6184d4605?expires=1792699200&signature=96643f9c24dea27ae0c00dff5071fe01d60c667ffa391b6c6c95f1343e41b006&req=dScvF857mIBYW%2FMW1HO4zQ9pXEgM9nnZ0ugSQm1MFW%2FBsGFPoh8MzMA7DNwZ%0AQ9iI%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755172/63c92550571842577ad435860ec5/6f5cc4e1-ff7d-48de-863a-c4e6184d4605?expires=1792735200&signature=efab3971ae86d9362ed16ffdc0da106a4d280f78413bfdeebf66c43ed906c330&req=dScvF857mIBYW%2FMW1HO4zQ9pXEgN%2FHXZ0ugSQm1MFW9GjHNQ9vhst75fxxil%0ANn6X%0A) 5. Toggle **Allowlist** on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755578/a6bafff5f084dc86ae463703fd3d/6cf0ee18-4e71-4129-98e8-cc08174e3c3a?expires=1792699200&signature=cec020fef8591feacdf0fbf4f3d4e4a0ba3c8ab0efba344bee79cd6175c87a1a&req=dScvF857mIRYUfMW1HO4zaj0BXMtQK4GTAorLxpdoc9xlbHn2F2HAkpFvpTP%0Am6cc%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755578/a6bafff5f084dc86ae463703fd3d/6cf0ee18-4e71-4129-98e8-cc08174e3c3a?expires=1792735200&signature=82325e05efccff0507e117a908ba073fb42fab9de6141d2c4eab19a576eef281&req=dScvF857mIRYUfMW1HO4zaj0BXMsSqIGTAorLxpdoc%2BphSHQ%2BGY8np88G9FA%0Amy9I%0A) ## What happens after enabling the allowlist? @@ -42,7 +42,7 @@ Consider completing the allowlist setup during off-hours to minimize disruption **Important:** The allowlist requires Claude Desktop version 0.13.91 or higher, so users should update the desktop app by clicking “Claude”, then either “Check for updates” or “Restart to update to Claude 0.13.91”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781756960/ad18af50c83d35f2673656c23e00/a7ee450f-0c7d-42d6-a75f-fb1bc088cb52?expires=1792699200&signature=ada39eac3acfeead33dcd561fcffb5993f3cc6f614fb017cb85752b6a92b256b&req=dScvF857m4hZWfMW1HO4zYUJqIGsAzvpCEDZ5AdBjIZm2tLGsns6RP8k4k4g%0A2NjceW6bxwECzZi%2FPNA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781756960/ad18af50c83d35f2673656c23e00/a7ee450f-0c7d-42d6-a75f-fb1bc088cb52?expires=1792735200&signature=c79d5a45eb792aea77feac184f77b7f051e680e511d586228bc01d8915f1e803&req=dScvF857m4hZWfMW1HO4zYUJqIGtCTfpCEDZ5AdBjIaiOmbyPE4AD7ipMLMG%0Ad3lrgH9dClIV0y3cLSs%3D%0A) ## Managing allowed extensions @@ -60,7 +60,7 @@ After enabling the allowlist, you can choose which extensions to allow: If you want to remove an extension from the allowlist, click the “...” button and “Remove from allowlist.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781751250/6558c0f59aea7976bd44b0213d76/e750f02b-cd0d-437e-a83f-9ac362cdf456?expires=1792699200&signature=d4d95a1d78103147979f836c6e930d433c5ef0b414c64df85b5c5a9e9fa80dee&req=dScvF857nINaWfMW1HO4zTrxBKov9l6XqXridZhfx1JwPfxsCSirdmkQPb74%0AtzFGdHs6A361k5eQ8y4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781751250/6558c0f59aea7976bd44b0213d76/e750f02b-cd0d-437e-a83f-9ac362cdf456?expires=1792735200&signature=e6727dcc8ad6b495f6525fa1bdc674352b500d1e48a44253898ea13fc7fae9fe&req=dScvF857nINaWfMW1HO4zTrxBKou%2FFKXqXridZhfx1L0V1%2FhLmgGkLpiDrgz%0A5cLExxhZgmgZhTD8w7Y%3D%0A) ## Uploading custom extensions diff --git a/content/support/12618689-use-claude-code-in-the-cloud.md b/content/support/12618689-use-claude-code-in-the-cloud.md index 861dd6ab47..7345e4e705 100644 --- a/content/support/12618689-use-claude-code-in-the-cloud.md +++ b/content/support/12618689-use-claude-code-in-the-cloud.md @@ -10,7 +10,7 @@ This feature works with repositories you may not have on your local machine. You Cloud sessions enable asynchronous development workflows. In a local session in your terminal or editor, you typically work synchronously: you make a request, wait for Claude to respond, review the changes, then make another request. Synchronous work like this gives you fine-grained control but requires your attention throughout the process. A cloud session handles this differently: you can assign a larger task, let Claude work independently, and return later to review the completed work. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446157/07ec74cd46317f8278083a317841/6448f3ee-c6df-4417-8a13-90d8c2ca3d55?expires=1792699200&signature=bb0d859e1a0d5a90f57833ad884caa141f36c2a6eb420a44aed51fc7de4f0f6e&req=dScvEM16m4BaXvMW1HO4zR8%2BAVGGS5R07XrRA1YwWGv9APhxXkB9kfnlCtn0%0A5u33FPHOAXGBjZn9PrI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446157/07ec74cd46317f8278083a317841/6448f3ee-c6df-4417-8a13-90d8c2ca3d55?expires=1792735200&signature=8ea9a8eafd9baa2d523e20d8ccbe44f86b619a02cc350388ec4cd8413ea890c1&req=dScvEM16m4BaXvMW1HO4zR8%2BAVGHQZh07XrRA1YwWGs38PgFq0HAo3CxW9sv%0AvO2Q8M2sgfDIbg4HFwk%3D%0A) You can also run multiple tasks in parallel. Since each task runs in its own isolated environment, you can have Claude working on several different issues or repositories simultaneously. Each task proceeds independently and creates its own pull request when complete. More than one task can work on the same repository at the same time. @@ -20,13 +20,13 @@ You can also run multiple tasks in parallel. Since each task runs in its own iso When you start a cloud session, Claude Code creates an isolated virtual machine for your work. Your GitHub repository is cloned into this environment, which comes pre-configured with common development tools and language ecosystems. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446158/c092f1383826cb871493f74169d4/97b7cb98-5da2-438e-a920-e170b8b9790e?expires=1792699200&signature=2b413faeec7871673c6c5413d6ba46947f3e3def659d795e50748ebee14d62c9&req=dScvEM16m4BaUfMW1HO4zcR0rJQyhuDC7DtpMiX%2FBYnAgTcVG63Axn0URo%2BF%0AuRZDB9%2FDxKj0Ad2n5j8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446158/c092f1383826cb871493f74169d4/97b7cb98-5da2-438e-a920-e170b8b9790e?expires=1792735200&signature=8b159b92286e7a6ee1aa6758d760e2966e9b6abefd1a726cc9c5c6b6a8d2f606&req=dScvEM16m4BaUfMW1HO4zcR0rJQzjOzC7DtpMiX%2FBYlviX34eAI53y5XPOlI%0AM5%2BGr75ndmeRhfd0Mis%3D%0A) Claude prepares the environment by running any setup commands you've defined in your repository's configuration. This includes installing dependencies, setting up databases, or running other initialization steps your project needs. If your task requires network access, maybe to install packages or fetch data, you can configure the level of internet access the environment has. Once the environment is ready, Claude begins working on your task. Claude reads your code, makes changes, writes tests, and runs commands to verify the work. You can monitor progress and provide guidance through the web interface if needed. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446156/83ecf0a5b98eddc9ffc9694c50f7/353589ce-b678-441d-8909-71b45fa2d065?expires=1792699200&signature=bc381e246f3374896c9aef2e348051f8193b9781f871641026d4e8e518e6fc23&req=dScvEM16m4BaX%2FMW1HO4zVbcTWGF6s3MUQl3YqgIJdYmHDNUOvGoDWtqd%2F8s%0A5CCqFm7tn%2BOYjSkig6w%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446156/83ecf0a5b98eddc9ffc9694c50f7/353589ce-b678-441d-8909-71b45fa2d065?expires=1792735200&signature=202add79f0ccf7200e839b6f6fd86f6195b3384408403880363437a8c2fd8481&req=dScvEM16m4BaX%2FMW1HO4zVbcTWGE4MHMUQl3YqgIJda1VcjB6L7OYwVQb2m2%0AHyhcOcO62xt3snyneMw%3D%0A) When Claude completes the task, it pushes the changes to a new branch in your GitHub repository. You receive a notification and can review the changes, then create a pull request directly from the interface. The pull request includes all of Claude's work, ready for your review and any additional changes you want to make. diff --git a/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md b/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md index 537ef0eff9..891ed6efda 100644 --- a/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md +++ b/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md @@ -40,7 +40,7 @@ When you first open the updated version of Claude Desktop, you'll see a prompt t Once enabled, double-tapping Option will open a text box where you can type your message and start a new chat. You can also click "New chat" to see your five most recent conversations. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893088365/2ca4b782dda90abea1fe5f4150af/CleanShot+2025-12-18+at+13_14_30%402x.png?expires=1792699200&signature=6551cc80708e91673e0200b07d388d7a171b7c8f7d7899288f63c0d56c1d58ac&req=dSguFcl2lYJZXPMW1HO4zWggDtxXr5WYRC8c%2FcM5c2JQ0M%2BPCtGn1%2Fl5vOaF%0AsULlDYetbnO0ZLqjUvw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893088365/2ca4b782dda90abea1fe5f4150af/CleanShot+2025-12-18+at+13_14_30%402x.png?expires=1792735200&signature=1d9544ccefc8da59739475d77b75e2520cce36994af9f824ba43f599dd755a78&req=dSguFcl2lYJZXPMW1HO4zWggDtxWpZmYRC8c%2FcM5c2KkutsnkxpVglX%2FLyWY%0A%2BePbRykUY9cPWJh9DoY%3D%0A) ### Enable the voice shortcut (optional) diff --git a/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md b/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md index 4fe4403c49..2dfe9258ac 100644 --- a/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md +++ b/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md @@ -22,7 +22,7 @@ This page includes the following analytics: - Sessions in Cowork -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515895966/9f231a620f47d49e0ee648152189/848c1787-4eaa-4809-8fd2-1dbe2722560f?expires=1792699200&signature=88374303b6cd99c8a2edfc6e1f2485178a8cd68c37a32d11ef084e63856927f6&req=diUmE8F3mIhZX%2FMW1HO4zZL6wKR0koxzExEG4dCAGDb0lg0QB5WMTIqfpRhq%0AaN%2FZTimyfbFwZ6LfIiY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515895966/9f231a620f47d49e0ee648152189/848c1787-4eaa-4809-8fd2-1dbe2722560f?expires=1792735200&signature=6752927aa088116b208d1a53ec431429004390cd460fc4ce907fb3918cac37bb&req=diUmE8F3mIhZX%2FMW1HO4zZL6wKR1mIBzExEG4dCAGDY3UUUjCr6MY71hMOWi%0A1RwADj0yiuU9Wa9TItE%3D%0A) ### Who’s using Claude? @@ -34,7 +34,7 @@ This page includes the following analytics: Use the dropdown on the **Active members and assigned seats** chart to filter by product, including Claude Design. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896351/4d955858e6662c37489cc1470871/457cf159-8c2a-4403-ba22-cb92cb47e459?expires=1792699200&signature=b1844637b00c37e3d1ff4102cf56061093400618aef66303818bee52ba7a5cb9&req=diUmE8F3m4JaWPMW1HO4zYEqezWvS5mtYqPRsgaNdTzdQgWutSXadXJRvU0z%0Ae8N34rB6E2L5qOWef%2Bg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896351/4d955858e6662c37489cc1470871/457cf159-8c2a-4403-ba22-cb92cb47e459?expires=1792735200&signature=a399460fc330a7eee6ef3f549999d3e5ecd8e9d0a67204ae0e61c71ad176f198&req=diUmE8F3m4JaWPMW1HO4zYEqezWuQZWtYqPRsgaNdTwzgGi5d70AC0gIfaVJ%0AoHtwP5cYi1humRBuCtM%3D%0A) ### How are they using Claude? @@ -48,9 +48,9 @@ Use the dropdown on the **Active members and assigned seats** chart to filter by - How agentic is their work? (beta) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2583875713/e3cb3c329f3b643cb9a3809876b3/image.png?expires=1792699200&signature=9d1bc5e9ce78824eca5e323bbb9989168f0199c6ecbf0da7642dd6d4a90b5ba4&req=diUvFcF5mIZeWvMW1HO4zciS3Krvk7dpDFD6TO7tG4gJUf9xq42oeYSoKr3u%0AmUMVLr1rBYdpHUdXB%2BE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2583875713/e3cb3c329f3b643cb9a3809876b3/image.png?expires=1792735200&signature=7bfc3fabf83f8445160954af24aef08356265018348d9970e2925fef7dec53b6&req=diUvFcF5mIZeWvMW1HO4zciS3KrumbtpDFD6TO7tG4ho2CJjg5jOzBrghNuc%0Ah0E7vEcy8btWVO%2BUH%2Bg%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896563/abf008596ce5501297a609696362/fce5423c-4769-4b73-9a0a-c50f6407ebea?expires=1792699200&signature=c22212c4cd58417a5b3e0a5ae4610fd6c779a5155bda80fe23bd3531b2bd0880&req=diUmE8F3m4RZWvMW1HO4zR%2BID4VotP71LS3kobW3ZgQfZjOC07eheReBQPae%0ASZvYHgZs37eBW3kfuG4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896563/abf008596ce5501297a609696362/fce5423c-4769-4b73-9a0a-c50f6407ebea?expires=1792735200&signature=c56dfd1367fcdb79a932191dc5981d5531b4cd842c1640aab2fa9365fc8d4da4&req=diUmE8F3m4RZWvMW1HO4zR%2BID4VpvvL1LS3kobW3ZgRi8AlwZiA%2Bdg9hFL%2Fj%0AoRPjNNOXgNIiPaidqPw%3D%0A) ### What are the results? @@ -66,7 +66,7 @@ Use the dropdown on the **Active members and assigned seats** chart to filter by - Estimated time saved -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896943/dd415f03afe56ca38308ef987f86/189e8ebc-5594-4f4b-bd84-e3c11c824d5b?expires=1792699200&signature=cb503882f26aea96163dad34b6ba56ec68f1d2871e3c9a8e0eabfda3b40e2587&req=diUmE8F3m4hbWvMW1HO4zfJThSY5oNVEiovaLYNN7RnPliNK8PqrJBDA3xjp%0Awj8OlxO3MU%2BycQDN%2Bog%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896943/dd415f03afe56ca38308ef987f86/189e8ebc-5594-4f4b-bd84-e3c11c824d5b?expires=1792735200&signature=d204fcc58e0575b3b4a079d07f20423e0eeefd910803dc405c16ea3755ff6bac&req=diUmE8F3m4hbWvMW1HO4zfJThSY4qtlEiovaLYNN7Rmx7OsBEYszpm8ZguVe%0AhR%2BnIzop7bEH%2FYcmWl4%3D%0A) ### How much is Claude costing? @@ -82,9 +82,9 @@ This section includes the following analytics: - Spend by model (month-to-date, quarter-to-date, year-to-date, 1 year) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896942/b403f2d216fc40b5195911020b8e/446b99f1-3187-4b79-b2be-9f17b1632ff8?expires=1792699200&signature=5498d05ea27318e626424c2a51f9ec462d1ba5a37c74a316606110a0301e07a9&req=diUmE8F3m4hbW%2FMW1HO4zYE%2BQtwE5TjfWbBLGZ4vBJWCifF1y0W8BdtujcKQ%0Ar3Jazkk%2F2ayuloksRDU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896942/b403f2d216fc40b5195911020b8e/446b99f1-3187-4b79-b2be-9f17b1632ff8?expires=1792735200&signature=e96a65f8b56e00e464b6e84ad83135331a02f85412be74539f8e1a1ab8ffc622&req=diUmE8F3m4hbW%2FMW1HO4zYE%2BQtwF7zTfWbBLGZ4vBJWORS%2FlrGrke%2BI%2B%2BDt0%0AwAT%2BWeio4m3LEZvwCMA%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896941/2239ce38639df339b24d5af1cb50/f829bc2a-ee52-4135-9b13-09ef1b7d66d6?expires=1792699200&signature=3f782fb5bc18201f8c9e47a0dd8d036d3ab573856ba32d3d146c0c8288f9a58e&req=diUmE8F3m4hbWPMW1HO4zTz0N%2BgELsBSC%2BtvTPa1I7HktpDvvhRVBJSzEYA7%0ApVrmvwmmBAMCiJKX9HI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896941/2239ce38639df339b24d5af1cb50/f829bc2a-ee52-4135-9b13-09ef1b7d66d6?expires=1792735200&signature=f30b8beaa8e777d6e0b3418eaf1790da4136e28696c42a0f77d3daa24e17ce75&req=diUmE8F3m4hbWPMW1HO4zTz0N%2BgFJMxSC%2BtvTPa1I7FJnS1wpNyGqjw9XBs%2B%0A%2FrrsaND%2BKnsjMvVj%2B3o%3D%0A) **Note:** For a view of how spend limits are affecting your organization, you can also check the **Blocked by a spend limit** section at the top of **[Organization settings > Usage](https://claude.ai/admin-settings/usage)**. **Blocked by a spend limit** is built for usage-based Enterprise plans. Orgs without usage-based seats only see how many members are blocked or near their limit right now. Learn more about **[monitoring usage and spend on Enterprise plans](https://support.claude.com/en/articles/11526368-how-am-i-billed-for-my-enterprise-plan#h_ae17ec8236)**. @@ -162,7 +162,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to - Top members by chats -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515898793/405db0c492da11886c28a2b82731/71a55afc-1cef-4c50-b7e1-86775cb9a168?expires=1792699200&signature=a132cb69ad2a9a045c0e5a71864f8c6fdfb5b974700637c4e0e138bf8ba21975&req=diUmE8F3lYZWWvMW1HO4zbhc8P%2BaaO0jTcfMEUwBBiW46DrUN9RDfhv3Td0X%0AbTs%2FhPMkgmYDCPMJQg0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515898793/405db0c492da11886c28a2b82731/71a55afc-1cef-4c50-b7e1-86775cb9a168?expires=1792735200&signature=a92b5968a19fc3aecf44de4d5b354a784edc0d755edd371c84de1a5f2225bee0&req=diUmE8F3lYZWWvMW1HO4zbhc8P%2BbYuEjTcfMEUwBBiXCnZLvwK4HClKPGZ5Y%0AXKJT6yDgABi%2FEBn5XRg%3D%0A) ### Projects @@ -174,7 +174,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to - Top members by project usage -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899610/91d93108f0767e795fb9e488e882/71607d6d-dff1-4a13-a445-aa1d79850eed?expires=1792699200&signature=9fccd1ec501c8264e39ce5ac3a07e4601a64c16258c81ef367a2b4b06de16fe3&req=diUmE8F3lIdeWfMW1HO4zWhGoD6fkiqgExu5cYiHHN8Ognz%2BFbkP9BB37MFU%0AJqxqMpgkEBgUNCJVekU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899610/91d93108f0767e795fb9e488e882/71607d6d-dff1-4a13-a445-aa1d79850eed?expires=1792735200&signature=7075c2bade6eda28dc0963f523905ef8c00f08368122cdb52d0dca2fbbbeedd0&req=diUmE8F3lIdeWfMW1HO4zWhGoD6emCagExu5cYiHHN8e5loFlAZfpVmtSRUU%0AQvPn9gcXzGrz8%2Bgp5gc%3D%0A) ### Artifacts @@ -184,7 +184,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to - Top 10 users by artifacts generated (month-to-date, quarter-to-date, year-to-date, 1 year) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899838/33d737f2357d6e485704669962ae/43faadc3-47da-4a93-bbb7-47a7983e7441?expires=1792699200&signature=3a5a6395cb7b5d4f83a8d95282c855229a394159df4302c4afd96e4313863158&req=diUmE8F3lIlcUfMW1HO4zcSk47jUd%2BfCjHDogqK0V%2BwhhaAy88y7CuYpyqle%0A3d6%2BfAsnDAqQawcR5ik%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899838/33d737f2357d6e485704669962ae/43faadc3-47da-4a93-bbb7-47a7983e7441?expires=1792735200&signature=b178a352247915aa895cde334da4f49b2673dc455e792747cdd406226baf154b&req=diUmE8F3lIlcUfMW1HO4zcSk47jVfevCjHDogqK0V%2Byl%2FPCLDPD3h%2B1Ybhi0%0Akvmr3yAYWvj8ks%2FGZOk%3D%0A) --- @@ -280,7 +280,7 @@ Navigate to **[Analytics > Cowork](https://claude.ai/analytics/cowork)** to view - Daily, weekly, and monthly active Cowork users -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515901489/8005693d55b7fefbfe9233258d39/106c22a0-3f47-47a6-abbd-4788dd70f218?expires=1792699200&signature=591488c290285690011b2c401ec76a07d32d6b47f3f5f9d3f2c4b92361c8075f&req=diUmE8B%2BnIVXUPMW1HO4zX7WE4q3VEiqFSi1Z3SzLLtvfZIiN5uzDkKomL4C%0Amchr0dN9AJ8wliQlhZM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515901489/8005693d55b7fefbfe9233258d39/106c22a0-3f47-47a6-abbd-4788dd70f218?expires=1792735200&signature=ace43498790ead7a8d5c11b31837827225669100e1ab7bec9492a17859363d3c&req=diUmE8B%2BnIVXUPMW1HO4zX7WE4q2XkSqFSi1Z3SzLLuLwgy1t5QavHGl4dDf%0A1SxzQKWDAnoYJLiKDr0%3D%0A) **Note:** Cowork analytics are available alongside Chat and Claude Code data in the **[Analytics API](https://platform.claude.com/docs/en/manage-claude/analytics-api)**. @@ -296,7 +296,7 @@ Navigate to **[Analytics > Surveys](https://claude.ai/analytics/surveys)** to as On Enterprise plans with usage-based billing, when your admin turns on individual usage analytics, any member of the organization can see their own usage broken down by product, model, and skill, along with where they stand against any spend limits set for them. Individual usage analytics are available in **[Settings > Usage](https://claude.ai/settings/usage)**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2533906328/1f5cd0a57def40676410f8f379b4/member-usage-30d-model.png?expires=1792699200&signature=7a35fed93582548636ef79a9937d375f16d8824e31440ec5dfea87afc5beb34a&req=diUkFcB%2Bm4JdUfMW1HO4zfveBq3DdeLYWGUKUw6QS49nvgHDa9bbUr2E6oRR%0AeJEscn9BRfuZpKEnB0E%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2533906328/1f5cd0a57def40676410f8f379b4/member-usage-30d-model.png?expires=1792735200&signature=88fd2414ccfb86b74c349543fa2ea6264c75e266b424b7cd542e9c4d31248326&req=diUkFcB%2Bm4JdUfMW1HO4zfveBq3Cf%2B7YWGUKUw6QS49R9q0eJZq%2BB5jd%2FCOW%0A3%2Fmc8c4fTB947D8y2f0%3D%0A) --- diff --git a/content/support/12902405-claude-in-chrome-troubleshooting.md b/content/support/12902405-claude-in-chrome-troubleshooting.md index db9b992e51..f0a28d3f51 100644 --- a/content/support/12902405-claude-in-chrome-troubleshooting.md +++ b/content/support/12902405-claude-in-chrome-troubleshooting.md @@ -68,7 +68,7 @@ If you'd rather use the previous side panel, click the three dots in the upper r ## Usage limits -Usage limits apply across different interfaces, so using Claude in Chrome will count against the same plan limits that apply to Claude or Claude Code. Browser interactions are more compute-intensive than regular chats with Claude, so you can expect the extension to use more of your limit. With the long-running workflow capabilities, tasks can continue for extended periods, which may use more of your usage allocation. The Cowork side panel defaults to "Automatically approve" mode, which runs extra safety checks on each action and uses more of your usage limit than the other modes. +Usage limits apply across different interfaces, so using Claude in Chrome will count against the same plan limits that apply to Claude or Claude Code. Browser interactions are more compute-intensive than regular chats with Claude, so you can expect the extension to use more of your limit. With the long-running workflow capabilities, tasks can continue for extended periods, which may use more of your usage allocation. --- diff --git a/content/support/12902446-claude-in-chrome-permissions-guide.md b/content/support/12902446-claude-in-chrome-permissions-guide.md index 2d9d7c461e..8967d56813 100644 --- a/content/support/12902446-claude-in-chrome-permissions-guide.md +++ b/content/support/12902446-claude-in-chrome-permissions-guide.md @@ -28,17 +28,17 @@ In "Manually approve," Claude checks with you before it acts. What that looks li Claude creates a plan from your prompt, which you can approve before Claude starts. The plan specifies which websites you're allowing Claude to access, as well as the approach it will follow: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1843320727/8d1c859ae9b8e0cdb536d024bf40/9bc3d239-8eb6-4bae-a032-a236f88ee606?expires=1792699200&signature=0279567beacb7c49fcb0ac630e17fb63ea8408251b2f77a383ab92595dcd267e&req=dSgjFcp8nYZdXvMW1HO4zYqyZMBL9Yu1gN0ADj5oqFBeTsNrSHtV2pgiX%2Bb7%0AxTPaGFafqiuGebBUH4o%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1843320727/8d1c859ae9b8e0cdb536d024bf40/9bc3d239-8eb6-4bae-a032-a236f88ee606?expires=1792756800&signature=39085252b12b294fbdfdd5f05cd858b1b6feb3172ab10f0b11a31aced3c4102c&req=dSgjFcp8nYZdXvMW3nq%2BgWGE%2FNALMAOb%2BdvFBtvjxAmqXNLR8Iyz2wXjNgFm%0Avgm6SBnEs%2BKSeu1m7qv3ASXVb%2Bk%3D%0A) Note that Claude will only use the websites listed in the plan, so you’ll need to manually approve any additional access requests. -Claude clarifies which sites it’s planning to access and the actions it will take upfront, allowing you to review the proposed plan and ensure it’s correct before starting. You can also click "Make changes" to reject the current proposal, then prompt Claude again to make any necessary changes. Once you click "Approve plan," Claude will be able to act independently within the outlined parameters, but will still check with you before other sensitive actions, like downloading a file or entering sensitive information into a page. Claude will not deviate from the stated plan without requesting your permission first. There are certain actions that Claude cannot take for your security, such as making purchases, creating accounts, bypassing bot authorizations, executing trades, permanently deleting files, or taking certain actions that may indicate a prompt injection risk (see **[Prohibited actions](https://support.claude.com/en/articles/12902446-claude-in-chrome-permissions-guide#h_e199f8f523)**). +Claude clarifies which sites it’s planning to access and the actions it will take upfront, allowing you to review the proposed plan and ensure it’s correct before starting. You can also click "Make changes" to reject the current proposal, then prompt Claude again to make any necessary changes. Once you click "Approve plan," Claude will be able to act independently within the outlined parameters, but will still check with you before other sensitive actions, like downloading a file or entering sensitive information into a page. Claude will not deviate from the stated plan without requesting your permission first. There are certain actions that Claude cannot take for your security, such as making purchases, creating accounts, bypassing bot authorizations, executing trades, permanently deleting files, or taking certain actions that may indicate a prompt injection risk (see **[Prohibited actions](#h_e199f8f523)**). ### In the Cowork side panel Claude doesn't create a plan for you to approve before starting. Claude may ask you a question or two to clarify what you want, then begins work and asks for your approval before each action. You review each request and choose Allow all for this website, Allow this time only, or Deny. -Claude still checks with you before sensitive actions like downloading a file or entering sensitive information into a page, and some actions are blocked regardless of mode. See **[Actions requiring explicit permission](https://support.claude.com/en/articles/12902446-claude-in-chrome-permissions-guide#h_b209fa12fc)** and **[Prohibited actions](https://support.claude.com/en/articles/12902446-claude-in-chrome-permissions-guide#h_e199f8f523)** below. +Claude still checks with you before sensitive actions like downloading a file or entering sensitive information into a page, and some actions are blocked regardless of mode. See **[Actions requiring explicit permission](#h_b209fa12fc)** and **[Prohibited actions](#h_e199f8f523)** below. --- @@ -48,7 +48,7 @@ When you choose "Automatically approve," Claude keeps working without stopping t We tested Claude's safety check extensively before releasing it, including working with outside security experts who tried to sneak dangerous actions past it. It gives you the speed of letting Claude work without interruptions, with a layer of protection that "Skip all approvals" doesn't have: every action still gets reviewed before it happens. *Of course, no defense is perfect and no mode replaces your judgment. For work with real consequences—money, messages sent as you, important files—stay close and review what Claude does or consider switching back to "Manually approve."* -You'll see fewer prompts than in "Manually approve," but the safety checks still run in the background. Because Claude does this extra checking for you, **auto mode consumes more of your usage limit than the other modes**. +You'll see fewer prompts than in "Manually approve," but the safety checks still run in the background. --- @@ -62,7 +62,7 @@ When you choose "Skip all approvals," Claude doesn't pause to ask, and nothing c There are some websites on which Claude requires approval for every action. If you navigate to one of these sites, a **New permissions required** prompt will appear in the extension side panel, Claude Cowork, or Claude Code where Claude will ask for permission before accessing the page or taking any action. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2604970825/d7b961271be69e7541b406df1efd/d845324e-6b4a-4f54-83b9-0bea86ec09c6?expires=1792699200&signature=71cfbe0cde2e939a9ea0f32b055e32aed68e27f92cd0946d6628e602ed657ad0&req=diYnEsB5nYldXPMW1HO4zZ3Nq2R2gSXu7A4lHPBihAXUqoPyUP1GJ8GLyE0t%0ABFw6ZgwKZN3vBNsBUPA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2604970825/d7b961271be69e7541b406df1efd/d845324e-6b4a-4f54-83b9-0bea86ec09c6?expires=1792756800&signature=6d6cba0c48175f2c355da17d9f44aae8cb29f233f82faa9d621c129064809db5&req=diYnEsB5nYldXPMW3nq%2BgcHRFEUTsmE5GrTSEFo4rGf6AAqMS3MWzBSNwLRH%0AA53NSkJjfwexuNL70LiJAhQv2uI%3D%0A) ### Permission options diff --git a/content/support/12997503-team-plan-billing-faqs.md b/content/support/12997503-team-plan-billing-faqs.md index 77aeb13ef6..167ad0a3e9 100644 --- a/content/support/12997503-team-plan-billing-faqs.md +++ b/content/support/12997503-team-plan-billing-faqs.md @@ -18,7 +18,7 @@ Your organization's billing address determines where your invoices are sent. You If you want to use a name other than the one tied to your payment method, an organization Owner should check the "Use a different name on invoices" box when adding or updating your payment method in **[Organization settings > Billing](https://claude.ai/admin-settings/billing)**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922145253/f2e3d4e0fe43a2ea07e89244764c/image.png?expires=1792699200&signature=e45d941cf013434a7b1f422d9473691e2080f9c0f5e841a48660abbd59f6f3f4&req=dSklFMh6mINaWvMW1HO4zRZTxVjHssLRKAqLF4ERnlWivjo0fW74%2B%2F3AM13c%0Al4gAttrmsHC6mr6UOrs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922145253/f2e3d4e0fe43a2ea07e89244764c/image.png?expires=1792735200&signature=6f4bbc2f4ea7883bd11f45fc1adfae2547b80972bd7546e628c57105155c1831&req=dSklFMh6mINaWvMW1HO4zRZTxVjGuM7RKAqLF4ERnlV47LutzBkEM8SnmNWw%0A%2BGZzDpM2xMOPAJPTdq4%3D%0A) ## When will I be billed? diff --git a/content/support/13132885-set-up-single-sign-on-sso.md b/content/support/13132885-set-up-single-sign-on-sso.md index eb151b3932..c889c9ff75 100644 --- a/content/support/13132885-set-up-single-sign-on-sso.md +++ b/content/support/13132885-set-up-single-sign-on-sso.md @@ -42,7 +42,7 @@ You can verify multiple domains for a single organization, but all domains must 3. Enter the domain(s) you want to verify in the **Update organization email domains** modal and click the “+” button: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2498843282/561d5ceb1c3a5df75bdfee8bfc3f/d2491145-362d-490b-bdcf-66a0a7656ddc?expires=1792699200&signature=ee99749d9b2e42eb0c0403278374e41dc2d8510e82e2610909591e806c0a4115&req=diQuHsF6noNXW%2FMW1HO4zSdmH34%2F882Oe3H0OpmIzWFbqmlQ3G7xqQG3%2FoMU%0Aa1%2Ba%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2498843282/561d5ceb1c3a5df75bdfee8bfc3f/d2491145-362d-490b-bdcf-66a0a7656ddc?expires=1792735200&signature=961579f85f439b1316086814a978326bb4633f278f054e40c003f79589d67fa0&req=diQuHsF6noNXW%2FMW1HO4zSdmH34%2B%2BcGOe3H0OpmIzWGdB9LgVuuh9Hfb2Ig3%0AU04U%0A) 4. Click “Save” when you’re finished adding domains. @@ -50,7 +50,7 @@ You can verify multiple domains for a single organization, but all domains must 6. Enter your domain in the text box and click “Continue”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047042630/0617a562cd28a7ff0e607d66a30b/6bd08e1d-2b65-40ab-bc79-a257153854c1?expires=1792699200&signature=028cca0ecf106a031f2f24af9584cafac8fefead2d60c0103d41f99b80219948&req=diAjEcl6n4dcWfMW1HO4zWHctB%2BRntioyoyXAW0OlXq0uTKbVNWWcvxBShzW%0AUjZV%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047042630/0617a562cd28a7ff0e607d66a30b/6bd08e1d-2b65-40ab-bc79-a257153854c1?expires=1792735200&signature=8d9434ad37d4316f2ee23ef40ab1b045c681f35a9c59944965830d1e0f4df91d&req=diAjEcl6n4dcWfMW1HO4zWHctB%2BQlNSoyoyXAW0OlXqDzmutuEVRbzxK6GwI%0AGBMF%0A) 7. The setup screen displays a TXT record. **Copy the full Value using the copy button**—it begins with `anthropic-domain-verification-` and is longer than what's visible in the box. In your DNS provider, add a TXT record to your domain and **Value** set to the copied string. The domain must match exactly what you entered in the previous step, including any subdomains. Add it alongside any existing TXT records; don't replace them. The value is case-sensitive, so paste it exactly. Please refer to your DNS provider's documentation on this topic. @@ -76,7 +76,7 @@ Clicking "Refresh" re-checks your DNS; it won't show Verified until the publishe If the record is correct and propagated but the status still shows Pending, contact Support. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047044496/b8df54a0331784cc9ae8f00112aa/bf9609c1-dc93-4665-a066-4cae2fe4b002?expires=1792699200&signature=0bc406c934b09ac7b0423e1d4435ab3900e88058b140f57db61ef5d366fc183c&req=diAjEcl6mYVWX%2FMW1HO4zVjmWCsGZn27PM2D8Zcdgrh5Ha3n6NfjxAbQRNTU%0AygNAibpr%2FA8NLmsg21s%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047044496/b8df54a0331784cc9ae8f00112aa/bf9609c1-dc93-4665-a066-4cae2fe4b002?expires=1792735200&signature=5ae2a552523b30d3d5c318b2694421ff78f7805ab5d674fac3cc00c058abe48e&req=diAjEcl6mYVWX%2FMW1HO4zVjmWCsHbHG7PM2D8ZcdgrhbCPkGg9wXeo%2Be2xic%0ACgyqINF9pl6GuFy5Vfk%3D%0A) **Note:** Once your domain is verified, you'll see a **Restrict organization creation** toggle under **Security** on the Organization and access organization settings page. Enable this if you want to prevent users from creating new Claude or Console organizations—including personal accounts—using your verified domains. @@ -116,7 +116,7 @@ For IdP-specific setup instructions, see: You can now choose to toggle on **Require SSO for Console** and/or **Require SSO for Claude,** on the **Organization and access** page, under the **Authentication** section: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312690200/bd2403586d4f6651ccd79e2a45af/b9f8d7ce-0def-49d9-bfb2-3a14352d7214?expires=1792699200&signature=24ead008507e793c0dfd9999838a26433245a26f092d56cf4c6e7eb1ad95480b&req=diMmFM93nYNfWfMW1HO4zdAICg2nC3UIItXtKivx6ZEKLUekxWuSV8GPvl3p%0A4WmfN%2BGzQ4CsqW74pKs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312690200/bd2403586d4f6651ccd79e2a45af/b9f8d7ce-0def-49d9-bfb2-3a14352d7214?expires=1792735200&signature=fdd8ad842a90282fc9a270631bcb5c08273842e64b2e9693b15171fff5d78049&req=diMmFM93nYNfWfMW1HO4zdAICg2mAXkIItXtKivx6ZEj8nI3ckDoDQNya%2FBE%0ACJBMntUv%2BLNG%2F9GEzvA%3D%0A) When SSO is required, users must use the “Continue with SSO” option to log in to their Claude/Console accounts. When SSO is not required, they will have the option to choose “Continue with SSO” or “Continue with email.” diff --git a/content/support/13133195-set-up-jit-or-scim-provisioning.md b/content/support/13133195-set-up-jit-or-scim-provisioning.md index 6f6bb83140..66a7adf205 100644 --- a/content/support/13133195-set-up-jit-or-scim-provisioning.md +++ b/content/support/13133195-set-up-jit-or-scim-provisioning.md @@ -40,7 +40,7 @@ Use this table to help decide which provisioning mode is right for your organiza Both JIT and SCIM can be combined with **Enable group mappings** to control role or seat tier assignment based on IdP group membership. If you select either of these options for your provisioning mode, **Enable group mappings** will appear within the **User provisioning** section: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312706099/35d5d3ec149880a96bb7acec59f6/a4cfce55-86bf-40b0-b455-c8f412d48e9e?expires=1792699200&signature=bfaadca351dfaff085d0befc3d1997ef7f866705421397d6ba98f8b4df25165d&req=diMmFM5%2Bm4FWUPMW1HO4zXBDQqlSBFN0xFMG%2BIEvQSfZigmFl2boTL9HcHQH%0Au5gTng2e9TqZGAKIUw0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312706099/35d5d3ec149880a96bb7acec59f6/a4cfce55-86bf-40b0-b455-c8f412d48e9e?expires=1792735200&signature=51202e4a785fe78c59a67560786a4bf49e06556feacdfa9c0e3403d3fb1b1b5f&req=diMmFM5%2Bm4FWUPMW1HO4zXBDQqlTDl90xFMG%2BIEvQSfzxQHjkTsIw%2BM7qu6O%0AdV0Cpd07UrzzuI163z8%3D%0A) **Important:** Group mappings set a user’s role type and seat tier only. Users with the Custom role get their permissions from groups in Claude, and those groups sync from your IdP only when your provisioning mode is SCIM directory sync. With JIT, you need to create groups and add users to them manually in **[Organization settings > Groups](https://claude.ai/admin-settings/groups)**. If you map an IdP group to the Custom role under JIT without doing this, those users have no permissions when they log in. Learn more about **[managing groups on Enterprise plans](https://support.claude.com/en/articles/13799932)**. @@ -136,7 +136,7 @@ Learn more about **[setting up role-based permissions on Enterprise plans](https 4. Toggle **Enable group mappings** on (if it’s not already): - ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312714635/b57870b51e6511c8293637bceee2/da1ceabc-b6bc-451b-9cda-24ff6aa90d02?expires=1792699200&signature=d024b2d2aa34e8d049528d0ff3a7396d787b76506fdeab28e57888623474eadc&req=diMmFM5%2FmYdcXPMW1HO4zeBEb8fenvNKyb72rapuHpMRs7FDPOBq0I4ZTtOp%0AsyeO%0A) + ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312714635/b57870b51e6511c8293637bceee2/da1ceabc-b6bc-451b-9cda-24ff6aa90d02?expires=1792735200&signature=1df1f2ad55f863bdf3e5e764ca50a0c71c219d27b89df5c42d0da2b6cd2104b9&req=diMmFM5%2FmYdcXPMW1HO4zeBEb8fflP9Kyb72rapuHpOzvtIjMRRHeWmtrwEb%0ADPkw%0A) 5. In the **Enable group mappings** section, click “Add” next to each role and select the corresponding group from your IdP in the dropdown. @@ -188,7 +188,7 @@ Verify you have enough seats purchased and available to add members to your org. 4. **For SCIM:** Click "Sync" to prompt an immediate sync, or wait for the automatic sync cycle: - ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312717421/c97fce49ad17d4660880a05fbaaf/59fbfa2a-1072-4662-8ca5-102970d5a795?expires=1792699200&signature=df36bdc45f885ca878161c8b54f28413ee91695241c4112e579e129b56ec4798&req=diMmFM5%2FmoVdWPMW1HO4zZ9Lal%2BrEMPA5hujYvMis4fuL1FYHcPo%2BHC73wzi%0AEhDl%0A) + ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312717421/c97fce49ad17d4660880a05fbaaf/59fbfa2a-1072-4662-8ca5-102970d5a795?expires=1792735200&signature=8ff28122bd4a564a3b860134c8a6baf265a980817c0c24d74e49795928ff128b&req=diMmFM5%2FmoVdWPMW1HO4zZ9Lal%2BqGs%2FA5hujYvMis4fC19VkX3VWbZLaGWOM%0AQi1F%0A) ### Users mapped to the Custom role can't access anything after logging in diff --git a/content/support/13163631-configuring-session-security-settings.md b/content/support/13163631-configuring-session-security-settings.md index ebb5d495f8..e3173dc252 100644 --- a/content/support/13163631-configuring-session-security-settings.md +++ b/content/support/13163631-configuring-session-security-settings.md @@ -18,7 +18,7 @@ Session duration controls allow Enterprise and Console Admins to set a maximum s 5. Confirm your selection by clicking “Enable.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469436/1725e63ea1a2615948faecf4ec73/9bd276a1-7329-414d-87a1-d04dac93fff7?expires=1792699200&signature=9ec2befe5d1c2b208c1ffbf64bf3d44c73dd9e7bc5e0c80a3b3cd471c41e1c6f&req=dSgvHs14lIVcX%2FMW1HO4zQNx6uAhSlNSg%2F6XaftFnjxFVQXmAkq%2FFphBtCW9%0AchTRCE%2FiSJEusoMOMoA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469436/1725e63ea1a2615948faecf4ec73/9bd276a1-7329-414d-87a1-d04dac93fff7?expires=1792735200&signature=e39587c2aa922943f9f88d65b8ffce4f45dcc21d42d141183c0cc4760beb3f76&req=dSgvHs14lIVcX%2FMW1HO4zQNx6uAgQF9Sg%2F6XaftFnjyhi4vYJSMkD5nPMTzS%0AWOUM0NDqb53gEfJa5UY%3D%0A) ### For Console Admins @@ -32,7 +32,7 @@ Session duration controls allow Enterprise and Console Admins to set a maximum s 5. Confirm your selection by clicking “Enable.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469435/7a766bbe02e61c7d8f05deb5b8f0/b0bda400-47c6-43dd-9907-131ebe180b36?expires=1792699200&signature=d4e2db6263593fc5eef00471ecd53a12736307d1c3fe7ef75098ab707c7fb382&req=dSgvHs14lIVcXPMW1HO4zWzx2bswLnYjXZ5D7eVpMtc44sF%2BQ5rcwj%2Bvzs%2B0%0A5skzPZ0ecLWwj5HkXUc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469435/7a766bbe02e61c7d8f05deb5b8f0/b0bda400-47c6-43dd-9907-131ebe180b36?expires=1792735200&signature=f355f7e8e3082b8dda10f3a868f90c862adff82bece3ab9e99bc79056567ed03&req=dSgvHs14lIVcXPMW1HO4zWzx2bsxJHojXZ5D7eVpMteBDeaWDwg%2FjKBE6uUa%0ApwdrwTBHZCBDYmoDn%2BU%3D%0A) ### What happens after enabling shortened session length? @@ -50,7 +50,7 @@ You can change the session duration at any time by selecting a new value from th - Sessions scheduled to expire beyond the new duration will have their expiration shortened accordingly. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469437/46ac5bc55484ca01556d87a5ade7/b01a7651-ad65-4b32-93ff-16dbc9ca97c0?expires=1792699200&signature=7d4ac8dcd3b4b050eb419e447fd883072071ab1f6fe9c8bf76f83e01f4cc0eb5&req=dSgvHs14lIVcXvMW1HO4zZ7mW8qd7jChA00cbyPOLDW2JyEa6IX%2FjnaC7ZCX%0A9Nqpft37ut9bmZKSlUU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469437/46ac5bc55484ca01556d87a5ade7/b01a7651-ad65-4b32-93ff-16dbc9ca97c0?expires=1792735200&signature=4f7dbcc2ec811cb136914f54d8713e7923323a0fb1e7be70f59aecd54176597e&req=dSgvHs14lIVcXvMW1HO4zZ7mW8qc5DyhA00cbyPOLDUE9SgzhjS0lyyJvqP5%0AO58RZD7Ip7DAh3vjNHQ%3D%0A) ## Disabling session length settings diff --git a/content/support/13189465-log-in-to-your-claude-account.md b/content/support/13189465-log-in-to-your-claude-account.md index 0e521f6984..842a5d942f 100644 --- a/content/support/13189465-log-in-to-your-claude-account.md +++ b/content/support/13189465-log-in-to-your-claude-account.md @@ -2,7 +2,7 @@ When you open Claude on a web browser ([claude.ai](https://claude.ai)), the desktop app, or a mobile app, you will see two different options for logging in to your Claude account. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893216804/f2209c3ec6cf4fc2e803d13bbc9d/40520c9e-ff82-4a7c-adca-5a064fe18d8c?expires=1792699200&signature=036afc61933743b2481682c42e9d6b0b4ea334857b38fca1e33de95ffac28067&req=dSguFct%2Fm4lfXfMW1HO4zXg5B4CK6hu2zWhrqpWiTMnYNpC4Q%2BHsnXNIO7oV%0AAoa7LYnjZv5KpGMXkuA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893216804/f2209c3ec6cf4fc2e803d13bbc9d/40520c9e-ff82-4a7c-adca-5a064fe18d8c?expires=1792735200&signature=4aeccae087e3b358d600a6634ddb4f157e78e305d424c737e272d6addcc81384&req=dSguFct%2Fm4lfXfMW1HO4zXg5B4CL4Be2zWhrqpWiTMnbeHL0Jz4ECse%2Bae4%2F%0AsC%2FYaGK4lkKy4HcPJpA%3D%0A) ## Continue with Google diff --git a/content/support/13325567-account-management-faqs.md b/content/support/13325567-account-management-faqs.md index f5a27ddd11..71ae6ce2da 100644 --- a/content/support/13325567-account-management-faqs.md +++ b/content/support/13325567-account-management-faqs.md @@ -44,6 +44,6 @@ The email domain that was used to create your Team or Enterprise plan organizati Owners can remove domains by opening up the same modal and clicking the trash can icon to the right of the domain: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2053873852/1cbccea3b7067e03205f2ff8546b/CleanShot+2026-02-11+at+11_16_07%402x.png?expires=1792699200&signature=026bf43c7f1ec0821f07097f7b53c5f9931906f5b8eb725383ccced7837ebfd6&req=diAiFcF5nolaW%2FMW1HO4zUrhF%2BmeYAEYkeFUnrkrQZj64DFOI8BhXm42DeqL%0AfzLMMurQJF7Q3MO3JEY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2053873852/1cbccea3b7067e03205f2ff8546b/CleanShot+2026-02-11+at+11_16_07%402x.png?expires=1792735200&signature=50e3be2b3f5dcbdb69fa43575d94be93759038bebcf644b8cd51cd66e5f0ecd1&req=diAiFcF5nolaW%2FMW1HO4zUrhF%2Bmfag0YkeFUnrkrQZhZQ5c4ua9yks%2FMTulL%0A3Ih%2FZj3JPnIekTbuqEw%3D%0A) While the account creator must use a business email address, you can add public domains like @gmail.com, @yahoo.com, and @hotmail.com as allowed domains for other members of your organization. \ No newline at end of file diff --git a/content/support/13345190-get-started-with-claude-cowork.md b/content/support/13345190-get-started-with-claude-cowork.md index 2acd28d0e9..6ec103a29e 100644 --- a/content/support/13345190-get-started-with-claude-cowork.md +++ b/content/support/13345190-get-started-with-claude-cowork.md @@ -142,7 +142,7 @@ Tasks can run for extended periods depending on complexity. You can monitor prog Cowork has three modes that control when Claude asks your permission before taking an action, like using your connectors. You can change the mode at any time from the mode selector in the chat box. -**Note:** If you have the new Claude experience, the permission setting in the message box offers **Auto** and **Manual** (default). +**Note:** If you have the new Claude experience, the permission setting in the message box offers **Auto** (default on Pro, Max, and Team plans) and **Manual** (default on Enterprise plans). | | **Connector tool permission: "Always allow"** | **Connector tool permission: "Needs approval"** | **Connector tool permission: "Blocked"** | | ----------------- | ---------------------------------------------------------------------- | ----------------------------------------------- | ---------------------------------------- | @@ -152,15 +152,15 @@ Cowork has three modes that control when Claude asks your permission before taki As a reminder, you control which connectors Claude can use via the "+" menu in the chat box or the **[Customize > Connectors](https://claude.ai/customize/connectors)** page. -**Note:** On Team and Enterprise plans, your admin controls whether "Automatically approve" is available to your organization. It's available by default, and if your admin turns it off, the mode doesn't appear in your mode selector. Your organization may also require per-task approval for write-capable connector tools, so "Always allow" preferences may not apply. See **[Use Claude Cowork on Team and Enterprise plans](https://support.claude.com/en/articles/13455879-use-claude-cowork-on-team-and-enterprise-plans#h_1bd1fa754d)**. +**Note:** On Team and Enterprise plans, your admin controls whether "Automatically approve" is available to your organization and whether new tasks start in it. If your admin turns it off, the mode doesn't appear in your mode selector. Your organization may also require per-task approval for write-capable connector tools, so "Always allow" preferences may not apply. See **[Use Claude Cowork on Team and Enterprise plans](https://support.claude.com/en/articles/13455879-use-claude-cowork-on-team-and-enterprise-plans#h_1bd1fa754d)**. **Manually approve (Manual)**, formerly "Ask before acting." Claude pauses and asks for approval for actions. You review each request and choose Allow or Deny. **Automatically approve (Auto).** Claude keeps working without stopping to ask about every step. Instead, Claude reviews each action for safety (such as checking for data exfiltration or **[prompt injection](https://support.claude.com/en/articles/13364135-use-claude-cowork-safely)**) and automatically blocks anything it determines to be unsafe. When an action is blocked, Claude looks for a safer way to finish the task or pauses and asks you directly. If Claude keeps running into blocks, it switches back to asking your permission for each step. -We tested Claude's safety check extensively before releasing it, including working with outside security experts who tried to sneak dangerous actions past it. It gives you the speed of letting Claude work without interruptions, with a layer of protection that "Skip all approvals" doesn't have: every action still gets reviewed before it happens. *Of course, no defense is perfect and no mode replaces your judgment. For work with real consequences—money, messages sent as you, important files—stay close and review what Claude does or consider switching back to "Manually approve."* +Before making auto mode the default in Claude Code, we tested it internally and with third-party red-teaming. We used those findings to strengthen how auto mode works across all our products. It gives you the speed of letting Claude work without interruptions, with a layer of protection that "Skip all approvals" doesn't have: every action still gets reviewed before it happens. *Of course, no defense is perfect and no mode replaces your judgment. For work with real consequences—money, messages sent as you, important files—stay close and review what Claude does or consider switching back to "Manually approve."* -Auto mode applies to all of your existing connectors, plugins, the built-in browser, Claude in Chrome, and some Cowork actions like fetching websites. Because Claude does this extra checking for you, **auto mode consumes more of your usage limit than the other modes**. +Auto mode applies to all of your existing connectors, plugins, the built-in browser, Claude in Chrome, and some Cowork actions like fetching websites. **Skip all approvals (Skip)**, formerly "Act without asking." Claude doesn't pause to ask and nothing checks its actions automatically. Only use this when you completely trust every action, connector, file, app, etc. involved in the task. @@ -182,7 +182,7 @@ To set global instructions: 3. Type your instructions in the text box and click "Save": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2525926874/15324ac4155d7802272e8bdef04b/ec66cd09-a4db-4f1d-8f30-226c9d126333?expires=1792699200&signature=60083ed888d4d11668baa1318af25c7ac4918402d3c7c8ef4d8b5a9409831bf4&req=diUlE8B8m4lYXfMW1HO4zcDl69rqP1iy8iWjaktE942trbJ9rMD7CG7pMJX6%0AfRG0tiyqaPJZfoQ1EgY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2525926874/15324ac4155d7802272e8bdef04b/ec66cd09-a4db-4f1d-8f30-226c9d126333?expires=1792756800&signature=060c13c064b3e6bbc96ee4b2e58e45cab8510a211cd7df622ed771d3b4f82945&req=diUlE8B8m4lYXfMW3nq%2BgcqgxG%2BC3rHZbVmMqW%2FkK1c%2BfuAVf1d5Q5vmRHlY%0AjOVodmY9PCVaR%2FAONTIRVSCAmYU%3D%0A) ### Folder instructions diff --git a/content/support/13371040-log-in-to-your-console-account.md b/content/support/13371040-log-in-to-your-console-account.md index 31f5a6180e..c5043b3a3e 100644 --- a/content/support/13371040-log-in-to-your-console-account.md +++ b/content/support/13371040-log-in-to-your-console-account.md @@ -2,7 +2,7 @@ When you navigate to the **[Claude Console](https://platform.claude.com)**, you will see two different options for logging in to your Console account. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1935026646/d90d1613a3dbe763fef5abb96e3c/image.png?expires=1792699200&signature=948e7b849a3a55684933553067f3a17b9ef5735483aa1def18805615058a3761&req=dSkkE8l8m4dbX%2FMW1HO4zcrI5ovqqYkP8vUNcPt4%2B73WhNgM%2BOjIHNM%2Bf3ry%0ALuD32Y05FJInw9XAe3g%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1935026646/d90d1613a3dbe763fef5abb96e3c/image.png?expires=1792735200&signature=4436ae6e2a8ab5796adbd214db2f9eb4a9bef364dd2754a83f12702a8af6772f&req=dSkkE8l8m4dbX%2FMW1HO4zcrI5ovro4UP8vUNcPt4%2B72U5rZcJuU8cg%2BCIsov%0AslUlPbVDwdkHaxGxxhY%3D%0A) ## Continue with Google diff --git a/content/support/13455879-use-claude-cowork-on-team-and-enterprise-plans.md b/content/support/13455879-use-claude-cowork-on-team-and-enterprise-plans.md index 7cb4b0b5a9..a273cd7519 100644 --- a/content/support/13455879-use-claude-cowork-on-team-and-enterprise-plans.md +++ b/content/support/13455879-use-claude-cowork-on-team-and-enterprise-plans.md @@ -70,9 +70,13 @@ Learn more in **[Use the built-in browser in Claude Cowork](https://support.clau ### Auto mode availability -The organization setting **Allow “Automatically approve” mode** in **[Organization settings > Cowork](https://claude.ai/admin-settings/cowork)** (under Permissions) controls whether members can use "Automatically approve" mode in Cowork. This setting is on by default, so the mode is available to your members unless you turn it off. +Two organization settings in **[Organization settings > Capabilities](https://claude.ai/admin-settings/capabilities)** control "Automatically approve" mode in Cowork: -When the setting is off, "Automatically approve" doesn't appear in your members' mode selector. +- **Allow "Automatically approve" mode** controls whether members can use the mode. This setting is on by default, so the mode is available to your members unless you turn it off. When it's off, "Automatically approve" doesn't appear in your members' mode selector. + +- **Start new tasks in "Automatically approve" mode** controls whether new Cowork tasks start in that mode. It’s on by default on Pro, Max, and Team plans, and off by default on Enterprise plans. Turn it off to keep "Manually approve" as the default. + +Members can switch modes within any session. Learn more about how the modes differ in **[Get started with Claude Cowork](https://support.claude.com/en/articles/13345190-get-started-with-claude-cowork#h_e1353133dd)**. diff --git a/content/support/13641943-visual-and-interactive-content.md b/content/support/13641943-visual-and-interactive-content.md index f44477a79e..056fe93f34 100644 --- a/content/support/13641943-visual-and-interactive-content.md +++ b/content/support/13641943-visual-and-interactive-content.md @@ -18,7 +18,7 @@ Claude can show current weather conditions and forecasts when you ask about the Claude automatically displays temperatures in Fahrenheit for US locations and Celsius for everywhere else. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544927/3a9c695b24df387ecdd766ad308c/8be9f393-dcb0-4ff8-89e8-5fa47bedaa38?expires=1792699200&signature=204b4ae9c3111f37b42a063a80b7c74c4151d34b2359de3b0a3e17ebd30d5c3c&req=diAjFsx6mYhdXvMW1HO4zXlB7Dy83BGKdgndksVD5R3xZqtgm8a1MSc3jfhT%0ALoD8SwtNtU4d7fkO6mU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544927/3a9c695b24df387ecdd766ad308c/8be9f393-dcb0-4ff8-89e8-5fa47bedaa38?expires=1792735200&signature=36fc070d42dd496e596bd4343d39cfccd187bf098b9907c105aa8e4322a2ee9b&req=diAjFsx6mYhdXvMW1HO4zXlB7Dy91h2KdgndksVD5R3%2FSdlQ8ulhz%2FhK1689%0AZHHDWTUGfOIu3ukNV7w%3D%0A) Weather is powered by Google Maps (). @@ -28,7 +28,7 @@ When you ask about recipes, Claude can display formatted recipe cards that are e **Note:** Visual recipe cards are available on web and desktop only. On mobile, Claude provides recipe information as text in the conversation. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544929/12f4c51eda7779d65d3ea2c7ab16/d0f4a314-cff8-421a-b401-10c2bf50374e?expires=1792699200&signature=2650b6622155307a6072c5e84a2233f5dbce80ce9108548b4f9cf70d2f77a8cd&req=diAjFsx6mYhdUPMW1HO4zUQperIT212VrIPm%2FImZVg2yl938J1SfxB70wdah%0A%2BBRj1tPRQlGooicANQc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544929/12f4c51eda7779d65d3ea2c7ab16/d0f4a314-cff8-421a-b401-10c2bf50374e?expires=1792735200&signature=b6962055a9a2bf41bea42f06aa7c53ad5509d79199a09a264358d9e9b83eacce&req=diAjFsx6mYhdUPMW1HO4zUQperIS0VGVrIPm%2FImZVg3hobI9THlnsaVzck3d%0Ankjigw4piZjkeqSX9tU%3D%0A) ### Custom visuals @@ -76,7 +76,7 @@ For example, if you ask Claude to help you plan a trip, it might ask you to: This content appears at the bottom of the chat. You can still type a response if you prefer. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544930/9ad066e137d11e4b559b0217e12d/9bf30d2d-1715-42b3-9da5-2a9298f41f08?expires=1792699200&signature=239fa87b92b1be41f7a89429574129642baae0a43e87e78bac80b8a2111ad66c&req=diAjFsx6mYhcWfMW1HO4zWmF5ve4YBegx4wz0C7CTAIpbYGnnbIWu%2BZlA%2Fh%2F%0AGpMmcGlTD9rNmIApxC8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544930/9ad066e137d11e4b559b0217e12d/9bf30d2d-1715-42b3-9da5-2a9298f41f08?expires=1792735200&signature=b3a055273f784c6ef6271760da11918c3eabcddcaaa2eff0250e89ba5f99ac9a&req=diAjFsx6mYhcWfMW1HO4zWmF5ve5ahugx4wz0C7CTAIGLQLVMCDmXKWIgbkB%0AeZSzXxdRIQKnsKS%2BTBw%3D%0A) --- diff --git a/content/support/13837440-use-plugins-in-claude.md b/content/support/13837440-use-plugins-in-claude.md index eda1604cfa..e0dd4cc419 100644 --- a/content/support/13837440-use-plugins-in-claude.md +++ b/content/support/13837440-use-plugins-in-claude.md @@ -58,7 +58,7 @@ In Cowork, open the "Cowork" tab first, then open **Customize**. You can also upload a custom plugin file if you built one yourself. On Team and Enterprise plans, a colleague can share a plugin with you directly instead of sending you the file. See **[Use a plugin shared with you](#h_ef985546b4)** below. Plugins you add in Claude on the web or in Claude Desktop are saved to your account, not to your computer, so they follow you to chat, Cowork, and Claude Code. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2100409211/fc01614dde1a616fa31ffaa9cb04/47bacf5b-a810-45b5-a468-9769f1a58ef8?expires=1792699200&signature=98f1208c72101d1327eafbda8f8a9f85a0ffbb367a16a165643b433a44303d8f&req=diEnFs1%2BlINeWPMW1HO4zZF3IxfbOvxXxakFVfq5WwyN3g0Tz4mMee0yi5xy%0Aqd7tVAIqYfeyycybRCA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2100409211/fc01614dde1a616fa31ffaa9cb04/47bacf5b-a810-45b5-a468-9769f1a58ef8?expires=1792735200&signature=0424e5fca92449300857d928bf506f2b81ad98ceea75b0fc80528ae66c9fe095&req=diEnFs1%2BlINeWPMW1HO4zZF3IxfaMPBXxakFVfq5WwyOHT8E5aX3JiBkMPB4%0A8xY4n2knPKSdMb2%2FruA%3D%0A) If you're on the Enterprise plan and your organization has skill scanning turned on, plugins are checked for malicious content when they're installed or updated. A plugin with malicious content is blocked, and one that may carry risk shows a caution banner. Learn more about **[skill and plugin scanning](https://support.claude.com/en/articles/15927065)**. @@ -68,7 +68,7 @@ If you're on the Enterprise plan and your organization has skill scanning turned Each plugin you add brings skills and commands you can use while working with Claude. Type "/" or click the "+" button to see the available skills from your plugins, in chat and in Cowork. In Cowork, you can also run a plugin's command by typing `/plugin-name:command`. Click any skill to see its details. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2157396844/4a790e10f5b88df770783df1d7e9/image.png?expires=1792699200&signature=5fe05260dd566c41fac7ee5060897a1ac96780f6c8b4494832379ff2f66eb052&req=diEiEcp3m4lbXfMW1HO4zf4NBfT6ikmWmKUxugP2BQsxlExcinqePDicG0Qg%0A7BxYLwoDWdf7jL7rwus%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2157396844/4a790e10f5b88df770783df1d7e9/image.png?expires=1792735200&signature=491dc187024afab31e2d555885e853b2d95f5076d89e4daa2427d03fc7e86d19&req=diEiEcp3m4lbXfMW1HO4zf4NBfT7gEWWmKUxugP2BQs%2FvFRd%2BNlc%2FkX6syhN%0AvfxtbzIS1jFnnRlVntU%3D%0A) --- diff --git a/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md b/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md index e3645d1a28..a63b407a2d 100644 --- a/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md +++ b/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md @@ -52,11 +52,11 @@ Follow these steps to get started: 5. You’ll land on a page describing the functionality. Click “Get started”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169954086/419674f781edb2977b93cce062b4/93b1893c-d79a-4eb6-b2f1-2fe3e043bd90?expires=1792699200&signature=a1f31750d7b503e55932be321f3cd49fdb6887195415035e156f0e5a621c2d40&req=diEhH8B7mYFXX%2FMW1HO4zSZP05CNHAf9B32drIe5EDnwkGrxmbOLbar1nOnL%0AmjKA%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169954086/419674f781edb2977b93cce062b4/93b1893c-d79a-4eb6-b2f1-2fe3e043bd90?expires=1792735200&signature=a893d700b9ac816875008dc34071f0da2be68cc6b64382034c8ab69daf26976c&req=diEhH8B7mYFXX%2FMW1HO4zSZP05CMFgv9B32drIe5EDm6dMvIU%2FV2cYay8NGc%0AjUGs%0A) 6. On the next screen, you can give Claude access to your files and keep your computer awake by toggling those on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169955082/de4053ee0eab8fcb9263584bb171/d39b77da-1a69-4682-9fdb-7ed488f236b0?expires=1792699200&signature=5aa029934d944209584ca288df0f827950a0665eb4ad4c94c542dd53f3d9ab0d&req=diEhH8B7mIFXW%2FMW1HO4zaZWstieVAgcepuGRb1rD3JzMlLr6i8db0vPNnZi%0ADjiX%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169955082/de4053ee0eab8fcb9263584bb171/d39b77da-1a69-4682-9fdb-7ed488f236b0?expires=1792735200&signature=201956c0e257729295aafebdadc2ee1e2f3299af28ba7d945c032cdee26b45fa&req=diEhH8B7mIFXW%2FMW1HO4zaZWstifXgQcepuGRb1rD3IZlg9psZnYMM0xF7rr%0AfR1d%0A) 7. Click “Finish setup.” diff --git a/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md b/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md index d39333643a..4db7237f0d 100644 --- a/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md +++ b/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md @@ -24,23 +24,23 @@ Cowork is available for paid plans (Pro, Max, Team, Enterprise) on: Find **Projects** in the left navigation panel and click the “+” button to see the three different ways to create a project: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183720240/6f6ef438913391703598d86d606c/CleanShot+2026-03-20+at+09_11_43.png?expires=1792699200&signature=f02cfcf30df7f5ac12464574f146235bae25d6a2e7303ccb48ce6e8ae3ee327d&req=diEvFc58nYNbWfMW1HO4zcOgige82CF3ZwSvwegvtgzlgiApNq1ydOm9ASAP%0AAdpNV0UEsqn2EOVjojw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183720240/6f6ef438913391703598d86d606c/CleanShot+2026-03-20+at+09_11_43.png?expires=1792735200&signature=c8f5963c23518eedd21b4729d8497b19b1155fe19fbdbc14fc0fdc7e131303e6&req=diEvFc58nYNbWfMW1HO4zcOgige90i13ZwSvwegvtgzMJTRjmgbNV7PFlq0e%0AM%2FNTLJWzs9AKg3xmius%3D%0A) ### Start from scratch Selecting “Start from scratch” allows you to set up a new folder with instructions and files: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177090014/07832b50003cf7fd3b4e9c7c448b/3385d9b8-c3e7-42b9-ae3f-4d213baa53a7?expires=1792699200&signature=db4c65e2f63007e59a4c2d7a5f041c88ab3a61969cf5a78e4460142d747a82c4&req=diEgEcl3nYFeXfMW1HO4zZCoQo9DR3yUvb0suCMAnj2WG72M9C4aX%2Bc%2Fpaod%0AqPWiusupn9BOw0DImVk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177090014/07832b50003cf7fd3b4e9c7c448b/3385d9b8-c3e7-42b9-ae3f-4d213baa53a7?expires=1792735200&signature=846777bbef0e5e903a4960f9e564fb1c03fc78f44a392bc2fb6f6f960fa5ad33&req=diEgEcl3nYFeXfMW1HO4zZCoQo9CTXCUvb0suCMAnj09E7IT6eFVWX5CH6jB%0AwOruil6gOHpWfPEpaWY%3D%0A) ### Import from a Claude project After selecting “Import from project,” you’ll see a “Search projects in Chat…” field: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183717962/acdc11bcc825ae76a13f508365bc/CleanShot+2026-03-20+at+09_12_08.png?expires=1792699200&signature=a470faae0d8c09e2546c0a2ed411642630703fdb684081dd6a7e7ea5041cd608&req=diEvFc5%2FmohZW%2FMW1HO4zQQ7UWFbw5EdjggUT7FIJz8j79PfcpL7VlJVubVK%0A9Yeebybqk8dbQ7bk2pg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183717962/acdc11bcc825ae76a13f508365bc/CleanShot+2026-03-20+at+09_12_08.png?expires=1792735200&signature=6d1e36b82e49d4eb2ae4efdea8bd77c60b2329d53554fcb92189112a347d00c0&req=diEvFc5%2FmohZW%2FMW1HO4zQQ7UWFayZ0djggUT7FIJz%2FMxSPJXrMpjYg0%2FvJb%0Acg2IoSXaYyiQIQTzxI4%3D%0A) Clicking into the field will display a drop-down showing your recent projects, but you can also use it to search all your projects. After you select a chat project (bulk upload is not supported), you can name the new Cowork project and choose where to save it on your computer: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183727973/7a25430123d9e13e7c3cdd411f70/CleanShot+2026-03-20+at+09_13_41.png?expires=1792699200&signature=2c86482de42c032fc0073f5115745792371731258d785dba04e4de14f50af8d0&req=diEvFc58mohYWvMW1HO4zU%2FKAyFA9SrOI7f%2FdY0VL6gpCUBVnqxwGaqVFOBK%0A3%2F2Zx87L0CdF27m%2Fi64%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183727973/7a25430123d9e13e7c3cdd411f70/CleanShot+2026-03-20+at+09_13_41.png?expires=1792735200&signature=31251074f31d93f4e99bc760120ea52d75fb240419ef4f647fb9f2556c3ce5bc&req=diEvFc58mohYWvMW1HO4zU%2FKAyFB%2FybOI7f%2FdY0VL6gG11Y6uXo3C6QDUneK%0AmlkEm8HyL2pnPO5Ni4Y%3D%0A) Clicking “Create” will transfer the files and instructions from your existing Claude project and create a new Cowork project. @@ -48,11 +48,11 @@ Clicking “Create” will transfer the files and instructions from your existin If you select “Use an existing folder,” you’ll be prompted to pick a file to use as context for the new Cowork project: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087935/2f0052dae601d0b7fecdc029e1c3/2e3ca9e7-23b1-436e-bbdb-edcd31c41f15?expires=1792699200&signature=8d05f084cad4551d5afd389ac902b8f899f116de179bea7c16c773fd671c8cd4&req=diEgEcl2mohcXPMW1HO4zejrnjTQHCpduv8e2Xj2xOUVuA0B%2FTUpae8q6nYX%0AK4XHzVj%2Bu3yuVbt8BXM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087935/2f0052dae601d0b7fecdc029e1c3/2e3ca9e7-23b1-436e-bbdb-edcd31c41f15?expires=1792735200&signature=f5355487a53fea81d0ac9b02d302e415bc8193de3dca16f22a858e144e6b7c1a&req=diEgEcl2mohcXPMW1HO4zejrnjTRFiZduv8e2Xj2xOW4aR0lNKiGidc4q3mR%0ALtzdeepSQ1KH13zreWA%3D%0A) After selecting a folder, you can name the new Cowork project, choose where to save it on your computer, add instructions, and attach any additional files. Click “Create” to start using your new project: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087937/f59dbe3fc28448a9597ea097cb4d/96a59acb-4054-4b4b-a208-751f9711f535?expires=1792699200&signature=59a1f821ed1957696a1b53c22837b370569d319033e72aae187954084572f111&req=diEgEcl2mohcXvMW1HO4zUq4VuGyiqs4MfnqHouW6MJl98fuWaMf8vJuvmEx%0A2tHGCmXzErSUCOkHT8I%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087937/f59dbe3fc28448a9597ea097cb4d/96a59acb-4054-4b4b-a208-751f9711f535?expires=1792735200&signature=f3d8fc7b27317189fef3c0392119079f22b3937052340af99d111636e49d6913&req=diEgEcl2mohcXvMW1HO4zUq4VuGzgKc4MfnqHouW6MJSQcPwKFWWIZTf07RC%0A%2FeZ2i4EkmDxrmj0Zr4o%3D%0A) --- diff --git a/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md b/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md index 15200bb770..bc71163a5e 100644 --- a/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md +++ b/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md @@ -50,7 +50,7 @@ You can trigger a manual sync from two places in your admin settings. 2. Click "Check for updates" under **SCIM sync**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312613548/44cd5970ee3c3b2c7f8dcd592d71/image+%2824%29.png?expires=1792699200&signature=405148b4c17e0d670040df20bfbc27ad1eea021c47cd64458e432d7677ca00d9&req=diMmFM9%2FnoRbUfMW1HO4zW4gbTerPMS2rgfl7PnOiulMl1XBCuVoq65AfKeS%0ATiol%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312613548/44cd5970ee3c3b2c7f8dcd592d71/image+%2824%29.png?expires=1792735200&signature=ed1683c544891658f2b284c1fdacf31d437649bf1d746940dfe93ee74d34a9cf&req=diMmFM9%2FnoRbUfMW1HO4zW4gbTeqNsi2rgfl7PnOiulZP%2B%2BhPKEgZzbfTVlw%0APdpk%0A) 3. Select whether to sync members, groups, or both. @@ -62,7 +62,7 @@ You can trigger a manual sync from two places in your admin settings. 3. Select whether to sync members, groups, or both: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312608119/e4b0ef4f309f3c4eac8311a6ef47/image.png?expires=1792699200&signature=26770118b057ff9521e867d736f9cd54b6fa7f843e73e4c180ea7161ed4f2893&req=diMmFM9%2BlYBeUPMW1HO4zX%2F4f7j2wjId43OpyTHzM9QMj2US46UJbwidA2qO%0AUyIN%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312608119/e4b0ef4f309f3c4eac8311a6ef47/image.png?expires=1792735200&signature=d0fed932ebddfa900b17fc086dc12284b549837a4dca8bbe2deb6c9181d7203e&req=diMmFM9%2BlYBeUPMW1HO4zX%2F4f7j3yD4d43OpyTHzM9QxWHRJP6jn5ioiwpqC%0A6i7o%0A) **Note:** If you trigger a manual sync while background changes are processing, your organization takes the most recent change for each member or group. If multiple changes are queued for the same member or group, you may need to resync again to make sure everything applies correctly. diff --git a/content/support/14604397-set-up-your-design-system-in-claude-design.md b/content/support/14604397-set-up-your-design-system-in-claude-design.md index e0aa7a31e9..f936e94d8a 100644 --- a/content/support/14604397-set-up-your-design-system-in-claude-design.md +++ b/content/support/14604397-set-up-your-design-system-in-claude-design.md @@ -34,9 +34,9 @@ If your design system already exists as React components, run /design-sync in Cl 1. Open the "Design" tab at the bottom of the sidebar. -2. Click "Migrate team design systems" in the banner. +2. Click "Move team design systems" in the banner. -Each design system becomes an artifact Claude can use in any chat, including in Claude Code. Migrated design systems may need some cleanup, so each one shows a banner where you can click "Let Claude clean it up," and Claude tidies its guide, tokens, and components. +Each design system becomes an artifact Claude can use in any chat, including in Claude Code. Design systems may need some cleanup after you move them, so each one shows a banner where you can click "Let Claude clean it up," and Claude tidies its guide, tokens, and components. If your organization has a retention period that covers artifacts, a design system you moved can be permanently deleted if nobody opens it for that period. Opening a design or deck that uses the design system doesn't count as opening it. ## Manage your design systems diff --git a/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md b/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md index 4a6fa247c8..4106ce09f4 100644 --- a/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md +++ b/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md @@ -28,7 +28,7 @@ To turn on the **Design** template, see the instructions in **[Artifacts admin g On Enterprise plans, you can control access to standalone Claude Design with **[custom roles](https://support.claude.com/en/articles/13930452)**. -**Important:** Standalone Claude Design closes on December 14, 2026. Before then, check that **Artifacts** and **Design systems** are on in **[Organization settings > Artifacts](https://claude.ai/admin-settings/artifacts)**, so users can migrate their design systems. On Enterprise plans, **Design systems** is off by default. Learn more in **[Migrate from standalone Claude Design to Claude](https://support.claude.com/en/articles/17440474)**. +**Important:** Standalone Claude Design closes on December 14, 2026. Before then, check that **Artifacts** and **Design systems** are on in **[Organization settings > Artifacts](https://claude.ai/admin-settings/artifacts)**, so users can move their projects and design systems. On Enterprise plans, **Design systems** is off by default. If your organization has a retention period that covers artifacts, a project or design system that moves, or has already moved, to Claude can be permanently deleted if nobody opens it for that period. Learn more in[**Move from standalone Claude Design to Claude**](https://support.claude.com/en/articles/17440474) and **[Configure custom data retention controls for Enterprise plans](https://support.claude.com/en/articles/10440198)**. Before you turn on broad access, read through the rollout approach below. Turning on Claude Design without a design system in place means your team gets functional but generic output. diff --git a/content/support/14604416-get-started-with-claude-design.md b/content/support/14604416-get-started-with-claude-design.md index 4409f77676..ed42632378 100644 --- a/content/support/14604416-get-started-with-claude-design.md +++ b/content/support/14604416-get-started-with-claude-design.md @@ -2,7 +2,7 @@ **[Claude Design](https://claude.com/product/design)** lets you create designs, interactive prototypes, one-pagers, and other visual work by chatting with Claude. It's one of the templates you can start an artifact from, so you can use it in any chat, in Claude Code, and from the **Artifacts** tab, with on-canvas editing and your design system included. This guide walks you through creating your first design, iterating on it, and getting the most out of it. Learn more about **[what artifacts are and how to use them](https://support.claude.com/en/articles/9487310)**. -Claude Design is available on Free, Pro, Max, Team, and Enterprise plans, and it's on by default. On Enterprise plans, it turns on by default on October 15, 2026, and owners can turn it on before then in **[Organization settings > Artifacts](https://claude.ai/admin-settings/artifacts)**. The standalone version at claude.ai/design closes on December 14, 2026. Learn more in **[Migrate from standalone Claude Design to Claude](https://support.claude.com/en/articles/17440474)**. +Claude Design is available on Free, Pro, Max, Team, and Enterprise plans, and it's on by default. On Enterprise plans, it turns on by default on October 15, 2026, and owners can turn it on before then in **[Organization settings > Artifacts](https://claude.ai/admin-settings/artifacts)**. The standalone version at claude.ai/design closes on December 14, 2026. Learn more in **[Move from standalone Claude Design to Claude](https://support.claude.com/en/articles/17440474)**. This guide assumes your organization’s design system has already been set up, so everything you create will automatically use your brand’s colors, typography, and component patterns. If you’re a design lead who needs to set up or modify the design system itself, see **[Set up your design system in Claude Design](https://support.claude.com/en/articles/14604397-set-up-your-design-system-in-claude-design)**. @@ -18,7 +18,7 @@ This guide assumes your organization’s design system has already been set up, - **In the Claude app for iOS and Android:** Ask for a design in any conversation and check back later for the result, then view it full screen in the **Artifacts** tab. You can also edit a design. To change sharing settings, use Claude on web or desktop. -- **At claude.ai/design:** The standalone version keeps working until it closes on December 14, 2026, and your existing projects stay there until then. Migrate your design systems to Claude before it closes. Learn more in **[Migrate from standalone Claude Design to Claude](https://support.claude.com/en/articles/17440474)**. +- **At claude.ai/design:** The standalone version keeps working until it closes on December 14, 2026. Your existing projects stay there until then, and moving them to Claude is rolling out gradually to paid plans. Move your design systems to Claude before it closes. Learn more in **[Move from standalone Claude Design to Claude](https://support.claude.com/en/articles/17440474)**. --- @@ -62,7 +62,7 @@ On Enterprise plans, admins can reserve publishing, setting the default, and del ### Bring over a design system from claude.ai/design -Design systems you made in the standalone version at claude.ai/design can move over, so Claude can use them in any chat, including in Claude Code. Migrate them before the standalone version closes on December 14, 2026. Learn more in **[Migrate from standalone Claude Design to Claude](https://support.claude.com/en/articles/17440474)**. +Design systems you made in the standalone version at claude.ai/design can move over, so Claude can use them in any chat, including in Claude Code. Move them before the standalone version closes on December 14, 2026. Learn more in **[Move from standalone Claude Design to Claude](https://support.claude.com/en/articles/17440474)**. ### Add context to your project diff --git a/content/support/14604842-cyber-verification-program.md b/content/support/14604842-cyber-verification-program.md index 1248b1c6a2..634b214a71 100644 --- a/content/support/14604842-cyber-verification-program.md +++ b/content/support/14604842-cyber-verification-program.md @@ -12,7 +12,7 @@ Our generally available models can still be used by all users for secure code re ## Access tiers -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2716457392/33c90f9ccfbd33fee02840fd2efa/267bc7d1-baeb-4302-a1d9-4491b4110775?expires=1792699200&signature=95e9c7ef77c0502c92d2c4a7bef47d7358df5cdb3ec560510089d5fc478dc928&req=dicmEM17moJWW%2FMW1HO4zVYZ0Nq4Z81Fy1US26KtMzIy%2F%2FMwWRj9PWdfxuhY%0A5taQYPCZ6EvJupZrhS4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2716457392/33c90f9ccfbd33fee02840fd2efa/267bc7d1-baeb-4302-a1d9-4491b4110775?expires=1792821600&signature=0e7406ed8b91dc01ed43d95cd00b37bff679d9ed5d532107fac47a6b98291acf&req=dicmEM17moJWW%2FMW3nq%2BgVW5JBO7gnLAvZ3g72lEz5zmzgXaL6hM%2Bo0ji4U%2F%0AJiRepYb643bMjZwwAk6%2FAL0wKyc%3D%0A) ## How to apply @@ -50,7 +50,47 @@ What you'll need: ## Building client-facing products -Your CVP access covers security work on your organization's own code, products, and infrastructure. Your CVP grant may not be used to build or operate a client-facing product or service. For example, using CVP access to run the model against a customer's code or systems, letting a customer interact with the model through something you've built, or any other "productizing" of our models requires a separate application and approval. The productization application will become available in the Verification Portal to CVP users shortly. +Your CVP access covers security work on your organization's own code, products, and infrastructure. Using your CVP access to deliver work to your customers, for example by running the model against a customer's code or systems or by letting customers use something you've built on the model, requires approval. Please submit a separate application for **each service or product you offer**. + +**Managed services: applications are open.** In a managed service, your own staff use the model to do security work for a customer, on code and systems the customer owns or operates. The customer receives only finished deliverables, such as a findings report or patched code. Your customers never prompt the model, interact with it, or see its raw output. + +**Products: not open yet.** In a product, your customers use something you built on the model, such as a scanner or a code-review tool, even if they can only trigger or configure it. Products are categorized as follows: + +- **Constrained products:** Customers use something built on the model but cannot direct it or see its raw output + +- **Unconstrained products:** Any other customer-facing product, such as one where customers can give the model their own instructions or see its responses as written. + +While we are not yet reviewing applications for products, you can express interest by selecting “Constrained product” or “Unconstrained product,” then select “Express interest.” We'll contact you when we're accepting product applications, and you'll need to submit a full application then. + +### How to apply for a managed service + +You must be an admin of an organization approved for the Cyber Verification Program. + +1. Sign in to the **[Verification Portal](https://portal.anthropic.com/programs/cyber-productization)**, open “Programs,” then choose “Cyber productization.” + +2. Select “Register an offering,” then choose “Managed service.” + +3. Name the service and describe how it runs, who operates the model, and what your customers receive. Then confirm the six security commitments and give a security contact and the name and title of the company officer who signs off. + +4. Accept the Anthropic Cyber Defender Partner Addendum, then select “Submit” for review. + +5. To apply for another managed service, go back to the Cyber productization page and repeat steps 2 to 4. + +### How to express interest in a constrained or unconstrained product + +You must be an admin of an organization approved for the Cyber Verification Program. + +1. Sign in to the **[Verification Portal](https://portal.anthropic.com/programs/cyber-productization)**, open “Programs,” then choose “Cyber productization.” + +2. Select “Register an offering,” then choose “Constrained” or “Unconstrained” product. + +3. Describe the product in one line. + +4. Add a name and email. + +5. Select “Express Interest." + +Check your answers before you submit: you can't edit or withdraw an application after you send it. You can follow each application's status on the **Cyber productization** page. Don't serve customers through a service until it's approved. Until then, you can keep using your CVP access for work on your own code, products, and infrastructure. ## Security controls and requirements diff --git a/content/support/15330088-set-a-default-model-for-your-organization.md b/content/support/15330088-set-a-default-model-for-your-organization.md index 3cf7cec4a2..577206aa56 100644 --- a/content/support/15330088-set-a-default-model-for-your-organization.md +++ b/content/support/15330088-set-a-default-model-for-your-organization.md @@ -50,7 +50,7 @@ The organization default applies to every member. To set it: 4. Click “Save changes.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514722139/d05c94072a41ea9090ecf386c53e/c32ee31d-954a-4551-a2da-91677fbd0b6f?expires=1792699200&signature=7e49fc80fb59f86e0fff6e6d882890b761aebb8a3b5c8392fae88a00612386be&req=diUmEs58n4BcUPMW1HO4zelOdjBGJEFFfdGVZ664dGEgwd5N0N0nHXrSqilW%0Ad47ID%2FU5GYE%2Bsgcs1GA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514722139/d05c94072a41ea9090ecf386c53e/c32ee31d-954a-4551-a2da-91677fbd0b6f?expires=1792735200&signature=65f4d6bb29959b276591c9b2df0596637bea27e963c93429b6ef5400bc23436b&req=diUmEs58n4BcUPMW1HO4zelOdjBHLk1FfdGVZ664dGGzy1ZRXblJxiTsu7G0%0AnuuzTdUt7Jfl21cS0bU%3D%0A) --- diff --git a/content/support/15694740-manage-model-access-for-your-organization.md b/content/support/15694740-manage-model-access-for-your-organization.md index 7642ef34ab..1e41462d56 100644 --- a/content/support/15694740-manage-model-access-for-your-organization.md +++ b/content/support/15694740-manage-model-access-for-your-organization.md @@ -42,9 +42,9 @@ The organization setting is the ceiling. A role can't grant access to a model th If any custom role uses the model you’re disabling as its default, you’ll be prompted to change that role’s default before the change can be saved. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693921/02ea72756f5163f14e5d158516dc/69102088-cd86-498e-97aa-c8a6e0004419?expires=1792699200&signature=e2741235843de931403b9c7ee5c65d407bd9956565767733b1c22cb5924c2579&req=diUmEs93nohdWPMW1HO4zXlxE%2BW%2FXthVQf5Pb7M2Q0t%2BAHdme6e5a7w7%2BBxT%0AnsheHi0ezLQETpZaD10%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693921/02ea72756f5163f14e5d158516dc/69102088-cd86-498e-97aa-c8a6e0004419?expires=1792735200&signature=1a16d187c8d2b8c484e8d4371265c29ea9f4a6ad28ecf7f6fab7ba339fd4338d&req=diUmEs93nohdWPMW1HO4zXlxE%2BW%2BVNRVQf5Pb7M2Q0uQtFyIt8dPLBo9sxCi%0AqCpTCsejDfoug%2BEf%2BkY%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693922/bfc5de6626eb19dca1d7caf818ca/c3cd8bb6-f86c-4d01-92da-6ae4ca966662?expires=1792699200&signature=57855cfbe807e9d9beafaf29e2a791b4f473d904e4ba02ab2e3328ca79739772&req=diUmEs93nohdW%2FMW1HO4zTqNsIvDT1FVAod9uc510lxwn09%2BhCqdDbmirSd9%0ARTtEz%2BHXiSGHcts4B24%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693922/bfc5de6626eb19dca1d7caf818ca/c3cd8bb6-f86c-4d01-92da-6ae4ca966662?expires=1792735200&signature=4623adddc988550e424f3523e1ea0456f993e89935d2fea5873046737154b6bc&req=diUmEs93nohdW%2FMW1HO4zTqNsIvCRV1VAod9uc510ly%2B6c7AZxEmHgzDMK0W%0A%2FsEjgx8CUiMcpHQWPpU%3D%0A) --- @@ -78,7 +78,7 @@ If any custom role has an effort cap higher than the new organization cap for th Only models the role grants access to can be selected as that role’s default model. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693923/880665a87dbd4776cf19d6063a37/29d30c6d-f9fc-408c-8c72-4320c6d88d14?expires=1792699200&signature=09d291a6748a04790b7f1d73e892358878e08123f7d8ada8a2fe0edcf3e97cae&req=diUmEs93nohdWvMW1HO4zYj9SPcF5Ii%2FXsqpNqvyFRLJgd%2FhPMHeSTbpcT6E%0A5%2BNEy0Nay4oNEAIHqAk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693923/880665a87dbd4776cf19d6063a37/29d30c6d-f9fc-408c-8c72-4320c6d88d14?expires=1792735200&signature=6e04c2076484dc035b6a200972c98cdf3ab5f98fe7959072fc02c389350ad738&req=diUmEs93nohdWvMW1HO4zYj9SPcE7oS%2FXsqpNqvyFRIhC02bCqeJbtA1MQyx%0A4Xxw2u7jAiW6015MEIk%3D%0A) --- @@ -96,7 +96,7 @@ Effort limits determine how much computation members on a role can apply per res 5. Click "Save" to save your changes. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693927/7a25673b3b075d72adb3cdc371e3/d2d7cd8d-a713-4e91-a706-f589ac46a9fe?expires=1792699200&signature=3fa2e3bd3b7a19714792aa0252f92a3cf93527d8cc1125d6c20cb62bc70c7ae5&req=diUmEs93nohdXvMW1HO4ze1xBzG6erAbDeA1RkowXUHLUhhgiixi87YOMz7i%0A4A3hqUCToHqjXb1P4PQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693927/7a25673b3b075d72adb3cdc371e3/d2d7cd8d-a713-4e91-a706-f589ac46a9fe?expires=1792735200&signature=7654ddab6a0e4d2f6be5bdcc6adc1e749dd42437a311f98de7af644111f0da0c&req=diUmEs93nohdXvMW1HO4ze1xBzG7cLwbDeA1RkowXUH6gGqgGavNw9YlBttI%0A0HsN%2BniygwYb%2BADnlIM%3D%0A) Members on the role see only effort levels at or below the cap in their model menu. Note that available effort levels differ depending on the model, and some models don’t support effort level settings at all. For an explanation of each level, see **[Change the model, effort, and thinking settings](https://support.claude.com/en/articles/8664678)**. diff --git a/content/support/15936181-get-started-with-1password-for-claude.md b/content/support/15936181-get-started-with-1password-for-claude.md index 39d52aaac9..22b8d20d62 100644 --- a/content/support/15936181-get-started-with-1password-for-claude.md +++ b/content/support/15936181-get-started-with-1password-for-claude.md @@ -52,7 +52,7 @@ Once the requirements are in place, you can set up 1Password from a few places i 4. Toggle on **Password managers**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2546126596/ba71ca47e2df21cec62c243831f8/5b1c67e1-607d-4c73-8f61-d1ceb081082a?expires=1792699200&signature=53bd70b31246bb89f8e6725c59788b33dc00d415782484ab01c4fe2564eeb841&req=diUjEMh8m4RWX%2FMW1HO4zU5ln2lopMxhGkiu4hEpcPUGrbAJJA0qjOoYqWcS%0AwBWqoxzchWv%2B0g1DllI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2546126596/ba71ca47e2df21cec62c243831f8/5b1c67e1-607d-4c73-8f61-d1ceb081082a?expires=1792735200&signature=2b8c72f486166d95c83da3f70dfadb00057c605c0a30a8c8af424890acb9ea22&req=diUjEMh8m4RWX%2FMW1HO4zU5ln2lprsBhGkiu4hEpcPU6Ipq5NuL9kiFe95Ba%0AtfiUmIRJtdPDfW%2BxvYo%3D%0A) Once enabled, eligible users will see the discovery options above. Users still need to install and set up the required apps and extensions themselves. diff --git a/content/support/16607638-understanding-your-pro-or-max-plan-invoices.md b/content/support/16607638-understanding-your-pro-or-max-plan-invoices.md index 8b7d289c0f..2ba57e76d1 100644 --- a/content/support/16607638-understanding-your-pro-or-max-plan-invoices.md +++ b/content/support/16607638-understanding-your-pro-or-max-plan-invoices.md @@ -40,7 +40,7 @@ You can also open any invoice from your account: **Amount due.** The invoice total minus any applied balance. This is what your payment method was charged. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2629072970/c514f489b65072ccad08e803864f/e8c7a7de-905f-4a40-815f-c9c66edcdbf6?expires=1792699200&signature=bef30eadce25ec8d74f7982bf9cbaee62afd7d41a1735a1761fc6ee14b4214df&req=diYlH8l5n4hYWfMW1HO4zdWraRM5510cPZYKVlMiWEXcLdvLCzewqwKqdscc%0ANIoIpLUSKHRd3tBM97k%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2629072970/c514f489b65072ccad08e803864f/e8c7a7de-905f-4a40-815f-c9c66edcdbf6?expires=1792735200&signature=77b9cdd9dad6cf8069fe36d2571c3fe03077237376602ff14aec57c037a797ac&req=diYlH8l5n4hYWfMW1HO4zdWraRM47VEcPZYKVlMiWEWqwkIl1jqOxXaSm1u1%0AhHh5QF9SnZSCBYM85qA%3D%0A) ## Billing details on your invoice diff --git a/content/support/16761823-claude-cowork-and-chat-are-one-claude.md b/content/support/16761823-claude-cowork-and-chat-are-one-claude.md index 9ad57ae8a2..2ca6e921a7 100644 --- a/content/support/16761823-claude-cowork-and-chat-are-one-claude.md +++ b/content/support/16761823-claude-cowork-and-chat-are-one-claude.md @@ -72,9 +72,9 @@ A task you start at your desk shows up in Claude Mobile too, so you can see how A permission setting in the message box controls how independently Claude works: -- **Auto:** Claude keeps working without stopping to ask about each step, and automated safety checks run before it takes an action. +- **Auto (default on Pro, Max, and Team plans):** Claude keeps working without stopping to ask about each step, and automated safety checks run before it takes an action. -- **Manual (default):** Claude asks before it takes actions, and you choose whether to allow each one. +- **Manual (default on Enterprise plans):** Claude asks before it takes actions, and you choose whether to allow each one. You can change the setting at any time, and you can stop or redirect Claude while it works. The setting applies to the whole conversation. For work with real consequences, like sending messages or changing important files, stay close and review what Claude does. Learn more in **[Use Claude Cowork safely](https://support.claude.com/en/articles/13364135)**. diff --git a/content/support/16893491-get-started-with-smart-reports.md b/content/support/16893491-get-started-with-smart-reports.md index 3d961e04d5..dea6dc3d2d 100644 --- a/content/support/16893491-get-started-with-smart-reports.md +++ b/content/support/16893491-get-started-with-smart-reports.md @@ -28,13 +28,13 @@ Each report includes the following sections: Workstreams shows what the group used Claude for most, by sessions and by spend, side by side. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671030907/7b62b605189fe8e9474a20c1eaf2/image.png?expires=1792699200&signature=f3f856982e07269682092fa7a08fd6074bf2faca7fc2da6344f6ede9339537a6&req=diYgF8l9nYhfXvMW1HO4zZse%2BmCaQgEOVa%2FWhnGS4GkJktYn7H1Ud%2BicyVlL%0Avho0NcFL8StuZ1ErVqM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671030907/7b62b605189fe8e9474a20c1eaf2/image.png?expires=1792735200&signature=d3f3bad58789acc5e6e1067a85ea9caf04e3cce2ef10644b54b29be22a167a86&req=diYgF8l9nYhfXvMW1HO4zZse%2BmCbSA0OVa%2FWhnGS4GkHwJs%2FHrmNiw98eOUS%0AfkSB99E%2BfOV64rzgdxg%3D%0A) ### Deliverables produced Deliverables produced groups sessions by the type of output that was produced. For example, analysis, documentation, content drafts, and code. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671035220/2a582bc047a6ba46e7dbd6f05d9f/e17881ac-874c-4747-94ca-8679e0301455?expires=1792699200&signature=eb00277ff43b06d94060b99d5481540f6c86abc081029d6c9c6500dde17afa0a&req=diYgF8l9mINdWfMW1HO4zelj06VdmtTwYDEFlKbF9Y%2F2856mYznSw2qtJPy8%0AWt0WJeRRbVdrVZ61nN8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671035220/2a582bc047a6ba46e7dbd6f05d9f/e17881ac-874c-4747-94ca-8679e0301455?expires=1792735200&signature=2bc2d723df03b2738bbbc6f8f68ae2abcbb7aa38bd95b059035df4d8d6ecaf2a&req=diYgF8l9mINdWfMW1HO4zelj06VckNjwYDEFlKbF9Y9WsLT5NQp3k%2FBukhbo%0AMtRKOK0onaRt9oT4wg8%3D%0A) ### Cost per session by type of output @@ -48,17 +48,17 @@ Task outcomes shows what each session produced. Most common frictions shows what got in the way, by category. For example, a connector that wasn’t set up, output that didn’t match the ask, approval or sign-in gating, tool failures, or rework loops. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671052365/b69f22b75729e5587563e7ab6830/b1647659-a7ea-403b-89fc-0b150ee97675?expires=1792699200&signature=191dbe6f1a0ad4e5ceb69dccb3df3253dd3f517afabe675ffbd584d19758a53a&req=diYgF8l7n4JZXPMW1HO4zdDitrgzXdRTjFK5P3Uf7RhSGrG4dJw22VwNV1wy%0AWIRNpAza3LkvcAqRvvs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671052365/b69f22b75729e5587563e7ab6830/b1647659-a7ea-403b-89fc-0b150ee97675?expires=1792735200&signature=01642906867601f254da8f45924ce34394a742abb020e7b8a765eeb0b13b5bc8&req=diYgF8l7n4JZXPMW1HO4zdDitrgyV9hTjFK5P3Uf7RiX1QDemg5%2BFsTCtzEA%0AZ0zgdiz6VyIIQUH8H3Q%3D%0A) Click into a category to see more information: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671053199/b68936dd5d590c5fbcbbc092b332/5ec247b2-cd67-4f3f-97b5-23479b87a5c6?expires=1792699200&signature=fd250c2bf7aec842bf3f2e4043cd257655660ec99e8e46a6de2052a06f9a09b7&req=diYgF8l7noBWUPMW1HO4zbuGO4kuL7AeodOVMLl17PX3%2FeHuWid9M7kajdBE%0AIr%2BlK%2FJMIbQNBRdPE6A%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671053199/b68936dd5d590c5fbcbbc092b332/5ec247b2-cd67-4f3f-97b5-23479b87a5c6?expires=1792735200&signature=8459217febc3ac52ed247ec7659ccba97ad6a3d16230faeb2a128ba54d552dcc&req=diYgF8l7noBWUPMW1HO4zbuGO4kvJbweodOVMLl17PX4ZyKaTkbrZtWScrW8%0Ac4QNyWLobcHYg2otWP8%3D%0A) ### Inefficiencies Inefficiencies counts sessions that produced nothing usable and sessions that were personal or off-topic, with their cost (shown only as an aggregate count and cost, with no summaries or drilldown). -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671036122/90dc848a7adf371a872bd89a2f5e/de86945b-ccfe-4e0f-892d-abacc475c5c4?expires=1792699200&signature=96ea7010e456a5d7aeaaf2dbca0a0b8b3addb610b22be65ef97399b9ae9a30bc&req=diYgF8l9m4BdW%2FMW1HO4zcYfhg2QBP0YBas8rgXn%2Fb2pV8gJnKl5dbub%2BVDj%0A18K08tuBAKPtla2INeo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671036122/90dc848a7adf371a872bd89a2f5e/de86945b-ccfe-4e0f-892d-abacc475c5c4?expires=1792735200&signature=0f3b58381d6147a693c5fcedbcd127b6cf5c35975cd75a8fac6a365edd937d38&req=diYgF8l9m4BdW%2FMW1HO4zcYfhg2RDvEYBas8rgXn%2Fb2zOrR11QFMLgf8zITu%0AnNrWAgqQDZjdZvZ3DKA%3D%0A) ### Reusable skills and workflows to build @@ -68,13 +68,13 @@ Reusable skills and workflows to build identifies repeated patterns that could b Most expensive sessions lists where spend concentrates. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671032083/2b075387a4a3473f884a8ba26436/image.png?expires=1792699200&signature=58a3530b46db46340d8fd636448f73e89f0b72907298a6888cd8b7d3bff90e03&req=diYgF8l9n4FXWvMW1HO4zdLkIm2j408rnUoxuhUXEhg7eFAaU3oJoGprBt0h%0ARiq4%2BpzjmquGeI0RENo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671032083/2b075387a4a3473f884a8ba26436/image.png?expires=1792735200&signature=cbc332d7347d2eb1341d55b3ad82f3b3b4a879e7651a6ec92c1869bc6b94ae92&req=diYgF8l9n4FXWvMW1HO4zdLkIm2i6UMrnUoxuhUXEhh0rciEGdP3JTlI7%2BlV%0AnVlmsu%2BUGxgLVeYuNRw%3D%0A) ### Complex, autonomous work Complex, autonomous work shows sessions scoring highest on task complexity, time saved, how long Claude worked on its own, and the expertise required. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671031695/3781b98c5cb9cdc069439aa3d9ab/image.png?expires=1792699200&signature=967bf4a5085d4ce399c599b1edd0c5c44858b5ac890b5b01076385dc95f01d44&req=diYgF8l9nIdWXPMW1HO4zcPtgjD3AtbGtjDEKfEvx0NakX2YMyA0sxW0oONB%0AxdApfOkMjoRZAXukCaA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2671031695/3781b98c5cb9cdc069439aa3d9ab/image.png?expires=1792735200&signature=445e97efd26d565a284cb44bc5b88ff75310d5213c881f2a89c9a80c4227a14a&req=diYgF8l9nIdWXPMW1HO4zcPtgjD2CNrGtjDEKfEvx0NgvJoRgPAv8mKWEpYB%0AAyXamEsIcK70BN2FLyg%3D%0A) ### Answers to custom questions diff --git a/content/support/16951679-use-claude-in-google-docs-sheets-and-slides.md b/content/support/16951679-use-claude-in-google-docs-sheets-and-slides.md index fd6efcf946..ed5f503ef4 100644 --- a/content/support/16951679-use-claude-in-google-docs-sheets-and-slides.md +++ b/content/support/16951679-use-claude-in-google-docs-sheets-and-slides.md @@ -28,11 +28,11 @@ If your organization already allows Marketplace apps, this takes about two minut 2. Open a Google Docs, Sheets, or Slides file and go to Extensions > Claude > “Open Claude": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2707281468/abc0497defca04936c9a4b97d147/8b17d05f-3fb1-4e49-8d1f-65364ac3f496?expires=1792699200&signature=d54c42f6f29a9f76ac4c46aa8e7feb1f7af400d6ac7b84b708641d0057c5529e&req=dicnEct2nIVZUfMW1HO4zRwmJT5qXe1NaAKM49NdBLP%2BDQiuwVrtwTB5LE8T%0ANz%2Bf%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2707281468/abc0497defca04936c9a4b97d147/8b17d05f-3fb1-4e49-8d1f-65364ac3f496?expires=1792735200&signature=ad01ac50ecfb7ad78802121f547a4b3488b47baff5f33827af894fc055e699c3&req=dicnEct2nIVZUfMW1HO4zRwmJT5rV%2BFNaAKM49NdBLNXCFYKnyrduN7%2Bawle%0AdB9i%0A) 3. The first time, Google asks you to allow two permissions. Review them and click "Allow": - ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2707282342/f583a396098ff16e3cbd156d4a2a/112c6459-79c6-4fbb-9bc0-748fda6f592f?expires=1792699200&signature=1abf12f7bfdae1119388edcd96fc9841d7182f7976c023dd3ff1ff689f118bc6&req=dicnEct2n4JbW%2FMW1HO4zeKY3p4AiQfyeBfHlrCfDWfvbP5SW77xu3lqMlB5%0AjhDg%0A) + ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2707282342/f583a396098ff16e3cbd156d4a2a/112c6459-79c6-4fbb-9bc0-748fda6f592f?expires=1792735200&signature=0b0f29fb71332d4266851036f45e53c94a8a5fbf8e0ef0369093ad707fad6e81&req=dicnEct2n4JbW%2FMW1HO4zeKY3p4BgwvyeBfHlrCfDWcuz2FcMcf4tmK6iCQN%0AmTDv%0A) 4. Sign in with your Claude account in the sidebar, and optionally enable your connectors. diff --git a/content/support/16994751-artifacts-admin-guide-for-team-and-enterprise-plans.md b/content/support/16994751-artifacts-admin-guide-for-team-and-enterprise-plans.md index 960e7bb5dc..8697323055 100644 --- a/content/support/16994751-artifacts-admin-guide-for-team-and-enterprise-plans.md +++ b/content/support/16994751-artifacts-admin-guide-for-team-and-enterprise-plans.md @@ -47,7 +47,9 @@ Templates are the starting points users pick when they create an artifact. ### Standalone Claude Design at claude.ai/design -Standalone Claude Design at **claude.ai/design** closes on December 14, 2026. Until then, it has its own setting in **[Organization settings > Claude Design](https://claude.ai/admin-settings/claude-design)**, separate from the **Design** template. Users' existing projects stay at **claude.ai/design** until it closes, and up to 60 of them also appear in the **Artifacts** tab. To let users migrate their design systems, keep **Artifacts** and **Design systems** on. Learn more in **[Migrate from standalone Claude Design to Claude](https://support.claude.com/en/articles/17440474)**. +Standalone Claude Design at **claude.ai/design** closes on December 14, 2026. Until then, it has its own setting in **[Organization settings > Claude Design](https://claude.ai/admin-settings/claude-design)**, separate from the **Design** template. Users' existing projects stay at **claude.ai/design** until it closes, and up to 60 of them also appear in the **Artifacts** tab. + +Moving projects to Claude is rolling out gradually to paid plans, and a project or design system that moves to Claude becomes an artifact. To let users move their projects and move their design systems, keep **Artifacts** and **Design systems** on for your organization. On Enterprise plans with custom roles, each user's role needs them too. Learn more in **[Move from standalone Claude Design to Claude](https://support.claude.com/en/articles/17440474)**. --- @@ -170,7 +172,7 @@ To share someone else’s design system with everyone, an Owner or Primary Owner On Enterprise plans, custom roles control who can create design systems. Turn **Design systems** on or off under **Artifacts** in a role’s **Capabilities** tab. -Design systems migrated from standalone Claude Design can arrive already shared with everyone. Published design systems that weren’t private there are shared with everyone in your organization, and if your organization’s default design system migrates, it becomes the default in Artifacts too, unless you’ve already set one. +Design systems moved from standalone Claude Design can arrive already shared with everyone. Published design systems that weren’t private there are shared with everyone in your organization, and if your organization’s default design system moves, it becomes the default in Artifacts too, unless you’ve already set one. **In standalone Claude Design** @@ -224,6 +226,8 @@ When users create designs and docs, they may upload design assets, brand guideli - Uploaded assets are stored persistently, and fall under the same **[data retention and deletion policies](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data)** as other Anthropic products for organizations. +- A custom retention period set on an Enterprise plan can cover artifacts, including projects and design systems moved from standalone Claude Design. An artifact can be permanently deleted if nobody opens it for that period. For a moved project or design system, the period starts on the day of the move and restarts when someone opens or edits the artifact. Learn more in **[Configure custom data retention controls for Enterprise plans](https://support.claude.com/en/articles/10440198)**. + - Claude Design doesn't currently support data residency requirements. ### When someone leaves your organization diff --git a/content/support/17005973-manage-pooled-group-budgets-on-enterprise-plans.md b/content/support/17005973-manage-pooled-group-budgets-on-enterprise-plans.md index 52d58d69b5..6bad9ed2dc 100644 --- a/content/support/17005973-manage-pooled-group-budgets-on-enterprise-plans.md +++ b/content/support/17005973-manage-pooled-group-budgets-on-enterprise-plans.md @@ -76,7 +76,7 @@ If a user belongs to more than one group with a pooled budget, the largest poole With a custom order, the first pooled budget in your list with budget remaining pays. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2719736736/a4ec8e92af4975a87891357e5dbd/6f58b496-432d-4069-ba18-72a6390ab2ea?expires=1792699200&signature=3eb7104faee888f182375b1325be4c985751291629ee51e47869e0363d06df33&req=dicmH859m4ZcX%2FMW1HO4zU9wBwYeWIExTLR6JppsyjS0QRniacafdkC3Ufw9%0AstIYhrHb80P9Uc33mKs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2719736736/a4ec8e92af4975a87891357e5dbd/6f58b496-432d-4069-ba18-72a6390ab2ea?expires=1792735200&signature=f21b2c1d06e08f1e5c416a68031db57c55ce1ea6ed05d9af6f4f987d85b55847&req=dicmH859m4ZcX%2FMW1HO4zU9wBwYfUo0xTLR6JppsyjRwaI181h6TWK6lJgAK%0AAks3dcpJwZRCkJTWzxk%3D%0A) **Note:** Budget priority only decides the order in which pooled budgets pay. To choose which group's member monthly limit applies to a user in more than one group, use the **Member limit from groups** setting under **Spending defaults**. diff --git a/content/support/17203415-set-up-claude-for-intune.md b/content/support/17203415-set-up-claude-for-intune.md index 86ef9c9395..34755716f4 100644 --- a/content/support/17203415-set-up-claude-for-intune.md +++ b/content/support/17203415-set-up-claude-for-intune.md @@ -70,25 +70,25 @@ To add Claude for Intune for enrolled company-owned devices: 1. In the Microsoft Intune admin center, select "Apps" from the left side navigation panel: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700192269/ce2bf95a18aba11042da50f4c1ad/dda0f9a2-d585-4b09-ae4f-a1ff70b1e010?expires=1792699200&signature=4329094ef281ca535a952e1d21ecc8565d664fd10615bd4fec182c1e70da0a90&req=dicnFsh3n4NZUPMW1HO4ze7khjPX62JiAMLV2Uu0R4UlKkMEwUtakXKvtTTU%0AJj%2F5%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700192269/ce2bf95a18aba11042da50f4c1ad/dda0f9a2-d585-4b09-ae4f-a1ff70b1e010?expires=1792735200&signature=23701d82fd4fe1f0db5f98e19d27ebfbe9363576ff00159c3b972d76b0eb0233&req=dicnFsh3n4NZUPMW1HO4ze7khjPW4W5iAMLV2Uu0R4Uf5gTe4%2BLgn0nTa7vJ%0ASB0m%0A) 2. Under Platforms, select "iOS/iPadOS": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700195036/b70c6c0bdeff5f2b72568ef4943b/67cc834c-5e91-42da-9d3b-1f32c8dd8c05?expires=1792699200&signature=c56d494a2414672a7eabbf0dac3163b204bd834beb8bc61ca2c8575065125c48&req=dicnFsh3mIFcX%2FMW1HO4zeH1oU%2FhuHqWQ7hR7Wh%2Bi70csGU1uVqUY9kKu8ka%0AjWV1%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700195036/b70c6c0bdeff5f2b72568ef4943b/67cc834c-5e91-42da-9d3b-1f32c8dd8c05?expires=1792735200&signature=64ca543df46cd2c536da5384e0f986ecf43ee75f7e55a83591fd52fdf99f79b8&req=dicnFsh3mIFcX%2FMW1HO4zeH1oU%2FgsnaWQ7hR7Wh%2Bi7062TiYhALmRovlJpTJ%0AgTBX%0A) 3. Click "+ Create." For the App type, select the "iOS store app," and click the "Select" button on the bottom: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700195791/9a01290b4189e6a39c473af0a448/cfed06da-f35a-4b22-b687-286ea48864c1?expires=1792699200&signature=50554024d80e1c73f2e1fbc97c97acf9a6e674cc8e8e0238e93360038693d065&req=dicnFsh3mIZWWPMW1HO4zTni3cQva5cu2SRx6amjj9FRtIDedYQkk1Y2h8iA%0AJ7lQ%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700195791/9a01290b4189e6a39c473af0a448/cfed06da-f35a-4b22-b687-286ea48864c1?expires=1792735200&signature=450a1fe926e017e20a2d7b7d48207953dbe9a9eafd18efa54973c432bdd4ce37&req=dicnFsh3mIZWWPMW1HO4zTni3cQuYZsu2SRx6amjj9FhyOqAbDWvMunLk6TM%0AF2fY%0A) 4. Search "Claude for Intune" and click the "Select" button on the bottom. 5. In **App Information**, set **Minimum operating system** to iOS 18, then click the "Next" button: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700196458/588327ab209e9524c45111a244a1/258697c2-2f82-471b-9104-2bccb1b01614?expires=1792699200&signature=a2a275a17ed67c97504d32cf1f056c35366420ff729214ca853122ea7d0f8053&req=dicnFsh3m4VaUfMW1HO4zbxl5YpRfjssDNNSLAHCCFq79jL9yLQfsYNFODmy%0Anq%2F%2F%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700196458/588327ab209e9524c45111a244a1/258697c2-2f82-471b-9104-2bccb1b01614?expires=1792735200&signature=30ac8dc38282dd77922d8238ca94d6829c6348b823ec6cc45dbc4f59466c78cf&req=dicnFsh3m4VaUfMW1HO4zbxl5YpQdDcsDNNSLAHCCFq8%2F4xa298PQveDHyE3%0AZulW%0A) 6. For **Assignments**, add the groups that should get the app: under Required to install it automatically, or under Available for enrolled devices so employees can install it from Company Portal. You can use user groups or device groups. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2741107114/8f15b0d179a54c2ca4effaad8577/55bed25a-4b20-47b0-9e89-7f8adc86c04f?expires=1792699200&signature=ef6e19288f4f715d192ba35c6e97977100f322ba7dc375fd986a8bc06c497732&req=dicjF8h%2BmoBeXfMW1HO4zYaZMeq6cPqcmN%2B6UXepdg9I7CB0bWNdOEPml0jo%0A8j%2Bt%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2741107114/8f15b0d179a54c2ca4effaad8577/55bed25a-4b20-47b0-9e89-7f8adc86c04f?expires=1792735200&signature=327d92fb42d0f6362e6383df8a389f96e4acc20d17c64bd97eaba49ab27e1847&req=dicjF8h%2BmoBeXfMW1HO4zYaZMeq7evacmN%2B6UXepdg%2BgqReM33tfmsC2yA7O%0AQuVA%0A) 7. Click "Next," review and create. @@ -98,27 +98,27 @@ To add Claude for Intune for enrolled company-owned devices: 1. In the Microsoft Intune admin center, select "Apps" from the left side navigation panel: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700190760/9f6412fe68632cffee29826f7d30/42fdeb30-64af-4089-a976-5094bb6b8292?expires=1792699200&signature=99cb3598d89996ae5f3a9f846c138e2018d5255abf05633e80ffdcd2454cac4a&req=dicnFsh3nYZZWfMW1HO4zQwrZIgEWts%2BLtTCoSp4D6qmPvvttK968t%2BuROLL%0A07zy%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700190760/9f6412fe68632cffee29826f7d30/42fdeb30-64af-4089-a976-5094bb6b8292?expires=1792735200&signature=e1b1ba0b1b924aeb37954a35049063ef32812a3bfd0651cedca02f68460ea769&req=dicnFsh3nYZZWfMW1HO4zQwrZIgFUNc%2BLtTCoSp4D6oyiyhUWrbwElDdS62N%0AGdya%0A) 2. Under **Manage apps**, select "Protection": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700200858/a7ddd4265aeb6d61a7a096297cd5/fc9a1fe2-3d0e-4038-9b2c-f96bd19e4020?expires=1792699200&signature=fe25252517354acc0449e85978aa056d2bb0e48fb042ad4632a16503e1df78e5&req=dicnFst%2BnYlaUfMW1HO4zeBHXB07%2FPTvnJWY0xu8hzKv2DmiZR3jHB0eo9ix%0A7vG1%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700200858/a7ddd4265aeb6d61a7a096297cd5/fc9a1fe2-3d0e-4038-9b2c-f96bd19e4020?expires=1792735200&signature=79dc8b3d1e2d714bdd4c1e38841200f3f28f7289d1f57e4b3b839fa588ae6e88&req=dicnFst%2BnYlaUfMW1HO4zeBHXB069vjvnJWY0xu8hzJrvTX7F%2FtBvNfdb%2Bai%0AtCfX%0A) 3. Click "+ Create" and then select "iOS/iPadOS": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700201382/6240e257b2b498b5fa5ac1111561/11ef4f59-aba1-4d2b-ac58-9aec1dd60a4d?expires=1792699200&signature=cabcd8d687eea6e40440da27a8fb57e967e91dd45ae1649d0a7389108244c39c&req=dicnFst%2BnIJXW%2FMW1HO4zc89y0lQC3NMV2VWh%2B9zzEqmsJa4sbknoeF7AzAH%0AcNX%2F%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700201382/6240e257b2b498b5fa5ac1111561/11ef4f59-aba1-4d2b-ac58-9aec1dd60a4d?expires=1792735200&signature=114f4e19992f11a8f96438ba6aaad8e720af44ab4873ff0bea2036b88ce5152d&req=dicnFst%2BnIJXW%2FMW1HO4zc89y0lRAX9MV2VWh%2B9zzEqOaSWiHffErdwY4lX7%0AYOc6%0A) 4. Enter Name in the **Basics** tab, then click "Next" to **Apps**. Set **Target policy to** "Selected apps." Click "+ Select custom apps": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700201929/2edf45cedc0bc03204f86d01a49e/4d96c12d-962b-43f6-8b3f-668e3247d4c1?expires=1792699200&signature=ba06624be0fd276aaeaa3a325d18fa1ad01b061af5693cd135cd9ba16355dd55&req=dicnFst%2BnIhdUPMW1HO4zVmMRJMSWjQKKETwku7gMsuTeF3Z5tF8MFMh8qqU%0AjkjW%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700201929/2edf45cedc0bc03204f86d01a49e/4d96c12d-962b-43f6-8b3f-668e3247d4c1?expires=1792735200&signature=21ca33bcb59204a4c877d3e53c62fd20a370c826032b6daa3f9f1575d6733d49&req=dicnFst%2BnIhdUPMW1HO4zVmMRJMTUDgKKETwku7gMsvqX%2FsOOQI2%2Bem6RMga%0Ad7qz%0A) 5. Type in the bundle ID `com.anthropic.claudeforintune`. Select it so it appears under **Selected Apps** before clicking "Select": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700202816/3565aea2d1b9c22a5f8d105825c5/3de6d241-6259-463e-a503-a6ca9f2095e0?expires=1792699200&signature=c133325e9374a1bb6d78efa921c2eaa870b604f7ae50a6e1b27ae00b2be73059&req=dicnFst%2Bn4leX%2FMW1HO4zf6tYiEuwaN112LT9vQL0W71b3yBhZ2%2BCQNVqEKe%0AR4pQ%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700202816/3565aea2d1b9c22a5f8d105825c5/3de6d241-6259-463e-a503-a6ca9f2095e0?expires=1792735200&signature=26978b8d91f7e1e94287e8b725b7b5829f350a28e5c8bcc85be1e20b0462b3b1&req=dicnFst%2Bn4leX%2FMW1HO4zf6tYiEvy69112LT9vQL0W6pJUineE3%2BeHeEjBjA%0AB0ZJ%0A) 6. In Apps, confirm the bundle ID now appears under **Custom apps** before clicking "Next": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700203780/24ed354ef0de87bf0a0c1bc129a1/46eed662-f488-48ee-a4d1-8a9a76079884?expires=1792699200&signature=74d9075c3ae5d32c2c7a2c4bb58ffb8b425eb745554e17353440bede036eeacb&req=dicnFst%2BnoZXWfMW1HO4zQd95NeM0sHd8F6Cfy2R7u%2Ffg1zy%2ByBI2njtElqi%0Af07I%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2700203780/24ed354ef0de87bf0a0c1bc129a1/46eed662-f488-48ee-a4d1-8a9a76079884?expires=1792735200&signature=b7a5b5bf9ddd8674ca9fa4d40efe67b09946efd29d4067d7177c2a76d8adab3a&req=dicnFst%2BnoZXWfMW1HO4zQd95NeN2M3d8F6Cfy2R7u%2F%2FbNBG0czsrGc5zy5J%0A4rwg%0A) 7. Configure the Data protection, Access requirements, and Conditional launch settings as needed. diff --git a/content/support/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization.md b/content/support/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization.md index 1fe35ef855..7bd98804e1 100644 --- a/content/support/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization.md +++ b/content/support/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization.md @@ -103,7 +103,7 @@ To learn how to create a role, see **[Set up role-based permissions on Enterpris | Computer access | Organization settings | When off, web, mobile, and scheduled tasks can't use a member's linked computer. | | Require Trusted Devices | Organization settings | Require members to verify each new device before it can connect to Claude on their computer remotely. | | Scheduled tasks | Organization settings | When off, scheduled tasks that execute remotely are disabled for your org. Users will not be able to create new scheduled tasks in the cloud. | -| Custom data retention | Organization settings | Governs conversations and projects. See Data retention and deletion below. | +| Custom data retention | Organization settings | Governs conversations, projects, and artifacts. See Data retention and deletion below, and learn more in **[Configure custom data retention controls for Enterprise plans](https://support.claude.com/en/articles/10440198)**. | | Compliance API | Organization settings | Covers conversations in the new unified Claude experience with your existing access keys. For setup and endpoint reference, see **[Access the Compliance API](https://support.claude.com/en/articles/13015708)** and the **[Compliance API documentation](https://platform.claude.com/docs/en/manage-claude/compliance-api)**. | | Analytics API | Organization settings | Covers analytics for the new unified Claude experience with your existing access keys. Please refer to the **[Analytics API documentation](https://platform.claude.com/docs/en/manage-claude/analytics-api)**.
| | Admin API | Organization settings | Works with your existing access keys. The new unified Claude experience appears as the chat\_cowork\_unified permission when you list a custom role's permissions. For endpoint reference, see the **[Admin API documentation](https://platform.claude.com/docs/en/manage-claude/user-management)**. | @@ -118,11 +118,13 @@ For recommended Security settings and architecture, see **[Unified Claude and Co ## Data retention and deletion -1. Conversations. Conversations are kept until the member deletes them or according to your organization's custom data retention setting if you’ve set one (minimum 30 days). See **[custom data retention](https://support.claude.com/en/articles/10440198)**. Conversations in a project follow the project’s retention period. The period is measured from the most recent activity in the conversation or in any cloud session Claude started from it, so a conversation isn’t deleted while one of its cloud sessions is in use. +1. **Conversations.** Conversations are kept until the member deletes them or according to your organization's custom data retention setting if you’ve set one (minimum 30 days). See **[custom data retention](https://support.claude.com/en/articles/10440198)**. Conversations in a project follow the project’s retention period. The period is measured from the most recent activity in the conversation or in any cloud session Claude started from it, so a conversation isn’t deleted while one of its cloud sessions is in use. -2. Cloud sessions started from a conversation. When a conversation is deleted, whether by a member, by deleting its project, or under your retention period, the cloud sessions Claude started in it are deleted too, including their transcripts. +2. **Cloud sessions started from a conversation.** When a conversation is deleted, whether by a member, by deleting its project, or under your retention period, the cloud sessions Claude started in it are deleted too, including their transcripts. -3. Not deleted with a conversation. Custom data retention doesn’t cover: +3. **Artifacts.** When a conversation is deleted under your retention period, the artifacts made in it aren't deleted with it. They follow the retention period that covers artifacts, if you have one. Research reports and artifacts in some older chats are the exception, and they're deleted with their conversation. + +4. **Not deleted with a conversation.** Custom data retention doesn’t cover: 1. Cowork cloud sessions a member starts directly, including in a project. These are kept until the member deletes them. @@ -130,7 +132,7 @@ For recommended Security settings and architecture, see **[Unified Claude and Co 3. Cowork history stored on a member’s computer. -4. Memory during the public beta. Memory isn’t covered by your retention setting during the beta. When you turn on the new experience, each member’s existing memory is copied into it, and memory from conversations that are later deleted can remain. If you turn the experience off, that memory is kept. We plan to apply your retention setting to memory, including memory created during the beta, at general availability, and will update this article. +5. **Memory during the public beta.** Memory isn’t covered by your retention setting during the beta. When you turn on the new experience, each member’s existing memory is copied into it, and memory from conversations that are later deleted can remain. If you turn the experience off, that memory is kept. We plan to apply your retention setting to memory, including memory created during the beta, at general availability, and will update this article. As with chat, we may retain content flagged by our trust and safety systems or as required by law. See **[How long do you store my organization’s data?](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data)** @@ -168,11 +170,11 @@ The new unified Claude experience gets its own line in your reports. When a memb - **A page of its own.** Admins who can view analytics will find a Chat and Cowork unified page under Apps, marked Beta. It shows daily active users. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2719814921/59cd7abb6c99192d741223dd2016/f2fadd45-8cb0-49db-a9a2-c8f367f29c91?expires=1792699200&signature=149731a39d0dc76b423314e884fbbc7b10ee944b5b5c1d4f7fc2de2b3b040c08&req=dicmH8F%2FmYhdWPMW1HO4zdLa5Q1uaaeCf83E9koMvr%2FK1NgxJRvSwgbbBwjU%0A%2FD9r%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2719814921/59cd7abb6c99192d741223dd2016/f2fadd45-8cb0-49db-a9a2-c8f367f29c91?expires=1792821600&signature=5168a6366a0b11fb8c6cfdecafb642088f6fcfb06ef2a4f00f0aff8abcce0f68&req=dicmH8F%2FmYhdWPMW3nq%2BgbJHOpVrn9%2FZGL6gL%2F%2BcHiMGXFke%2Bm3LkMWBxdle%0AfF9d2QKcDG8CFSTTSVuSS8Ix2rw%3D%0A) - **Across the dashboard.** You can pick "Chat and Cowork unified (beta)" in the Active users, Active members, Total spend, and Spend by model charts. The See all members table on the Overview page has a "Messages in Chat and Cowork unified (beta)" column. The Top connectors and Top skills cards don't include it yet. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2719816289/17e3ba22d470c32e8df9b3c20251/385c6be9-7019-451d-85f8-025a6e12a34c?expires=1792699200&signature=2c0916244195537cbdffeefd2154b18f96ce6dda4fdcc87703eb867ffe673a0f&req=dicmH8F%2Fm4NXUPMW1HO4zRXO8A0XSYy7JG9o%2B2MbcGpIEyPOgI%2BjD5wROlof%0AV4hO%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2719816289/17e3ba22d470c32e8df9b3c20251/385c6be9-7019-451d-85f8-025a6e12a34c?expires=1792821600&signature=744cee854a21f384fbf2811f58926346baa9e8750bb29031f1a3f9ea68618fbe&req=dicmH8F%2Fm4NXUPMW3nq%2BgTeAtlvnIqi0a%2BTv3uEHtAV9RkBaXnct2w9%2B2AWD%0Aw1%2B4Kqs8P3WfBWyxi8OK%2FJlB584%3D%0A) - **Who sees it.** The page appears for every organization that can turn on the new unified Claude experience, whether or not it is on yet. diff --git a/content/support/8114491-get-started-with-claude.md b/content/support/8114491-get-started-with-claude.md index 71219493d6..ba9e4564d5 100644 --- a/content/support/8114491-get-started-with-claude.md +++ b/content/support/8114491-get-started-with-claude.md @@ -36,7 +36,7 @@ You use **prompts** to communicate with Claude. The best approach is to speak to Type your prompt into the chat interface and click the submit button to start a conversation with Claude. You can click the "+" button in the lower left or type "/" to view additional options and commands: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1916208578/2cf2ea52f1f884084b57983a8805/image.png?expires=1792699200&signature=e7406c47d7e12e5af32ed583685f464eb606ac2f45240ae6110a38d89b67223f&req=dSkmEMt%2BlYRYUfMW1HO4zV2J7C3MvY6D9crMELaMZPySgeo153T0AlQWmlzO%0AKAhJ9NP6dmthRbTJkNo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1916208578/2cf2ea52f1f884084b57983a8805/image.png?expires=1792735200&signature=0dc0de8f15669cb22d5f51602bfe21ade10883e5582b04d0ea793feaafa610c4&req=dSkmEMt%2BlYRYUfMW1HO4zV2J7C3Nt4KD9crMELaMZPzwfmbLd4w3WRnBxFtF%0AKotATBmiQ6TSwo2YyCg%3D%0A) --- diff --git a/content/support/8230524-delete-or-rename-a-conversation.md b/content/support/8230524-delete-or-rename-a-conversation.md index 35b11ae1da..667d54f48a 100644 --- a/content/support/8230524-delete-or-rename-a-conversation.md +++ b/content/support/8230524-delete-or-rename-a-conversation.md @@ -44,15 +44,15 @@ These steps apply to Claude for iOS, listed on the App Store as Claude by Anthro 4. If deleting, tap "Delete" again in the confirmation prompt. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599501318/75c28edc693efbe8befd21e4da64/d18a921a-df4b-4788-833c-12c966a32527?expires=1792699200&signature=a28548b3cab6a5a87807f527cf33685e21738aefa9cf7bcb3700946b6d042307&req=diUuH8x%2BnIJeUfMW1HO4zSc12KxcgWmp1DBI29QsIlEWRAgW0sQIDalM0mzN%0AgKceDOqSPk1EAfZgAMc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599501318/75c28edc693efbe8befd21e4da64/d18a921a-df4b-4788-833c-12c966a32527?expires=1792735200&signature=06cd7833e6295d2f26c39c1205a499f0870899d56c152750f59132f66bb16ef4&req=diUuH8x%2BnIJeUfMW1HO4zSc12Kxdi2Wp1DBI29QsIlHQ0tRg%2FiEsbHv75Tnk%0ARJMaKPerKlW7LBezfUk%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493852/2e58b92d18f307bb79ae30650f26/1bbe52f3-202b-4d5d-9f9a-eeda4d6952c3?expires=1792699200&signature=92ecf7b47d58a9b100662b84c6e6cb1737a8b9fe707531a4f199c9a5934c1eb9&req=diUuH813nolaW%2FMW1HO4zTjXM%2BWKJ8nnj7blKEDtUI1P1565aGtus1mJwoBZ%0AersWGraX9PbBj%2FbO%2BaY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493852/2e58b92d18f307bb79ae30650f26/1bbe52f3-202b-4d5d-9f9a-eeda4d6952c3?expires=1792735200&signature=4e6244765cbde32c0a56466c418c1f4194ab64828d9192c0e9a8ecdf50e834d6&req=diUuH813nolaW%2FMW1HO4zTjXM%2BWLLcXnj7blKEDtUI2UF6JIa5ZcFGPM7DuF%0ACnPP42GLRpsGTt2kuTM%3D%0A) You can also delete the conversation you have open: tap the "⋯" button in the top right corner, tap "Delete," then confirm. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493848/997184c386d0e6fb0bd2d7c1f2b6/5d2bc394-25fc-4814-8c2a-2f54d004f83f?expires=1792699200&signature=6b20888e99f2c2e13493843d6ee28a34d809d6525fbf2c248293c78e2e621016&req=diUuH813nolbUfMW1HO4zVCIq5jJwtVEzQl%2BKgU984x2dBHO1V33qe08m4fE%0A%2BCiI%2BYH8X8YLTr9jlUE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493848/997184c386d0e6fb0bd2d7c1f2b6/5d2bc394-25fc-4814-8c2a-2f54d004f83f?expires=1792735200&signature=b2f04fc5acd938e8a8d392c208622301a06ea0062bc173b44835838d76a074a4&req=diUuH813nolbUfMW1HO4zVCIq5jIyNlEzQl%2BKgU984ykmtbq0nd%2B9%2FZ6CYtb%0A8WHVU20NH6tc0ulrkBQ%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493856/799041da9fa918e90068c5ebf5bd/2e8d5cee-c45a-41d7-a14b-486e50a37f88?expires=1792699200&signature=40d809279dce8b0e19ae63a662992e98a31941b7c1ce6b1b215810ef9bee7c09&req=diUuH813nolaX%2FMW1HO4zVCl4Qr02GxPEDIU8RT6jk3OLvsVE9ohy0mbJEdR%0AJATumf2jsH1DagLRlGs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493856/799041da9fa918e90068c5ebf5bd/2e8d5cee-c45a-41d7-a14b-486e50a37f88?expires=1792735200&signature=f2644c4141e79b00c87109da95413d5f1d95fd5a43b84b3d984de1d93e5f188e&req=diUuH813nolaX%2FMW1HO4zVCl4Qr10mBPEDIU8RT6jk2rPynDtOaCoY5EI7s%2F%0Av%2FxEWCcAUciDF4FfZG8%3D%0A) ## Delete or rename a conversation on Claude for Android @@ -66,9 +66,9 @@ These steps apply to the Claude for Android, listed on Google Play as Claude by 3. If deleting, tap "Delete" again in the confirmation prompt. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493850/a64e6561222d535f2f5bd03e71f0/5de429c2-d8ed-4e8a-89e8-a13ccaa49767?expires=1792699200&signature=02e8f2920b285900c7c5018b01db3f1dbdad943862eb6f7794fdbc58e18f2743&req=diUuH813nolaWfMW1HO4zVTddtAqy1l3rqtc0YNNUtLlFkVr9Km5%2Be%2BKgwbL%0APNOyuMpuhvEr6b7ebb0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493850/a64e6561222d535f2f5bd03e71f0/5de429c2-d8ed-4e8a-89e8-a13ccaa49767?expires=1792735200&signature=72bfb697c3e7b9a0c498ac933f9937f417ba20fa4157d922c3bc9b1026ebf7f6&req=diUuH813nolaWfMW1HO4zVTddtArwVV3rqtc0YNNUtJgxUgjX1UVBPQ9mxNB%0A%2Fh%2FP3VCrCXD7ttepcmE%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493851/f21b39c60e88050d4b0745325f0d/0a8c0d08-dc53-4ef1-8d9f-2b995242c1f9?expires=1792699200&signature=9a45ff5e49f8eb244cca374e565de496fa166e5bee6a5f5dcc9f5cee38d64a0d&req=diUuH813nolaWPMW1HO4zUYvwlcNqzde%2FjekULCQNzV5ionD7IGgtNo5U%2BSP%0ANqag0w5WpDAFMO6d3CI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493851/f21b39c60e88050d4b0745325f0d/0a8c0d08-dc53-4ef1-8d9f-2b995242c1f9?expires=1792735200&signature=8ac4c2a62ace4228ea26e990615d29746165e7a1fc92aff632ac503a20656332&req=diUuH813nolaWPMW1HO4zUYvwlcMoTte%2FjekULCQNzVyyDVLYcjvV7l6ih1n%0AS3LfGV3PmJnL%2BFssq98%3D%0A) **To delete multiple conversations at once:** @@ -78,9 +78,9 @@ These steps apply to the Claude for Android, listed on Google Play as Claude by 3. Tap the trash icon, then tap "Delete" in the confirmation prompt. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493849/3013a0ab921337b4544f7ffeffa6/e828ec14-fb52-4205-a840-707b6f2a848d?expires=1792699200&signature=2e3e50c7988a127e2c97a81ed9abd8741858cd3ad1599e927ac8969e0c974657&req=diUuH813nolbUPMW1HO4zWGamcVyc4Td4AqhTnZa84XwfzLvwxcVARQRxLa6%0AO73KfkYPC%2FsiY0l8fg4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493849/3013a0ab921337b4544f7ffeffa6/e828ec14-fb52-4205-a840-707b6f2a848d?expires=1792735200&signature=170dda4cd6794df466ef97b9da11f5aeda54270724719801df5a39565c91863d&req=diUuH813nolbUPMW1HO4zWGamcVzeYjd4AqhTnZa84W3UlUPoOKhFhp0nZ5E%0AKb0XpCxZsCeeDkOkOiA%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493853/e2507f53cce8a26776a22a457b1a/bd79bb8a-b078-420f-a4e1-75590367aa80?expires=1792699200&signature=b0f781a78f3f348829cb1e644c96f581b5bda49d78e028c9054ce5fdecf5f763&req=diUuH813nolaWvMW1HO4zQTtEhf3zUk6SBGfF3I2bRhvidMN%2B2RfRMNzUM4H%0AED2KK%2BRr8Y7RxvYtNL0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493853/e2507f53cce8a26776a22a457b1a/bd79bb8a-b078-420f-a4e1-75590367aa80?expires=1792735200&signature=b14db1880824feeb98a7b0e46dcd139373c71b161a7b0bf5d7315bb862b1c9af&req=diUuH813nolaWvMW1HO4zQTtEhf2x0U6SBGfF3I2bRhaIWPB6RPkl%2Bhl3m0Z%0AxWZCb2udyjRgjnkG4UA%3D%0A) ## What happens when you delete a conversation diff --git a/content/support/8325618-paid-plan-billing-faqs.md b/content/support/8325618-paid-plan-billing-faqs.md index 96c206b181..de6405cec5 100644 --- a/content/support/8325618-paid-plan-billing-faqs.md +++ b/content/support/8325618-paid-plan-billing-faqs.md @@ -50,7 +50,7 @@ There's no separate option to remove a card, and updating to a new card replaces If you want to use a name other than the one tied to your payment method, check the "Use a different name on invoices" box when adding or updating your payment method in **[Settings > Billing](https://claude.ai/settings/billing)**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922141785/666191101c11030b05f03a668a74/image.png?expires=1792699200&signature=34496b18320c07fbfa286815a0fc3025c32170b5daf993f0d69faa9fa78ec5a1&req=dSklFMh6nIZXXPMW1HO4zVXW8W%2BtYjrOQoNvNFTb5cflvcrKe%2FqmF8UtpujQ%0AcOx1BHWzRsbYwT6EMnY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922141785/666191101c11030b05f03a668a74/image.png?expires=1792735200&signature=cbefcdde096f3c6fb1833186601f1611b629407adc2672244a0d093707066a05&req=dSklFMh6nIZXXPMW1HO4zVXW8W%2BsaDbOQoNvNFTb5cf9DKTeICDkFYJdTIBo%0AkVQtbkY6Ji%2FSWPVAtuc%3D%0A) ## How can I edit a paid invoice? diff --git a/content/support/8887527-customizing-your-appearance-settings.md b/content/support/8887527-customizing-your-appearance-settings.md index fe5050aa79..a426edc5f5 100644 --- a/content/support/8887527-customizing-your-appearance-settings.md +++ b/content/support/8887527-customizing-your-appearance-settings.md @@ -8,7 +8,7 @@ 3. Select from Light, Match System, and Dark under **Color mode**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260417/d478c757c7115ad58a12026d4caf/AD_4nXc__Qop4X9hknWGfGj_y_DCpLutLruhxIclJIfir0ilsgNMg7X8ksIVnqk1Oce5FKlGIOYu9CKbVsu8DqD7iIY2aC0ZfXMyFTeAdNq-Cao2mXcj_WUpNF0kM2HoYR_dEx6N_cuJow?expires=1792699200&signature=cbd5e8ec27e8ab1907bca8275e9b7e9bb1e4cecd8d64f4e05b933092dc5f10dd&req=dSYjHst4nYVeXvMW1HO4zc2jJqA7iYLmSBkgeTglJroSNPvy74QRsljiYnr5%0AoXwUNJybcal931xaBK4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260417/d478c757c7115ad58a12026d4caf/AD_4nXc__Qop4X9hknWGfGj_y_DCpLutLruhxIclJIfir0ilsgNMg7X8ksIVnqk1Oce5FKlGIOYu9CKbVsu8DqD7iIY2aC0ZfXMyFTeAdNq-Cao2mXcj_WUpNF0kM2HoYR_dEx6N_cuJow?expires=1792735200&signature=de7ae9257b168c74e5b27ee405c6a7ddf500a4612556d6106ed051f97d93b6d4&req=dSYjHst4nYVeXvMW1HO4zc2jJqA6g47mSBkgeTglJro1f6hdhCLMrhXPtYbN%0A2%2Fjhgm1Q1vNjpT%2FoIqo%3D%0A) ## How to change your font @@ -16,10 +16,10 @@ 2. Select from Default, Match System, and Dyslexic Friendly. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260416/7fc0803d44d8de40f8e6636b2eb6/AD_4nXf0UEDa1i2QmqlQtoB5BgpQ-FfZVzss_7wMVQdvkmEDSfoTxixnG0GSxC6qrOs21HdkXH-I2Yn_GHDAf8yjd6FJtoh9FadALozvIErFp9r8LychDGLPb7OpN1CN4PRcgVAYNCre?expires=1792699200&signature=2b993bf16aae3a6e82a1f521bc2c40ef69c4be9e9f108fa52f45ebf5207a4943&req=dSYjHst4nYVeX%2FMW1HO4zc896mLjVHg%2BQtNFlF5%2FHEehlUOmfkXjuDs1sabE%0AA9whxVK8EDUnVf72Cfc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260416/7fc0803d44d8de40f8e6636b2eb6/AD_4nXf0UEDa1i2QmqlQtoB5BgpQ-FfZVzss_7wMVQdvkmEDSfoTxixnG0GSxC6qrOs21HdkXH-I2Yn_GHDAf8yjd6FJtoh9FadALozvIErFp9r8LychDGLPb7OpN1CN4PRcgVAYNCre?expires=1792735200&signature=adb3db895c35be03682abac8c81aa8f42b03e6371cb9eaf77a01e43408acdeaa&req=dSYjHst4nYVeX%2FMW1HO4zc896mLiXnQ%2BQtNFlF5%2FHEdx69n7jnX1UHF59SIG%0AgtN2O7VLFvuIu84AE%2BU%3D%0A) ## Can I disable the sidebar? It's not currently possible to completely disable the sidebar. You can click the button on the top right of the sidebar to open or close it. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1941108004/5217903737ddd9bb62fe5d7a904c/CleanShot+2026-01-14+at+09_12_58.png?expires=1792699200&signature=5d3fb7aeab6484b37d07d7126d5006f7cb357dde08255d8905de9ceee612759a&req=dSkjF8h%2BlYFfXfMW1HO4zUS%2BBl3wUHLtylfYa7uDb9kIb01C6whpruHwBv32%0AQEmCKcj0rXVR%2BmaTXkM%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1941108004/5217903737ddd9bb62fe5d7a904c/CleanShot+2026-01-14+at+09_12_58.png?expires=1792735200&signature=23f3ec10b3dbd55624df80f2b4c7c45580ce7ccf71f9a0050006dae2437c82a9&req=dSkjF8h%2BlYFfXfMW1HO4zUS%2BBl3xWn7tylfYa7uDb9lQk%2F6dQGkZc9%2BJCBxD%0Az3K4z8dWcW7OvH19yfA%3D%0A) \ No newline at end of file diff --git a/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md b/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md index a29ef1a714..a3de2c647f 100644 --- a/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md +++ b/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md @@ -132,7 +132,7 @@ For the full walkthrough of your options, deadlines, and what happens to your su You may have both a personal account and an organization account tied to the same email address. You can switch between them by clicking your initials or name in the lower left corner of the screen. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312193347/712f763fc290b2488c103849f20c/0c135a6f-3442-4ee1-9ab7-98673f03ef6e?expires=1792699200&signature=37c58a08d16fd8aa4e7925d38a4d92dcdbcc0ebc88512a8eb4bab8666690cae0&req=diMmFMh3noJbXvMW1HO4zXhPnNIwwRZjufhmlOXMdYZIXMGmb1fO8vqjkeoc%0AfKDLnBgYtjchafl%2FZ24%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312193347/712f763fc290b2488c103849f20c/0c135a6f-3442-4ee1-9ab7-98673f03ef6e?expires=1792735200&signature=96fe56bf38a22653fa2be30bb13b1303de99f99999bc3877fecaaf544a868e74&req=diMmFMh3noJbXvMW1HO4zXhPnNIxyxpjufhmlOXMdYYTex%2FjHblwKi8up7Ns%0A9i3MLy2txqW5CXAfvCY%3D%0A) A blue checkmark shows which account you're currently using. Click the other account to switch to it and access its separate conversations and projects. diff --git a/content/support/9519177-how-can-i-create-and-manage-projects.md b/content/support/9519177-how-can-i-create-and-manage-projects.md index d244301ec0..4fa18150a6 100644 --- a/content/support/9519177-how-can-i-create-and-manage-projects.md +++ b/content/support/9519177-how-can-i-create-and-manage-projects.md @@ -104,15 +104,15 @@ Starring a project allows for quick access from your projects and chats list, vi You can move a standalone chat into a project by clicking on the dropdown arrow next to the chat name, then “Add to project”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784190248/0f19c8de18b494a27be252fdfaff/d4e7a5c5-25f5-4623-862b-c593d2dc0b39?expires=1792699200&signature=9fcbef8071964540156077e9cf4cbe447b7e9a08a015ab614d1c436fc3baf511&req=dScvEsh3nYNbUfMW1HO4zQABaGNqQ6kXBSXNVFXQ%2FVFNgAVoLQU4xP4C7PQV%0Anvr32TwmvV5W9a7V6qQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784190248/0f19c8de18b494a27be252fdfaff/d4e7a5c5-25f5-4623-862b-c593d2dc0b39?expires=1792735200&signature=feebc9387e022be0564698037092ffce6206050d70c9a1ecd1f425e03e221766&req=dScvEsh3nYNbUfMW1HO4zQABaGNrSaUXBSXNVFXQ%2FVHkslKU2irRz35Vp4SY%0AvyeOZlumy2VIcNZD1w8%3D%0A) Browse or search for the correct project in the **Move chat** modal that appears, then click on it to move the chat. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784190951/34dc256ccd4c0cf74976f31062e6/55365cf2-059d-41b2-ac95-4b00c4389a76?expires=1792699200&signature=dcd9b3efb086799db38cc5b380e3906939016437b9fbf640767ff2f31eefca21&req=dScvEsh3nYhaWPMW1HO4zSMECyK2wgADgYbpTjViBxBqX9nbYuD0ChSu54yL%0A8jpmXsQLcZxWDLBwtXk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784190951/34dc256ccd4c0cf74976f31062e6/55365cf2-059d-41b2-ac95-4b00c4389a76?expires=1792735200&signature=c16fdd6fd09dc2fd305a3de02d650bd4f2e5dbf2bc6c76d11ea9e72168b57059&req=dScvEsh3nYhaWPMW1HO4zSMECyK3yAwDgYbpTjViBxCROiZAXCy478XHHQGY%0AbRyMeO8YGiMTXLGUyY8%3D%0A) You can also remove chats from projects, or move them between projects, using the same dropdown menu within the chat: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784185682/8625eac15b9fa452f148a6c47250/c53a1bc4-a991-4684-a789-5447ed789d35?expires=1792699200&signature=c49ffad551e86aa4583f119bc2515ea6bb99ffb3aa48a4bd014f071d83773245&req=dScvEsh2mIdXW%2FMW1HO4zb6DufUqB0wIS2r1%2FGRlqOT6etv1z%2FA0dgZy8kAY%0ATvuAf2NOP8wy8xio9Dg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784185682/8625eac15b9fa452f148a6c47250/c53a1bc4-a991-4684-a789-5447ed789d35?expires=1792735200&signature=2c7dff6900a055c33d964848eaadd2e7511f4e30c28ae507f2033ee2ab8035db&req=dScvEsh2mIdXW%2FMW1HO4zb6DufUrDUAIS2r1%2FGRlqORlpZ9693zWBIQ9%2FEFY%0AKvcfTSySuLShG%2FyGDGQ%3D%0A) --- diff --git a/discovery.json b/discovery.json index 662cc6974b..2a5718c7e8 100644 --- a/discovery.json +++ b/discovery.json @@ -1,7 +1,7 @@ { "version": 1, "note": "What the last full run could see outside sources.json. Written by the fetcher so a new source arrives as a diff a human reviews, not as a line in an Actions log nobody reads. Stable facts only: a change here is always news. `review` is the actionable list \u2014 domains we could archive today and do not.", - "updated": "2026-10-22", + "updated": "2026-10-23", "domains": { "anthropic.com": { "status": "frozen", diff --git a/tombstones.json b/tombstones.json index 6af3da12d5..f9abaf2dd0 100644 --- a/tombstones.json +++ b/tombstones.json @@ -1,7 +1,7 @@ { "version": 1, "note": "URLs confirmed gone upstream. Kept so a page that died once does not report as a fresh failure on every later run, which would bury the failure that is actually new. An entry clears itself if the URL answers again -- but only while something still probes it. Entries whose local file was removed are no longer fetched, so they stay as a record of the restructure rather than a live check.", - "updated": "2026-10-22", + "updated": "2026-10-23", "urls": { "https://claude.com/docs/claude-science/annotations": { "since": "2026-09-01", @@ -951,6 +951,10 @@ "since": "2026-08-25", "reason": "moved -> https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy" }, + "https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai": { + "since": "2026-10-23", + "reason": "moved -> https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed" + }, "https://platform.claude.com/docs/en/build-with-claude/data-residency": { "since": "2026-08-25", "reason": "moved -> https://platform.claude.com/docs/en/manage-claude/data-residency" @@ -1503,6 +1507,10 @@ "since": "2026-10-16", "reason": "HTTP 404" }, + "https://support.claude.com/en/articles/17440474-migrate-from-standalone-claude-design-to-claude": { + "since": "2026-10-23", + "reason": "moved -> https://support.claude.com/en/articles/17440474-move-from-standalone-claude-design-to-claude" + }, "https://support.claude.com/en/articles/7996906-reporting-blocking-and-removing-content-from-claude": { "since": "2026-08-25", "reason": "moved -> https://support.claude.com/en/articles/7996906-report-block-and-remove-content-from-claude"