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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,810 changes: 912 additions & 898 deletions content/.metadata.json

Large diffs are not rendered by default.

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

## 2.1.227

- Fixed feature flags being evaluated without the user's subscription tier when a session started with an expired login token, which could wrongly prompt Max plan users to enable usage credits for Fable
- Fixed every Bash command failing under `claude-code-action` with `allowed_non_write_users` on GitHub-hosted runners
- Fixed `/tui` bringing back a conversation that had been rewound to before its first message
- Improved slash-command menu: blue now marks only the selected row, matched characters are bolded instead of recolored, and emoji or accented names keep their glyphs
- Improved performance: fewer event-loop stalls on file-not-found suggestions and at-mention size checks

## 2.1.226

- Bug fixes and reliability improvements
Expand Down
40 changes: 20 additions & 20 deletions content/claude-code-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
"url": "https://github.com/anthropics/claude-code/issues"
},
"dist": {
"shasum": "68b41535948dc06a7486716bd21353b3d48626c0",
"tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.226.tgz",
"shasum": "5f5e7b7dff0006f1f1ec93afe63c7a333cb48ed6",
"tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.227.tgz",
"fileCount": 7,
"integrity": "sha512-mUkA81SbzATHFsHNz/rPy3Itw0D0S9kQMsIUJ3qPGwpNJMqPePyDP6xnWHI0jfFlspVjs8r/GfolMUyiy8P1FQ==",
"integrity": "sha512-D0YP8GFwPaP/9eObEuP5LRO5+9QSD9CLa6K26whNzXxpxz3pFqPS3nn7l1/MLmSWy32wBP2IKQzkRB3mumUKUQ==",
"signatures": [
{
"sig": "MEUCIQDIL4Yc1ob0Y043u3mPHjyldlDOwG8het/xpqW3Q/QDRAIgbO6iF/xUOYYoPy1L8ct9Z3W8ndjNnMOF4iVYpPDskIA=",
"sig": "MEQCICIaEl1DiO6iUzyHBueYdUaA7wiYnvjHRO7PaGD3Dc35AiAY8OB4358h/8qKL9MGlm1E9zEO1Ayhx2Ktd8r/JmSuEg==",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
},
{
"sig": "MEUCIGpiUuj75kwZx2vExBrPOo1jnI8xloo2FXnhxErePbiyAiEAjuEjKaSAyjDMerbabJUh97HKHN3YESRww0oFlEa/Tpg=",
"sig": "MEQCIFnkbzmoHD0xDXNlt44Y4HJFJnMCeiq5X+/NECqpjExoAiBFKQRd1gBpzcXJMIVwbGAGZ7d4h2ARaEBuz/D+maXS+w==",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 166777
"unpackedSize": 168548
},
"name": "@anthropic-ai/claude-code",
"type": "module",
"_from": "file:staged-npm/anthropic-ai-claude-code-2.1.226.tgz",
"_from": "file:staged-npm/anthropic-ai-claude-code-2.1.227.tgz",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
Expand All @@ -42,8 +42,8 @@
"email": "wolffiex@anthropic.com"
},
"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.226.tgz",
"_integrity": "sha512-mUkA81SbzATHFsHNz/rPy3Itw0D0S9kQMsIUJ3qPGwpNJMqPePyDP6xnWHI0jfFlspVjs8r/GfolMUyiy8P1FQ==",
"_resolved": "/home/runner/work/claude-cli-internal/claude-cli-internal/staged-npm/anthropic-ai-claude-code-2.1.227.tgz",
"_integrity": "sha512-D0YP8GFwPaP/9eObEuP5LRO5+9QSD9CLa6K26whNzXxpxz3pFqPS3nn7l1/MLmSWy32wBP2IKQzkRB3mumUKUQ==",
"_npmVersion": "11.16.0",
"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 Down Expand Up @@ -106,19 +106,19 @@
"_hasShrinkwrap": false,
"readmeFilename": "README.md",
"optionalDependencies": {
"@anthropic-ai/claude-code-linux-x64": "2.1.226",
"@anthropic-ai/claude-code-win32-x64": "2.1.226",
"@anthropic-ai/claude-code-darwin-x64": "2.1.226",
"@anthropic-ai/claude-code-linux-arm64": "2.1.226",
"@anthropic-ai/claude-code-win32-arm64": "2.1.226",
"@anthropic-ai/claude-code-darwin-arm64": "2.1.226",
"@anthropic-ai/claude-code-linux-x64-musl": "2.1.226",
"@anthropic-ai/claude-code-linux-arm64-musl": "2.1.226"
"@anthropic-ai/claude-code-linux-x64": "2.1.227",
"@anthropic-ai/claude-code-win32-x64": "2.1.227",
"@anthropic-ai/claude-code-darwin-x64": "2.1.227",
"@anthropic-ai/claude-code-linux-arm64": "2.1.227",
"@anthropic-ai/claude-code-win32-arm64": "2.1.227",
"@anthropic-ai/claude-code-darwin-arm64": "2.1.227",
"@anthropic-ai/claude-code-linux-x64-musl": "2.1.227",
"@anthropic-ai/claude-code-linux-arm64-musl": "2.1.227"
},
"_npmOperationalInternal": {
"tmp": "tmp/claude-code_2.1.226_1786154002100_0.05448646964367998",
"tmp": "tmp/claude-code_2.1.227_1786395417404_0.7061829520913361",
"host": "s3://npm-registry-packages-npm-production"
},
"_id": "@anthropic-ai/claude-code@2.1.226",
"version": "2.1.226"
"_id": "@anthropic-ai/claude-code@2.1.227",
"version": "2.1.227"
}
4 changes: 2 additions & 2 deletions content/en/about-claude/models/choosing-a-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ This approach is best for:
The [effort parameter](/docs/en/build-with-claude/effort) defaults to `high` on Claude Opus 5 and Claude Opus 4.8, including in Claude Code and the Messages API. On Claude Opus 5, start at the default and step up to `xhigh` for the most demanding coding and agentic work. On Claude Opus 4.8, use `xhigh` for coding, high-autonomy work, and the most intelligence-demanding tasks.
</Note>

**Claude Opus 5** (`claude-opus-5`) is a step-change improvement over Claude Opus 4.8, strong on deep reasoning, agentic and long-horizon tasks, and test-time compute scaling. Claude Opus 5 supports a 1M token context window by default and up to 128k output tokens, and is priced at $5 per million input tokens and $25 per million output tokens.
**Claude Opus 5** (`claude-opus-5`) is a step-change improvement over Claude Opus 4.8, strong on deep reasoning, agentic and long-horizon tasks, and test-time compute scaling. Claude Opus 5 supports a 1M token context window by default and up to 128k output tokens, and is priced at $5 USD per million input tokens and $25 USD per million output tokens.

**Claude Fable 5** (`claude-fable-5`) is Anthropic's most capable widely released model, delivering next-generation intelligence for long-running agents. **Claude Mythos 5** (`claude-mythos-5`) is available through [Project Glasswing](https://anthropic.com/glasswing). Both models support a 1M token context window by default, up to 128k output tokens, and always-on [adaptive thinking](/docs/en/build-with-claude/thinking). See [Introducing Claude Fable 5 and Claude Mythos 5](/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5) for launch details.

Claude Fable 5 and Claude Mythos 5 are priced at $10 per million input tokens and $50 per million output tokens.
Claude Fable 5 and Claude Mythos 5 are priced at $10 USD per million input tokens and $50 USD per million output tokens.

## Model selection matrix

Expand Down
4 changes: 2 additions & 2 deletions content/en/about-claude/models/whats-new-opus-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The minimum cacheable prompt length on Claude Opus 5 is 512 tokens, down from 1,

### Fast mode

[Fast mode](/docs/en/build-with-claude/fast-mode) (research preview) is available for Claude Opus 5 on the Claude API only; it is not currently available on Amazon Bedrock, Google Cloud, or Microsoft Foundry. Fast mode for Claude Opus 5 is priced at $10 per million input tokens and $50 per million output tokens. See [Fast mode](/docs/en/build-with-claude/fast-mode) for access, supported models, and pricing.
[Fast mode](/docs/en/build-with-claude/fast-mode) (research preview) is available for Claude Opus 5 on the Claude API only; it is not currently available on Amazon Bedrock, Google Cloud, or Microsoft Foundry. Fast mode for Claude Opus 5 is priced at $10 USD per million input tokens and $50 USD per million output tokens. See [Fast mode](/docs/en/build-with-claude/fast-mode) for access, supported models, and pricing.

## Behavior changes

Expand Down Expand Up @@ -260,7 +260,7 @@ For the prompting patterns that get the most out of these capabilities, see [Pro

## Pricing

Claude Opus 5 is priced at $5 per million input tokens and $25 per million output tokens, unchanged from Claude Opus 4.8.
Claude Opus 5 is priced at $5 USD per million input tokens and $25 USD per million output tokens, unchanged from Claude Opus 4.8.

See [Pricing](/docs/en/about-claude/pricing) for complete pricing, including batch processing, prompt caching, and fast mode rates.

Expand Down
2 changes: 1 addition & 1 deletion content/en/build-with-claude/claude-in-amazon-bedrock.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,10 @@ For the full feature list with Amazon Bedrock availability, see [Features overvi
* [Thinking](/docs/en/build-with-claude/thinking)
* [Tool use](/docs/en/agents-and-tools/tool-use/overview), including the [Bash tool](/docs/en/agents-and-tools/tool-use/bash-tool), [Computer use tool](/docs/en/agents-and-tools/tool-use/computer-use-tool), [Memory tool](/docs/en/agents-and-tools/tool-use/memory-tool), and [Text editor tool](/docs/en/agents-and-tools/tool-use/text-editor-tool)
* [Citations](/docs/en/build-with-claude/citations)
* [Structured outputs](/docs/en/build-with-claude/structured-outputs)

### Features not supported

* [Structured outputs](/docs/en/build-with-claude/structured-outputs)
* Input sources (URL sources for images and documents, Files API)
* Server-side tools (code execution, web search, web fetch, advisor)
* Agent infrastructure (Agent Skills, MCP connector, programmatic tool calling)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ This page covers two features: mid-conversation system messages, which are gener
<Note>
Mid-conversation system messages are available on the Claude API, [Claude in Amazon Bedrock](/docs/en/build-with-claude/claude-in-amazon-bedrock), and [Google Cloud](/docs/en/build-with-claude/claude-on-vertex-ai).

This feature is available on Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), Claude Opus 4.8, and Claude Opus 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 instead.
This feature is available on Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), Claude Opus 4.8, Claude Opus 5, and Claude Sonnet 5. No beta header is required for mid-conversation system messages.

Mid-conversation tool changes are in beta and require the `mid-conversation-tool-changes-2026-07-01` beta header. They are available on Claude Fable 5, Claude Mythos 5, Claude Opus 4.8, and Claude Opus 5, on the Claude API, Amazon Bedrock, and Google Cloud.
Mid-conversation tool changes are in beta and require the `mid-conversation-tool-changes-2026-07-01` beta header. They are available on Claude Fable 5, Claude Mythos 5, Claude Opus 4.8, and Claude Opus 5, on the Claude API, Amazon Bedrock, and Google Cloud. They are not available on Claude Sonnet 5.
</Note>

## Mid-conversation tool changes
Expand Down
2 changes: 1 addition & 1 deletion content/en/build-with-claude/prompt-caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ The following table shows which parts of the cache are invalidated by different
| **Non-tool results passed to extended thinking requests** | ✓ | ✓ | Model-specific | On Opus 4.5+ and Sonnet 4.6+, thinking blocks are preserved by default, so the cache remains valid (✓). On earlier Opus/Sonnet models and all Haiku models, all previously-cached thinking blocks are stripped from context, and any messages that follow those thinking blocks are removed from the cache (✘). For more details, see [Caching with thinking blocks](#caching-with-thinking-blocks). |

<Note>
On Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), Claude Opus 4.8, and Claude Opus 5, you can add a new system instruction partway through a conversation without invalidating the system or message caches. Append a `{"role": "system"}` message to `messages` instead of editing the top-level `system` field, so the cached prefix stays unchanged. This feature is not available on Claude Sonnet 5; use the top-level `system` field instead. See [Mid-conversation system messages](/docs/en/build-with-claude/mid-conversation-system-messages).
On Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), Claude Opus 4.8, Claude Opus 5, and Claude Sonnet 5, you can add a new system instruction partway through a conversation without invalidating the system or message caches. Append a `{"role": "system"}` message to `messages` instead of editing the top-level `system` field, so the cached prefix stays unchanged. See [Mid-conversation system messages](/docs/en/build-with-claude/mid-conversation-system-messages).
</Note>

### Tracking cache performance
Expand Down
2 changes: 1 addition & 1 deletion content/en/build-with-claude/structured-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Get validated JSON results from agent workflows
- [ZDR](/docs/en/manage-claude/api-and-data-retention): eligible (excludes [Covered Models](/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements))
- Supported models: `claude-fable-5`, `claude-mythos-5`, `claude-mythos-preview`, `claude-opus-5`, `claude-opus-4-8`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-5`, `claude-sonnet-4-6`, `claude-sonnet-4-5-20250929`, `claude-opus-4-5-20251101`, `claude-haiku-4-5-20251001`
- Platforms: Claude API, Claude Platform on AWS, Amazon Bedrock [1], Google Cloud, Microsoft Foundry [2]
1. On Amazon Bedrock, structured outputs are natively GA for Claude Opus 5, Claude Opus 4.8, Claude Opus 4.6, Claude Sonnet 4.6, Claude Sonnet 4.5, Claude Opus 4.5, and Claude Haiku 4.5. Claude Sonnet 5, Claude Opus 4.7, and Claude Mythos Preview are available through [Claude in Amazon Bedrock](/docs/en/build-with-claude/claude-in-amazon-bedrock) (the Messages-API Bedrock endpoint).
1. On Amazon Bedrock, structured outputs are available for Claude Opus 4.6, Claude Sonnet 4.6, Claude Sonnet 4.5, Claude Opus 4.5, and Claude Haiku 4.5.
2. On [Microsoft Foundry](/docs/en/build-with-claude/claude-in-microsoft-foundry), structured outputs require a [Hosted on Anthropic deployment](/docs/en/build-with-claude/claude-in-microsoft-foundry#additional-features-not-supported-when-hosted-on-azure).

---
Expand Down
5 changes: 1 addition & 4 deletions content/en/build-with-claude/token-counting.md
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,7 @@ All [active models](/docs/en/about-claude/models/overview) support token countin
using Anthropic;
using Anthropic.Models.Messages;

AnthropicClient client = new()
{
ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_API_KEY")
};
AnthropicClient client = new();

var parameters = new MessageCountTokensParams
{
Expand Down
14 changes: 4 additions & 10 deletions content/en/build-with-claude/vision.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ On the API, provide images to Claude as `image` content blocks using one of thre
```

```typescript TypeScript
const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY
});
const anthropic = new Anthropic();

const message = await anthropic.messages.create({
model: "claude-opus-5",
Expand Down Expand Up @@ -365,9 +363,7 @@ On the API, provide images to Claude as `image` content blocks using one of thre
```

```typescript TypeScript
const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY
});
const anthropic = new Anthropic();

const message = await anthropic.messages.create({
model: "claude-opus-5",
Expand Down Expand Up @@ -968,9 +964,7 @@ You can include multiple images in a single request, and Claude analyzes them jo
```

```typescript TypeScript
const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY
});
const anthropic = new Anthropic();

const image1Data =
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC";
Expand Down Expand Up @@ -1276,7 +1270,7 @@ The following table shows the downsized resolution and visual-token cost for sev

When an image is downsized, Claude scales it to the largest size that fits the tier's limits while preserving its aspect ratio. This caps the token cost. For the precise rule and a reference implementation, see [How Claude resizes and pads images](/docs/en/build-with-claude/vision-coordinates#how-claude-resizes-and-pads-images).

To estimate cost, multiply the token count by the [per-token price of the model](https://claude.com/pricing) you're using. For example, at Claude Haiku 4.5's $1 per million input tokens (standard tier), the 1000×1000 image costs about $1.30 per thousand images. At Claude Opus 5's $5 per million (high-resolution tier), the same image costs about $6.48 per thousand and the 4K image about $23.92 per thousand.
To estimate cost, multiply the token count by the [per-token price of the model](https://claude.com/pricing) you're using. For example, at Claude Haiku 4.5's $1 USD per million input tokens (standard tier), the 1000×1000 image costs about $1.30 USD per thousand images. At Claude Opus 5's $5 USD per million (high-resolution tier), the same image costs about $6.48 USD per thousand and the 4K image about $23.92 USD per thousand.

High-resolution images can use up to roughly three times more visual tokens than the same image on a standard-tier model. If you don't need the additional fidelity that high resolution provides for computer use, screenshot understanding, and dense documents, downsample images before sending to control token costs. To minimize latency and to simplify [coordinate-based workflows](/docs/en/build-with-claude/vision-coordinates), prefer resizing images before uploading them.

Expand Down
7 changes: 2 additions & 5 deletions content/en/claude_api_primer.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ For fast, cost-effective tasks: Claude Haiku 4.5: claude-haiku-4-5-20251001

```python Python
import anthropic
import os

message = anthropic.Anthropic(
api_key=os.environ.get("ANTHROPIC_API_KEY")
).messages.create(
message = anthropic.Anthropic().messages.create(
model="claude-opus-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello, Claude"}],
Expand Down Expand Up @@ -102,7 +99,7 @@ The Messages API is stateless, which means that you always send the full convers

### Prefilling Claude's response

You can pre-fill part of Claude's response in the last position of the input messages list. This can be used to shape Claude's response. The following example uses `"max_tokens": 1` to get a single multiple choice answer from Claude.
You can prefill part of Claude's response in the last position of the input messages list. Use this technique to shape Claude's response. The following example uses `"max_tokens": 1` to get a single multiple choice answer from Claude.

<Note>
Claude 4.6 and later models and Claude Mythos Preview do not support assistant message prefill; requests to those models must end with a user message. The examples below use a model that supports prefill.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/claude-code/agent-sdk/agent-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ When either limit is hit, the SDK returns a `ResultMessage` with a corresponding

The budget cap covers [subagents](/docs/en/agent-sdk/subagents): their spend counts toward the total. Once spend reaches the cap, spawning another subagent fails with `Budget limit reached`, and Claude Code stops any background subagents still running. The cap-enforcement behaviors require Claude Code v2.1.217 or later.

With [streaming input](/docs/en/agent-sdk/streaming-vs-single-mode), a message you send while a turn is still running stays queued when that turn ends at the max-turns limit, and it starts its own turn with its own max-turns limit. Before v2.1.205, a message that arrived on the turn's final iteration could be consumed into the ending turn and lost without ever reaching the model.
With [streaming input](/docs/en/agent-sdk/streaming-vs-single-mode), a message you send while a turn is still running stays queued when that turn ends at the max-turns limit, and it starts its own turn with its own max-turns limit.

### Effort level

Expand Down
Loading
Loading