Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2,297 changes: 1,362 additions & 935 deletions content/.metadata.json

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions content/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## 2.1.96

- Fixed Bedrock requests failing with `403 "Authorization header is missing"` when using `AWS_BEARER_TOKEN_BEDROCK` or `CLAUDE_CODE_SKIP_BEDROCK_AUTH` (regression in 2.1.94)

## 2.1.94

- Added support for Amazon Bedrock powered by Mantle, set `CLAUDE_CODE_USE_MANTLE=1`
- Changed default effort level from medium to high for API-key, Bedrock/Vertex/Foundry, Team, and Enterprise users (control this with `/effort`)
- Added compact `Slacked #channel` header with a clickable channel link for Slack MCP send-message tool calls
- Added `keep-coding-instructions` frontmatter field support for plugin output styles
- Added `hookSpecificOutput.sessionTitle` to `UserPromptSubmit` hooks for setting the session title
- Plugin skills declared via `"skills": ["./"]` now use the skill's frontmatter `name` for the invocation name instead of the directory basename, giving a stable name across install methods
- Fixed agents appearing stuck after a 429 rate-limit response with a long Retry-After header β€” the error now surfaces immediately instead of silently waiting
- Fixed Console login on macOS silently failing with "Not logged in" when the login keychain is locked or its password is out of sync β€” the error is now surfaced and `claude doctor` diagnoses the fix
- Fixed plugin skill hooks defined in YAML frontmatter being silently ignored
- Fixed plugin hooks failing with "No such file or directory" when `CLAUDE_PLUGIN_ROOT` was not set
- Fixed `${CLAUDE_PLUGIN_ROOT}` resolving to the marketplace source directory instead of the installed cache for local-marketplace plugins on startup
- Fixed scrollback showing the same diff repeated and blank pages in long-running sessions
- Fixed multiline user prompts in the transcript indenting wrapped lines under the `❯` caret instead of under the text
- Fixed Shift+Space inserting the literal word "space" instead of a space character in search inputs
- Fixed hyperlinks opening two browser tabs when clicked inside tmux running in an xterm.js-based terminal (VS Code, Hyper, Tabby)
- Fixed an alt-screen rendering bug where content height changes mid-scroll could leave compounding ghost lines
- Fixed `FORCE_HYPERLINK` environment variable being ignored when set via `settings.json` `env`
- Fixed native terminal cursor not tracking the selected tab in dialogs, so screen readers and magnifiers can follow tab navigation
- Fixed Bedrock invocation of Sonnet 3.5 v2 by using the `us.` inference profile ID
- Fixed SDK/print mode not preserving the partial assistant response in conversation history when interrupted mid-stream
- Improved `--resume` to resume sessions from other worktrees of the same repo directly instead of printing a `cd` command
- Fixed CJK and other multibyte text being corrupted with U+FFFD in stream-json input/output when chunk boundaries split a UTF-8 sequence
- [VSCode] Reduced cold-open subprocess work on starting a session
- [VSCode] Fixed dropdown menus selecting the wrong item when the mouse was over the list while typing or using arrow keys
- [VSCode] Added a warning banner when `settings.json` files fail to parse, so users know their permission rules are not being applied

## 2.1.92

- Added `forceRemoteSettingsRefresh` policy setting: when set, the CLI blocks startup until remote managed settings are freshly fetched, and exits if the fetch fails (fail-closed)
Expand Down
634 changes: 516 additions & 118 deletions content/blog/engineering/claude-code-best-practices.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/blog/engineering/claude-code-sandboxing.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Our new sandboxed bash tool and Claude Code on the web offer substantial improve
To get started with these tools:

1. Run `/sandbox` in Claude and check out [our docs](https://docs.claude.com/en/docs/claude-code/sandboxing) on how to configure this sandbox.
2. Go to [claude.com/code](http://claude.ai/redirect/website.v1.b0157fd3-99db-436f-a42e-5cef466be6b0/code) to try out Claude Code on the web.
2. Go to [claude.com/code](http://claude.ai/redirect/website.v1.91b9b576-38af-40d7-8b65-118a3bfcad75/code) to try out Claude Code on the web.

Or, if you're building your own agents, check out our [open-sourced sandboxing code](https://github.com/anthropic-experimental/sandbox-runtime), and consider integrating it into your work. We look forward to seeing what you build.

Expand Down
22 changes: 11 additions & 11 deletions content/claude-code-manifest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@anthropic-ai/claude-code",
"version": "2.1.92",
"version": "2.1.96",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"license": "SEE LICENSE IN README.md",
"_id": "@anthropic-ai/claude-code@2.1.92",
"_id": "@anthropic-ai/claude-code@2.1.96",
"maintainers": [
{
"name": "zak-anthropic",
Expand Down Expand Up @@ -73,20 +73,20 @@
"claude": "cli.js"
},
"dist": {
"shasum": "536b5c573ae5d3ba85ace514e2e72d37c3d5e464",
"tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.92.tgz",
"shasum": "d528e9638292c7b275c896b283e4a8e6959ef0ef",
"tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.96.tgz",
"fileCount": 20,
"integrity": "sha512-mNGw/IK3+1yHsQBeKaNtdTPCrQDkUEuNTJtm3OBTXs4bBkUVdIgRme/34ZnbZkl2VMMYPoNaTvqX2qJZ9EdSxQ==",
"integrity": "sha512-ETrc0+1qWHaqtKi+ixbsAecZyM+H52VIJj+zWIvw3jBU/JZ9v5vnE2kHShM1lcpr+Gji7GXk23l0CMGLA7hC0g==",
"signatures": [
{
"sig": "MEUCIA9Pbrb5aRJaP0BIUvY7wPnYuXxf1bmtO2STf8s5CFUrAiEA5Ls/eijn2heuQIP7Mft2b0HcFrhaQgUt61c78t2tvYM=",
"sig": "MEUCIDfVFVFY0qtDRV8JGrx0/QKyh70/hWuV+lO0LSTt2zz6AiEA20JmCcoQACXgZOSLdrLxZ8I2356j3KvBbianSlhxu0A=",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 44517413
"unpackedSize": 48924836
},
"type": "module",
"_from": "file:/home/runner/work/claude-cli-internal/claude-cli-internal/build-external/anthropic-ai-claude-code-2.1.92.tgz",
"_from": "file:/home/runner/work/claude-cli-internal/claude-cli-internal/build-external/anthropic-ai-claude-code-2.1.96.tgz",
"engines": {
"node": ">=18.0.0"
},
Expand All @@ -97,8 +97,8 @@
"name": "wolffiex",
"email": "wolffiex@anthropic.com"
},
"_resolved": "/home/runner/work/claude-cli-internal/claude-cli-internal/build-external/anthropic-ai-claude-code-2.1.92.tgz",
"_integrity": "sha512-mNGw/IK3+1yHsQBeKaNtdTPCrQDkUEuNTJtm3OBTXs4bBkUVdIgRme/34ZnbZkl2VMMYPoNaTvqX2qJZ9EdSxQ==",
"_resolved": "/home/runner/work/claude-cli-internal/claude-cli-internal/build-external/anthropic-ai-claude-code-2.1.96.tgz",
"_integrity": "sha512-ETrc0+1qWHaqtKi+ixbsAecZyM+H52VIJj+zWIvw3jBU/JZ9v5vnE2kHShM1lcpr+Gji7GXk23l0CMGLA7hC0g==",
"_npmVersion": "10.8.2",
"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": {},
Expand All @@ -118,7 +118,7 @@
"@img/sharp-linuxmusl-arm64": "^0.34.2"
},
"_npmOperationalInternal": {
"tmp": "tmp/claude-code_2.1.92_1775261159015_0.18519671794064396",
"tmp": "tmp/claude-code_2.1.96_1775622763975_0.7218051294969574",
"host": "s3://npm-registry-packages-npm-production"
}
}
10 changes: 7 additions & 3 deletions content/en/about-claude/models/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Claude is a family of state-of-the-art large language models developed by Anthro

## Choosing a model

If you're unsure which model to use, consider starting with **Claude Opus 4.6** for the most complex tasks. It is the latest generation model with exceptional performance in coding and reasoning.
If you're unsure which model to use, consider starting with **Claude Opus 4.6** for the most complex tasks. It is the most intelligent broadly available model with exceptional performance in coding and reasoning.

All current Claude models support text and image input, text output, multilingual capabilities, and vision. Models are available via the Claude API, AWS Bedrock, and Google Vertex AI.

Expand All @@ -16,7 +16,7 @@ Once you've picked a model, [learn how to make your first API call](/docs/en/get

| Feature | Claude Opus 4.6 | Claude Sonnet 4.6 | Claude Haiku 4.5 |
|:--------|:----------------|:------------------|:-----------------|
| **Description** | The most intelligent model for building agents and coding | The best combination of speed and intelligence | The fastest model with near-frontier intelligence |
| **Description** | The most intelligent broadly available model for agents and coding | The best combination of speed and intelligence | The fastest model with near-frontier intelligence |
| **Claude API ID** | claude-opus-4-6 | claude-sonnet-4-6 | claude-haiku-4-5-20251001 |
| **Claude API alias** | claude-opus-4-6 | claude-sonnet-4-6 | claude-haiku-4-5 |
| **AWS Bedrock ID** | anthropic.claude-opus-4-6-v1 | anthropic.claude-sonnet-4-6 | anthropic.claude-haiku-4-5-20251001-v1:0 |
Expand All @@ -35,9 +35,13 @@ _<sup>1 - See the [pricing page](/docs/en/about-claude/pricing) for complete pri

_<sup>2 - **Reliable knowledge cutoff** indicates the date through which a model's knowledge is most extensive and reliable. **Training data cutoff** is the broader date range of training data used. For more information, see [Anthropic's Transparency Hub](https://www.anthropic.com/transparency).</sup>_

<Info>
[Claude Mythos Preview](https://anthropic.com/glasswing) is offered separately as a research preview model for defensive cybersecurity workflows as part of [Project Glasswing](https://anthropic.com/glasswing). Access is invitation-only and there is no self-serve sign-up.
</Info>

<Note>Models with the same snapshot date (e.g., 20240620) are identical across all platforms and do not change. The snapshot date in the model name ensures consistency and allows developers to rely on stable performance across different environments.</Note>

<Note>Starting with **Claude Sonnet 4.5 and all subsequent models** (including Claude Sonnet 4.6), AWS Bedrock and Google Vertex AI offer two endpoint types: **global endpoints** (dynamic routing for maximum availability) and **regional endpoints** (guaranteed data routing through specific geographic regions). For more information, see the [third-party platform pricing section](/docs/en/about-claude/pricing#third-party-platform-pricing).</Note>
<Note>Starting with **Claude Sonnet 4.5 and all subsequent models** (including Claude Sonnet 4.6), AWS Bedrock offers two endpoint types: **global endpoints** (dynamic routing for maximum availability) and **regional endpoints** (guaranteed data routing through specific geographic regions). Google Vertex AI offers three endpoint types: global endpoints, **multi-region endpoints** (dynamic routing within a geographic area), and regional endpoints. For more information, see the [third-party platform pricing section](/docs/en/about-claude/pricing#third-party-platform-pricing).</Note>

<Tip>
You can query model capabilities and token limits programmatically with the [Models API](/docs/en/api/models/list). The response includes `max_input_tokens`, `max_tokens`, and a `capabilities` object for every available model.
Expand Down
16 changes: 8 additions & 8 deletions content/en/about-claude/pricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,25 @@ MTok = Million tokens. The "Base Input Tokens" column shows standard input prici

## Third-party platform pricing

Claude models are available on [AWS Bedrock](/docs/en/build-with-claude/claude-on-amazon-bedrock), [Google Vertex AI](/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](/docs/en/build-with-claude/claude-in-microsoft-foundry). For official pricing, visit:
Claude models are available on [AWS Bedrock](/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Vertex AI](/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](/docs/en/build-with-claude/claude-in-microsoft-foundry). For official pricing, visit:
- [AWS Bedrock pricing](https://aws.amazon.com/bedrock/pricing/)
- [Google Vertex AI pricing](https://cloud.google.com/vertex-ai/generative-ai/pricing)
- [Microsoft Foundry pricing](https://azure.microsoft.com/en-us/pricing/details/ai-foundry/#pricing)

<Note>
**Regional endpoint pricing for Claude 4.5 models and beyond**
**Regional and multi-region endpoint pricing for Claude 4.5 models and beyond**

Starting with Claude Sonnet 4.5 and Haiku 4.5, AWS Bedrock and Google Vertex AI offer two endpoint types:
- **Global endpoints:** Dynamic routing across regions for maximum availability
- **Regional endpoints:** Data routing guaranteed within specific geographic regions
Starting with Claude Sonnet 4.5 and Haiku 4.5:
- **AWS Bedrock** offers two endpoint types: global endpoints (dynamic routing for maximum availability) and regional endpoints (guaranteed data routing through specific geographic regions).
- **Google Vertex AI** offers three endpoint types: global endpoints, multi-region endpoints (dynamic routing within a geographic area), and regional endpoints.

Regional endpoints include a 10% premium over global endpoints. The Claude API (1P) is global by default; for 1P data residency options and pricing, see [Data residency pricing](#data-residency-pricing) below.
Regional and multi-region endpoints include a 10% premium over global endpoints. The Claude API (1P) is global by default; for 1P data residency options and pricing, see [Data residency pricing](#data-residency-pricing) below.

**Scope:** This pricing structure applies to Claude Sonnet 4.5, Haiku 4.5, and all future models. Earlier models (Claude Sonnet 4, Opus 4, and prior releases) retain their existing pricing.

For implementation details and code examples:
- [AWS Bedrock global vs regional endpoints](/docs/en/build-with-claude/claude-on-amazon-bedrock#global-vs-regional-endpoints)
- [Google Vertex AI global vs regional endpoints](/docs/en/build-with-claude/claude-on-vertex-ai#global-vs-regional-endpoints)
- [Google Vertex AI global, multi-region, and regional endpoints](/docs/en/build-with-claude/claude-on-vertex-ai#global-multi-region-and-regional-endpoints)
</Note>

## Feature-specific pricing
Expand Down Expand Up @@ -126,7 +126,7 @@ For more information about batch processing, see the [batch processing documenta

### Long context pricing

Claude Opus 4.6 and Sonnet 4.6 include the full [1M token context window](/docs/en/build-with-claude/context-windows) at standard pricing. (A 900k-token request is billed at the same per-token rate as a 9k-token request.) Prompt caching and batch processing discounts apply at standard rates across the full context window.
[Claude Mythos Preview](https://anthropic.com/glasswing), Opus 4.6 and Sonnet 4.6 include the full [1M token context window](/docs/en/build-with-claude/context-windows) at standard pricing. (A 900k-token request is billed at the same per-token rate as a 9k-token request.) Prompt caching and batch processing discounts apply at standard rates across the full context window.

### Tool use pricing

Expand Down
4 changes: 2 additions & 2 deletions content/en/agent-sdk/agent-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ The `effort` option controls how much reasoning Claude applies. Lower effort lev
| `"high"` | Thorough analysis | Refactors, debugging |
| `"max"` | Maximum reasoning depth | Multi-step problems requiring deep analysis |

If you don't set `effort`, the Python SDK leaves the parameter unset and defers to the model's default behavior. The TypeScript SDK defaults to `"high"`.
If you don't set `effort`, both SDKs leave the parameter unset and the underlying engine resolves a model-dependent default.

<Note>
`effort` trades latency and token cost for reasoning depth within each response. [Extended thinking](/docs/en/build-with-claude/extended-thinking) is a separate feature that produces visible chain-of-thought blocks in the output. They are independent: you can set `effort: "low"` with extended thinking enabled, or `effort: "max"` without it.
Expand All @@ -185,7 +185,7 @@ The permission mode option (`permission_mode` in Python, `permissionMode` in Typ
|:-----|:---------|
| `"default"` | Tools not covered by allow rules trigger your approval callback; no callback means deny |
| `"acceptEdits"` | Auto-approves file edits, other tools follow default rules |
| `"plan"` | No tool execution; Claude produces a plan for review |
| `"plan"` | Read-only tools run; tools that make changes are blocked while Claude produces a plan for review |
| `"dontAsk"` | Never prompts. Tools pre-approved by [permission rules](https://code.claude.com/docs/en/settings#permission-settings) run, everything else is denied |
| `"auto"` (TypeScript only) | Uses a model classifier to approve or deny each tool call. See [Auto mode](https://code.claude.com/docs/en/permission-modes#eliminate-prompts-with-auto-mode) for availability and behavior |
| `"bypassPermissions"` | Runs all allowed tools without asking. Cannot be used when running as root on Unix. Use only in isolated environments where the agent's actions cannot affect systems you care about |
Expand Down
16 changes: 8 additions & 8 deletions content/en/agent-sdk/custom-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This guide covers how to define tools with input schemas and handlers, bundle th
| Pre-approve a tool | Add to your allowed tools. See [Configure allowed tools](#configure-allowed-tools). |
| Remove a built-in tool from Claude's context | Pass a `tools` array listing only the built-ins you want. See [Configure allowed tools](#configure-allowed-tools). |
| Let Claude call tools in parallel | Set `readOnlyHint: true` on tools with no side effects. See [Add tool annotations](#add-tool-annotations). |
| Handle errors without stopping the loop | Return `isError: true` instead of throwing. See [Handle errors](#handle-errors). |
| Control the error message Claude sees | Return `isError: true` instead of throwing. See [Handle errors](#handle-errors). |
| Return images or files | Use `image` or `resource` blocks in the content array. See [Return images and resources](#return-images-and-resources). |
| Scale to many tools | Use [tool search](/docs/en/agent-sdk/tool-search) to load tools on demand. |

Expand Down Expand Up @@ -339,12 +339,12 @@ To limit which built-ins Claude can use, prefer `tools` over disallowed tools. O

## Handle errors

How your handler reports errors determines whether the agent loop continues or stops:
In both cases the agent loop continues. An uncaught exception is wrapped by the MCP server and surfaces to Claude as a tool error result, so the loop does not stop. Returning `isError: true` (TypeScript) or `"is_error": True` (Python) is preferred because it lets you control the error message Claude sees:

| What happens | Result |
|:-------------|:-------|
| Handler throws an uncaught exception | Agent loop stops. Claude never sees the error, and the `query` call fails. |
| Handler catches the error and returns `isError: true` (TS) / `"is_error": True` (Python) | Agent loop continues. Claude sees the error as data and can retry, try a different tool, or explain the failure. |
| Handler throws an uncaught exception | Agent loop continues. Claude sees the exception's stringified message as the tool result. |
| Handler catches the error and returns `isError: true` (TS) / `"is_error": True` (Python) | Agent loop continues. Claude sees your formatted error message as data and can retry, try a different tool, or explain the failure. |

The example below catches two kinds of failures inside the handler instead of letting them throw. A non-200 HTTP status is caught from the response and returned as an error result. A network error or invalid JSON is caught by the surrounding `try/except` (Python) or `try/catch` (TypeScript) and also returned as an error result. In both cases the handler returns normally and the agent loop continues.

Expand Down Expand Up @@ -381,8 +381,8 @@ async def fetch_data(args: dict[str, Any]) -> dict[str, Any]:
data = response.json()
return {"content": [{"type": "text", "text": json.dumps(data, indent=2)}]}
except Exception as e:
# Catching here keeps the agent loop alive. An uncaught exception
# would end the whole query() call.
# Catching here lets you control the error message Claude sees instead
# of surfacing the raw exception string.
return {
"content": [{"type": "text", "text": f"Failed to fetch data: {str(e)}"}],
"is_error": True,
Expand Down Expand Up @@ -424,8 +424,8 @@ tool(
]
};
} catch (error) {
// Catching here keeps the agent loop alive. An uncaught throw
// would end the whole query() call.
// Catching here lets you control the error message Claude sees instead
// of surfacing the raw exception string.
return {
content: [
{
Expand Down
Loading
Loading