Skip to content
Closed
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
  •  
  •  
  •  
7,955 changes: 5,409 additions & 2,546 deletions content/.metadata.json

Large diffs are not rendered by default.

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

## 2.1.97

- Added focus view toggle (`Ctrl+O`) in `NO_FLICKER` mode showing prompt, one-line tool summary with edit diffstats, and final response
- Added `refreshInterval` status line setting to re-run the status line command every N seconds
- Added `workspace.git_worktree` to the status line JSON input, set when the current directory is inside a linked git worktree
- Added `● N running` indicator in `/agents` next to agent types with live subagent instances
- Added syntax highlighting for Cedar policy files (`.cedar`, `.cedarpolicy`)
- Fixed `--dangerously-skip-permissions` being silently downgraded to accept-edits mode after approving a write to a protected path
- Fixed and hardened Bash tool permissions, tightening checks around env-var prefixes and network redirects, and reducing false prompts on common commands
- Fixed permission rules with names matching JavaScript prototype properties (e.g. `toString`) causing `settings.json` to be silently ignored
- Fixed managed-settings allow rules remaining active after an admin removed them until process restart
- Fixed `permissions.additionalDirectories` changes in settings not applying mid-session
- Fixed removing a directory from `settings.permissions.additionalDirectories` revoking access to the same directory passed via `--add-dir`
- Fixed MCP HTTP/SSE connections accumulating ~50 MB/hr of unreleased buffers when servers reconnect
- Fixed MCP OAuth `oauth.authServerMetadataUrl` not being honored on token refresh after restart, fixing ADFS and similar IdPs
- Fixed 429 retries burning all attempts in ~13 seconds when the server returns a small `Retry-After` — exponential backoff now applies as a minimum
- Fixed rate-limit upgrade options disappearing after context compaction
- Fixed several `/resume` picker issues: `--resume <name>` opening uneditable, Ctrl+A reload wiping search, empty list swallowing navigation, task-status text replacing conversation summary, and cross-project staleness
- Fixed file-edit diffs disappearing on `--resume` when the edited file was larger than 10KB
- Fixed `--resume` cache misses and lost mid-turn input from attachment messages not being saved to the transcript
- Fixed messages typed while Claude is working not being persisted to the transcript
- Fixed prompt-type `Stop`/`SubagentStop` hooks failing on long sessions, and hook evaluator API errors displaying "JSON validation failed" instead of the actual message
- Fixed subagents with worktree isolation or `cwd:` override leaking their working directory back to the parent session's Bash tool
- Fixed compaction writing duplicate multi-MB subagent transcript files on prompt-too-long retries
- Fixed `claude plugin update` reporting "already at the latest version" for git-based marketplace plugins when the remote had newer commits
- Fixed slash command picker breaking when a plugin's frontmatter `name` is a YAML boolean keyword
- Fixed copying wrapped URLs in `NO_FLICKER` mode inserting spaces at line breaks
- Fixed scroll rendering artifacts in `NO_FLICKER` mode when running inside zellij
- Fixed a crash in `NO_FLICKER` mode when hovering over MCP tool results
- Fixed a `NO_FLICKER` mode memory leak where API retries left stale streaming state
- Fixed slow mouse-wheel scrolling in `NO_FLICKER` mode on Windows Terminal
- Fixed custom status line not displaying in `NO_FLICKER` mode on terminals shorter than 24 rows
- Fixed Shift+Enter and Alt/Cmd+arrow shortcuts not working in Warp with `NO_FLICKER` mode
- Fixed Korean/Japanese/Unicode text becoming garbled when copied in no-flicker mode on Windows
- Fixed Bedrock SigV4 authentication failing when `AWS_BEARER_TOKEN_BEDROCK` or `ANTHROPIC_BEDROCK_BASE_URL` are set to empty strings (as GitHub Actions does for unset inputs)
- Improved Accept Edits mode to auto-approve filesystem commands prefixed with safe env vars or process wrappers (e.g. `LANG=C rm foo`, `timeout 5 mkdir out`)
- Improved auto mode and bypass-permissions mode to auto-approve sandbox network access prompts
- Improved sandbox: `sandbox.network.allowMachLookup` now takes effect on macOS
- Improved image handling: pasted and attached images are now compressed to the same token budget as images read via the Read tool
- Improved slash command and `@`-mention completion to trigger after CJK sentence punctuation, so Japanese/Chinese input no longer requires a space before `/` or `@`
- Improved Bridge sessions to show the local git repo, branch, and working directory on the claude.ai session card
- Improved footer layout: indicators (Focus, notifications) now stay on the mode-indicator row instead of wrapping below
- Improved context-low warning to show as a transient footer notification instead of a persistent row
- Improved markdown blockquotes to show a continuous left bar across wrapped lines
- Improved session transcript size by skipping empty hook entries and capping stored pre-edit file copies
- Improved transcript accuracy: per-block entries now carry the final token usage instead of the streaming placeholder
- Improved Bash tool OTEL tracing: subprocesses now inherit a W3C `TRACEPARENT` env var when tracing is enabled
- Updated `/claude-api` skill to cover Managed Agents alongside the Claude API

## 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)
Expand Down
4 changes: 2 additions & 2 deletions content/blog/engineering/claude-code-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Use Claude Code

Best Practices for Claude Code

[Getting started](https://www.anthropic.com/docs/en/overview)[Build with Claude Code](https://www.anthropic.com/docs/en/sub-agents)[Deployment](https://www.anthropic.com/docs/en/third-party-integrations)[Administration](https://www.anthropic.com/docs/en/setup)[Configuration](https://www.anthropic.com/docs/en/settings)[Reference](https://www.anthropic.com/docs/en/cli-reference)[What's New](https://www.anthropic.com/docs/en/whats-new)[Resources](https://www.anthropic.com/docs/en/legal-and-compliance)
[Getting started](https://www.anthropic.com/docs/en/overview)[Build with Claude Code](https://www.anthropic.com/docs/en/sub-agents)[Deployment](https://www.anthropic.com/docs/en/third-party-integrations)[Administration](https://www.anthropic.com/docs/en/setup)[Configuration](https://www.anthropic.com/docs/en/settings)[Reference](https://www.anthropic.com/docs/en/cli-reference)[Agent SDK](https://www.anthropic.com/docs/en/agent-sdk/overview)[What's New](https://www.anthropic.com/docs/en/whats-new)[Resources](https://www.anthropic.com/docs/en/legal-and-compliance)

##### Getting started

Expand Down Expand Up @@ -125,7 +125,7 @@ Claude performs dramatically better when it can verify its own work, like run te

| Strategy | Before | After |
| --- | --- | --- |
| **Provide verification criteria** | _”implement a function that validates email addresses"_ | _"write a validateEmail function. example test cases: [[email protected]](https://www.anthropic.com/cdn-cgi/l/email-protection#7005031502301508111d001c155e131f1d) is true, invalid is false, [[email protected]](https://www.anthropic.com/cdn-cgi/l/email-protection#b8cdcbddcaf896dbd7d5) is false. run the tests after implementing”_ |
| **Provide verification criteria** | _”implement a function that validates email addresses"_ | _"write a validateEmail function. example test cases: [[email protected]](https://www.anthropic.com/cdn-cgi/l/email-protection#423731273002273a232f322e276c212d2f) is true, invalid is false, [[email protected]](https://www.anthropic.com/cdn-cgi/l/email-protection#0d787e687f4d236e6260) is false. run the tests after implementing”_ |
| **Verify UI changes visually** | _”make the dashboard look better"_ | _"[paste screenshot] implement this design. take a screenshot of the result and compare it to the original. list differences and fix them”_ |
| **Address root causes, not symptoms** | _”the build is failing"_ | _"the build fails with this error: [paste error]. fix it and verify the build succeeds. address the root cause, don’t suppress the error”_ |

Expand Down
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.91b9b576-38af-40d7-8b65-118a3bfcad75/code) to try out Claude Code on the web.
2. Go to [claude.com/code](http://claude.ai/redirect/website.v1.2c75e6bb-6a63-4eff-b77e-916242daf86e/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.96",
"version": "2.1.97",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"license": "SEE LICENSE IN README.md",
"_id": "@anthropic-ai/claude-code@2.1.96",
"_id": "@anthropic-ai/claude-code@2.1.97",
"maintainers": [
{
"name": "zak-anthropic",
Expand Down Expand Up @@ -73,20 +73,20 @@
"claude": "cli.js"
},
"dist": {
"shasum": "d528e9638292c7b275c896b283e4a8e6959ef0ef",
"tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.96.tgz",
"shasum": "b790d417b4f47b897068ffff9b57812ccc81e707",
"tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.97.tgz",
"fileCount": 20,
"integrity": "sha512-ETrc0+1qWHaqtKi+ixbsAecZyM+H52VIJj+zWIvw3jBU/JZ9v5vnE2kHShM1lcpr+Gji7GXk23l0CMGLA7hC0g==",
"integrity": "sha512-8lKM/rFctBl+82bQ+0g0Lkbt9tJU/zYKAjWisNUq436/386n/VZQbnyjnibGkyqqB6mrX/3ub/cpFlpCu4FXLg==",
"signatures": [
{
"sig": "MEUCIDfVFVFY0qtDRV8JGrx0/QKyh70/hWuV+lO0LSTt2zz6AiEA20JmCcoQACXgZOSLdrLxZ8I2356j3KvBbianSlhxu0A=",
"sig": "MEUCICG6rML8JBFMxvrHFFDhofBztC5mvsOLqHbO7G4bdU4MAiEA/TuR+/HzSBvE2e/5XokcLHWOLaw604eahZ4Hy+IFTew=",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 48924836
"unpackedSize": 48991994
},
"type": "module",
"_from": "file:/home/runner/work/claude-cli-internal/claude-cli-internal/build-external/anthropic-ai-claude-code-2.1.96.tgz",
"_from": "file:/home/runner/work/claude-cli-internal/claude-cli-internal/build-external/anthropic-ai-claude-code-2.1.97.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.96.tgz",
"_integrity": "sha512-ETrc0+1qWHaqtKi+ixbsAecZyM+H52VIJj+zWIvw3jBU/JZ9v5vnE2kHShM1lcpr+Gji7GXk23l0CMGLA7hC0g==",
"_resolved": "/home/runner/work/claude-cli-internal/claude-cli-internal/build-external/anthropic-ai-claude-code-2.1.97.tgz",
"_integrity": "sha512-8lKM/rFctBl+82bQ+0g0Lkbt9tJU/zYKAjWisNUq436/386n/VZQbnyjnibGkyqqB6mrX/3ub/cpFlpCu4FXLg==",
"_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.96_1775622763975_0.7218051294969574",
"tmp": "tmp/claude-code_2.1.97_1775683674825_0.4147276975853762",
"host": "s3://npm-registry-packages-npm-production"
}
}
80 changes: 77 additions & 3 deletions content/en/about-claude/models/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Guide for migrating to Claude 4.6 models from previous Claude versions

---

<Note>
This guide covers migrating [Messages API](/docs/en/build-with-claude/working-with-messages) code. If you use [Claude Managed Agents](/docs/en/managed-agents/overview), see [Migrating between model versions](/docs/en/managed-agents/migration#migrating-between-model-versions). The Managed Agents runtime handles most of the request-shape changes described here.
</Note>

## Migrating to Claude 4.6

Claude Opus 4.6 is a near drop-in replacement for Claude 4.5, with a few breaking changes to be aware of. For a full list of new features, see [What's new in Claude 4.6](/docs/en/about-claude/models/whats-new-claude-4-6).
Expand Down Expand Up @@ -50,6 +54,20 @@ These are not required but will improve your experience:
)
```

```bash CLI
ant messages create <<'YAML'
model: claude-opus-4-6
max_tokens: 16000
thinking:
type: adaptive
output_config:
effort: high
messages:
- role: user
content: Your prompt here
YAML
```

```typescript TypeScript hidelines={1..2}
import Anthropic from "@anthropic-ai/sdk";

Expand Down Expand Up @@ -222,7 +240,7 @@ model = "claude-opus-4-6" # After
Use only `temperature` OR `top_p`, not both:


```python nocheck
```python Python nocheck
# Before - This will error in Claude 4+ models
response = client.messages.create(
model="claude-3-7-sonnet-20250219",
Expand Down Expand Up @@ -263,7 +281,7 @@ model = "claude-opus-4-6" # After
Update your application to [handle `refusal` stop reasons](/docs/en/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals):


```python nocheck
```python Python nocheck
response = client.messages.create(...)

if response.stop_reason == "refusal":
Expand All @@ -276,7 +294,7 @@ model = "claude-opus-4-6" # After
Claude 4.5+ models return a `model_context_window_exceeded` stop reason when generation stops due to hitting the context window limit, rather than the requested `max_tokens` limit. Update your application to handle this new stop reason:


```python nocheck
```python Python nocheck
response = client.messages.create(...)

if response.stop_reason == "model_context_window_exceeded":
Expand Down Expand Up @@ -436,6 +454,18 @@ curl https://api.anthropic.com/v1/messages \
}'
```

```bash CLI
ant messages create <<'YAML'
model: claude-sonnet-4-6
max_tokens: 8192
output_config:
effort: low
messages:
- role: user
content: Your prompt here
YAML
```

```python Python
response = client.messages.create(
model="claude-sonnet-4-6",
Expand Down Expand Up @@ -615,6 +645,20 @@ curl https://api.anthropic.com/v1/messages \
}'
```

```bash CLI nocheck
ant messages create <<'YAML'
model: claude-sonnet-4-6
max_tokens: 64000
thinking:
type: adaptive
output_config:
effort: medium
messages:
- role: user
content: Your prompt here
YAML
```

```python Python nocheck
response = client.messages.create(
model="claude-sonnet-4-6",
Expand Down Expand Up @@ -803,6 +847,21 @@ curl https://api.anthropic.com/v1/messages \
}'
```

```bash CLI
ant beta:messages create --beta interleaved-thinking-2025-05-14 <<'YAML'
model: claude-sonnet-4-6
max_tokens: 16384
thinking:
type: enabled
budget_tokens: 16384
output_config:
effort: medium
messages:
- role: user
content: Your prompt here
YAML
```

```python Python
response = client.beta.messages.create(
model="claude-sonnet-4-6",
Expand Down Expand Up @@ -995,6 +1054,21 @@ curl https://api.anthropic.com/v1/messages \
}'
```

```bash CLI
ant beta:messages create --beta interleaved-thinking-2025-05-14 <<'YAML'
model: claude-sonnet-4-6
max_tokens: 8192
thinking:
type: enabled
budget_tokens: 16384
output_config:
effort: low
messages:
- role: user
content: Your prompt here
YAML
```

```python Python
response = client.beta.messages.create(
model="claude-sonnet-4-6",
Expand Down
6 changes: 3 additions & 3 deletions content/en/about-claude/models/whats-new-claude-4-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For complete pricing and specs, see the [models overview](/docs/en/about-claude/

`thinking: {type: "enabled"}` and `budget_tokens` are **deprecated** on Opus 4.6 and Sonnet 4.6. They remain functional but will be removed in a future model release. Use adaptive thinking and the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth instead. Adaptive thinking also automatically enables interleaved thinking.

```python
```python Python
response = client.messages.create(
model="claude-opus-4-6",
max_tokens=16000,
Expand Down Expand Up @@ -66,7 +66,7 @@ The following tools are now generally available:

[Fast mode](/docs/en/build-with-claude/fast-mode) (`speed: "fast"`) delivers significantly faster output token generation for Opus models. Fast mode is up to 2.5x as fast at premium pricing ($30/$150 per MTok). This is the same model running with faster inference (no change to intelligence or capabilities).

```python
```python Python
response = client.beta.messages.create(
model="claude-opus-4-6",
max_tokens=4096,
Expand Down Expand Up @@ -106,7 +106,7 @@ On **Sonnet 4.6**, the `interleaved-thinking-2025-05-14` beta header is still fu

The `output_format` parameter for [structured outputs](/docs/en/build-with-claude/structured-outputs) has been moved to `output_config.format`. The old parameter remains functional but is deprecated and will be removed in a future model release.

```python nocheck
```python Python nocheck
# Before
response = client.messages.create(
output_format={"type": "json_schema", "schema": {...}},
Expand Down
Loading
Loading