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
286 changes: 143 additions & 143 deletions content/.metadata.json

Large diffs are not rendered by default.

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

## 2.1.83

- Added `managed-settings.d/` drop-in directory alongside `managed-settings.json`, letting separate teams deploy independent policy fragments that merge alphabetically
- Added `CwdChanged` and `FileChanged` hook events for reactive environment management (e.g., direnv)
- Added `sandbox.failIfUnavailable` setting to exit with an error when sandbox is enabled but cannot start, instead of running unsandboxed
- Added `disableDeepLinkRegistration` setting to prevent `claude-cli://` protocol handler registration
- Added `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1` to strip Anthropic and cloud provider credentials from subprocess environments (Bash tool, hooks, MCP stdio servers)
- Added transcript search — press `/` in transcript mode (`Ctrl+O`) to search, `n`/`N` to step through matches
- Added `Ctrl+X Ctrl+E` as an alias for opening the external editor (readline-native binding; `Ctrl+G` still works)
- Pasted images now insert an `[Image #N]` chip at the cursor so you can reference them positionally in your prompt
- Agents can now declare `initialPrompt` in frontmatter to auto-submit a first turn
- `chat:killAgents` and `chat:fastMode` are now rebindable via `~/.claude/keybindings.json`
- Fixed mouse tracking escape sequences leaking to shell prompt after exit
- Fixed Claude Code hanging on exit on macOS
- Fixed screen flashing blank after being idle for a few seconds
- Fixed a hang when diffing very large files with few common lines — diffs now time out after 5 seconds and fall back gracefully
- Fixed a 1–8 second UI freeze on startup when voice input was enabled, caused by eagerly loading the native audio module
- Fixed a startup regression where Claude Code would wait ~3s for claude.ai MCP config fetch before proceeding
- Fixed `--mcp-config` CLI flag bypassing `allowedMcpServers`/`deniedMcpServers` managed policy enforcement
- Fixed claude.ai MCP connectors (Slack, Gmail, etc.) not being available in single-turn `--print` mode
- Fixed `caffeinate` process not properly terminating when Claude Code exits, preventing Mac from sleeping
- Fixed bash mode not activating when tab-accepting `!`-prefixed command suggestions
- Fixed stale slash command selection showing wrong highlighted command after navigating suggestions
- Fixed `/config` menu showing both the search cursor and list selection at the same time
- Fixed background subagents becoming invisible after context compaction, which could cause duplicate agents to be spawned
- Fixed background agent tasks staying stuck in "running" state when git or API calls hang during cleanup
- Fixed `--channels` showing "Channels are not currently available" on first launch after upgrade
- Fixed uninstalled plugin hooks continuing to fire until the next session
- Fixed queued commands flickering during streaming responses
- Fixed slash commands being sent to the model as text when submitted while a message is processing
- Fixed scrollback jumping when collapsed read/search groups finish after scrolling offscreen
- Fixed scrollback jumping to top when the model starts or stops thinking
- Fixed SDK session history loss on resume caused by hook progress/attachment messages forking the parentUuid chain
- Fixed copy-on-select not firing when you release the mouse outside the terminal window
- Fixed ghost characters appearing in height-constrained lists when items overflow
- Fixed `Ctrl+B` interfering with readline backward-char at an idle prompt — it now only fires when a foreground task can be backgrounded
- Fixed tool result files never being cleaned up, ignoring the `cleanupPeriodDays` setting
- Fixed space key being swallowed for up to 3 seconds after releasing voice hold-to-talk
- Fixed ALSA library errors corrupting the terminal UI when using voice mode on Linux without audio hardware (Docker, headless, WSL1)
- Fixed voice mode SoX detection on Termux/Android where spawning `which` is kernel-restricted
- Fixed Remote Control sessions showing as Idle in the web session list while actively running
- Fixed footer navigation selecting an invisible Remote Control pill in config-driven mode
- Fixed memory leak in remote sessions where tool use IDs accumulate indefinitely
- Improved Bedrock SDK cold-start latency by overlapping profile fetch with other boot work
- Improved `--resume` memory usage and startup latency on large sessions
- Improved plugin startup — commands, skills, and agents now load from disk cache without re-fetching
- Improved Remote Control session titles: AI-generated titles now appear within seconds of the first message
- Improved `WebFetch` to identify as `Claude-User` so site operators can recognize and allowlist Claude Code traffic via `robots.txt`
- Reduced `WebFetch` peak memory usage for large pages
- Reduced scrollback resets in long sessions from once per turn to once per ~50 messages
- Faster `claude -p` startup with unauthenticated HTTP/SSE MCP servers (~600ms saved)
- Bash ghost-text suggestions now include just-submitted commands immediately
- Increased non-streaming fallback token cap (21k → 64k) and timeout (120s → 300s local) so fallback requests are less likely to be truncated
- Interrupting a prompt before any response now automatically restores your input so you can edit and resubmit
- `/status` now works while Claude is responding, instead of being queued until the turn finishes
- Plugin MCP servers that duplicate an org-managed connector are now suppressed instead of running a second connection
- Linux: respect `XDG_DATA_HOME` when registering the `claude-cli://` protocol handler
- Changed "stop all background agents" keybinding from `Ctrl+F` to `Ctrl+X Ctrl+K` to stop shadowing readline forward-char
- Deprecated `TaskOutput` tool in favor of using `Read` on the background task's output file path
- Added `CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK` env var to disable the non-streaming fallback when streaming fails
- Plugin options (`manifest.userConfig`) now available externally — plugins can prompt for configuration at enable time, with `sensitive: true` values stored in keychain (macOS) or protected credentials file (other platforms)
- Claude can now reference the on-disk path of clipboard-pasted images for file operations
- `Ctrl+L` now clears the screen and forces a full redraw — use this to recover when Cmd+K leaves the UI partially blank. Use `Ctrl+U` or double-Esc to clear prompt input.
- `--bare -p` (SDK pattern) is ~14% faster to the API request
- Memory: `MEMORY.md` index now truncates at 25KB as well as 200 lines
- Disabled `AskUserQuestion` and plan-mode tools when `--channels` is active
- Fixed API 400 error when a pasted image was queued during a failing tool call
- Fixed MCP tool calls hanging indefinitely when an SSE connection drops mid-call and exhausts its reconnection attempts
- Fixed Remote Control session titles showing raw XML when a background agent completed before the first user message
- Fixed remote sessions forgetting conversation history after a container restart due to progress-message gaps in the resumed transcript chain
- Fixed remote sessions requiring re-login on transient auth errors instead of retrying automatically
- Fixed `rg ... | wc -l` and similar piped commands hanging and returning `0` in sandbox mode on Linux
- Fixed voice input hold-to-talk not activating when a CJK IME inserts a full-width space
- Fixed `--worktree` hanging silently when the worktree name contained a forward slash
- [VSCode] Spinner now turns red with "Not responding" when the backend hasn't responded for 60 seconds
- [VSCode] Fixed session history not loading correctly when reopening a session via URL or after restart
- [VSCode] Added Esc-twice (or `/rewind`) to open a keyboard-navigable rewind picker
- [VSCode] Fixed "Fork conversation from here" and rewind actions failing silently after the session cache goes stale

## 2.1.81

- Added `--bare` flag for scripted `-p` calls — skips hooks, LSP, plugin sync, and skill directory walks; requires `ANTHROPIC_API_KEY` or an `apiKeyHelper` via `--settings` (OAuth and keychain auth disabled); auto-memory fully disabled
Expand Down
6 changes: 5 additions & 1 deletion content/blog/engineering/claude-code-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ Claude Code overview

* [How Claude Code works](https://www.anthropic.com/docs/en/how-claude-code-works)
* [Extend Claude Code](https://www.anthropic.com/docs/en/features-overview)

##### Use Claude Code

* [Store instructions and memories](https://www.anthropic.com/docs/en/memory)
* [Permission modes](https://www.anthropic.com/docs/en/permission-modes)
* [Common workflows](https://www.anthropic.com/docs/en/common-workflows)
* [Best practices](https://www.anthropic.com/docs/en/best-practices)

Expand Down Expand Up @@ -291,7 +295,7 @@ Each surface connects to the same underlying Claude Code engine, so your CLAUDE.
| I want to… | Best option |
| --- | --- |
| Continue a local session from my phone or another device | [Remote Control](https://www.anthropic.com/docs/en/remote-control) |
| Push events from Telegram, Discord, or my own webhooks into a session | [Channels](https://www.anthropic.com/docs/en/channels) |
| Push events from Telegram, Discord, iMessage, or my own webhooks into a session | [Channels](https://www.anthropic.com/docs/en/channels) |
| Start a task locally, continue on mobile | [Web](https://www.anthropic.com/docs/en/claude-code-on-the-web) or [Claude iOS app](https://apps.apple.com/app/claude-by-anthropic/id6473753684) |
| Run Claude on a recurring schedule | [Cloud scheduled tasks](https://www.anthropic.com/docs/en/web-scheduled-tasks) or [Desktop scheduled tasks](https://www.anthropic.com/docs/en/desktop#schedule-recurring-tasks) |
| Automate PR reviews and issue triage | [GitHub Actions](https://www.anthropic.com/docs/en/github-actions) or [GitLab CI/CD](https://www.anthropic.com/docs/en/gitlab-ci-cd) |
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.542850ba-218c-4d0c-8173-fd7087e9b940/code) to try out Claude Code on the web.
2. Go to [claude.com/code](http://claude.ai/redirect/website.v1.63f3d942-a588-41ac-adbe-5000730c8a82/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
19 changes: 10 additions & 9 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.81",
"version": "2.1.83",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"license": "SEE LICENSE IN README.md",
"_id": "@anthropic-ai/claude-code@2.1.81",
"_id": "@anthropic-ai/claude-code@2.1.83",
"maintainers": [
{
"name": "zak-anthropic",
Expand Down Expand Up @@ -73,23 +73,23 @@
"claude": "cli.js"
},
"dist": {
"shasum": "70d2d688d08a398664f6ad863302b1d6736929e9",
"tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.81.tgz",
"shasum": "fc8d518a0e8703f64c0e05db37a10d0cbff30ee2",
"tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.83.tgz",
"fileCount": 26,
"integrity": "sha512-CyQmbrsCccqx7kNgg7/4+L9GcUG6VaTZYtB51zPHy85z1VvbPrnRP+jFP4seyR9L/c3XHSDU1LVHzKKyd1IcGQ==",
"integrity": "sha512-DrYl2aA0vOj157waWu/AUbBQNbekSB/yRXlEti92eY/vBCdVxw8rdubWjEYVtqZK36icdam73fokXCi7shs3aw==",
"signatures": [
{
"sig": "MEQCIE9TeFdcHXmid+R9ZCjSIgmaEyVFDq6e5UR4Hh9WaL1pAiBmBTbGoR3aGtOmvc5X3DVuA5Ie6gzoUCXfBBhZYvNfXA==",
"sig": "MEUCIBv9ilhl0AmwXUdUmQMnkqGIwPLYXJIQp79WfZMXh3YPAiEArfhDyrpcwBabmRiiaw99a+ul4o1f60Efb+yEP914U9Q=",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 59209300
"unpackedSize": 59295321
},
"type": "module",
"engines": {
"node": ">=18.0.0"
},
"gitHead": "0784f4d43f5836cf83ff02e1bebd072411c35f10",
"gitHead": "ea985f318533962cb807f60a270edd8eb5f0d8fc",
"scripts": {
"prepare": "node -e \"if (!process.env.AUTHORIZED) { console.error('ERROR: Direct publishing is not allowed.\\nPlease see the release workflow documentation to publish this package.'); process.exit(1); }\""
},
Expand All @@ -103,6 +103,7 @@
"_nodeVersion": "20.20.1",
"dependencies": {},
"_hasShrinkwrap": false,
"readmeFilename": "README.md",
"optionalDependencies": {
"@img/sharp-linux-arm": "^0.34.2",
"@img/sharp-linux-x64": "^0.34.2",
Expand All @@ -115,7 +116,7 @@
"@img/sharp-linuxmusl-arm64": "^0.34.2"
},
"_npmOperationalInternal": {
"tmp": "tmp/claude-code_2.1.81_1774042038952_0.14085403366238758",
"tmp": "tmp/claude-code_2.1.83_1774390606496_0.04406419854915611",
"host": "s3://npm-registry-packages-npm-production"
}
}
2 changes: 1 addition & 1 deletion content/en/api/cli/beta.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/files.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/files/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/files/download.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/files/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/files/retrieve_metadata.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/files/upload.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/messages.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/messages/batches.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/messages/batches/cancel.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/messages/batches/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/messages/batches/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/messages/batches/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/messages/batches/results.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/messages/batches/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/messages/count_tokens.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/messages/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/models.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/models/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/models/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/skills.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/skills/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/skills/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/skills/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/skills/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/skills/versions.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/skills/versions/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/skills/versions/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/skills/versions/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/beta/skills/versions/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/completions.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/completions/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/messages.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/messages/batches.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/messages/batches/cancel.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/messages/batches/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/messages/batches/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/messages/batches/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/messages/batches/results.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/messages/batches/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/messages/count_tokens.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/messages/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/models.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/models/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/cli/models/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/files.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/files/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/files/download.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/files/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/files/retrieve_metadata.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/files/upload.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/messages.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/messages/batches.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/messages/batches/cancel.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/messages/batches/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/messages/batches/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/messages/batches/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/messages/batches/results.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/messages/batches/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/messages/count_tokens.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/messages/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/models.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/models/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/models/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/skills.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/skills/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/skills/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/skills/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/skills/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/skills/versions.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/skills/versions/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/skills/versions/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/skills/versions/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/beta/skills/versions/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/completions.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/completions/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/messages.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/messages/batches.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/messages/batches/cancel.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/messages/batches/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/messages/batches/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/messages/batches/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/messages/batches/results.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/messages/batches/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/messages/count_tokens.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/messages/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/models.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/models/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/php/models/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/files.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/files/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/files/download.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/files/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/files/retrieve_metadata.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/files/upload.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/messages.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/messages/batches.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/messages/batches/cancel.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/messages/batches/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/messages/batches/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/messages/batches/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/messages/batches/results.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/messages/batches/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/messages/count_tokens.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/messages/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/models.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/models/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/models/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/skills.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/skills/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/skills/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/skills/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/skills/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/skills/versions.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/skills/versions/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/skills/versions/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/skills/versions/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/beta/skills/versions/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/completions.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/completions/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/messages.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/messages/batches.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/messages/batches/cancel.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/messages/batches/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/messages/batches/delete.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/messages/batches/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/messages/batches/results.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/messages/batches/retrieve.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/messages/count_tokens.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/messages/create.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/models.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/models/list.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/terraform/models/retrieve.md

Large diffs are not rendered by default.

25 changes: 15 additions & 10 deletions content/en/docs/claude-code/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,21 +202,16 @@ You can place CLAUDE.md files in several locations:
### Configure permissions

<Tip>
Use `/permissions` to allowlist safe commands or `/sandbox` for OS-level isolation. This reduces interruptions while keeping you in control.
Use [auto mode](/en/permission-modes#eliminate-prompts-with-auto-mode) to let a classifier handle approvals, `/permissions` to allowlist specific commands, or `/sandbox` for OS-level isolation. Each reduces interruptions while keeping you in control.
</Tip>

By default, Claude Code requests permission for actions that might modify your system: file writes, Bash commands, MCP tools, etc. This is safe but tedious. After the tenth approval you're not really reviewing anymore, you're just clicking through. There are two ways to reduce these interruptions:
By default, Claude Code requests permission for actions that might modify your system: file writes, Bash commands, MCP tools, etc. This is safe but tedious. After the tenth approval you're not really reviewing anymore, you're just clicking through. There are three ways to reduce these interruptions:

* **Permission allowlists**: permit specific tools you know are safe (like `npm run lint` or `git commit`)
* **Auto mode**: a separate classifier model reviews commands and blocks only what looks risky: scope escalation, unknown infrastructure, or hostile-content-driven actions. Best when you trust the general direction of a task but don't want to click through every step
* **Permission allowlists**: permit specific tools you know are safe, like `npm run lint` or `git commit`
* **Sandboxing**: enable OS-level isolation that restricts filesystem and network access, allowing Claude to work more freely within defined boundaries

Alternatively, use `--dangerously-skip-permissions` to bypass permission prompts for contained workflows like fixing lint errors or generating boilerplate. See [permission modes](/en/permissions#permission-modes) for what is and isn't skipped.

<Warning>
Letting Claude run arbitrary commands can result in data loss, system corruption, or data exfiltration via prompt injection. Only use `--dangerously-skip-permissions` in a sandbox without internet access.
</Warning>

Read more about [configuring permissions](/en/permissions) and [enabling sandboxing](/en/sandboxing).
Read more about [permission modes](/en/permission-modes), [permission rules](/en/permissions), and [sandboxing](/en/sandboxing).

### Use CLI tools

Expand Down Expand Up @@ -540,6 +535,16 @@ claude -p "<your prompt>" --output-format json | your_command

Use `--verbose` for debugging during development, and turn it off in production.

### Run autonomously with auto mode

For uninterrupted execution with background safety checks, use [auto mode](/en/permission-modes#eliminate-prompts-with-auto-mode). A classifier model reviews commands before they run, blocking scope escalation, unknown infrastructure, and hostile-content-driven actions while letting routine work proceed without prompts.

```bash theme={null}
claude --permission-mode auto -p "fix all lint errors"
```

For non-interactive runs with the `-p` flag, auto mode aborts if the classifier repeatedly blocks actions, since there is no user to fall back to. See [when auto mode falls back](/en/permission-modes#when-auto-mode-falls-back) for thresholds.

***

## Avoid common failure patterns
Expand Down
Loading
Loading