modified Manage multiple agents with agent view View current →
--- a/agent-view.md +++ b/agent-view.md @@ -156,7 +156,7 @@ Attach to a session -Press `Enter` or `→` on a selected row to attach. Agent view is replaced by the full interactive session, exactly as if you had run `claude` in that directory. When you attach, Claude posts a short recap of what happened while you were away. While attached, the session behaves like any other Claude Code session: every [command](</docs/en/commands>), keyboard shortcut, and feature works. Press `←` on an empty prompt to detach and return to agent view. If a dialog has focus and isn’t responding to `←`, press `Ctrl+Z` to detach immediately. `Ctrl+C` keeps its standard interrupt behavior while attached: it cancels a running response or `!` shell command rather than detaching. Pressing `Ctrl+C` twice on an empty prompt detaches, the same as in any session. Detaching never stops a background session: `←`, `Ctrl+Z`, `/exit`, and double `Ctrl+C` or double `Ctrl+D` all leave it running. To end a session from inside it, run `/stop`. After you’ve dispatched or backgrounded a session, pressing `←` on an empty prompt works from any Claude Code session, not only ones you attached to from agent view. It backgrounds the current session and opens agent view with that row selected, so you can switch sessions without leaving the terminal. The row is created even from a fresh session with no conversation history, so `→` returns to it. When that row is the only one, agent view shows an onboarding hint below it. You can turn this shortcut off in `/config` (the `leftArrowOpensAgents` setting). +Press `Enter` or `→` on a selected row to attach. Agent view is replaced by the full interactive session, exactly as if you had run `claude` in that directory. When you attach, Claude posts a short recap of what happened while you were away. While attached, the session behaves like any other Claude Code session: every [command](</docs/en/commands>), keyboard shortcut, and feature works. Press `←` on an empty prompt to detach and return to agent view. If a dialog has focus and isn’t responding to `←`, press `Ctrl+Z` to detach immediately. `Ctrl+C` keeps its standard interrupt behavior while attached: it cancels a running response or `!` shell command rather than detaching. Pressing `Ctrl+C` twice on an empty prompt detaches, the same as in any session. Detaching never stops a background session: `←`, `Ctrl+Z`, `/exit`, and double `Ctrl+C` or double `Ctrl+D` all leave it running. To end a session from inside it, run `/stop`. Pressing `←` on an empty prompt works from any Claude Code session, not only ones you attached to from agent view. It backgrounds the current session and opens agent view with that row selected, so you can switch sessions without leaving the terminal. The row is created even from a fresh session with no conversation history, so `→` returns to it. When that row is the only one, agent view shows an onboarding hint below it. You can turn this shortcut off in `/config` (the `leftArrowOpensAgents` setting). ### @@ -236,6 +236,7 @@ `@<agent-name>`| Mention a custom subagent anywhere in the prompt to run it as the main agent `@<repo>`| Mention a repository under the directory you opened agent view from to run the session there `/<command>`| Suggest [skills](</docs/en/skills>) and [commands](</docs/en/commands>) to dispatch as the prompt +`! <command>`| Run a shell command as a background job instead of starting a Claude session. The job appears as a row you can attach to, watch, and detach from `#<number>` or a pull request URL| If a session is already working on that PR, select it instead of dispatching `Shift+Enter`| Dispatch and immediately attach to the new session @@ -297,6 +298,22 @@ claude attach 7c5dcf5d open in this terminal claude logs 7c5dcf5d show recent output claude stop 7c5dcf5d stop this session + +#### + +​ + +Run a shell command + +To run a shell command as a background job instead of a Claude session, type `!` as the first character of the agent view dispatch input. The `!` shows as a prefix and everything you type after it is the command. The following example dispatches `pytest -x` from the agent view input box: + + ! pytest -x + +Press `Enter` to start the job. The same job can also be launched directly from your shell with `--exec`: + + claude --bg --exec 'pytest -x' + +The command runs as a PTY-backed job and appears as a row in agent view, with the most recent line of output as its status. A shell job runs the command in place of Claude, so no model is invoked and the output is not sent to any session. To see the output, attach to the row, press `Space` to peek without attaching, or run `claude logs <id>` from your shell. The captured output stays in memory and is not written to disk. The row and its output clean up automatically about five minutes after the command exits, so read it before then if you need the result. ### @@ -405,7 +422,7 @@ The supervisor process -Background sessions are hosted by a per-user supervisor process, separate from your terminal and from agent view. The supervisor starts automatically the first time you background a session or open agent view, and you don’t manage it directly. The supervisor and its sessions authenticate with the same credentials as your interactive sessions and make no additional network connections beyond the model API. Each background session is its own Claude Code process, managed by the supervisor rather than tied to your terminal. A session that’s actively working, waiting for your input, or has a terminal attached keeps its process running. A running background shell command, subagent, workflow, or monitor counts as active work, so a long-running process such as a dev server keeps the session alive. Once a session finishes and sits unattached for about an hour, the supervisor stops its process to free resources. A session you have pinned with `Ctrl+T` is exempt and keeps its process running while idle. The transcript and state stay on disk either way, and the next time you attach, peek, or reply to a stopped session, the supervisor starts a fresh process from where it left off. When every session has finished and no terminal is connected, the supervisor itself exits and starts again the next time you need it. When the host runs low on memory, the supervisor stops idle non-pinned sessions first and stops idle pinned ones only if that freed nothing. The supervisor watches the installed Claude Code binary on disk and restarts into the new version after the regular [auto-updater](</docs/en/setup#auto-updates>) replaces it. This is a local file watch, not a network check. Background sessions are detached processes, so they keep running through the restart and the new supervisor reconnects to them. An idle pinned session is also restarted in place onto the new version so it picks up the update without you reattaching. +Background sessions are hosted by a per-user supervisor process, separate from your terminal and from agent view. The supervisor starts automatically the first time you background a session or open agent view, and you don’t manage it directly. The supervisor and its sessions authenticate with the same credentials as your interactive sessions and make no additional network connections beyond the model API. Each background session is its own Claude Code process, managed by the supervisor rather than tied to your terminal. A session that’s actively working, waiting for your input, or has a terminal attached keeps its process running. A running background shell command, subagent, dynamic workflow, or monitor counts as active work, so a long-running process such as a dev server keeps the session alive. Once a session finishes and sits unattached for about an hour, the supervisor stops its process to free resources. A session you have pinned with `Ctrl+T` is exempt and keeps its process running while idle. The transcript and state stay on disk either way, and the next time you attach, peek, or reply to a stopped session, the supervisor starts a fresh process from where it left off. When every session has finished and no terminal is connected, the supervisor itself exits and starts again the next time you need it. When the host runs low on memory, the supervisor stops idle non-pinned sessions first and stops idle pinned ones only if that freed nothing. The supervisor watches the installed Claude Code binary on disk and restarts into the new version after the regular [auto-updater](</docs/en/setup#auto-updates>) replaces it. This is a local file watch, not a network check. Background sessions are detached processes, so they keep running through the restart and the new supervisor reconnects to them. An idle pinned session is also restarted in place onto the new version so it picks up the update without you reattaching. ### @@ -459,7 +476,7 @@ Cannot open agents because background tasks are running -If pressing `←` to background the current session shows `Cannot open agents — N background task(s) running`, the session has in-flight work such as a subagent, a workflow, or a background shell command, and the shortcut won’t silently abandon it. Run `/tasks` to see what’s running, then `/bg` to confirm abandoning them. See From inside a session for what does and doesn’t transfer when you background. +If pressing `←` to background the current session shows `Cannot open agents — N background task(s) running`, the session has in-flight work such as a subagent, a dynamic workflow, or a background shell command, and the shortcut won’t silently abandon it. Run `/tasks` to see what’s running, then `/bg` to confirm abandoning them. See From inside a session for what does and doesn’t transfer when you background. ###
modified Run agents in parallel View current →
--- a/agents.md +++ b/agents.md @@ -4,17 +4,25 @@ > > Use this file to discover all available pages before exploring further. -[Subagents](</docs/en/sub-agents>), [agent view](</docs/en/agent-view>), [agent teams](</docs/en/agent-teams>), and [worktrees](</docs/en/worktrees>) each parallelize work in a different way. The right one depends on whether you want to stay in each conversation yourself, hand tasks off and check back later, or have Claude coordinate a group of workers for you. +[Subagents](</docs/en/sub-agents>), [agent view](</docs/en/agent-view>), [agent teams](</docs/en/agent-teams>), and [dynamic workflows](</docs/en/workflows>) each parallelize work in a different way. The right one depends on whether you want to stay in each conversation yourself, hand tasks off and check back later, or have Claude coordinate a group of workers for you. Approach| What it gives you| Use it when ---|---|--- [Subagents](</docs/en/sub-agents>)| Delegated workers inside one session that do a side task in their own context and return a summary| A side task would flood your main conversation with search results, logs, or file contents you won’t reference again [Agent view](</docs/en/agent-view>)| One screen to dispatch and monitor sessions running in the background, opened with `claude agents`. Research preview| You have several independent tasks and want to hand them off, check status at a glance, and step in only when one needs you [Agent teams](</docs/en/agent-teams>)| Multiple coordinated sessions with a shared task list and inter-agent messaging, managed by a lead. Experimental and disabled by default| You want Claude to split a project into pieces, assign them, and keep the workers in sync -[Worktrees](</docs/en/worktrees>)| Separate git checkouts so parallel sessions never touch each other’s files| You’re running several sessions yourself, or your subagents edit overlapping files -[`/batch`](</docs/en/commands>)| A planned split of one large change into 5 to 30 worktree-isolated subagents that each open a pull request| A repo-wide migration or mechanical refactor you can describe in one instruction +[Dynamic workflows](</docs/en/workflows>)| A script that runs many subagents and cross-checks their results, for work too big to coordinate one turn at a time or that needs more than a single pass. Research preview| A job outgrows a handful of subagents, or you want findings verified against each other: a codebase-wide audit, a 500-file migration, cross-checked research, or a plan drafted from several angles -In every approach the workers are Claude sessions. To involve a different tool, expose it to Claude as an [MCP server](</docs/en/mcp>). You can combine these approaches. Agent view automatically moves each dispatched session into its own worktree when it needs to edit files, and a session you’re working in can spawn subagents that each get their own worktree. +In every approach the workers are Claude sessions. To involve a different tool, expose it to Claude as an [MCP server](</docs/en/mcp>). Two more tools support this work without being a way to run agents themselves: + + * [Worktrees](</docs/en/worktrees>) give each session a separate git checkout, so parallel sessions never edit the same files. Use them for sessions you run yourself. Agent view moves each dispatched session into its own worktree automatically, and subagents you spawn can each get one too. + * [`/batch`](</docs/en/commands>) is a [skill](</docs/en/skills>) that has Claude split one large change into 5 to 30 worktree-isolated subagents that each open a pull request. It’s a packaged use of subagents and worktrees, not a separate coordination style. + +A few other features run Claude without you driving each step, but they solve a different problem than splitting work across agents: + + * A [background bash command](</docs/en/interactive-mode#background-bash-commands>) runs one shell command without blocking the conversation. It doesn’t spawn an agent. + * A [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) is a subagent that inherits your full conversation context instead of starting fresh. It’s a way to spawn a subagent, not a separate surface. + * A [routine](</docs/en/routines>) runs a session on a schedule in Anthropic’s cloud, not in parallel on your machine. Running several sessions or subagents at once multiplies token usage. See [Costs](</docs/en/costs>) for usage and rate-limit details. @@ -26,7 +34,11 @@ The right approach depends on who coordinates the work, whether the workers need to communicate, and whether they edit the same files: - * **Who coordinates the work?** If you want Claude to delegate and collect results inside one conversation, use [subagents](</docs/en/sub-agents>). If you’re handing off independent tasks and checking back on them, use [agent view](</docs/en/agent-view>). If you want Claude to plan, assign, and supervise a group of workers, use [agent teams](</docs/en/agent-teams>), which are experimental and disabled by default. + * **Who coordinates the work?** + * Claude delegates and collects results inside one conversation: [subagents](</docs/en/sub-agents>) + * You hand off independent tasks and check back later: [agent view](</docs/en/agent-view>) + * Claude plans, assigns, and supervises a group of workers: [agent teams](</docs/en/agent-teams>), experimental and disabled by default + * A script holds the plan instead of Claude’s turn-by-turn judgment: [dynamic workflows](</docs/en/workflows>). See [how workflows compare to subagents and skills](</docs/en/workflows#when-to-use-a-workflow>) * **Do the workers need to talk to each other?** Subagents report results back to the conversation that spawned them, and agent view sessions report only to you. Teammates in an agent team share a task list and message each other directly. * **Do the tasks touch the same files?** Isolate the work with [worktrees](</docs/en/worktrees>). Subagents and sessions you run yourself can each use a separate worktree. Agent teams don’t isolate teammates in worktrees, so [partition the work](</docs/en/agent-teams#avoid-file-conflicts>) so each teammate owns a different set of files. @@ -41,6 +53,7 @@ * For background sessions, `claude agents` opens [agent view](</docs/en/agent-view>): one screen showing every session, its state, and which ones need your input. * For subagents in the current session, `/agents` opens a panel with a **Running** tab listing live subagents and a **Library** tab where you [create and edit custom subagents](</docs/en/sub-agents#use-the-%2Fagents-command>). Despite the similar name, this is separate from `claude agents`. * For anything running in the background of the current session, `/tasks` lists each item and lets you check on, attach to, or stop it. + * For dynamic workflows, `/workflows` lists running and completed runs, the phase each is in, and how many agents have finished. For a desktop view of all your sessions, see [parallel sessions in the desktop app](</docs/en/desktop#work-in-parallel-with-sessions>). @@ -55,4 +68,5 @@ * [Create custom subagents](</docs/en/sub-agents>): define reusable specialists and control which tools they can use. * [Manage agents with agent view](</docs/en/agent-view>): dispatch sessions, watch their state, and attach when one needs you. * [Orchestrate agent teams](</docs/en/agent-teams>): set up a lead and teammates, assign tasks, and review their work. + * [Orchestrate dynamic workflows](</docs/en/workflows>): run a bundled workflow or have Claude write one that runs many subagents and verifies their findings against each other. * [Run parallel sessions with worktrees](</docs/en/worktrees>): start Claude in an isolated checkout, control what gets copied in, and clean up afterward.
modified Claude Code on Amazon Bedrock View current →
--- a/amazon-bedrock.md +++ b/amazon-bedrock.md @@ -168,9 +168,9 @@ Pin specific model versions when deploying to multiple users. Without pinning, model aliases such as `sonnet` and `opus` resolve to the latest version, which may not yet be available in your Bedrock account when Anthropic releases an update. Claude Code falls back to the previous version at startup when the latest is unavailable, but pinning lets you control when your users move to a new model. -Set these environment variables to specific Bedrock model IDs. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Bedrock resolves to Opus 4.6. Set it to the Opus 4.7 ID to use the latest model: - - export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-7' +Set these environment variables to specific Bedrock model IDs. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Bedrock resolves to Opus 4.6. Set it to the Opus 4.8 ID to use the latest model: + + export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-8' export ANTHROPIC_DEFAULT_SONNET_MODEL='us.anthropic.claude-sonnet-4-6' export ANTHROPIC_DEFAULT_HAIKU_MODEL='us.anthropic.claude-haiku-4-5-20251001-v1:0' @@ -280,7 +280,7 @@ 1M token context window -Claude Opus 4.7, Opus 4.6, and Sonnet 4.6 support the [1M token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) on Amazon Bedrock. Claude Code automatically enables the extended context window when you select a 1M model variant. The setup wizard offers a 1M context option when it pins models. To enable it for a manually pinned model instead, append `[1m]` to the model ID. See [Pin models for third-party deployments](</docs/en/model-config#pin-models-for-third-party-deployments>) for details. +Claude Opus 4.6 and later, and Sonnet 4.6, support the [1M token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) on Amazon Bedrock. Claude Code automatically enables the extended context window when you select a 1M model variant. The setup wizard offers a 1M context option when it pins models. To enable it for a manually pinned model instead, append `[1m]` to the model ID. See [Pin models for third-party deployments](</docs/en/model-config#pin-models-for-third-party-deployments>) for details. ##
modified Best practices for Claude Code View current →
--- a/best-practices.md +++ b/best-practices.md @@ -18,9 +18,9 @@ Give Claude a way to verify its work -Include tests, screenshots, or expected outputs so Claude can check itself. This is the single highest-leverage thing you can do. - -Claude performs dramatically better when it can verify its own work, like run tests, compare screenshots, and validate outputs. Without clear success criteria, it might produce something that looks right but actually doesn’t work. You become the only feedback loop, and every mistake requires your attention. +Give Claude a check it can run: tests, a build, a screenshot to compare. It’s the difference between a session you watch and one you walk away from. + +Claude stops when the work looks done. Without a check it can run, “looks done” is the only signal available, and you become the verification loop: every mistake waits for you to notice it. Give Claude something that produces a pass or fail, and the loop closes on its own. Claude does the work, runs the check, reads the result, and iterates until the check passes. The check is anything that returns a signal Claude can read in the conversation: a test suite, a build exit code, a linter, a script that diffs output against a fixture, or a [browser screenshot](</docs/en/chrome>) compared against a design. Strategy| Before| After ---|---|--- @@ -28,7 +28,14 @@ **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”_ -UI changes can be verified using the [Claude in Chrome extension](</docs/en/chrome>). It opens new tabs in your browser, tests the UI, and iterates until the code works. Your verification can also be a test suite, a linter, or a Bash command that checks output. Invest in making your verification rock-solid. Have Claude show evidence rather than asserting success: the test output, the command it ran and what it returned, or a screenshot of the result. Reviewing evidence is faster than re-running the verification yourself, and it works for sessions you weren’t watching. +Once the check exists, decide how hard it gates the stop: + + * **In one prompt** : ask Claude to run the check and iterate in the same message, as in the table above. + * **Across a session** : set the check as a [`/goal` condition](</docs/en/goal>). A separate evaluator re-checks it after every turn and Claude keeps working until it holds. + * **As a deterministic gate** : a [Stop hook](</docs/en/hooks#stop>) runs your check as a script and blocks the turn from ending until it passes. Claude Code overrides the hook and ends the turn after 8 consecutive blocks. + * **By a second opinion** : a [verification subagent](</docs/en/sub-agents>) or a [dynamic workflow](</docs/en/workflows>) that checks its own findings has a fresh model try to refute the result, so the agent doing the work isn’t the one grading it. + +Each step trades setup for attention. The prompt version works on any task today. The `/goal` and Stop hook versions are what let an unattended run finish correctly without you. Have Claude show evidence rather than asserting success: the test output, the command it ran and what it returned, or a screenshot of the result. Reviewing evidence is faster than re-running the verification yourself, and it works for sessions you weren’t watching. * * *
modified Changelog View current →
--- a/changelog.md +++ b/changelog.md @@ -5,6 +5,65 @@ > Use this file to discover all available pages before exploring further. This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Run `claude --version` to check your installed version. + +​ + +2.1.156 + +May 29, 2026 + + * Fixed an issue when using Opus 4.8 where thinking blocks were modified, leading to API errors. + +​ + +2.1.154 + +May 28, 2026 + + * Opus 4.8 is here! Now defaults to high effort · /effort xhigh for your hardest tasks + * Introducing dynamic workflows: ask Claude to create a workflow and it orchestrates work across tens to hundreds of agents in the background, so you can take on larger, more complex tasks. Run `/workflows` to view your runs + * Fast mode on Opus 4.8 is now available at a fraction of its previous cost: 2x the standard rate for 2.5x the speed + * The lean system prompt is now the default for all models except Haiku, Sonnet, and Opus 4.7 and earlier + * Claude now reserves the multiple-choice question prompt for decisions it genuinely cannot make itself, instead of asking when it already has enough context to proceed + * `/simplify` now runs a cleanup-only review (reuse, simplification, efficiency, altitude) and applies the fixes, instead of running the full `/code-review --fix` bug-hunting review + * Renamed the `/effort` slider labels from “Speed”/“Intelligence” to “Faster”/“Smarter” for clarity + * `claude agents`: type `! <command>` to run a shell command as a background session you can attach to and detach from. Also available as `claude --bg --exec '<command>'` + * `claude agents`: `/logout` now signs you out instead of being sent to a background session + * `←←` to open the agents view now works on Bedrock, Vertex, Foundry, and with telemetry disabled + * Claude in Chrome: pick which connected browser to use via `/chrome` → “Select browser…”, or in-chat when a browser action runs with multiple connected + * Plugins can now declare `defaultEnabled: false` in `plugin.json` or a marketplace entry; enable them with `/plugin` or `claude plugin enable`. Dependencies of enabled plugins are still enabled automatically + * The `/plugin` Discover tab now pins plugins whose relevance signals match the current directory with a “suggested for this directory” annotation + * Streaming tool execution is now always enabled, including when telemetry is disabled or on Bedrock/Vertex/Foundry (previously behind a feature flag) + * Stdio MCP server subprocesses now receive `CLAUDE_CODE_SESSION_ID` and `CLAUDECODE=1` in their environment + * `claude mcp list`/`get` now show unapproved `.mcp.json` servers as `⏸ Pending approval` instead of auto-approving and connecting when output is piped + * `/remote-control` autocomplete now shows “Disconnect Remote Control” when Remote Control is already active + * Added Claude Opus 4.8 support and 4.7 → 4.8 migration guidance to the `/claude-api` skill + * Deprecated `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE` (will be removed on 06/01). To use fast mode on Opus 4.6, switch with `/model claude-opus-4-6[1m]` and then `/fast on` + * Improved the auto-mode classifier’s detection of data exfiltration, particularly bulk transfers of repository contents + * Fixed `rm -rf $HOME` not being blocked as a dangerous path when `HOME` has a trailing slash + * Fixed `$TMPDIR` resolving to different directories in sandboxed vs unsandboxed Bash commands within the same session + * Fixed unreadable highlighted-row text in `claude agents` when the Claude Code theme doesn’t match the terminal background + * Fixed background-agent completion notifications triggering premature “out of context” behavior on some 1M-context models + * Fixed background-session classifier losing the user’s goal when a scheduled `/command` fires + * Fixed pinned background sessions respawning every minute after a Claude Code update, causing repeated agent-start notifications and process churn at idle + * Fixed background sessions stuck at “blocked”, “running”, or “working” not retiring after the idle grace period + * Fixed subagents in background sessions bypassing the worktree-isolation guard and writing to the shared checkout + * Fixed orphaned `claude --bg-pty-host` processes spinning at 100% CPU after the daemon exits on macOS + * Fixed number key shortcuts not working for options shown below the divider in option dialogs + * Fixed `worktree.baseRef: "head"` resolving to the main checkout’s HEAD instead of the current worktree’s HEAD when spawning subagents or calling `EnterWorktree` from inside a linked worktree + * Fixed a stray leading space on wrapped lines when the previous line ended exactly at the terminal width + * Fixed intermittent terminal rendering corruption in VS Code by capping the number of distinct colors the thinking spinner produces + * Fixed plan file names including `[Image #N]` / `[Pasted text #N]` placeholders when a plan-mode prompt starts with pasted images or text + * Fixed a phantom expand/click affordance on colored tool output: short ANSI-colored lines that fit on screen no longer show a “ctrl+o to expand” hint + * Fixed a single invalid `allowedMcpServers`/`deniedMcpServers` entry in managed settings discarding all managed-settings policy; the bad entry is now dropped with a `claude doctor` warning + * Fixed API 400 errors on models that don’t support the effort parameter when `CLAUDE_CODE_ALWAYS_ENABLE_EFFORT` is set + * Windows: Fixed update failures caused by `claude.exe` being in use showing a generic error instead of telling you to close other sessions and retry + * Removed the stale ”& for background” hint from the shortcuts help panel + * [VSCode] Auto mode no longer requires the bypass-permissions setting to appear in the mode picker, and a dismissable notice on the new-session screen explains auto mode the first time it’s active + * Fixed the task panel below the prompt showing a stray unselectable “main” row when only a workflow is running + * Fixed /mcp tools list and tool detail rendering when MCP servers have long or multi-line tool names or long descriptions + * Fixed the /model picker not showing fast mode pricing on the Default option for API (pay-as-you-go) users when fast mode is on + * Fixed auto mode incorrectly blocking actions with “could not evaluate this action” when the safety classifier ran out of output tokens while reasoning ​
modified Use Claude Code with Chrome (beta) View current →
--- a/chrome.md +++ b/chrome.md @@ -64,7 +64,7 @@ Go to code.claude.com/docs, click on the search box, type "hooks", and tell me what results appear -Run `/chrome` at any time to check the connection status, manage permissions, or reconnect the extension. For VS Code, see [browser automation in VS Code](</docs/en/vs-code#automate-browser-tasks-with-chrome>). +Run `/chrome` at any time to check the connection status, manage permissions, reconnect the extension, or choose which connected browser to use. If more than one browser is connected when a browser action starts, Claude prompts you to pick one. For VS Code, see [browser automation in VS Code](</docs/en/vs-code#automate-browser-tasks-with-chrome>). ###
modified Explore the .claude directory View current →
--- a/claude-directory.md +++ b/claude-directory.md @@ -47,6 +47,7 @@ Keep personal overrides out of git| `settings.local.json`| project only| [Settings scopes](</docs/en/settings#settings-files>) Add a prompt or capability you invoke with `/name`| `skills/<name>/SKILL.md`| project or global| [Skills](</docs/en/skills>) Define a specialized subagent with its own tools| `agents/*.md`| project or global| [Subagents](</docs/en/sub-agents>) +Orchestrate many subagents from a script| `workflows/*.js`| project or global| [Dynamic workflows](</docs/en/workflows>) Connect external tools over MCP| `.mcp.json`| project only| [MCP](</docs/en/mcp>) Change how Claude formats responses| `output-styles/*.md`| project or global| [Output styles](</docs/en/output-styles>) @@ -80,6 +81,7 @@ `commands/*.md`| Project and global| ✓| Single-file prompts; same mechanism as skills| [Skills](</docs/en/skills>) `output-styles/*.md`| Project and global| ✓| Custom system-prompt sections| [Output styles](</docs/en/output-styles>) `agents/*.md`| Project and global| ✓| Subagent definitions with their own prompt and tools| [Subagents](</docs/en/sub-agents>) +`workflows/*.js`| Project and global| ✓| Dynamic workflow scripts written by Claude and saved from `/workflows`; each file becomes a `/<name>` command| [Dynamic workflows](</docs/en/workflows>) `agent-memory/<name>/`| Project and global| ✓| Persistent memory for subagents| [Persistent memory](</docs/en/sub-agents#enable-persistent-memory>) `~/.claude.json`| Global only| | App state, OAuth, UI toggles, personal MCP servers| [Global config](</docs/en/settings#global-config-settings>) `projects/<project>/memory/`| Global only| | Auto memory: Claude’s notes to itself across sessions| [Auto memory](</docs/en/memory#auto-memory>)
modified CLI reference View current →
--- a/cli-reference.md +++ b/cli-reference.md @@ -62,7 +62,7 @@ `--append-system-prompt-file`| Load additional system prompt text from a file and append to the default prompt| `claude --append-system-prompt-file ./extra-rules.txt` `--bare`| Minimal mode: skip auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Claude has access to Bash, file read, and file edit tools. Sets [`CLAUDE_CODE_SIMPLE`](</docs/en/env-vars>). See [bare mode](</docs/en/headless#start-faster-with-bare-mode>)| `claude --bare -p "query"` `--betas`| Beta headers to include in API requests (API key users only)| `claude --betas interleaved-thinking` -`--bg`| Start the session as a [background agent](</docs/en/agent-view>) and return immediately. Prints the session ID and management commands. Combine with `--agent` to run a specific subagent| `claude --bg "investigate the flaky test"` +`--bg`| Start the session as a [background agent](</docs/en/agent-view>) and return immediately. Prints the session ID and management commands. Combine with `--exec` to run a shell command as a background job instead of a Claude session, or with `--agent` to run a specific subagent| `claude --bg "investigate the flaky test"` `--channels`| (Research preview) MCP servers whose [channel](</docs/en/channels>) notifications Claude should listen for in this session. Space-separated list of `plugin:<name>@<marketplace>` entries. Requires Claude.ai authentication| `claude --channels plugin:my-notifier@my-marketplace` `--chrome`| Enable [Chrome browser integration](</docs/en/chrome>) for web automation and testing| `claude --chrome` `--continue`, `-c`| Load the most recent conversation in the current directory. Includes sessions that added this directory with `/add-dir`| `claude --continue` @@ -75,6 +75,7 @@ `--effort`| Set the [effort level](</docs/en/model-config#adjust-effort-level>) for the current session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model. Overrides the [`effortLevel`](</docs/en/settings#available-settings>) setting for this session and does not persist| `claude --effort high` `--enable-auto-mode`| Removed in v2.1.111. Auto mode is now in the `Shift+Tab` cycle by default; use `--permission-mode auto` to start in it| `claude --permission-mode auto` `--exclude-dynamic-system-prompt-sections`| Move per-machine sections from the system prompt (working directory, environment info, memory paths, git-repo flag) into the first user message. Improves prompt-cache reuse across different users and machines running the same task. Only applies with the default system prompt; ignored when `--system-prompt` or `--system-prompt-file` is set. Use with `-p` for scripted, multi-user workloads| `claude -p --exclude-dynamic-system-prompt-sections "query"` +`--exec`| Run a shell command as a PTY-backed background job instead of starting a Claude session. Use with `--bg` to launch from the shell| `claude --bg --exec 'pytest -x'` `--fallback-model`| Enable automatic fallback to a specified model when the default model is overloaded or not available, for example a retired model. Takes effect in print mode (`-p`) and in [background sessions](</docs/en/agent-view>), which run non-interactively; ignored in an interactive session| `claude -p --fallback-model sonnet "query"` `--fork-session`| When resuming, create a new session ID instead of reusing the original (use with `--resume` or `--continue`)| `claude --resume abc123 --fork-session` `--from-pr`| Resume sessions linked to a specific pull request. Accepts a PR number, a GitHub or GitHub Enterprise PR URL, a GitLab merge request URL, or a Bitbucket pull request URL. Sessions are linked automatically when Claude creates the pull request| `claude --from-pr 123` @@ -101,6 +102,7 @@ `--plugin-dir`| Load a plugin from a directory or `.zip` archive for this session only. Each flag takes one path. Repeat the flag for multiple plugins: `--plugin-dir A --plugin-dir B.zip`| `claude --plugin-dir ./my-plugin` `--plugin-url`| Fetch a plugin `.zip` archive from a URL for this session only. Repeat the flag for multiple plugins, or pass space-separated URLs in a single quoted value| `claude --plugin-url https://example.com/plugin.zip` `--print`, `-p`| Print response without interactive mode (see [Agent SDK documentation](</docs/en/agent-sdk/overview>) for programmatic usage details)| `claude -p "query"` +`--prompt-suggestions`| Emit a `prompt_suggestion` message after each turn with a predicted next user prompt. Requires `--print`, `--output-format stream-json`, and `--verbose`. See [Prompt suggestions](</docs/en/interactive-mode#prompt-suggestions>)| `claude -p --prompt-suggestions --output-format stream-json --verbose "query"` `--remote`| Create a new [web session](</docs/en/claude-code-on-the-web>) on claude.ai with the provided task description| `claude --remote "Fix the login bug"` `--remote-control`, `--rc`| Start an interactive session with [Remote Control](</docs/en/remote-control#start-a-remote-control-session>) enabled so you can also control it from claude.ai or the Claude app. Optionally pass a name for the session| `claude --remote-control "My Project"` `--remote-control-session-name-prefix <prefix>`| Prefix for auto-generated [Remote Control](</docs/en/remote-control>) session names when no explicit name is set. Defaults to your machine’s hostname, producing names like `myhost-graceful-unicorn`. Set `CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX` for the same effect| `claude remote-control --remote-control-session-name-prefix dev-box`
modified Code Review View current →
--- a/code-review.md +++ b/code-review.md @@ -305,7 +305,7 @@ Review a diff locally -The [`/code-review` command](</docs/en/commands>) reviews a diff in your terminal without installing the GitHub App. Run it in any Claude Code session: it reports correctness bugs and reuse, simplification, and efficiency cleanups in the current diff. Pass `--comment` to post findings as inline PR comments, or `--fix` to apply the findings to your working tree after the review. Lower [effort levels](</docs/en/model-config#adjust-effort-level>) return fewer, higher-confidence findings, while `high` through `max` give broader coverage and may include uncertain findings. Without an effort argument, the review uses the session’s current effort. Pass a path or PR reference to review a specific target instead of the current diff. `/code-review ultra --fix` runs the deeper [ultrareview](</docs/en/ultrareview>) in the cloud, then applies its findings to your working tree when they arrive back in your session. The command was named `/simplify` before v2.1.147, when it applied fixes by default. `/simplify` still works and is equivalent to `/code-review --fix`. +The [`/code-review` command](</docs/en/commands>) reviews a diff in your terminal without installing the GitHub App. Run it in any Claude Code session: it reports correctness bugs and reuse, simplification, and efficiency cleanups in the current diff. Pass `--comment` to post findings as inline PR comments, or `--fix` to apply the findings to your working tree after the review. Lower [effort levels](</docs/en/model-config#adjust-effort-level>) return fewer, higher-confidence findings, while `high` through `max` give broader coverage and may include uncertain findings. Without an effort argument, the review uses the session’s current effort. Pass a path or PR reference to review a specific target instead of the current diff. `/code-review ultra --fix` runs the deeper [ultrareview](</docs/en/ultrareview>) in the cloud, then applies its findings to your working tree when they arrive back in your session. The command was named `/simplify` before v2.1.147, when it applied fixes by default. From v2.1.154, `/simplify` runs a separate cleanup-only review that applies fixes without hunting for bugs. If you scripted `/simplify` for bug-finding, switch to `/code-review --fix`, which is unchanged. ##
modified Commands View current →
--- a/commands.md +++ b/commands.md @@ -20,7 +20,12 @@ All commands -The table below lists all the commands included in Claude Code. Entries marked **[Skill](</docs/en/skills#bundled-skills>)** are bundled skills. They use the same mechanism as skills you write yourself: a prompt handed to Claude, which Claude can also invoke automatically when relevant. Everything else is a built-in command whose behavior is coded into the CLI. To add your own commands, see [skills](</docs/en/skills>). In the table below, `<arg>` indicates a required argument and `[arg]` indicates an optional one. +The table below lists all the commands included in Claude Code. Most are built-in commands whose behavior is coded into the CLI. Two kinds of entries are marked: + + * **[Skill](</docs/en/skills#bundled-skills>)** : a bundled skill. It works like skills you write yourself: a prompt handed to Claude, which Claude can also invoke automatically when relevant. + * **[Workflow](</docs/en/workflows#bundled-workflows>)** : a bundled [dynamic workflow](</docs/en/workflows>) that fans work out across many subagents and runs in the background. + +To add your own commands, see [skills](</docs/en/skills>). In the table below, `<arg>` indicates a required argument and `[arg]` indicates an optional one. Not every command appears for every user. Availability depends on your platform, plan, and environment. For example, `/desktop` only shows on macOS and Windows when signed in with a Claude subscription, and `/upgrade` only shows on Pro and Max plans. @@ -36,7 +41,7 @@ `/chrome`| Configure [Claude in Chrome](</docs/en/chrome>) settings `/claude-api [migrate|managed-agents-onboard]`| **[Skill](</docs/en/skills#bundled-skills>).** Load Claude API reference material for your project’s language (Python, TypeScript, Java, Go, Ruby, C#, PHP, or cURL) and Managed Agents reference. Covers tool use, streaming, batches, structured outputs, and common pitfalls. Also activates automatically when your code imports `anthropic` or `@anthropic-ai/sdk`. Run `/claude-api migrate` to upgrade existing Claude API code to a newer model: Claude asks which files to scan and which model to target, then updates model IDs, thinking configuration, and other parameters that changed between versions. Run `/claude-api managed-agents-onboard` for an interactive walkthrough that creates a new Managed Agent from scratch `/clear [name]`| Start a new conversation with empty context. The previous conversation stays available in `/resume`. Pass a name to label the previous conversation in the `/resume` picker. To free up context while continuing the same conversation, use `/compact` instead. Aliases: `/reset`, `/new` -`/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [target]`| **[Skill](</docs/en/skills#bundled-skills>).** Review the current diff for correctness bugs and for reuse, simplification, and efficiency cleanups. Pass `--fix` to apply findings to your working tree, `--comment` to post them as inline GitHub PR comments, or `ultra` to run a deep [cloud review](</docs/en/ultrareview>). `/simplify` is equivalent to `/code-review --fix`. See [Review a diff locally](</docs/en/code-review#review-a-diff-locally>) for effort levels and targeting +`/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [target]`| **[Skill](</docs/en/skills#bundled-skills>).** Review the current diff for correctness bugs and for reuse, simplification, and efficiency cleanups. Pass `--fix` to apply findings to your working tree, `--comment` to post them as inline GitHub PR comments, or `ultra` to run a deep [cloud review](</docs/en/ultrareview>). From v2.1.154, `/simplify` runs a separate cleanup-only review that applies fixes without hunting for bugs. See [Review a diff locally](</docs/en/code-review#review-a-diff-locally>) for effort levels and targeting `/color [color|default]`| Set the prompt bar color for the current session. Available colors: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, `cyan`. Use `default` to reset, or run with no argument to pick a random color. When [Remote Control](</docs/en/remote-control>) is connected, the color syncs to claude.ai/code `/compact [instructions]`| Free up context by summarizing the conversation so far. Optionally pass focus instructions for the summary. See [how compaction handles rules, skills, and memory files](</docs/en/context-window#what-survives-compaction>) `/config`| Open the [Settings](</docs/en/settings>) interface to adjust theme, model, [output style](</docs/en/output-styles>), and other preferences. Alias: `/settings` @@ -44,10 +49,11 @@ `/copy [N]`| Copy the last assistant response to clipboard. Pass a number `N` to copy the Nth-latest response: `/copy 2` copies the second-to-last. When code blocks are present, shows an interactive picker to select individual blocks or the full response. Press `w` in the picker to write the selection to a file instead of the clipboard, which is useful over SSH `/cost`| Alias for `/usage` `/debug [description]`| **[Skill](</docs/en/skills#bundled-skills>).** Enable debug logging for the current session and troubleshoot issues by reading the session debug log. Debug logging is off by default unless you started with `claude --debug`, so running `/debug` mid-session starts capturing logs from that point forward. Optionally describe the issue to focus the analysis +`/deep-research <question>`| **[Workflow](</docs/en/workflows#bundled-workflows>).** Fan out web searches on a question, fetch and cross-check sources, and synthesize a cited report `/desktop`| Continue the current session in the Claude Code Desktop app. Requires macOS or Windows and a Claude subscription. Alias: `/app` `/diff`| Open an interactive diff viewer showing uncommitted changes and per-turn diffs. Use left/right arrows to switch between the current git diff and individual Claude turns, and up/down to browse files `/doctor`| Diagnose and verify your Claude Code installation and settings. Results show with status icons. Press `f` to have Claude fix any reported issues -`/effort [level|auto]`| Set the model [effort level](</docs/en/model-config#adjust-effort-level>). Accepts `low`, `medium`, `high`, `xhigh`, or `max`; available levels depend on the model and `max` is session-only. `auto` resets to the model default. Without an argument, opens an interactive slider; use left and right arrows to pick a level and `Enter` to apply. Takes effect immediately without waiting for the current response to finish +`/effort [level|auto]`| Set the model [effort level](</docs/en/model-config#adjust-effort-level>). Accepts `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode`; available levels depend on the model, and `max` and `ultracode` are session-only. `ultracode` is a Claude Code setting that combines `xhigh` reasoning with automatic [workflow](</docs/en/workflows#let-claude-decide-with-ultracode>) orchestration. `auto` resets to the model default. Without an argument, opens an interactive slider; use left and right arrows to pick a level and `Enter` to apply. Takes effect immediately without waiting for the current response to finish `/exit`| Exit the CLI. In an attached [background session](</docs/en/agent-view#attach-to-a-session>), this detaches and the session keeps running. Alias: `/quit` `/export [filename]`| Export the current conversation as plain text. With a filename, writes directly to that file. Without, opens a dialog to copy to clipboard or save to a file `/fast [on|off]`| Toggle [fast mode](</docs/en/fast-mode>) on or off @@ -97,6 +103,7 @@ `/security-review`| Analyze pending changes on the current branch for security vulnerabilities. Reviews the git diff and identifies risks like injection, auth issues, and data exposure `/setup-bedrock`| Configure [Amazon Bedrock](</docs/en/amazon-bedrock>) authentication, region, and model pins through an interactive wizard. Only visible when `CLAUDE_CODE_USE_BEDROCK=1` is set. First-time Bedrock users can also access this wizard from the login screen `/setup-vertex`| Configure [Google Vertex AI](</docs/en/google-vertex-ai>) authentication, project, region, and model pins through an interactive wizard. Only visible when `CLAUDE_CODE_USE_VERTEX=1` is set. First-time Vertex AI users can also access this wizard from the login screen +`/simplify [target]`| **[Skill](</docs/en/skills#bundled-skills>).** Review the changed code for cleanup opportunities and apply the fixes. Four review [agents](</docs/en/sub-agents>) run in parallel, covering reuse of existing helpers, simplification, efficiency, and whether the change sits at the right level of abstraction. From v2.1.154, the review does not look for correctness bugs. Use `/code-review` to find bugs. On earlier versions `/simplify` is equivalent to `/code-review --fix`. Pass a path or PR reference to review a specific target `/skills`| List available [skills](</docs/en/skills>). Press `t` to sort by token count. Press `Space` to [hide a skill from Claude or the `/` menu](</docs/en/skills#override-skill-visibility-from-settings>), then `Enter` to save `/stats`| Alias for `/usage`. Opens on the Stats tab `/status`| Open the Settings interface (Status tab) showing version, model, account, and connectivity. Works while Claude is responding, without waiting for the current response to finish @@ -118,6 +125,7 @@ `/vim`| Removed in v2.1.92. To toggle between Vim and Normal editing modes, use `/config` → Editor mode `/voice [hold|tap|off]`| Toggle [voice dictation](</docs/en/voice-dictation>), or enable it in a specific mode. Requires a Claude.ai account `/web-setup`| Connect your GitHub account to [Claude Code on the web](</docs/en/web-quickstart#connect-from-your-terminal>) using your local `gh` CLI credentials. `/schedule` prompts for this automatically if GitHub isn’t connected +`/workflows`| Open the [workflow](</docs/en/workflows#watch-the-run>) progress view to watch, pause, resume, or save running and completed workflows ##
modified Desktop application View current →
--- a/desktop.md +++ b/desktop.md @@ -84,7 +84,7 @@ **Auto**| `auto`| Claude executes all actions with background safety checks that verify alignment with your request. Reduces permission prompts while maintaining oversight. Enable in your Settings → Claude Code. See availability requirements below. **Bypass permissions**| `bypassPermissions`| Claude runs without any permission prompts, equivalent to `--dangerously-skip-permissions` in the CLI. Enable in your Settings → Claude Code under “Allow bypass permissions mode”. Only use this in sandboxed containers or VMs. Enterprise admins can disable this option. -The `dontAsk` permission mode is available only in the [CLI](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>). Auto mode is a research preview available to all users on the Anthropic API. It is not available on third-party providers. It requires Claude Sonnet 4.6, Opus 4.6, or Opus 4.7. +The `dontAsk` permission mode is available only in the [CLI](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>). Auto mode is a research preview available to all users on the Anthropic API. It is not available on third-party providers. It requires Claude Opus 4.6 or later, or Sonnet 4.6. Start complex tasks in Plan mode so Claude maps out an approach before making changes. Once you approve the plan, switch to Auto accept edits or Ask permissions to execute it. See [explore first, then plan, then code](</docs/en/best-practices#explore-first-then-plan-then-code>) for more on this workflow. @@ -348,7 +348,7 @@ Watch background tasks -The tasks pane shows the background work running inside the current session: subagents, background shell commands, and workflows. Open it from the **Views** menu or drag it into your layout. Click any entry to see its output in the subagent pane or stop it. To see what other sessions are doing, use the sidebar. +The tasks pane shows the background work running inside the current session: subagents, background shell commands, and dynamic workflows. Open it from the **Views** menu or drag it into your layout. Click any entry to see its output in the subagent pane or stop it. To see what other sessions are doing, use the sidebar. ### @@ -570,7 +570,7 @@ Local sessions -The desktop app does not always inherit your full shell environment. On macOS, when you launch the app from the Dock or Finder, it reads your shell profile, such as `~/.zshrc` or `~/.bashrc`, to extract `PATH` and a fixed set of Claude Code variables, but other variables you export there are not picked up. On Windows, the app inherits user and system environment variables but does not read PowerShell profiles. To set environment variables for local sessions and dev servers on any platform, open the environment dropdown in the prompt box, hover over **Local** , and click the gear icon to open the local environment editor. Variables you save here are stored encrypted on your machine and apply to every local session and preview server you start. You can also add variables to the `env` key in your `~/.claude/settings.json` file, though these reach Claude sessions only and not dev servers. See [environment variables](</docs/en/env-vars>) for the full list of supported variables. [Extended thinking](</docs/en/model-config#extended-thinking>) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. To disable thinking entirely, set `MAX_THINKING_TOKENS` to `0` in the local environment editor. On models with [adaptive reasoning](</docs/en/model-config#adjust-effort-level>), any other `MAX_THINKING_TOKENS` value is ignored because adaptive reasoning controls thinking depth instead. On Opus 4.6 and Sonnet 4.6, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` to `1` to use a fixed thinking budget; Opus 4.7 always uses adaptive reasoning and has no fixed-budget mode. +The desktop app does not always inherit your full shell environment. On macOS, when you launch the app from the Dock or Finder, it reads your shell profile, such as `~/.zshrc` or `~/.bashrc`, to extract `PATH` and a fixed set of Claude Code variables, but other variables you export there are not picked up. On Windows, the app inherits user and system environment variables but does not read PowerShell profiles. To set environment variables for local sessions and dev servers on any platform, open the environment dropdown in the prompt box, hover over **Local** , and click the gear icon to open the local environment editor. Variables you save here are stored encrypted on your machine and apply to every local session and preview server you start. You can also add variables to the `env` key in your `~/.claude/settings.json` file, though these reach Claude sessions only and not dev servers. See [environment variables](</docs/en/env-vars>) for the full list of supported variables. [Extended thinking](</docs/en/model-config#extended-thinking>) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. To disable thinking entirely, set `MAX_THINKING_TOKENS` to `0` in the local environment editor. On models with [adaptive reasoning](</docs/en/model-config#adjust-effort-level>), any other `MAX_THINKING_TOKENS` value is ignored because adaptive reasoning controls thinking depth instead. On Opus 4.6 and Sonnet 4.6, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` to `1` to use a fixed thinking budget; Opus 4.7 and later always use adaptive reasoning and have no fixed-budget mode. ###
modified Discover and install prebuilt plugins through marketplaces View current →
--- a/discover-plugins.md +++ b/discover-plugins.md @@ -175,7 +175,7 @@ * **Marketplaces** : add, remove, or update your added marketplaces * **Errors** : view any plugin loading errors -Go to the **Discover** tab to see plugins from the marketplace you just added. +Go to the **Discover** tab to see plugins from the marketplace you just added. Plugins marked as relevant to your current working directory are pinned at the top with a **suggested for this directory** label. 3
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -133,7 +133,7 @@ `BASH_MAX_OUTPUT_LENGTH`| Maximum number of characters in bash outputs before the full output is saved to a file and Claude receives the path plus a short preview. See [Bash tool behavior](</docs/en/tools-reference#bash-tool-behavior>) `BASH_MAX_TIMEOUT_MS`| Maximum timeout the model can set for long-running bash commands (default: 600000, or 10 minutes) `CCR_FORCE_BUNDLE`| Set to `1` to force [`claude --remote`](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) to bundle and upload your local repository even when GitHub access is available -`CLAUDECODE`| Set to `1` in subprocesses Claude Code spawns (Bash and PowerShell tools, tmux sessions, [hook](</docs/en/hooks>) commands, [status line](</docs/en/statusline>) commands). Use to detect when a script is running inside a subprocess spawned by Claude Code +`CLAUDECODE`| Set to `1` in subprocesses Claude Code spawns (Bash and PowerShell tools, tmux sessions, [hook](</docs/en/hooks>) commands, [status line](</docs/en/statusline>) commands, stdio [MCP server](</docs/en/mcp>) subprocesses). Use to detect when a script is running inside a subprocess spawned by Claude Code `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS`| Set to `1` to disable all built-in [subagent](</docs/en/sub-agents>) types such as Explore and Plan. Only applies in non-interactive mode (the `-p` flag). Useful for SDK users who want a blank slate `CLAUDE_AGENT_SDK_MCP_NO_PREFIX`| Set to `1` to skip the `mcp__<server>__` prefix on tool names from SDK-created MCP servers. Tools use their original names. SDK usage only `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`| Stall timeout in milliseconds for background subagents. Default `600000` (10 minutes). The timer resets on each streaming progress event; if no progress arrives within the window, the subagent is aborted and the task is marked failed, surfacing any partial result to the parent @@ -154,7 +154,7 @@ `CLAUDE_CODE_DEBUG_LOGS_DIR`| Override the debug log file path. Despite the name, this is a file path, not a directory. Requires debug mode to be enabled separately via `--debug`, `/debug`, or the `DEBUG` environment variable: setting this variable alone does not enable logging. The [`--debug-file`](</docs/en/cli-reference#cli-flags>) flag does both at once. Defaults to `~/.claude/debug/<session-id>.txt` `CLAUDE_CODE_DEBUG_LOG_LEVEL`| Minimum log level written to the debug log file. Values: `verbose`, `debug` (default), `info`, `warn`, `error`. Set to `verbose` to include high-volume diagnostics like full status line command output, or raise to `error` to reduce noise `CLAUDE_CODE_DISABLE_1M_CONTEXT`| Set to `1` to disable [1M context window](</docs/en/model-config#extended-context>) support. When set, 1M model variants are unavailable in the model picker. Useful for enterprise environments with compliance requirements -`CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING`| Set to `1` to disable [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) on Opus 4.6 and Sonnet 4.6 and fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`. Has no effect on Opus 4.7, which always uses adaptive reasoning +`CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING`| Set to `1` to disable [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) on Opus 4.6 and Sonnet 4.6 and fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`. Has no effect on Opus 4.7 and later, which always use adaptive reasoning `CLAUDE_CODE_DISABLE_AGENT_VIEW`| Set to `1` to turn off [background agents and agent view](</docs/en/agent-view>): `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Equivalent to the [`disableAgentView`](</docs/en/settings#available-settings>) setting `CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN`| Set to `1` to disable [fullscreen rendering](</docs/en/fullscreen>) and use the classic main-screen renderer. The conversation stays in your terminal’s native scrollback so `Cmd+f` and tmux copy mode work as usual. Takes precedence over `CLAUDE_CODE_NO_FLICKER` and the [`tui`](</docs/en/settings#available-settings>) setting. You can also switch with `/tui default` `CLAUDE_CODE_DISABLE_ATTACHMENTS`| Set to `1` to disable attachment processing. File mentions with `@` syntax are sent as plain text instead of being expanded into file content @@ -176,13 +176,14 @@ `CLAUDE_CODE_DISABLE_TERMINAL_TITLE`| Set to `1` to disable automatic terminal title updates based on conversation context `CLAUDE_CODE_DISABLE_THINKING`| Set to `1` to force-disable [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) regardless of model support or other settings. More direct than `MAX_THINKING_TOKENS=0` `CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL`| Set to `1` to disable virtual scrolling in [fullscreen rendering](</docs/en/fullscreen>) and render every message in the transcript. Use this if scrolling in fullscreen mode shows blank regions where messages should appear +`CLAUDE_CODE_DISABLE_WORKFLOWS`| Set to `1` to disable [workflows](</docs/en/workflows#turn-workflows-off>). Equivalent to the [`disableWorkflows`](</docs/en/settings#available-settings>) setting `CLAUDE_CODE_EFFORT_LEVEL`| Set the effort level for supported models. Values: `low`, `medium`, `high`, `xhigh`, `max`, or `auto` to use the model default. Available levels depend on the model. Takes precedence over `/effort` and the `effortLevel` setting. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>) `CLAUDE_CODE_ENABLE_AWAY_SUMMARY`| Override [session recap](</docs/en/interactive-mode#session-recap>) availability. Set to `0` to force recaps off regardless of the `/config` toggle. Set to `1` to force recaps on when [`awaySummaryEnabled`](</docs/en/settings#available-settings>) is `false`. Takes precedence over the setting and `/config` toggle `CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH`| Set to `1` to refresh plugin state at turn boundaries in [non-interactive mode](</docs/en/headless>) after a background install completes. Off by default because the refresh changes the system prompt mid-session, which invalidates [prompt caching](</docs/en/prompt-caching>) for that turn `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL`| Set to `1` to route the “How is Claude doing?” session quality survey to your own [OpenTelemetry collector](</docs/en/monitoring-usage>) when Anthropic-bound nonessential traffic is blocked. Survey ratings are emitted only as OTEL events to your configured collector. No survey data is sent to Anthropic in this mode. Applies when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_TELEMETRY`, or `DO_NOT_TRACK` is set, and has no effect otherwise. `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY` and the organization product feedback policy take precedence `CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING`| Controls whether tool call inputs stream from the API as Claude generates them. With this off, a large tool input such as a long file write arrives only after Claude finishes generating it, which can look like it’s hanging. Enabled by default on the Anthropic API. On Bedrock and Vertex, enabled per model where the deployed container supports it. Set to `0` to opt out. Set to `1` to force on when routing through a proxy via `ANTHROPIC_BASE_URL`, `ANTHROPIC_VERTEX_BASE_URL`, or `ANTHROPIC_BEDROCK_BASE_URL`. Off by default on Foundry and [gateway](</docs/en/llm-gateway>) connections `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY`| Set to `1` to populate the `/model` picker from your gateway’s `/v1/models` endpoint when `ANTHROPIC_BASE_URL` points at an Anthropic-compatible gateway such as LiteLLM, Kong, or an internal proxy. Off by default because gateways backed by a shared API key would otherwise show every user every model the key can access. Discovered models are still filtered by the [`availableModels`](</docs/en/settings#available-settings>) allowlist -`CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE`| Removed in v2.1.142. [Fast mode](</docs/en/fast-mode>) defaults to Opus 4.7. Set `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1` to keep Opus 4.6 instead +`CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE`| Removed in v2.1.142, when the [fast mode](</docs/en/fast-mode>) default moved from Opus 4.6 to Opus 4.7. Set `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1` to keep Opus 4.6 instead `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`| Set to `false` to disable prompt suggestions (the “Prompt suggestions” toggle in `/config`). These are the grayed-out predictions that appear in your prompt input after Claude responds. See [Prompt suggestions](</docs/en/interactive-mode#prompt-suggestions>) `CLAUDE_CODE_ENABLE_TASKS`| Controls whether sessions use the structured Task tools (`TaskCreate`, `TaskUpdate`, `TaskGet`, `TaskList`) or the legacy `TodoWrite` tool. As of Claude Code v2.1.142, Task tools are the default in all modes. Set to `0` to revert to `TodoWrite`. See [Task list](</docs/en/interactive-mode#task-list>) and [Migrate to Task tools](</docs/en/agent-sdk/todo-tracking#migrate-to-task-tools>) `CLAUDE_CODE_ENABLE_TELEMETRY`| Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. See [Monitoring](</docs/en/monitoring-usage>) @@ -212,7 +213,7 @@ `CLAUDE_CODE_OAUTH_REFRESH_TOKEN`| OAuth refresh token for Claude.ai authentication. When set, `claude auth login` exchanges this token directly instead of opening a browser. Requires `CLAUDE_CODE_OAUTH_SCOPES`. Useful for provisioning authentication in automated environments `CLAUDE_CODE_OAUTH_SCOPES`| Space-separated OAuth scopes the refresh token was issued with, such as `"user:profile user:inference user:sessions:claude_code"`. Required when `CLAUDE_CODE_OAUTH_REFRESH_TOKEN` is set `CLAUDE_CODE_OAUTH_TOKEN`| OAuth access token for Claude.ai authentication. Alternative to `/login` for SDK and automated environments. Takes precedence over keychain-stored credentials. Generate one with [`claude setup-token`](</docs/en/authentication#generate-a-long-lived-token>) -`CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE`| Set to `1` to pin [fast mode](</docs/en/fast-mode>) to Claude Opus 4.6 instead of the default Opus 4.7. With the variable set, `/fast` runs on Opus 4.6. Without it, `/fast` runs on Opus 4.7 +`CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE`| Set to `1` to pin fast mode to Claude Opus 4.6 instead of the [current fast mode default](</docs/en/fast-mode#toggle-fast-mode>), which depends on your Claude Code version. With the variable set, `/fast` runs on Opus 4.6. Fast mode for Opus 4.6 is deprecated, and this variable will be removed when it is retired `CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS`| Timeout in milliseconds for flushing pending OpenTelemetry spans (default: 5000). See [Monitoring](</docs/en/monitoring-usage>) `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS`| Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes). See [Dynamic headers](</docs/en/monitoring-usage#dynamic-headers>) `CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS`| Timeout in milliseconds for the OpenTelemetry exporter to finish on shutdown (default: 2000). Increase if metrics are dropped at exit. See [Monitoring](</docs/en/monitoring-usage>) @@ -234,7 +235,7 @@ `CLAUDE_CODE_SCRIPT_CAPS`| JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set. Keys are substrings matched against the command text; values are integer call limits. For example, `{"deploy.sh": 2}` allows `deploy.sh` to be called at most twice. Matching is substring-based so shell-expansion tricks like `./scripts/deploy.sh $(evil)` still count against the cap. Runtime fan-out via `xargs` or `find -exec` is not detected; this is a defense-in-depth control `CLAUDE_CODE_SCROLL_SPEED`| Set the mouse wheel scroll multiplier in [fullscreen rendering](</docs/en/fullscreen#mouse-wheel-scrolling>). Accepts values from 1 to 20. Set to `3` to match `vim` if your terminal sends one wheel event per notch without amplification. Ignored in the JetBrains IDE terminal, where Claude Code uses its own scroll handling `CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS`| Override the time budget in milliseconds for [SessionEnd](</docs/en/hooks#sessionend>) hooks. Applies to session exit, `/clear`, and switching sessions via interactive `/resume`. By default the budget is 1.5 seconds, automatically raised to the highest per-hook `timeout` configured in settings files, up to 60 seconds. Timeouts on plugin-provided hooks do not raise the budget -`CLAUDE_CODE_SESSION_ID`| Set automatically in Bash and PowerShell tool subprocesses and in [hook command](</docs/en/hooks>) subprocesses to the current session ID. Matches the `session_id` field in the hook JSON input. Updated on `/clear`. Use to correlate scripts and external tools with the Claude Code session that launched them +`CLAUDE_CODE_SESSION_ID`| Set automatically to the current session ID in Bash and PowerShell tool subprocesses, [hook command](</docs/en/hooks>) subprocesses, and stdio [MCP server](</docs/en/mcp>) subprocesses. For Bash, PowerShell, and hooks this matches the `session_id` field in the hook JSON input and is updated on `/clear`. An MCP server subprocess retains the ID it was spawned with, and may receive the initial startup ID rather than the resumed ID when launched via `--resume` or `--continue`. Use to correlate scripts and external tools with the Claude Code session that launched them `CLAUDE_CODE_SHELL`| Override automatic shell detection. Useful when your login shell differs from your preferred working shell (for example, `bash` vs `zsh`) `CLAUDE_CODE_SHELL_PREFIX`| Command prefix that wraps shell commands Claude Code spawns: Bash tool calls, [hook](</docs/en/hooks>) commands, and stdio [MCP server](</docs/en/mcp>) startup commands. Useful for logging or auditing. Example: setting `/path/to/logger.sh` runs each command as `/path/to/logger.sh <command>` `CLAUDE_CODE_SIMPLE`| Set to `1` to run with a minimal system prompt and only the Bash, file read, and file edit tools. MCP tools from `--mcp-config` are still available. Disables auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md. OAuth tokens and keychain credentials are not read, so Anthropic authentication must come from `ANTHROPIC_API_KEY` or an `apiKeyHelper` in `--settings`. Equivalent to passing [`--bare`](</docs/en/headless#start-faster-with-bare-mode>) @@ -265,7 +266,7 @@ `CLAUDE_CODE_USE_POWERSHELL_TOOL`| Controls the PowerShell tool. On Windows without Git Bash, the tool is enabled automatically; set to `0` to disable it. On Windows with Git Bash installed, the tool is rolling out progressively: set to `1` to opt in or `0` to opt out. On Linux, macOS, and WSL, set to `1` to enable it, which requires `pwsh` on your `PATH`. When enabled on Windows, Claude can run PowerShell commands natively instead of routing through Git Bash. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>) `CLAUDE_CODE_USE_VERTEX`| Use [Vertex](</docs/en/google-vertex-ai>) `CLAUDE_CONFIG_DIR`| Override the configuration directory (default: `~/.claude`). All settings, credentials, session history, and plugins are stored under this path. Useful for running multiple accounts side by side: for example, `alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'` -`CLAUDE_EFFORT`| Set automatically in Bash tool subprocesses and hook commands to the active [effort level](</docs/en/model-config#adjust-effort-level>) for the turn: `low`, `medium`, `high`, `xhigh`, or `max`. Matches the `effort.level` field passed to [hooks](</docs/en/hooks>). Only set when the current model supports the effort parameter +`CLAUDE_EFFORT`| Set automatically in Bash tool subprocesses and hook commands to the active [effort level](</docs/en/model-config#adjust-effort-level>) for the turn: `low`, `medium`, `high`, `xhigh`, `max`, or `ultra`. The `ultra` value corresponds to ultracode in `/effort`; the variable reports the stored value, not the display label. Matches the `effort.level` field passed to [hooks](</docs/en/hooks>). Only set when the current model supports the effort parameter `CLAUDE_ENABLE_BYTE_WATCHDOG`| Set to `1` to force-enable the byte-level streaming idle watchdog, or set to `0` to force-disable it. When unset, the watchdog is enabled by default for Anthropic API connections. The byte watchdog aborts a connection when no bytes arrive on the wire for the duration set by `CLAUDE_STREAM_IDLE_TIMEOUT_MS`, with a minimum of 5 minutes, independent of the event-level watchdog `CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK`| Set to `1` to enable the byte-level streaming idle watchdog on Amazon Bedrock `vnd.amazon.eventstream` responses. Off by default. Configure the timeout with `CLAUDE_STREAM_IDLE_TIMEOUT_MS` `CLAUDE_ENABLE_STREAM_WATCHDOG`| Set to `1` to enable the event-level streaming idle watchdog. Off by default. Applies to all providers, including Bedrock. For Vertex and Foundry, this is the only idle watchdog available. On Bedrock, you can also enable the independent byte-level watchdog with `CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK`; the two run together when both are set. Configure the timeout with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`
modified Error reference View current →
--- a/errors.md +++ b/errors.md @@ -601,13 +601,13 @@ thinking.type.enabled is not supported for this model -Your Claude Code version is older than the minimum for Opus 4.7. The CLI sent a thinking configuration the model no longer accepts. +Your Claude Code version is older than the minimum for Opus 4.7 or Opus 4.8. The CLI sent a thinking configuration the model no longer accepts. API Error: 400 ... "thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior. **What to do:** - * Run `claude update` to upgrade to v2.1.111 or later, then restart Claude Code + * Run `claude update` and restart Claude Code. Opus 4.7 needs v2.1.111 or later. Opus 4.8 needs v2.1.154 or later * If you cannot upgrade, run `/model` and select Opus 4.6 or Sonnet instead * If you hit this in the Agent SDK, see [SDK troubleshooting](</docs/en/agent-sdk/quickstart#troubleshooting>)
modified Speed up responses with fast mode View current →
--- a/fast-mode.md +++ b/fast-mode.md @@ -6,14 +6,16 @@ Fast mode is in research preview. The feature, pricing, and availability may change based on feedback. -Fast mode is a high-speed configuration for Claude Opus, making the model 2.5x faster at a higher cost per token. Toggle it on with `/fast` when you need speed for interactive work like rapid iteration or live debugging, and toggle it off when cost matters more than latency. Fast mode is not a different model. It uses Claude Opus with a different API configuration that prioritizes speed over cost efficiency. You get identical quality and capabilities with faster responses. Fast mode is supported on Opus 4.7 and Opus 4.6. It is not available on Sonnet, Haiku, or other models. +Fast mode is a high-speed configuration for Claude Opus, making the model up to 2.5x faster at a higher cost per token. Toggle it on with `/fast` when you need speed for interactive work like rapid iteration or live debugging, and toggle it off when cost matters more than latency. Fast mode is not a different model. It uses Claude Opus with a different API configuration that prioritizes speed over cost efficiency. You get identical quality and capabilities with faster responses. Fast mode is supported on Opus 4.8, Opus 4.7, and Opus 4.6. It is not available on Sonnet, Haiku, or other models. + +Fast mode for Opus 4.6 is deprecated and will be removed approximately 30 days after the Opus 4.8 launch. After removal, fast mode on Opus 4.6 falls back to standard speed at standard pricing. Migrate to Opus 4.8 or Opus 4.7 to keep the speedup. Fast mode requires Claude Code v2.1.36 or later. Check your version with `claude --version`. What to know: - * Use `/fast` to toggle on fast mode in Claude Code CLI. Also available via `/fast` in Claude Code VS Code Extension. - * Fast mode pricing is $30/$150 MTok on both Opus 4.7 and Opus 4.6. + * Use `/fast` to toggle on fast mode in the Claude Code CLI. Fast mode is not supported in the VS Code extension. + * Fast mode pricing is $10/$50 MTok on Opus 4.8 and $30/$150 MTok on Opus 4.7 and Opus 4.6. * Available to all Claude Code users on subscription plans (Pro/Max/Team/Enterprise) and Claude Console. * For Claude Code users on subscription plans (Pro/Max/Team/Enterprise), fast mode is available via usage credits only and not included in the subscription rate limits. @@ -37,7 +39,7 @@ * A small `↯` icon appears next to the prompt while fast mode is active * Run `/fast` again at any time to check whether fast mode is on or off -When you disable fast mode with `/fast` again, you remain on Opus. The model does not revert to your previous model. To switch to a different model, use `/model`. Opus 4.7 is the fast mode default in Claude Code v2.1.142 and later. To pin fast mode to Opus 4.6 instead, set `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1`. +When you disable fast mode with `/fast` again, you remain on Opus. The model does not revert to your previous model. To switch to a different model, use `/model`. Opus 4.8 is the fast mode default in Claude Code v2.1.154 and later. On v2.1.142 through v2.1.153, fast mode defaults to Opus 4.7. To pin fast mode to Opus 4.6 instead, set `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1`; this override will be removed when fast mode for Opus 4.6 is retired. ## @@ -45,13 +47,14 @@ Understand the cost tradeoff -Fast mode has higher per-token pricing than standard Opus: +Fast mode has higher per-token pricing than standard Opus, with the multiplier varying by model: -Mode| Input (MTok)| Output (MTok) +Model| Input (MTok)| Output (MTok) ---|---|--- -Fast mode| $30| $150 +Opus 4.8| $10| $50 +Opus 4.7 and Opus 4.6| $30| $150 -Fast mode pricing is flat across the full 1M token context window. When you switch into fast mode mid-conversation, you pay the full fast mode uncached input token price for the entire conversation context. This costs more than if you had enabled fast mode from the start. +Fast mode pricing is flat across the full 1M token context window. For the standard Opus rate to compare against, see the [Claude pricing reference](<https://platform.claude.com/docs/en/about-claude/pricing>). When you switch into fast mode mid-conversation, you pay the full fast mode uncached input token price for the entire conversation context. This costs more than if you had enabled fast mode from the start. ## @@ -94,7 +97,7 @@ Fast mode requires all of the following: - * **Not available on third-party cloud providers** : fast mode is not available on Amazon Bedrock, Google Vertex AI, or Microsoft Azure Foundry. Fast mode is available through the Anthropic Console API and for Claude subscription plans using usage credits. + * **Anthropic API or subscription only** : fast mode is available through the Anthropic Console API and for Claude subscription plans using usage credits. It is not available on Amazon Bedrock, Google Vertex AI, Microsoft Azure Foundry, or Claude Platform on AWS. * **Usage credits turned on** : your account must have usage credits turned on, which allows billing beyond your plan’s included usage. For individual accounts, turn this on in your [Console billing settings](<https://platform.claude.com/settings/organization/billing>). For Team and Enterprise, an admin must turn on usage credits for the organization. Fast mode usage draws directly from usage credits, even if you have remaining usage on your plan. This means fast mode tokens do not count against your plan’s included usage and are charged at the fast mode rate from the first token. @@ -136,7 +139,7 @@ Handle rate limits -Fast mode has separate rate limits from standard Opus. Fast mode for Opus 4.7 and Opus 4.6 share the same rate limit pool: usage on either model draws from the same limits. When you hit the fast mode rate limit or run out of usage credits: +Fast mode has separate rate limits from standard Opus. Fast mode on Opus 4.8, Opus 4.7, and Opus 4.6 shares the same rate limit pool: usage on any of them draws from the same limits. When you hit the fast mode rate limit or run out of usage credits: 1. Fast mode automatically falls back to standard speed 2. The `↯` icon turns gray to indicate cooldown
modified Claude Code GitHub Actions View current →
--- a/github-actions.md +++ b/github-actions.md @@ -8,7 +8,7 @@ Claude Code GitHub Actions is built on top of the [Claude Agent SDK](</docs/en/agent-sdk/overview>), which enables programmatic integration of Claude Code into your applications. You can use the SDK to build custom automation workflows beyond GitHub Actions. -**Claude Opus 4.7 is now available.** Claude Code GitHub Actions default to Sonnet. To use Opus 4.7, configure the model parameter to use `claude-opus-4-7`. +**Claude Opus 4.8 is now available.** Claude Code GitHub Actions default to Sonnet. To use Opus 4.8, configure the model parameter to use `claude-opus-4-8`. ##
modified Glossary View current →
--- a/glossary.md +++ b/glossary.md @@ -170,7 +170,7 @@ Effort level -A setting that controls how much of the adaptive-reasoning thinking budget Claude uses on each turn. Higher effort means more thinking tokens and deeper reasoning; lower effort is faster and cheaper. Effort is supported on Opus 4.7, Opus 4.6, and Sonnet 4.6. Learn more: [Adjust effort level](</docs/en/model-config#adjust-effort-level>) +A setting that controls how much of the adaptive-reasoning thinking budget Claude uses on each turn. Higher effort means more thinking tokens and deeper reasoning; lower effort is faster and cheaper. Effort is supported on Opus 4.6 and later, and on Sonnet 4.6. Learn more: [Adjust effort level](</docs/en/model-config#adjust-effort-level>) ### @@ -417,6 +417,20 @@ Turn One complete response from Claude within a session. A turn begins when you send a message and ends when Claude finishes responding, with any number of tool calls in between. Stop hooks fire at the end of each turn. A session consists of many turns, and the agentic loop describes what happens inside one. Learn more: [How Claude Code works](</docs/en/how-claude-code-works#the-agentic-loop>) + +## + +​ + +V + +### + +​ + +Verification loop + +How a session knows the work is actually done rather than just plausible. You give Claude a check it can run, such as a test suite, a build, or a screenshot comparison, and Claude iterates until the check passes instead of stopping after one attempt. A verification loop is the prerequisite for [`/goal`](</docs/en/goal>), unattended runs, and [dynamic workflows](</docs/en/workflows>): without one, the only thing deciding the agent is finished is the agent itself. Learn more: [Give Claude a way to verify its work](</docs/en/best-practices#give-claude-a-way-to-verify-its-work>) ##
modified Claude Code on Google Vertex AI View current →
--- a/google-vertex-ai.md +++ b/google-vertex-ai.md @@ -158,9 +158,9 @@ Pin specific model versions when deploying to multiple users. Without pinning, model aliases such as `sonnet` and `opus` resolve to the latest version, which may not yet be enabled in your Vertex AI project when Anthropic releases an update. Claude Code falls back to the previous version at startup when the latest is unavailable, but pinning lets you control when your users move to a new model. -Set these environment variables to specific Vertex AI model IDs. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Vertex resolves to Opus 4.6. Set it to the Opus 4.7 ID to use the latest model: - - export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7' +Set these environment variables to specific Vertex AI model IDs. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Vertex resolves to Opus 4.6. Set it to the Opus 4.8 ID to use the latest model: + + export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8' export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-6' export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5@20251001' @@ -173,7 +173,7 @@ Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Vertex AI, Claude Code defaults this to the primary model because Haiku may not be enabled in every project or region. To use Haiku for background tasks, set `ANTHROPIC_DEFAULT_HAIKU_MODEL` to a model ID that is available in your project. To customize models further: - export ANTHROPIC_MODEL='claude-opus-4-7' + export ANTHROPIC_MODEL='claude-opus-4-8' export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5@20251001' ## @@ -204,7 +204,7 @@ 1M token context window -Claude Opus 4.7, Opus 4.6, and Sonnet 4.6 support the [1M token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) on Vertex AI. Claude Code automatically enables the extended context window when you select a 1M model variant. The setup wizard offers a 1M context option when it pins models. To enable it for a manually pinned model instead, append `[1m]` to the model ID. See [Pin models for third-party deployments](</docs/en/model-config#pin-models-for-third-party-deployments>) for details. +Claude Opus 4.6 and later, and Sonnet 4.6, support the [1M token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) on Vertex AI. Claude Code automatically enables the extended context window when you select a 1M model variant. The setup wizard offers a 1M context option when it pins models. To enable it for a manually pinned model instead, append `[1m]` to the model ID. See [Pin models for third-party deployments](</docs/en/model-config#pin-models-for-third-party-deployments>) for details. ##
modified Hooks reference View current →
--- a/hooks.md +++ b/hooks.md @@ -443,7 +443,7 @@ Use these placeholders to reference hook scripts relative to the project or plugin root, regardless of the working directory when the hook runs: - * `${CLAUDE_PROJECT_DIR}`: the project root. + * `${CLAUDE_PROJECT_DIR}`: the project root. Claude Code also sets this variable in the environment of [stdio MCP servers](</docs/en/mcp#option-3-add-a-local-stdio-server>) and plugin LSP servers. * `${CLAUDE_PLUGIN_ROOT}`: the plugin’s installation directory, for scripts bundled with a [plugin](</docs/en/plugins>). Changes on each plugin update. * `${CLAUDE_PLUGIN_DATA}`: the plugin’s [persistent data directory](</docs/en/plugins-reference#persistent-data-directory>), for dependencies and state that should survive plugin updates. @@ -563,7 +563,7 @@ `transcript_path`| Path to conversation JSON `cwd`| Current working directory when the hook is invoked `permission_mode`| Current [permission mode](</docs/en/permissions#permission-modes>): `"default"`, `"plan"`, `"acceptEdits"`, `"auto"`, `"dontAsk"`, or `"bypassPermissions"`. Not all events receive this field: see each event’s JSON example below to check -`effort`| Object with a `level` field holding the active [effort level](</docs/en/model-config#adjust-effort-level>) for the turn: `"low"`, `"medium"`, `"high"`, `"xhigh"`, or `"max"`. If the requested effort exceeds what the current model supports, this is the downgraded level the model actually used, not the level you requested. The object matches the [status line](</docs/en/statusline#available-data>) `effort` field. Present for events that fire within a tool-use context, such as `PreToolUse`, `PostToolUse`, `Stop`, and `SubagentStop`, when the current model supports the effort parameter. The level is also available to hook commands and the Bash tool as the `$CLAUDE_EFFORT` environment variable. +`effort`| Object with a `level` field holding the active [effort level](</docs/en/model-config#adjust-effort-level>) for the turn: `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"`, or `"ultra"`. If the requested model effort exceeds what the current model supports, this is the downgraded level the model actually used. `"ultra"` is the stored value for ultracode and is reported here even though the model receives `xhigh`. The object matches the [status line](</docs/en/statusline#available-data>) `effort` field. Present for events that fire within a tool-use context, such as `PreToolUse`, `PostToolUse`, `Stop`, and `SubagentStop`, when the current model supports the effort parameter. The level is also available to hook commands and the Bash tool as the `$CLAUDE_EFFORT` environment variable. `hook_event_name`| Name of the event that fired When running with `--agent` or inside a subagent, two additional fields are included:
modified Interactive mode View current →
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -361,7 +361,7 @@ * Press **Tab** or **Right arrow** to place the suggestion in the prompt input, then **Enter** to submit * Start typing to dismiss it -The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation, in non-interactive mode, and in plan mode. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`: +The suggestion runs as a background request that reuses the parent conversation’s prompt cache, so the additional cost is minimal. Claude Code skips suggestion generation when the cache is cold to avoid unnecessary cost. Suggestions are automatically skipped after the first turn of a conversation and in plan mode. In print mode they are off by default. Pass [`--prompt-suggestions`](</docs/en/cli-reference#cli-flags>) with `--output-format stream-json --verbose` to emit a `prompt_suggestion` message after each turn instead. To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`: export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false
modified Connect Claude Code to tools via MCP View current →
--- a/mcp.md +++ b/mcp.md @@ -139,7 +139,7 @@ # (within Claude Code) Check server status /mcp -The `/mcp` panel shows the tool count next to each connected server and flags servers that advertise the tools capability but expose no tools. If your request needs tools from a server that is still connecting in the background, Claude waits for that server before continuing. With tool search enabled, which is the default, the wait happens inside the `ToolSearch` call. In configurations without tool search, such as Vertex AI, a custom `ANTHROPIC_BASE_URL`, or `ENABLE_TOOL_SEARCH=false`, Claude uses the `WaitForMcpServers` tool instead. The server name `workspace` is reserved for internal use. If your configuration defines a server with that name, Claude Code skips it at load time and shows a warning asking you to rename it. +Project-scoped servers from `.mcp.json` that are awaiting your approval appear in `claude mcp list` as `⏸ Pending approval`. Run `claude` interactively to review and approve them. `claude mcp get <name>` shows pending servers as `⏸ Pending approval` and rejected servers as `✗ Rejected`. The `/mcp` panel shows the tool count next to each connected server and flags servers that advertise the tools capability but expose no tools. If your request needs tools from a server that is still connecting in the background, Claude waits for that server before continuing. With tool search enabled, which is the default, the wait happens inside the `ToolSearch` call. In configurations without tool search, such as Vertex AI, a custom `ANTHROPIC_BASE_URL`, or `ENABLE_TOOL_SEARCH=false`, Claude uses the `WaitForMcpServers` tool instead. The server name `workspace` is reserved for internal use. If your configuration defines a server with that name, Claude Code skips it at load time and shows a warning asking you to rename it. ###
modified Claude Code on Microsoft Foundry View current →
--- a/microsoft-foundry.md +++ b/microsoft-foundry.md @@ -84,9 +84,9 @@ Pin specific model versions for every deployment. If you use model aliases (`sonnet`, `opus`, `haiku`) without pinning, Claude Code may attempt to use a newer model version that isn’t available in your Foundry account, breaking existing users when Anthropic releases updates. When you create Azure deployments, select a specific model version rather than “auto-update to latest.” -Set the model variables to match the deployment names you created in step 1. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Foundry resolves to Opus 4.6. Set it to the Opus 4.7 ID to use the latest model: +Set the model variables to match the deployment names you created in step 1. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Foundry resolves to Opus 4.6. Set it to the Opus 4.8 ID to use the latest model: - export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7' + export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8' export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-6' export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5'
modified Model configuration View current →
Show diff (118 lines)
--- a/model-config.md +++ b/model-config.md @@ -40,9 +40,9 @@ **`opus[1m]`**| Uses Opus with a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) for long sessions **`opusplan`**| Special mode that uses `opus` during plan mode, then switches to `sonnet` for execution -On the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), `opus` resolves to Opus 4.7 and `sonnet` resolves to Sonnet 4.6. On Bedrock, Vertex, and Foundry, `opus` resolves to Opus 4.6 and `sonnet` resolves to Sonnet 4.5; newer models are available on those providers by selecting the full model name explicitly or setting `ANTHROPIC_DEFAULT_OPUS_MODEL` or `ANTHROPIC_DEFAULT_SONNET_MODEL`. Aliases point to the recommended version for your provider and update over time. To pin to a specific version, use the full model name (for example, `claude-opus-4-7`) or set the corresponding environment variable like `ANTHROPIC_DEFAULT_OPUS_MODEL`. - -Opus 4.7 requires Claude Code v2.1.111 or later. Run `claude update` to upgrade. +On the Anthropic API, `opus` resolves to Opus 4.8 and `sonnet` resolves to Sonnet 4.6. On [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), `opus` resolves to Opus 4.7 and `sonnet` resolves to Sonnet 4.6. On Bedrock, Vertex, and Foundry, `opus` resolves to Opus 4.6 and `sonnet` resolves to Sonnet 4.5; newer models are available on those providers by selecting the full model name explicitly or setting `ANTHROPIC_DEFAULT_OPUS_MODEL` or `ANTHROPIC_DEFAULT_SONNET_MODEL`. Aliases point to the recommended version for your provider and update over time. To pin to a specific version, use the full model name (for example, `claude-opus-4-8`) or set the corresponding environment variable like `ANTHROPIC_DEFAULT_OPUS_MODEL`. + +Opus 4.8 requires Claude Code v2.1.154 or later. Run `claude update` to upgrade. ### @@ -153,13 +153,12 @@ The behavior of `default` depends on your account type: - * **Max and Team Premium** : defaults to Opus 4.7 - * **Pro, Team Standard, Enterprise, and Anthropic API** : defaults to Sonnet 4.6 + * **Max, Team Premium, Enterprise pay-as-you-go, and Anthropic API** : defaults to Opus 4.8 + * **Claude Platform on AWS** : defaults to Opus 4.7 + * **Pro, Team Standard, and Enterprise subscription seats** : defaults to Sonnet 4.6 * **Bedrock, Vertex, and Foundry** : defaults to Sonnet 4.5 -Claude Code may automatically fall back to Sonnet if you hit a usage threshold with Opus. - -On April 23, 2026, the default model for Enterprise pay-as-you-go and Anthropic API users will change to Opus 4.7. To keep a different default, set `ANTHROPIC_MODEL` or the `model` field in [server-managed settings](</docs/en/server-managed-settings>). +Enterprise pay-as-you-go means an Enterprise organization billed by usage rather than by subscription seat. Claude Code may automatically fall back to Sonnet if you hit a usage threshold with Opus. ### @@ -180,14 +179,14 @@ Adjust effort level -[Effort levels](<https://platform.claude.com/docs/en/build-with-claude/effort>) control adaptive reasoning, which lets the model decide whether and how much to think on each step based on task complexity. Lower effort is faster and cheaper for straightforward tasks, while higher effort provides deeper reasoning for complex problems. Effort is supported on Opus 4.7, Opus 4.6, and Sonnet 4.6. The available levels depend on the model: +[Effort levels](<https://platform.claude.com/docs/en/build-with-claude/effort>) control adaptive reasoning, which lets the model decide whether and how much to think on each step based on task complexity. Lower effort is faster and cheaper for straightforward tasks, while higher effort provides deeper reasoning for complex problems. The available effort levels depend on the model. Models not listed here do not support effort: Model| Levels ---|--- -Opus 4.7| `low`, `medium`, `high`, `xhigh`, `max` +Opus 4.8 and Opus 4.7| `low`, `medium`, `high`, `xhigh`, `max` Opus 4.6 and Sonnet 4.6| `low`, `medium`, `high`, `max` -If you set a level the active model does not support, Claude Code falls back to the highest supported level at or below the one you set. For example, `xhigh` runs as `high` on Opus 4.6. As of v2.1.117, the default effort is `xhigh` on Opus 4.7 and `high` on Opus 4.6 and Sonnet 4.6. When you first run Opus 4.7, Claude Code applies `xhigh` even if you previously set a different effort level for Opus 4.6 or Sonnet 4.6. Run `/effort` again to choose a different level after switching. `low`, `medium`, `high`, and `xhigh` persist across sessions. `max` provides the deepest reasoning with no constraint on token spending and applies to the current session only, except when set through the `CLAUDE_CODE_EFFORT_LEVEL` environment variable. +If you set a level the active model does not support, Claude Code falls back to the highest supported level at or below the one you set. For example, `xhigh` runs as `high` on Opus 4.6. The default effort is `high` on Opus 4.8, Opus 4.6, and Sonnet 4.6, and `xhigh` on Opus 4.7. When you first run Opus 4.8 or Opus 4.7, Claude Code applies that model’s default effort even if you previously set a different level for another model: `high` on Opus 4.8 and `xhigh` on Opus 4.7. Run `/effort` again to choose a different level after switching. `low`, `medium`, `high`, and `xhigh` persist across sessions. `max` provides the deepest reasoning with no constraint on token spending and applies to the current session only, except when set through the `CLAUDE_CODE_EFFORT_LEVEL` environment variable. The `/effort` menu also offers `ultracode`. Ultracode is a Claude Code setting rather than a model effort level: it sends `xhigh` to the model and additionally has Claude orchestrate [dynamic workflows](</docs/en/workflows>) for substantive tasks. It applies to the current session only. Set it through `/effort`, or pass `"ultracode": true` via `--settings` or an Agent SDK control request. It is not part of the `effortLevel` setting, the `--effort` flag, or `CLAUDE_CODE_EFFORT_LEVEL`. #### @@ -201,9 +200,10 @@ ---|--- `low`| Reserve for short, scoped, latency-sensitive tasks that are not intelligence-sensitive `medium`| Reduces token usage for cost-sensitive work that can trade off some intelligence -`high`| Balances token usage and intelligence. Use as a minimum for intelligence-sensitive work, or to reduce token spend relative to `xhigh` -`xhigh`| Best results for most coding and agentic tasks. Recommended default on Opus 4.7 +`high`| Balances token usage and intelligence. Default on Opus 4.8, Opus 4.6, and Sonnet 4.6 +`xhigh`| Deeper reasoning at higher token spend. Default on Opus 4.7 `max`| Can improve performance on demanding tasks but may show diminishing returns and is prone to overthinking. Test before adopting broadly +`ultracode`| A Claude Code setting that plans a [dynamic workflow](</docs/en/workflows>) for each substantive task with `xhigh` per-message reasoning. Session-only The effort scale is calibrated per model, so the same level name does not represent the same underlying value across models. @@ -227,7 +227,7 @@ * **In`/model`**: use left/right arrow keys to adjust the effort slider when selecting a model * **`--effort` flag**: pass a level name to set it for a single session when launching Claude Code * **Environment variable** : set `CLAUDE_CODE_EFFORT_LEVEL` to a level name or `auto` - * **Settings** : set `effortLevel` to `low`, `medium`, `high`, or `xhigh` in your settings file. `max` is session-only and is not accepted here + * **Settings** : set `effortLevel` to `low`, `medium`, `high`, or `xhigh` in your settings file. `max` and `ultracode` are session-only and are not accepted here * **Skill and subagent frontmatter** : set `effort` in a [skill](</docs/en/skills#frontmatter-reference>) or [subagent](</docs/en/sub-agents#supported-frontmatter-fields>) markdown file to override the effort level when that skill or subagent runs The environment variable takes precedence over all other methods, then your configured level, then the model default. Frontmatter effort applies when that skill or subagent is active, overriding the session level but not the environment variable. The effort slider appears in `/model` when a supported model is selected. The current effort level is also displayed next to the logo and spinner, for example “with low effort”, so you can confirm which setting is active without opening `/model`. @@ -238,7 +238,7 @@ Adaptive reasoning and fixed thinking budgets -Adaptive reasoning makes thinking optional on each step, so Claude can respond faster to routine prompts and reserve deeper thinking for steps that benefit from it. If you want Claude to think more or less often than the current level produces, you can say so directly in your prompt or in `CLAUDE.md`; the model responds to that guidance within its effort setting. Opus 4.7 always uses adaptive reasoning. The fixed thinking budget mode and `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` do not apply to it. On Opus 4.6 and Sonnet 4.6, you can set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` to revert to the previous fixed thinking budget controlled by `MAX_THINKING_TOKENS`. See [environment variables](</docs/en/env-vars>). +Adaptive reasoning makes thinking optional on each step, so Claude can respond faster to routine prompts and reserve deeper thinking for steps that benefit from it. If you want Claude to think more or less often than the current level produces, you can say so directly in your prompt or in `CLAUDE.md`; the model responds to that guidance within its effort setting. Opus 4.7 and later always use adaptive reasoning. The fixed thinking budget mode and `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` do not apply to them. On Opus 4.6 and Sonnet 4.6, you can set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` to revert to the previous fixed thinking budget controlled by `MAX_THINKING_TOKENS`. See [environment variables](</docs/en/env-vars>). ### @@ -262,7 +262,7 @@ Extended context -Opus 4.7, Opus 4.6, and Sonnet 4.6 support a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) for long sessions with large codebases. Availability varies by model and plan. On Max, Team, and Enterprise plans, Opus is automatically upgraded to 1M context with no additional configuration. This applies to both Team Standard and Team Premium seats. Sonnet with 1M context is not part of the automatic upgrade and requires [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) on every subscription plan, including Max. +Opus 4.6 and later, and Sonnet 4.6, support a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) for long sessions with large codebases. Availability varies by model and plan. On Max, Team, and Enterprise plans, Opus is automatically upgraded to 1M context with no additional configuration. This applies to both Team Standard and Team Premium seats. Sonnet with 1M context is not part of the automatic upgrade and requires [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) on every subscription plan, including Max. Plan| Opus with 1M context| Sonnet with 1M context ---|---|--- @@ -277,7 +277,7 @@ /model sonnet[1m] # Or append [1m] to a full model name - /model claude-opus-4-7[1m] + /model claude-opus-4-8[1m] ## @@ -335,13 +335,13 @@ Provider| Example ---|--- -Bedrock| `export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-7'` -Vertex AI| `export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7'` -Foundry| `export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7'` +Bedrock| `export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-8'` +Vertex AI| `export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8'` +Foundry| `export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8'` Apply the same pattern for `ANTHROPIC_DEFAULT_SONNET_MODEL` and `ANTHROPIC_DEFAULT_HAIKU_MODEL`. For current and legacy model IDs across all providers, see [Models overview](<https://platform.claude.com/docs/en/about-claude/models/overview>). To upgrade users to a new model version, update these environment variables and redeploy. To enable extended context for a pinned model, append `[1m]` to the model ID in `ANTHROPIC_DEFAULT_OPUS_MODEL` or `ANTHROPIC_DEFAULT_SONNET_MODEL`: - export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7[1m]' + export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8[1m]' The `[1m]` suffix applies the 1M context window to all usage of that alias, including `opusplan`.
modified Choose a permission mode View current →
--- a/permission-modes.md +++ b/permission-modes.md @@ -73,7 +73,7 @@ Auto mode| `auto` Bypass permissions| `bypassPermissions` -Auto mode appears in the mode indicator after you enable **Allow dangerously skip permissions** in the extension settings, but it stays unavailable until your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To start in auto mode by default, set `defaultMode` in your [user settings](</docs/en/settings#settings-files>) instead. Claude Code ignores `defaultMode: "auto"` in project and local settings.Bypass permissions also requires the **Allow dangerously skip permissions** toggle before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details. +Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To start in auto mode by default, set `defaultMode` in your [user settings](</docs/en/settings#settings-files>) instead. Claude Code ignores `defaultMode: "auto"` in project and local settings.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details. The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching. @@ -156,7 +156,7 @@ * **Plan** : All plans. * **Admin** : on Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Admins can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). - * **Model** : Claude Sonnet 4.6, Opus 4.6, or Opus 4.7. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported. + * **Model** : Claude Opus 4.6 or later, or Sonnet 4.6. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported. * **Provider** : Anthropic API only. Not available on Bedrock, Vertex, or Foundry. If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code ignores `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
modified Constrain plugin dependency versions View current →
--- a/plugin-dependencies.md +++ b/plugin-dependencies.md @@ -117,7 +117,7 @@ A dependency is set to `false` at a scope with higher precedence than the target scope| Enable fails. Enable the dependency at that scope, or pass `--scope` to write there. All dependencies are installed and allowed| Enable succeeds and writes `true` for the plugin and each dependency that was not already enabled at the target scope. -When you disable a plugin, Claude Code refuses if another enabled plugin still depends on it. The error names the plugins that depend on it and gives you a chained command that disables them in the right order, ending with the one you asked for. For example, if `deploy-kit` depends on `secrets-vault`, disabling `secrets-vault` alone fails with output similar to the following: +This holds even when a dependency sets [`defaultEnabled: false`](</docs/en/plugins-reference#default-enablement>) in its manifest, because Claude Code writes an explicit `true` for it. The same applies at install: a dependency pulled in to satisfy an active plugin installs with `true` regardless of its own default. When you disable a plugin, Claude Code refuses if another enabled plugin still depends on it. The error names the plugins that depend on it and gives you a chained command that disables them in the right order, ending with the one you asked for. For example, if `deploy-kit` depends on `secrets-vault`, disabling `secrets-vault` alone fails with output similar to the following: secrets-vault is still required by deploy-kit. Disable that plugin first, or disable everything together: claude plugin disable deploy-kit@acme-tools && claude plugin disable secrets-vault@acme-tools
modified Create and distribute a plugin marketplace View current →
--- a/plugin-marketplaces.md +++ b/plugin-marketplaces.md @@ -239,6 +239,7 @@ `category`| string| Plugin category for organization `tags`| array| Tags for searchability `strict`| boolean| Controls whether `plugin.json` is the authority for component definitions (default: true). See Strict mode below. +`defaultEnabled`| boolean| Whether the plugin is enabled after install (default: true). Set to `false` to install the plugin disabled until the user opts in. Takes precedence over the same field in the plugin’s `plugin.json`. See [Default enablement](</docs/en/plugins-reference#default-enablement>). Requires Claude Code v2.1.154 or later. **Component configuration fields:** @@ -913,6 +914,8 @@ ---|--- `--json`| Output as JSON +With `--json`, each entry includes `name`, `source`, and source-specific fields: `repo` for GitHub sources, `url` for git and URL sources, and `path` for local sources. GitHub and git sources also include a `ref` field when the marketplace was added with a pinned branch or tag. + ### ​
modified Plugins reference View current →
--- a/plugins-reference.md +++ b/plugins-reference.md @@ -409,6 +409,20 @@ `repository`| string| Source code URL| `"https://github.com/user/plugin"` `license`| string| License identifier| `"MIT"`, `"Apache-2.0"` `keywords`| array| Discovery tags| `["deployment", "ci-cd"]` +`defaultEnabled`| boolean| Whether the plugin starts in an enabled state when the user has not set one. Defaults to `true`. See Default enablement. Requires Claude Code v2.1.154 or later.| `false` + +### + +​ + +Default enablement + +Set `defaultEnabled: false` in `plugin.json` to ship a plugin that installs disabled. The user turns it on with `claude plugin enable <plugin>` or the `/plugin` interface. Use this for plugins that add cost or scope a user should opt into, such as one that connects to an external service. This requires Claude Code v2.1.154 or later. Earlier versions ignore the field and enable the plugin on install. `defaultEnabled` is the fallback when nothing else has decided the plugin’s state. Two things take precedence over it: + + * **The user’s setting** : an entry for the plugin in `enabledPlugins` at any settings scope. Once written, it persists across plugin updates and reinstalls, so changing `defaultEnabled` in a later release does not flip an existing user. + * **A dependency requirement** : when a plugin is required by another one that is active, Claude Code writes `true` for it at install or enable time. That gives it an explicit setting, so its own default no longer applies. See [Enable or disable a plugin with dependencies](</docs/en/plugin-dependencies#enable-or-disable-a-plugin-with-dependencies>). + +The same field can appear in a plugin’s marketplace entry, where it takes precedence over the value in `plugin.json`. See [Optional plugin fields](</docs/en/plugin-marketplaces#optional-plugin-fields>). ###
modified Claude Code settings View current →
--- a/settings.md +++ b/settings.md @@ -213,6 +213,7 @@ `disabledMcpjsonServers`| List of specific MCP servers from `.mcp.json` files to reject| `["filesystem"]` `disableRemoteControl`| Disable [Remote Control](</docs/en/remote-control>): blocks `claude remote-control`, the `--remote-control` flag, auto-start, and the in-session toggle. Typically placed in [managed settings](</docs/en/permissions#managed-settings>) for per-device MDM enforcement, but works from any scope. Requires Claude Code v2.1.128 or later| `true` `disableSkillShellExecution`| Disable inline shell execution for `!`...`` and ````!` blocks in [skills](</docs/en/skills>) and custom commands from user, project, plugin, or additional-directory sources. Commands are replaced with `[shell command execution disabled by policy]` instead of being run. Bundled and managed skills are not affected. Most useful in [managed settings](</docs/en/permissions#managed-settings>) where users cannot override it| `true` +`disableWorkflows`| Disable [dynamic workflows](</docs/en/workflows#turn-workflows-off>) and the bundled workflow commands. Default: `false`. Equivalent to setting `CLAUDE_CODE_DISABLE_WORKFLOWS` to `1`| `true` `editorMode`| Key binding mode for the input prompt: `"normal"` or `"vim"`. Default: `"normal"`. Appears in `/config` as **Editor mode**| `"vim"` `effortLevel`| Persist the [effort level](</docs/en/model-config#adjust-effort-level>) across sessions. Accepts `"low"`, `"medium"`, `"high"`, or `"xhigh"`. Written automatically when you run `/effort` with one of those values. `--effort` and [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars>) override this for one session. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>) for supported models| `"xhigh"` `enableAllProjectMcpServers`| Automatically approve all MCP servers defined in project `.mcp.json` files| `true` @@ -263,6 +264,7 @@ `teammateMode`| How [agent team](</docs/en/agent-teams>) teammates display: `auto` (picks split panes in tmux or iTerm2, in-process otherwise), `in-process`, or `tmux`. `--teammate-mode` overrides this for one session. See [choose a display mode](</docs/en/agent-teams#choose-a-display-mode>)| `"in-process"` `terminalProgressBarEnabled`| Show the terminal progress bar in supported terminals: ConEmu, Ghostty 1.2.0+, and iTerm2 3.6.6+. Default: `true`. Appears in `/config` as **Terminal progress bar**| `false` `tui`| Terminal UI renderer. Use `"fullscreen"` for the flicker-free [alt-screen renderer](</docs/en/fullscreen>) with virtualized scrollback. Use `"default"` for the classic main-screen renderer. Set via `/tui`. You can also set the [`CLAUDE_CODE_NO_FLICKER`](</docs/en/env-vars>) environment variable| `"fullscreen"` +`ultracode`| Turn on [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) for the session. Session-only and not read from `settings.json`. Set through `/effort ultracode`, `--settings`, or an Agent SDK control request| `true` `useAutoModeDuringPlan`| Whether plan mode uses auto mode semantics when auto mode is available. Default: `true`. Not read from shared project settings. Appears in `/config` as “Use auto mode during plan”| `false` `viewMode`| Default transcript view mode on startup: `"default"`, `"verbose"`, or `"focus"`. Overrides the sticky `/focus` selection when set. The `--verbose` flag overrides this for one session| `"verbose"` `voice`| [Voice dictation](</docs/en/voice-dictation>) settings: `enabled` turns dictation on, `mode` selects `"hold"` or `"tap"`, and `autoSubmit` sends the prompt on key release in hold mode. Written automatically when you run `/voice`. Requires a Claude.ai account| `{ "enabled": true, "mode": "tap" }` @@ -657,7 +659,7 @@ `enabledPlugins` -Controls which plugins are enabled. Format: `"plugin-name@marketplace-name": true/false` **Scopes** : +Controls which plugins are enabled. Format: `"plugin-name@marketplace-name": true/false`. A plugin with no entry at any scope falls back to its [`defaultEnabled`](</docs/en/plugins-reference#default-enablement>) value. **Scopes** : * **User settings** (`~/.claude/settings.json`): Personal plugin preferences * **Project settings** (`.claude/settings.json`): Project-specific plugins shared with team
modified Extend Claude with skills View current →
--- a/skills.md +++ b/skills.md @@ -257,7 +257,7 @@ `$N`| Shorthand for `$ARGUMENTS[N]`, such as `$0` for the first argument or `$1` for the second. `$name`| Named argument declared in the `arguments` frontmatter list. Names map to positions in order, so with `arguments: [issue, branch]` the placeholder `$issue` expands to the first argument and `$branch` to the second. `${CLAUDE_SESSION_ID}`| The current session ID. Useful for logging, creating session-specific files, or correlating skill output with sessions. -`${CLAUDE_EFFORT}`| The current effort level: `low`, `medium`, `high`, `xhigh`, or `max`. Use this to adapt skill instructions to the active effort setting. +`${CLAUDE_EFFORT}`| The current effort level: `low`, `medium`, `high`, `xhigh`, `max`, or `ultra`. The `ultra` value is the stored value for ultracode. Use this to adapt skill instructions to the active effort setting. `${CLAUDE_SKILL_DIR}`| The directory containing the skill’s `SKILL.md` file. For plugin skills, this is the skill’s subdirectory within the plugin, not the plugin root. Use this in bash injection commands to reference scripts or files bundled with the skill, regardless of the current working directory. Indexed arguments use shell-style quoting, so wrap multi-word values in quotes to pass them as a single argument. For example, `/my-skill "hello world" second` makes `$0` expand to `hello world` and `$1` to `second`. The `$ARGUMENTS` placeholder always expands to the full argument string as typed. **Example using substitutions:**
modified Customize your status line View current →
--- a/statusline.md +++ b/statusline.md @@ -164,7 +164,7 @@ `context_window.remaining_percentage`| Pre-calculated percentage of context window remaining `context_window.current_usage`| Token counts from the last API call, described in context window fields `exceeds_200k_tokens`| Whether the total token count (input, cache, and output tokens combined) from the most recent API response exceeds 200k. This is a fixed threshold regardless of actual context window size. -`effort.level`| Current reasoning effort (`low`, `medium`, `high`, `xhigh`, or `max`). Reflects the live session value, including mid-session `/effort` changes. Absent when the current model does not support the effort parameter +`effort.level`| Current reasoning effort (`low`, `medium`, `high`, `xhigh`, `max`, or `ultra`). The `ultra` value corresponds to ultracode in `/effort`; the field reports the stored value, not the display label. Reflects the live session value, including mid-session `/effort` changes. Absent when the current model does not support the effort parameter `thinking.enabled`| Whether extended thinking is enabled for the session `rate_limits.five_hour.used_percentage`, `rate_limits.seven_day.used_percentage`| Percentage of the 5-hour or 7-day rate limit consumed, from 0 to 100 `rate_limits.five_hour.resets_at`, `rate_limits.seven_day.resets_at`| Unix epoch seconds when the 5-hour or 7-day rate limit window resets @@ -193,7 +193,7 @@ "session_name": "my-session", "transcript_path": "/path/to/transcript.jsonl", "model": { - "id": "claude-opus-4-7", + "id": "claude-opus-4-8", "display_name": "Opus" }, "workspace": {
modified Create custom subagents View current →
--- a/sub-agents.md +++ b/sub-agents.md @@ -258,7 +258,7 @@ `description`| Yes| When Claude should delegate to this subagent `tools`| No| Tools the subagent can use. Inherits all tools if omitted. To preload Skills into context, use the `skills` field rather than listing `Skill` here `disallowedTools`| No| Tools to deny, removed from inherited or specified list -`model`| No| Model to use: `sonnet`, `opus`, `haiku`, a full model ID (for example, `claude-opus-4-7`), or `inherit`. Defaults to `inherit` +`model`| No| Model to use: `sonnet`, `opus`, `haiku`, a full model ID (for example, `claude-opus-4-8`), or `inherit`. Defaults to `inherit` `permissionMode`| No| Permission mode: `default`, `acceptEdits`, `auto`, `dontAsk`, `bypassPermissions`, or `plan`. Ignored for plugin subagents `maxTurns`| No| Maximum number of agentic turns before the subagent stops `skills`| No| [Skills](</docs/en/skills>) to preload into the subagent’s context at startup. The full skill content is injected, not just the description. Subagents can still invoke unlisted project, user, and plugin skills through the Skill tool @@ -280,7 +280,7 @@ The `model` field controls which [AI model](</docs/en/model-config>) the subagent uses: * **Model alias** : Use one of the available aliases: `sonnet`, `opus`, or `haiku` - * **Full model ID** : Use a full model ID such as `claude-opus-4-7` or `claude-sonnet-4-6`. Accepts the same values as the `--model` flag + * **Full model ID** : Use a full model ID such as `claude-opus-4-8` or `claude-sonnet-4-6`. Accepts the same values as the `--model` flag * **inherit** : Use the same model as the main conversation * **Omitted** : If not specified, defaults to `inherit` (uses the same model as the main conversation)
modified Voice dictation View current →
--- a/voice-dictation.md +++ b/voice-dictation.md @@ -14,7 +14,7 @@ Requirements -Voice dictation streams your recorded audio to Anthropic’s servers for transcription. Audio is not processed locally. The speech-to-text service is only available when you authenticate with a Claude.ai account, and is not available when Claude Code is configured to use an Anthropic API key directly, Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. Transcription does not consume Claude messages or tokens and does not count toward the limits shown in `/usage`. See [data usage](</docs/en/data-usage>) for how Anthropic handles your data. Voice dictation also needs local microphone access, so it does not work in remote environments such as [Claude Code on the web](</docs/en/claude-code-on-the-web>) or SSH sessions. In WSL, voice dictation requires WSLg for audio access. WSLg is included with WSL2 when installed from the Microsoft Store on Windows 10 or 11. If WSLg is not available, for example on WSL1, run Claude Code in native Windows instead. Audio recording uses a built-in native module on macOS, Linux, and Windows. On Linux, if the native module cannot load, Claude Code falls back to `arecord` from ALSA utils or `rec` from SoX. If neither is available, `/voice` prints an install command for your package manager. The Claude Code [VS Code extension](</docs/en/vs-code>) also supports voice dictation with the same Claude.ai account requirement. It is not available in VS Code Remote sessions, including SSH, Dev Containers, and Codespaces, because the microphone is on your local machine and the extension runs on the remote host. +Voice dictation streams your recorded audio to Anthropic’s servers for transcription. Audio is not processed locally. The speech-to-text service is only available when you authenticate with a Claude.ai account, and is not available when Claude Code is configured to use an Anthropic API key directly, Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. Voice dictation is also not available when your organization has HIPAA compliance enabled. Transcription does not consume Claude messages or tokens and does not count toward the limits shown in `/usage`. See [data usage](</docs/en/data-usage>) for how Anthropic handles your data. Voice dictation also needs local microphone access, so it does not work in remote environments such as [Claude Code on the web](</docs/en/claude-code-on-the-web>) or SSH sessions. In WSL, voice dictation requires WSLg for audio access. WSLg is included with WSL2 when installed from the Microsoft Store on Windows 10 or 11. If WSLg is not available, for example on WSL1, run Claude Code in native Windows instead. Audio recording uses a built-in native module on macOS, Linux, and Windows. On Linux, if the native module cannot load, Claude Code falls back to `arecord` from ALSA utils or `rec` from SoX. If neither is available, `/voice` prints an install command for your package manager. The Claude Code [VS Code extension](</docs/en/vs-code>) also supports voice dictation with the same Claude.ai account requirement. It is not available in VS Code Remote sessions, including SSH, Dev Containers, and Codespaces, because the microphone is on your local machine and the extension runs on the remote host. ##
modified Use Claude Code in VS Code View current →
--- a/vs-code.md +++ b/vs-code.md @@ -333,7 +333,7 @@ `usePythonEnvironment`| `true`| Activate the workspace’s Python environment when running Claude. Requires the Python extension. `environmentVariables`| `[]`| Set environment variables for the Claude process. Use Claude Code settings instead for shared config. `disableLoginPrompt`| `false`| Skip authentication prompts (for third-party provider setups) -`allowDangerouslySkipPermissions`| `false`| Adds [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) and Bypass permissions to the mode selector. Auto mode has [plan, admin, model, and provider requirements](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), so it may remain unavailable even with this toggle on. Use Bypass permissions only in sandboxes with no internet access. +`allowDangerouslySkipPermissions`| `false`| Adds Bypass permissions to the mode selector. Use it only in sandboxes with no internet access. `claudeProcessWrapper`| -| Executable used to launch the Claude process. The bundled binary path is passed as an argument when present. Set this to a separately installed `claude` binary if the extension build doesn’t include one for your platform. ##
added Orchestrate subagents at scale with dynamic workflows View current →
Show diff (260 lines)
--- a/workflows.md +++ b/workflows.md @@ -0,0 +1,257 @@ +> ## Documentation Index +> +> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt> +> +> Use this file to discover all available pages before exploring further. + +Dynamic workflows are in research preview. They require Claude Code v2.1.154 or later and are available on all paid plans, with Anthropic API access, and on Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry. On Pro, turn them on from the Dynamic workflows row in `/config`. + +A dynamic workflow is a JavaScript script that orchestrates [subagents](</docs/en/sub-agents>) at scale. Claude writes the script for the task you describe, and a runtime executes it in the background while your session stays responsive. Reach for a workflow when a task needs more agents than one conversation can coordinate, or when you want the orchestration codified as a script you can read and rerun. Examples include a codebase-wide bug sweep, a 500-file migration, a research question that needs sources cross-checked against each other, and a hard plan worth drafting from several independent angles before you commit to one. This page covers how to: + + * Decide when to use a workflow instead of subagents or skills + * Run a bundled workflow with `/deep-research` + * Have Claude write a workflow for your task and save it + * Understand how a workflow runs and manage runs + +## + +​ + +When to use a workflow + +[Subagents](</docs/en/sub-agents>), [skills](</docs/en/skills>), and workflows can all run a multi-step task. The difference is who holds the plan: + +| Subagents| Skills| Workflows +---|---|---|--- +What it is| A worker Claude spawns| Instructions Claude follows| A script the runtime executes +Who decides what runs next| Claude, turn by turn| Claude, following the prompt| The script +Where intermediate results live| Claude’s context window| Claude’s context window| Script variables +What’s repeatable| The worker definition| The instructions| The orchestration itself +Scale| A few delegated tasks per turn| Same as subagents| Dozens to hundreds of agents per run +Interruption| Restarts the turn| Restarts the turn| Resumable in the same session + +A workflow moves the plan into code. With subagents and skills, Claude is the orchestrator: it decides turn by turn what to spawn next, and every result lands in Claude’s context. A workflow script holds the loop, the branching, and the intermediate results itself, so Claude’s context holds only the final answer. Moving the plan into code also lets a workflow apply a repeatable quality pattern, not just run more agents: it can have independent agents adversarially review each other’s findings before they’re reported, or draft a plan from several angles and weigh them against each other, so you get a more trustworthy result than a single pass. + +## + +​ + +Run a bundled workflow + +The quickest way to see a workflow in action is to run `/deep-research`, the built-in workflow Claude Code includes for investigating a question across many sources. You’ll see agents work through a set of phases in the background while your session stays free, and get one report at the end instead of a turn-by-turn transcript. + +1 + +Run the workflow + +Run `/deep-research` with a question you want investigated. It fans out web searches across several angles, fetches and cross-checks the sources it finds, and synthesizes a cited report. + + /deep-research What changed in the Node.js permission model between v20 and v22? + +2 + +Allow workflows + +Claude Code asks whether to allow the workflow. Select **Yes** to continue. The exact prompt depends on your permission mode. See Approve the plan before it runs for the per-mode options. + +3 + +Watch progress + +The run starts in the background. Run `/workflows`, use the arrow keys to select the run, and press Enter to open its progress view: + + /workflows + +The view shows each phase with its agent count, token total, and elapsed time. Drill into any phase to see its agents and what each one found. See Watch the run for the full set of controls.You can also watch from the task panel below the input box: a one-line progress summary appears there while the run is going. Press the down arrow to focus it, then Enter to expand. + +4 + +Read the report + +When the run finishes, the report lands in your session. It cites the sources each claim came from, with claims that didn’t survive cross-checking already filtered out. + +To run a workflow for your own task, have Claude write one, and once a run does what you wanted you can save it as a command of your own. + +### + +​ + +Bundled workflows + +Claude Code includes `/deep-research` as a built-in workflow: + +Command| What it does +---|--- +`/deep-research <question>`| Fans out web searches on a question across several angles, fetches and cross-checks the sources it finds, votes on each claim, and returns a cited report with claims that didn’t survive cross-checking filtered out. Requires the [WebSearch tool](</docs/en/tools-reference#websearch-tool-behavior>) to be available + +Workflows you save yourself become commands the same way and appear in `/` autocomplete alongside the bundled ones. + +### + +​ + +Watch the run + +Workflows run in the background, so the session stays responsive while agents work. Run `/workflows` at any time to list running and completed workflows, then select one to open its progress view. + + /workflows + +The progress view shows each phase with its agent counts, token totals, and elapsed time. The footer lists the key for each action: + +Key| Action +---|--- +`↑` / `↓`| Select a phase or agent +`Enter` or `→`| Drill into the selected phase, then into an agent to read its prompt, recent tool calls, and result +`Esc`| Back out one level +`j` / `k`| Scroll within the agent detail when it overflows +`p`| Pause or resume the run +`x`| Stop the selected agent, or stop the whole workflow when focus is on the run +`r`| Restart the selected running agent +`s`| Save the run’s script as a command + +## + +​ + +Have Claude write a workflow + +You can have Claude write a workflow for your task in two ways: + + * Ask for a workflow in your prompt with the word `workflow`, and Claude writes one for the task. + * Let Claude decide with ultracode: set `/effort ultracode` and Claude plans a workflow for every substantive task in the session. + +You can also run a workflow command that already exists: a bundled workflow like `/deep-research`, or one you’ve saved. + +### + +​ + +Ask for a workflow in your prompt + +To run a single task as a workflow without changing the session’s effort level, include the word `workflow` anywhere in your prompt. + + Run a workflow to audit every API endpoint under src/routes/ for missing auth checks + +Claude Code highlights the word in your input and Claude writes a workflow script for the task instead of working through it turn by turn. If the run does what you wanted, you can save it as a command afterward. If Claude Code highlights the word when you didn’t mean to trigger one, press `alt+w` to ignore it for this prompt. + +### + +​ + +Let Claude decide with ultracode + +Ultracode is a Claude Code setting that combines `xhigh` [reasoning effort](</docs/en/model-config#adjust-effort-level>) with automatic workflow orchestration. With it on, Claude plans a workflow for each substantive task instead of waiting for you to ask. + + /effort ultracode + +With ultracode on, Claude decides when a task warrants a workflow. A single request can turn into several workflows in a row: one to understand the code, one to make the change, and one to verify it. This applies to every task in the session, so each request uses more tokens and takes longer than at lower effort levels. Ultracode lasts for the current session and resets when you start a new one. Drop back with `/effort high` when you return to routine work. It’s available on models that support `xhigh` [effort](</docs/en/model-config#adjust-effort-level>); on other models the `/effort` menu doesn’t offer it. + +### + +​ + +Approve the plan before it runs + +In the CLI, the per-run prompt shows the planned phases and these options: + + * **Yes, run it** : start the run + * **Yes, and don’t ask again for`<name>` in `<path>`**: start, and skip this prompt for this workflow in this project from now on + * **View raw script** : read the script before deciding + * **No** : cancel + +`Ctrl+G` opens the script in your editor. `Tab` lets you adjust the prompt before the run starts. Whether you see this prompt depends on your [permission mode](</docs/en/permission-modes>): + +Permission mode| When you’re prompted +---|--- +Default, accept edits| Every run, unless you’ve selected **Yes, and don’t ask again** for that workflow in this project +Auto| First launch only. Any **Yes** records consent in your user settings, and later launches start without prompting. Skipped entirely when ultracode is on +Bypass permissions, `claude -p`, Agent SDK| Never. The run starts immediately + +In the Desktop app, an approval card shows the workflow name, the phase list, and a token-usage caution, with **Once** , **Always** , and **Deny** actions. The progress view appears in the Background tasks side pane. Your permission mode controls only the launch prompt above. The subagents the workflow spawns always run in `acceptEdits` mode and inherit your [tool allowlist](</docs/en/settings#permission-settings>), regardless of your session’s mode. File edits are auto-approved. Shell commands, web fetches, and MCP tools that aren’t in your allowlist can still prompt you mid-run. To avoid this on a long run, add the commands the agents need to your allowlist before starting. In `claude -p` and the Agent SDK there is no one to prompt, so tool calls follow your configured permission rules without interactive confirmation. + +### + +​ + +Save the workflow for reuse + +When Claude writes a workflow for a task you’ll repeat, you can save that run’s script as a command. A process like a review you run on every branch then runs the same orchestration each time. Run `/workflows`, select the run you want to keep, and press `s`. In the save dialog, Tab toggles between the two save locations: + + * `.claude/workflows/` in your project: shared with everyone who clones the repo + * `~/.claude/workflows/` in your home directory: available in every project, visible only to you + +Press Enter to save. The workflow runs as `/<name>` in future sessions from either location. If a project workflow and a personal workflow share a name, the project one runs. + +## + +​ + +How a workflow runs + +The workflow runtime executes the script in an isolated environment, separate from your conversation. Intermediate results stay in script variables instead of landing in Claude’s context. The runtime tracks each agent’s result as the run progresses, which is what makes a run resumable within the same session. + +### + +​ + +Behavior and limits + +The runtime applies the following constraints: + +Constraint| Why +---|--- +No mid-run user input| Only agent permission prompts can pause a run. For sign-off between stages, run each stage as its own workflow +No direct filesystem or shell access from the workflow itself| Agents read, write, and run commands. The script coordinates the agents +Up to 16 concurrent agents, fewer on machines with limited CPU cores| Bounds local resource use +1,000 agents total per run| Prevents runaway loops + +## + +​ + +Manage runs + +Once a run starts, you manage it from the `/workflows` view, or by expanding its progress line in the task panel below the input box. + +### + +​ + +Resume after a pause + +If you stop a run, you can resume it: agents that already completed return their cached results, and the rest run live. Resume a paused run from `/workflows` by selecting it and pressing `p`, or ask Claude to relaunch the workflow with the same script. Resume works within the same Claude Code session. If you exit Claude Code while a workflow is running, the next session starts the workflow fresh. + +### + +​ + +Cost + +A workflow spawns many agents, so a single run can use meaningfully more tokens than working through the same task in conversation. Runs count toward your plan’s usage and rate limits like any other session. You can stop a running workflow from `/workflows` at any time without losing completed work. Every agent in a workflow uses your session’s model unless the script routes a stage to a different one. To control the model cost: + + * Check `/model` before a large run if you usually switch to a smaller model for routine work + * Ask Claude to use a smaller model for stages that don’t need the strongest one when you describe the task + +### + +​ + +Turn workflows off + +Workflows are available in the CLI, the Desktop app, the IDE extensions, [non-interactive mode](</docs/en/headless>) with `claude -p`, and the [Agent SDK](</docs/en/agent-sdk/overview>). The same disable settings apply on every surface. To turn workflows off for yourself: + + * Toggle Dynamic workflows off in `/config`. Persists across sessions. + * Set `"disableWorkflows": true` in `~/.claude/settings.json`. Persists across sessions. + * Set `CLAUDE_CODE_DISABLE_WORKFLOWS=1`. Read at startup, so it applies wherever you set it. + +To turn workflows off for your whole organization, set `"disableWorkflows": true` in [managed settings](</docs/en/server-managed-settings>), or use the toggle on the [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) page. When workflows are disabled, the bundled workflow commands are unavailable, the `workflow` keyword no longer triggers a run, and `ultracode` is removed from the `/effort` menu. + +## + +​ + +Related resources + + * [Run agents in parallel](</docs/en/agents>): compare subagents, agent view, agent teams, and workflows + * [Create custom subagents](</docs/en/sub-agents>): the worker primitive workflows orchestrate + * [Manage costs](</docs/en/costs>): how multi-agent runs count toward usage limits