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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/claude-code/auto-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ As of v2.1.142, Claude Code ignores `defaultMode: "auto"` in project and local s

**Team/Enterprise:** An admin must enable auto mode in [Claude Code admin settings](https://claude.ai/admin-settings/claude-code) before individual users can access it.

**Bedrock / Vertex AI / Foundry:** Auto mode is off until you set the `CLAUDE_CODE_ENABLE_AUTO_MODE` environment variable to `1` (Claude Code v2.1.158 or later). See [Availability](#availability).
**Bedrock / Google Cloud's Agent Platform / Foundry:** From v2.1.207, auto mode is available by default on these providers, with no opt-in required. (In v2.1.158 through v2.1.206 it was off until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; that variable is still accepted for compatibility but has no effect from v2.1.207 onward.) See [Availability](#availability).

## How it works

Expand Down Expand Up @@ -140,8 +140,8 @@ claude auto-mode critique
| Requirement | Detail |
|-------------|--------|
| **Plans** | All plans (Pro, Max, Team, Enterprise, and the Anthropic API). On Team and Enterprise, an admin must enable it first. |
| **Models** | On the Anthropic API: Claude Opus 4.6 or later, or Sonnet 4.6. On Bedrock, Vertex AI, and Foundry: only Opus 4.7 and Opus 4.8. |
| **Providers** | Available by default on the Anthropic API. On Amazon Bedrock, Google Vertex AI, and Microsoft Foundry, set `CLAUDE_CODE_ENABLE_AUTO_MODE=1` (v2.1.158+) to enable it. |
| **Models** | On the Anthropic API: Claude Opus 4.6 or later, or Sonnet 4.6. On Bedrock, Google Cloud's Agent Platform, and Foundry: only Opus 4.7 and Opus 4.8. |
| **Providers** | Available by default on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry. From v2.1.207 no opt-in is required; in v2.1.158 through v2.1.206, Bedrock, Agent Platform, and Foundry needed `CLAUDE_CODE_ENABLE_AUTO_MODE=1`. The variable is still accepted for compatibility but has no effect from v2.1.207 onward. |
| **Not available** | Sonnet 4.5, Opus 4.5, Haiku, and Claude 3 models on any provider |
| **Enterprise opt-out** | Admins can disable with `permissions.disableAutoMode` set to `"disable"` in managed settings |

Expand Down
6 changes: 4 additions & 2 deletions docs/claude-code/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Some commands are **bundled skills** rather than hard-coded CLI behavior. They u
| `/exit` | Exit Claude Code (alias: `/quit`) |
| `/clear` | Clear conversation history and free up context (aliases: `/reset`, `/new`) |
| `/resume [session]` | Resume a previous conversation by ID or name, or open the session picker (alias: `/continue`) |
| `/fork [name]` | Create a fork of the current conversation at this point |
| `/fork [name]` | Copy the current conversation into a new background session (with its own row in `claude agents`) so it can branch off while you keep working in the original. The in-session forked subagent this used to launch is now `/subtask` |
| `/rename [name]` | Rename the current session (auto-generates a name if none provided) |
| `/export [filename]` | Export current conversation as plain text |
| `/copy` | Copy the last assistant response to clipboard (shows interactive picker for code blocks) |
Expand Down Expand Up @@ -86,6 +86,7 @@ Some commands are **bundled skills** rather than hard-coded CLI behavior. They u
| `/agents` | Manage agent and subagent configurations |
| `/tasks` | List and manage background tasks |
| `/background [prompt]` | Detach the current session to run as a background agent and free the terminal. Pass a prompt to send one more instruction before detaching. Alias: `/bg` |
| `/subtask [prompt]` | Launch an in-session forked subagent that continues from the current conversation state. This is the behavior `/fork` used to have before `/fork` became a background-session copy |
| `/stop` | Stop the current background session (only available while attached to one) |
| `/batch <instruction>` | **[Skill]** Orchestrate large-scale changes across a codebase in parallel: decomposes the work into independent units and spawns one background subagent per unit in an isolated git worktree |
| `/goal [condition]` | Set a completion goal; Claude keeps working across turns until the condition is met. `clear` or `cancel` removes the goal early |
Expand All @@ -111,12 +112,13 @@ Some commands are **bundled skills** rather than hard-coded CLI behavior. They u
|---------|-------------|
| `/login` | Sign in to your Anthropic account |
| `/logout` | Sign out from your Anthropic account |
| `/doctor` | Diagnose and verify your Claude Code installation and settings |
| `/doctor` | Run a full setup checkup (v2.1.205+): diagnoses installation health, finds unused skills, MCP servers, and plugins versus their context cost, deduplicates local `CLAUDE.md` files against checked-in ones, proposes trimming `CLAUDE.md` content Claude could derive from the codebase, and flags slow hooks. Reports findings first and asks for confirmation before changing anything. Alias: `/checkup` |
| `/status` | Show version, model, account, and connectivity status |
| `/stats` | Visualize daily usage, session history, streaks, and model preferences |
| `/insights` | Generate a report analyzing your Claude Code sessions |
| `/team-onboarding` | Generate a team onboarding guide from your Claude Code usage history |
| `/powerup` | Launch interactive lessons with animated demos of Claude Code features |
| `/radio` | Open the Claude FM lo-fi radio stream in your browser (prints the stream URL when no browser is available). Not available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry |
| `/voice [hold\|tap\|off]` | Toggle voice dictation (requires a Claude.ai account) |
| `/feedback [report]` | Submit feedback about Claude Code (alias: `/bug`) |
| `/release-notes` | View the full changelog |
Expand Down
12 changes: 11 additions & 1 deletion docs/claude-code/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ keywords: [Claude Code CLI flags, command line options, --continue, --resume, --

| Flag | Purpose |
|------|---------|
| `--permission-mode <mode>` | Permission mode: `default`, `acceptEdits`, `plan`, `auto`, `dontAsk`, `bypassPermissions` |
| `--permission-mode <mode>` | Permission mode: `default` (also accepted as `manual`), `acceptEdits`, `plan`, `auto`, `dontAsk`, `bypassPermissions` |
| `--allowedTools <tools>` | Allow specific tools (e.g. `"Bash(git:*) Edit Read"`) |
| `--disallowedTools <tools>` | Deny specific tools (e.g. `"Bash(rm:*)"`) |
| `--tools <tools>` | Restrict the available tool set entirely (`""` to disable all, `"default"` for all) |
Expand All @@ -51,6 +51,7 @@ keywords: [Claude Code CLI flags, command line options, --continue, --resume, --
| `--print "prompt"` | Run a single prompt in headless mode (no interactive session) |
| `--output-format <format>` | Output format with `--print`: `text`, `json`, or `stream-json` |
| `--input-format <format>` | Input format with `--print`: `text` or `stream-json` |
| `--forward-subagent-text` | Include subagent text and thinking blocks in `stream-json` output (also settable via `CLAUDE_CODE_FORWARD_SUBAGENT_TEXT`) |
| `--json-schema <schema>` | Enforce structured output with a JSON Schema |
| `--no-session-persistence` | Do not save the session to disk (headless mode only) |
| `--bare` | Minimal mode: skip auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md. Faster starts for scripted calls. |
Expand Down Expand Up @@ -106,6 +107,12 @@ keywords: [Claude Code CLI flags, command line options, --continue, --resume, --
| `--verbose` | Enable verbose output |
| `--safe-mode` | Launch with all customizations disabled (`CLAUDE.md`, skills, plugins, hooks, MCP servers, custom commands and agents do not load) to isolate a broken configuration. Authentication, model selection, built-in tools, and permissions still work. Also settable via the `CLAUDE_CODE_SAFE_MODE` environment variable. |

## Accessibility

| Flag | Purpose |
|------|---------|
| `--ax-screen-reader` | Start the session in screen reader mode: replace the visual terminal interface (boxes, spinners, in-place redraws) with plain, linear labeled lines that a screen reader such as VoiceOver or NVDA reads in order. Also settable per shell with the `CLAUDE_AX_SCREEN_READER` environment variable or everywhere with the `axScreenReader` setting. |

## Environment variables

| Variable | Purpose |
Expand All @@ -114,4 +121,7 @@ keywords: [Claude Code CLI flags, command line options, --continue, --resume, --
| `MAX_THINKING_TOKENS` | Control how many tokens the model uses for reasoning (set to `0` to disable thinking) |
| `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` | Set to `1` to revert to a fixed thinking token budget instead of adaptive reasoning (applies to Sonnet 4.6 and Opus 4.6 only) |
| `CLAUDE_CODE_DISABLE_AUTO_MEMORY` | Set to `1` to disable auto memory globally |
| `CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION` | Tune the per-session cap on WebSearch calls (default `200`) that stops runaway loops |
| `CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION` | Tune the per-session cap on subagent spawns (default `200`) that stops runaway loops |
| `CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS` | Tune or disable the threshold after which a long-running MCP tool call moves to the background automatically (default two minutes) so the session stays usable |
| `ANTHROPIC_MODEL` | Override the default model for all sessions |
4 changes: 3 additions & 1 deletion docs/claude-code/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ Claude Code supports several permission modes that change how much Claude prompt

| Mode | What runs without asking | Best for |
|------|-------------------------|----------|
| `default` | Read-only operations | Getting started, sensitive work |
| `default` (now called **Manual**) | Read-only operations | Getting started, sensitive work |
| `acceptEdits` | Reads, file edits, and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.) | Iterating on code you're reviewing |
| `plan` | Read-only (Claude analyzes but cannot modify files) | Exploring a codebase before changing it |
| `auto` | Everything, with background safety checks | Long tasks, reducing prompt fatigue |
| `dontAsk` | Only pre-approved tools | Locked-down CI and scripts |
| `bypassPermissions` | Everything, including protected paths | Isolated containers and VMs only |

The `default` mode is now labelled **Manual** across the CLI, `--help`, VS Code, and JetBrains, and `--permission-mode manual` is accepted as an alias for `default`. From v2.1.203, the status bar shows a gray `⏸ manual mode on` badge while it is active. The stored setting value remains `default`.

Set a default mode in your settings:

```json
Expand Down
12 changes: 4 additions & 8 deletions docs/claude-code/subagents.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,13 @@ Output a structured report with severity ratings (critical / high / medium / low
| `model` | No | Model to use: `sonnet`, `opus`, `haiku`, a full model ID, or `inherit`. Defaults to `inherit` (uses the parent session's model) |
| `tools` | No | Comma-separated list of allowed tools; omit to inherit all tools from the parent session |
| `disallowedTools` | No | Tools to deny, removed from the inherited or specified list |
| `permissionMode` | No | Permission mode for this subagent: `default`, `acceptEdits`, `plan`, `auto`, `dontAsk`, or `bypassPermissions` |
| `permissionMode` | No | Permission mode for this subagent: `default` (also accepted as `manual`), `acceptEdits`, `plan`, `auto`, `dontAsk`, or `bypassPermissions` |
| `maxTurns` | No | Maximum number of agentic turns before the subagent stops |
| `skills` | No | Skills to load into the subagent's context at startup. Full skill content is injected; subagents do not inherit skills from the parent session |
| `mcpServers` | No | MCP servers available to this subagent. Each entry is a server name referencing an already-configured server or an inline server definition |
| `hooks` | No | Lifecycle hooks scoped to this subagent |
| `memory` | No | Persistent memory scope: `user`, `project`, or `local`. Enables cross-session learning for this subagent |
| `background` | No | Set to `true` to always run this subagent as a background task. Default: `false` |
| `effort` | No | Effort level: `low`, `medium`, `high`, `xhigh`, or `max`. Overrides the session effort level for this subagent |
| `isolation` | No | Set to `worktree` to run the subagent in a temporary git worktree, giving it an isolated copy of the repository |
| `color` | No | Display color in the task list: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan` |
| `initialPrompt` | No | Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` CLI flag) |
| `background` | No | Set to `true` to always run this subagent as a background task, even when the main agent needs its result right away. When unset, Claude chooses, and as of v2.1.198 it runs subagents in the background by default |
| `effort` | No | Effort level: `low`, `medium`, `high`, `xhigh`, or `max`. Overrides the session effort level for this subagent |
| `isolation` | No | Set to `worktree` to run the subagent in a temporary git worktree, giving it an isolated copy of the repository |
| `color` | No | Display color in the task list: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan` |
Expand Down Expand Up @@ -722,13 +718,13 @@ Run the test-runner agent on the files I just edited, then continue.

### Background vs. foreground

By default, subagents run in the foreground; the main agent waits for a result before continuing. For independent tasks you can run them in the background:
As of v2.1.198, subagents run in the **background by default**: the main agent keeps working and picks up the result when the subagent finishes. The main agent still runs a subagent in the foreground when it needs the result before it can continue. You can also steer this explicitly:

```
Run the test suite in the background while I keep working.
```

The main agent will notify you when a background subagent completes.
Press **Ctrl+B** to background a running task. A background subagent's result reaches the main agent as a completion notification in a later turn (v2.1.211+); if you ask about progress before it finishes, the main agent reports that the subagent is still running rather than guessing at results.

When a background subagent needs a permission decision, the prompt surfaces in your main session instead of being auto-denied. The dialog shows which agent is asking, and pressing **Esc** denies only that one tool call.

Expand Down