SpyBara
Go Premium

Documentation 2026-03-14 03:44 UTC to 2026-03-16 21:10 UTC

13 files changed +113 −31. View all changes and history on the product overview
2026
Tue 31 21:09 Mon 30 21:13 Sat 28 18:04 Fri 27 21:09 Thu 26 21:07 Wed 25 21:08 Tue 24 18:15 Mon 23 21:08 Sun 22 18:04 Sat 21 18:03 Fri 20 21:05 Thu 19 06:17 Wed 18 18:16 Tue 17 21:10 Mon 16 21:10 Sat 14 03:44 Fri 13 21:07 Thu 12 21:07 Wed 11 03:43 Tue 10 03:43 Mon 9 21:06 Sat 7 03:37 Fri 6 06:10 Thu 5 06:12 Wed 4 21:06 Sun 1 06:10

commands.md +1 −1

Details

56| `/pr-comments [PR]` | Fetch and display comments from a GitHub pull request. Automatically detects the PR for the current branch, or pass a PR URL or number. Requires the `gh` CLI |56| `/pr-comments [PR]` | Fetch and display comments from a GitHub pull request. Automatically detects the PR for the current branch, or pass a PR URL or number. Requires the `gh` CLI |

57| `/privacy-settings` | View and update your privacy settings. Only available for Pro and Max plan subscribers |57| `/privacy-settings` | View and update your privacy settings. Only available for Pro and Max plan subscribers |

58| `/release-notes` | View the full changelog, with the most recent version closest to your prompt |58| `/release-notes` | View the full changelog, with the most recent version closest to your prompt |

59| `/reload-plugins` | Reload all active [plugins](/en/plugins) to apply pending changes without restarting. Reports what was loaded and notes any changes that require a restart |59| `/reload-plugins` | Reload all active [plugins](/en/plugins) to apply pending changes without restarting. Reports counts for each reloaded component and flags any load errors |

60| `/remote-control` | Make this session available for [remote control](/en/remote-control) from claude.ai. Alias: `/rc` |60| `/remote-control` | Make this session available for [remote control](/en/remote-control) from claude.ai. Alias: `/rc` |

61| `/remote-env` | Configure the default remote environment for [web sessions started with `--remote`](/en/claude-code-on-the-web#environment-configuration) |61| `/remote-env` | Configure the default remote environment for [web sessions started with `--remote`](/en/claude-code-on-the-web#environment-configuration) |

62| `/rename [name]` | Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history |62| `/rename [name]` | Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history |

data-usage.md +4 −4

Details

27 27 

28When you see the "How is Claude doing this session?" prompt in Claude Code, responding to this survey (including selecting "Dismiss"), only your numeric rating (1, 2, 3, or dismiss) is recorded. We do not collect or store any conversation transcripts, inputs, outputs, or other session data as part of this survey. Unlike thumbs up/down feedback or `/bug` reports, this session quality survey is a simple product satisfaction metric. Your responses to this survey do not impact your data training preferences and cannot be used to train our AI models.28When you see the "How is Claude doing this session?" prompt in Claude Code, responding to this survey (including selecting "Dismiss"), only your numeric rating (1, 2, 3, or dismiss) is recorded. We do not collect or store any conversation transcripts, inputs, outputs, or other session data as part of this survey. Unlike thumbs up/down feedback or `/bug` reports, this session quality survey is a simple product satisfaction metric. Your responses to this survey do not impact your data training preferences and cannot be used to train our AI models.

29 29 

30To disable these surveys, set `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1`. The survey is also automatically disabled when using third-party providers (Bedrock, Vertex, Foundry) or when telemetry is disabled.30To disable these surveys, set `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1`. The survey is also disabled when `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. To control frequency instead of disabling, set [`feedbackSurveyRate`](/en/settings#available-settings) in your settings file to a probability between `0` and `1`.

31 31 

32### Data retention32### Data retention

33 33 


86 86 

87## Default behaviors by API provider87## Default behaviors by API provider

88 88 

89By default, we disable all non-essential traffic (including error reporting, telemetry, bug reporting functionality, and session quality surveys) when using Bedrock, Vertex, or Foundry. You can also opt out of all of these at once by setting the `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` environment variable. Here are the full default behaviors:89By default, error reporting, telemetry, and bug reporting are disabled when using Bedrock, Vertex, or Foundry. Session quality surveys are the exception and appear regardless of provider. You can opt out of all non-essential traffic, including surveys, at once by setting `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`. Here are the full default behaviors:

90 90 

91| Service | Claude API | Vertex API | Bedrock API | Foundry API |91| Service | Claude API | Vertex API | Bedrock API | Foundry API |

92| ------------------------------- | -------------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ |92| ------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |

93| **Statsig (Metrics)** | Default on.<br />`DISABLE_TELEMETRY=1` to disable. | Default off.<br />`CLAUDE_CODE_USE_VERTEX` must be 1. | Default off.<br />`CLAUDE_CODE_USE_BEDROCK` must be 1. | Default off.<br />`CLAUDE_CODE_USE_FOUNDRY` must be 1. |93| **Statsig (Metrics)** | Default on.<br />`DISABLE_TELEMETRY=1` to disable. | Default off.<br />`CLAUDE_CODE_USE_VERTEX` must be 1. | Default off.<br />`CLAUDE_CODE_USE_BEDROCK` must be 1. | Default off.<br />`CLAUDE_CODE_USE_FOUNDRY` must be 1. |

94| **Sentry (Errors)** | Default on.<br />`DISABLE_ERROR_REPORTING=1` to disable. | Default off.<br />`CLAUDE_CODE_USE_VERTEX` must be 1. | Default off.<br />`CLAUDE_CODE_USE_BEDROCK` must be 1. | Default off.<br />`CLAUDE_CODE_USE_FOUNDRY` must be 1. |94| **Sentry (Errors)** | Default on.<br />`DISABLE_ERROR_REPORTING=1` to disable. | Default off.<br />`CLAUDE_CODE_USE_VERTEX` must be 1. | Default off.<br />`CLAUDE_CODE_USE_BEDROCK` must be 1. | Default off.<br />`CLAUDE_CODE_USE_FOUNDRY` must be 1. |

95| **Claude API (`/bug` reports)** | Default on.<br />`DISABLE_BUG_COMMAND=1` to disable. | Default off.<br />`CLAUDE_CODE_USE_VERTEX` must be 1. | Default off.<br />`CLAUDE_CODE_USE_BEDROCK` must be 1. | Default off.<br />`CLAUDE_CODE_USE_FOUNDRY` must be 1. |95| **Claude API (`/bug` reports)** | Default on.<br />`DISABLE_BUG_COMMAND=1` to disable. | Default off.<br />`CLAUDE_CODE_USE_VERTEX` must be 1. | Default off.<br />`CLAUDE_CODE_USE_BEDROCK` must be 1. | Default off.<br />`CLAUDE_CODE_USE_FOUNDRY` must be 1. |

96| **Session quality surveys** | Default on.<br />`CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1` to disable. | Default off.<br />`CLAUDE_CODE_USE_VERTEX` must be 1. | Default off.<br />`CLAUDE_CODE_USE_BEDROCK` must be 1. | Default off.<br />`CLAUDE_CODE_USE_FOUNDRY` must be 1. |96| **Session quality surveys** | Default on.<br />`CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1` to disable. | Default on.<br />`CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1` to disable. | Default on.<br />`CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1` to disable. | Default on.<br />`CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1` to disable. |

97 97 

98All environment variables can be checked into `settings.json` ([read more](/en/settings)).98All environment variables can be checked into `settings.json` ([read more](/en/settings)).

Details

154 </Step>154 </Step>

155 155 

156 <Step title="Use your new plugin">156 <Step title="Use your new plugin">

157 After installing, the plugin's commands are immediately available. Plugin commands are namespaced by the plugin name, so **commit-commands** provides commands like `/commit-commands:commit`.157 After installing, run `/reload-plugins` to activate the plugin. Plugin commands are namespaced by the plugin name, so **commit-commands** provides commands like `/commit-commands:commit`.

158 158 

159 Try it out by making a change to a file and running:159 Try it out by making a change to a file and running:

160 160 


296 296 

297### Apply plugin changes without restarting297### Apply plugin changes without restarting

298 298 

299When you install, enable, or disable plugins during a session, some changes (like new commands and hooks) take effect immediately. Others, including LSP server updates, require a restart.299When you install, enable, or disable plugins during a session, run `/reload-plugins` to pick up all changes without restarting:

300 

301To activate all pending plugin changes without restarting, run:

302 300 

303```shell theme={null}301```shell theme={null}

304/reload-plugins302/reload-plugins

305```303```

306 304 

307Claude Code reloads all active plugins and reports what was loaded. If any LSP servers were added or updated, it will let you know those require a restart to take effect.305Claude Code reloads all active plugins and shows counts for reloaded commands, skills, agents, hooks, plugin MCP servers, and plugin LSP servers.

308 306 

309## Manage marketplaces307## Manage marketplaces

310 308 

env-vars.md +2 −1

Details

43| `CLAUDE_CODE_DISABLE_CRON` | Set to `1` to disable [scheduled tasks](/en/scheduled-tasks). The `/loop` skill and cron tools become unavailable and any already-scheduled tasks stop firing, including tasks that are already running mid-session |43| `CLAUDE_CODE_DISABLE_CRON` | Set to `1` to disable [scheduled tasks](/en/scheduled-tasks). The `/loop` skill and cron tools become unavailable and any already-scheduled tasks stop firing, including tasks that are already running mid-session |

44| `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` | Set to `1` to disable Anthropic API-specific `anthropic-beta` headers. Use this if experiencing issues like "Unexpected value(s) for the `anthropic-beta` header" when using an LLM gateway with third-party providers |44| `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` | Set to `1` to disable Anthropic API-specific `anthropic-beta` headers. Use this if experiencing issues like "Unexpected value(s) for the `anthropic-beta` header" when using an LLM gateway with third-party providers |

45| `CLAUDE_CODE_DISABLE_FAST_MODE` | Set to `1` to disable [fast mode](/en/fast-mode) |45| `CLAUDE_CODE_DISABLE_FAST_MODE` | Set to `1` to disable [fast mode](/en/fast-mode) |

46| `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY` | Set to `1` to disable the "How is Claude doing?" session quality surveys. Also disabled when using third-party providers or when telemetry is disabled. See [Session quality surveys](/en/data-usage#session-quality-surveys) |46| `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY` | Set to `1` to disable the "How is Claude doing?" session quality surveys. Surveys are also disabled when `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. See [Session quality surveys](/en/data-usage#session-quality-surveys) |

47| `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` | Equivalent of setting `DISABLE_AUTOUPDATER`, `DISABLE_BUG_COMMAND`, `DISABLE_ERROR_REPORTING`, and `DISABLE_TELEMETRY` |47| `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` | Equivalent of setting `DISABLE_AUTOUPDATER`, `DISABLE_BUG_COMMAND`, `DISABLE_ERROR_REPORTING`, and `DISABLE_TELEMETRY` |

48| `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context |48| `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context |

49| `CLAUDE_CODE_EFFORT_LEVEL` | Set the effort level for supported models. Values: `low`, `medium`, `high`, `max` (Opus 4.6 only), or `auto` to use the model default. Takes precedence over `/effort` and the `effortLevel` setting. See [Adjust effort level](/en/model-config#adjust-effort-level) |49| `CLAUDE_CODE_EFFORT_LEVEL` | Set the effort level for supported models. Values: `low`, `medium`, `high`, `max` (Opus 4.6 only), or `auto` to use the model default. Takes precedence over `/effort` and the `effortLevel` setting. See [Adjust effort level](/en/model-config#adjust-effort-level) |


65| `CLAUDE_CODE_SHELL_PREFIX` | Command prefix to wrap all bash commands (for example, for logging or auditing). Example: `/path/to/logger.sh` will execute `/path/to/logger.sh <command>` |65| `CLAUDE_CODE_SHELL_PREFIX` | Command prefix to wrap all bash commands (for example, for logging or auditing). Example: `/path/to/logger.sh` will execute `/path/to/logger.sh <command>` |

66| `CLAUDE_CODE_SIMPLE` | Set to `1` to run with a minimal system prompt and only the Bash, file read, and file edit tools. Disables MCP tools, attachments, hooks, and CLAUDE.md files |66| `CLAUDE_CODE_SIMPLE` | Set to `1` to run with a minimal system prompt and only the Bash, file read, and file edit tools. Disables MCP tools, attachments, hooks, and CLAUDE.md files |

67| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS authentication for Bedrock (for example, when using an LLM gateway) |67| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS authentication for Bedrock (for example, when using an LLM gateway) |

68| `CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS` | Set to `1` to allow [fast mode](/en/fast-mode) when the organization status check fails due to a network error. Useful when a corporate proxy blocks the status endpoint. The API still enforces organization-level disable separately |

68| `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` | Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway) |69| `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` | Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway) |

69| `CLAUDE_CODE_SKIP_VERTEX_AUTH` | Skip Google authentication for Vertex (for example, when using an LLM gateway) |70| `CLAUDE_CODE_SKIP_VERTEX_AUTH` | Skip Google authentication for Vertex (for example, when using an LLM gateway) |

70| `CLAUDE_CODE_SUBAGENT_MODEL` | See [Model configuration](/en/model-config) |71| `CLAUDE_CODE_SUBAGENT_MODEL` | See [Model configuration](/en/model-config) |

fast-mode.md +4 −5

Details

21What to know:21What to know:

22 22 

23* Use `/fast` to toggle on fast mode in Claude Code CLI. Also available via `/fast` in Claude Code VS Code Extension.23* Use `/fast` to toggle on fast mode in Claude Code CLI. Also available via `/fast` in Claude Code VS Code Extension.

24* Fast mode for Opus 4.6 pricing starts at \$30/150 MTok. Fast mode is available at a 50% discount for all plans until 11:59pm PT on February 16.24* Fast mode for Opus 4.6 pricing is \$30/150 MTok.

25* Available to all Claude Code users on subscription plans (Pro/Max/Team/Enterprise) and Claude Console.25* Available to all Claude Code users on subscription plans (Pro/Max/Team/Enterprise) and Claude Console.

26* For Claude Code users on subscription plans (Pro/Max/Team/Enterprise), fast mode is available via extra usage only and not included in the subscription rate limits.26* For Claude Code users on subscription plans (Pro/Max/Team/Enterprise), fast mode is available via extra usage only and not included in the subscription rate limits.

27 27 


52Fast mode has higher per-token pricing than standard Opus 4.6:52Fast mode has higher per-token pricing than standard Opus 4.6:

53 53 

54| Mode | Input (MTok) | Output (MTok) |54| Mode | Input (MTok) | Output (MTok) |

55| ------------------------------ | ------------ | ------------- |55| --------------------- | ------------ | ------------- |

56| Fast mode on Opus 4.6 (\<200K) | \$30 | \$150 |56| Fast mode on Opus 4.6 | \$30 | \$150 |

57| Fast mode on Opus 4.6 (>200K) | \$60 | \$225 |

58 57 

59Fast mode is compatible with the 1M token extended context window.58Fast mode pricing is flat across the full 1M token context window.

60 59 

61When 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.60When 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.

62 61 

hooks.md +33 −4

Details

431 431 

432The `disableAllHooks` setting respects the managed settings hierarchy. If an administrator has configured hooks through managed policy settings, `disableAllHooks` set in user, project, or local settings cannot disable those managed hooks. Only `disableAllHooks` set at the managed settings level can disable managed hooks.432The `disableAllHooks` setting respects the managed settings hierarchy. If an administrator has configured hooks through managed policy settings, `disableAllHooks` set in user, project, or local settings cannot disable those managed hooks. Only `disableAllHooks` set at the managed settings level can disable managed hooks.

433 433 

434Direct edits to hooks in settings files don't take effect immediately. Claude Code captures a snapshot of hooks at startup and uses it throughout the session. This prevents malicious or accidental hook modifications from taking effect mid-session without your review. If hooks are modified externally, Claude Code warns you and requires review in the `/hooks` menu before changes apply.434Direct edits to hooks in settings files are normally picked up automatically by the file watcher.

435 435 

436## Hook input and output436## Hook input and output

437 437 


977 "description": "Remove node_modules directory"977 "description": "Remove node_modules directory"

978 },978 },

979 "permission_suggestions": [979 "permission_suggestions": [

980 { "type": "toolAlwaysAllow", "tool": "Bash" }980 {

981 "type": "addRules",

982 "rules": [{ "toolName": "Bash", "ruleContent": "rm -rf node_modules" }],

983 "behavior": "allow",

984 "destination": "localSettings"

985 }

981 ]986 ]

982}987}

983```988```


987`PermissionRequest` hooks can allow or deny permission requests. In addition to the [JSON output fields](#json-output) available to all hooks, your hook script can return a `decision` object with these event-specific fields:992`PermissionRequest` hooks can allow or deny permission requests. In addition to the [JSON output fields](#json-output) available to all hooks, your hook script can return a `decision` object with these event-specific fields:

988 993 

989| Field | Description |994| Field | Description |

990| :------------------- | :------------------------------------------------------------------------------------------------------------- |995| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

991| `behavior` | `"allow"` grants the permission, `"deny"` denies it |996| `behavior` | `"allow"` grants the permission, `"deny"` denies it |

992| `updatedInput` | For `"allow"` only: modifies the tool's input parameters before execution |997| `updatedInput` | For `"allow"` only: modifies the tool's input parameters before execution |

993| `updatedPermissions` | For `"allow"` only: applies permission rule updates, equivalent to the user selecting an "always allow" option |998| `updatedPermissions` | For `"allow"` only: array of [permission update entries](#permission-update-entries) to apply, such as adding an allow rule or changing the session permission mode |

994| `message` | For `"deny"` only: tells Claude why the permission was denied |999| `message` | For `"deny"` only: tells Claude why the permission was denied |

995| `interrupt` | For `"deny"` only: if `true`, stops Claude |1000| `interrupt` | For `"deny"` only: if `true`, stops Claude |

996 1001 


1008}1013}

1009```1014```

1010 1015 

1016#### Permission update entries

1017 

1018The `updatedPermissions` output field and the [`permission_suggestions` input field](#permissionrequest-input) both use the same array of entry objects. Each entry has a `type` that determines its other fields, and a `destination` that controls where the change is written.

1019 

1020| `type` | Fields | Effect |

1021| :------------------ | :--------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

1022| `addRules` | `rules`, `behavior`, `destination` | Adds permission rules. `rules` is an array of `{toolName, ruleContent?}` objects. Omit `ruleContent` to match the whole tool. `behavior` is `"allow"`, `"deny"`, or `"ask"` |

1023| `replaceRules` | `rules`, `behavior`, `destination` | Replaces all rules of the given `behavior` at the `destination` with the provided `rules` |

1024| `removeRules` | `rules`, `behavior`, `destination` | Removes matching rules of the given `behavior` |

1025| `setMode` | `mode`, `destination` | Changes the permission mode. Valid modes are `default`, `acceptEdits`, `dontAsk`, `bypassPermissions`, and `plan` |

1026| `addDirectories` | `directories`, `destination` | Adds working directories. `directories` is an array of path strings |

1027| `removeDirectories` | `directories`, `destination` | Removes working directories |

1028 

1029The `destination` field on every entry determines whether the change stays in memory or persists to a settings file.

1030 

1031| `destination` | Writes to |

1032| :---------------- | :---------------------------------------------- |

1033| `session` | in-memory only, discarded when the session ends |

1034| `localSettings` | `.claude/settings.local.json` |

1035| `projectSettings` | `.claude/settings.json` |

1036| `userSettings` | `~/.claude/settings.json` |

1037 

1038A hook can echo one of the `permission_suggestions` it received as its own `updatedPermissions` output, which is equivalent to the user selecting that "always allow" option in the dialog.

1039 

1011### PostToolUse1040### PostToolUse

1012 1041 

1013Runs immediately after a tool completes successfully.1042Runs immediately after a tool completes successfully.

hooks-guide.md +51 −2

Details

69* [Block edits to protected files](#block-edits-to-protected-files)69* [Block edits to protected files](#block-edits-to-protected-files)

70* [Re-inject context after compaction](#re-inject-context-after-compaction)70* [Re-inject context after compaction](#re-inject-context-after-compaction)

71* [Audit configuration changes](#audit-configuration-changes)71* [Audit configuration changes](#audit-configuration-changes)

72* [Auto-approve specific permission prompts](#auto-approve-specific-permission-prompts)

72 73 

73### Get notified when Claude needs input74### Get notified when Claude needs input

74 75 


279 280 

280The matcher filters by configuration type: `user_settings`, `project_settings`, `local_settings`, `policy_settings`, or `skills`. To block a change from taking effect, exit with code 2 or return `{"decision": "block"}`. See the [ConfigChange reference](/en/hooks#configchange) for the full input schema.281The matcher filters by configuration type: `user_settings`, `project_settings`, `local_settings`, `policy_settings`, or `skills`. To block a change from taking effect, exit with code 2 or return `{"decision": "block"}`. See the [ConfigChange reference](/en/hooks#configchange) for the full input schema.

281 282 

283### Auto-approve specific permission prompts

284 

285Skip the approval dialog for tool calls you always allow. This example auto-approves `ExitPlanMode`, the tool Claude calls when it finishes presenting a plan and asks to proceed, so you aren't prompted every time a plan is ready.

286 

287Unlike the exit-code examples above, auto-approval requires your hook to write a JSON decision to stdout. A `PermissionRequest` hook fires when Claude Code is about to show a permission dialog, and returning `"behavior": "allow"` answers it on your behalf.

288 

289The matcher scopes the hook to `ExitPlanMode` only, so no other prompts are affected. Add this to `~/.claude/settings.json`:

290 

291```json theme={null}

292{

293 "hooks": {

294 "PermissionRequest": [

295 {

296 "matcher": "ExitPlanMode",

297 "hooks": [

298 {

299 "type": "command",

300 "command": "echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PermissionRequest\", \"decision\": {\"behavior\": \"allow\"}}}'"

301 }

302 ]

303 }

304 ]

305 }

306}

307```

308 

309When the hook approves, Claude Code exits plan mode and restores whatever permission mode was active before you entered plan mode. The transcript shows "Allowed by PermissionRequest hook" where the dialog would have appeared. The hook path always keeps the current conversation: it cannot clear context and start a fresh implementation session the way the dialog can.

310 

311To set a specific permission mode instead, your hook's output can include an `updatedPermissions` array with a `setMode` entry. The `mode` value is any permission mode like `default`, `acceptEdits`, or `bypassPermissions`, and `destination: "session"` applies it for the current session only.

312 

313To switch the session to `acceptEdits`, your hook writes this JSON to stdout:

314 

315```json theme={null}

316{

317 "hookSpecificOutput": {

318 "hookEventName": "PermissionRequest",

319 "decision": {

320 "behavior": "allow",

321 "updatedPermissions": [

322 { "type": "setMode", "mode": "acceptEdits", "destination": "session" }

323 ]

324 }

325 }

326}

327```

328 

329Keep the matcher as narrow as possible. Matching on `.*` or leaving the matcher empty would auto-approve every permission prompt, including file writes and shell commands. See the [PermissionRequest reference](/en/hooks#permissionrequest-decision-control) for the full set of decision fields.

330 

282## How hooks work331## How hooks work

283 332 

284Hook events fire at specific lifecycle points in Claude Code. When an event fires, all matching hooks run in parallel, and identical hook commands are automatically deduplicated. The table below shows each event and when it triggers:333Hook events fire at specific lifecycle points in Claude Code. When an event fires, all matching hooks run in parallel, and identical hook commands are automatically deduplicated. The table below shows each event and when it triggers:


512 561 

513Run [`/hooks`](/en/hooks#the-hooks-menu) in Claude Code to browse all configured hooks grouped by event. To disable all hooks at once, set `"disableAllHooks": true` in your settings file.562Run [`/hooks`](/en/hooks#the-hooks-menu) in Claude Code to browse all configured hooks grouped by event. To disable all hooks at once, set `"disableAllHooks": true` in your settings file.

514 563 

515If you edit settings files directly while Claude Code is running, hook changes won't take effect until you review them in the `/hooks` menu or restart your session. This prevents unexpected hook modifications from taking effect mid-session.564If you edit settings files directly while Claude Code is running, the file watcher normally picks up hook changes automatically.

516 565 

517## Prompt-based hooks566## Prompt-based hooks

518 567 


645 694 

646You edited a settings file but the hooks don't appear in the menu.695You edited a settings file but the hooks don't appear in the menu.

647 696 

648* Restart your session or open `/hooks` to reload. Manual file edits require a reload before they take effect.697* File edits are normally picked up automatically. If they haven't appeared after a few seconds, the file watcher may have missed the change: restart your session to force a reload.

649* Verify your JSON is valid (trailing commas and comments are not allowed)698* Verify your JSON is valid (trailing commas and comments are not allowed)

650* Confirm the settings file is in the correct location: `.claude/settings.json` for project hooks, `~/.claude/settings.json` for global hooks699* Confirm the settings file is in the correct location: `.claude/settings.json` for project hooks, `~/.claude/settings.json` for global hooks

651 700 

mcp.md +1 −1

Details

395 395 

396**Plugin MCP features**:396**Plugin MCP features**:

397 397 

398* **Automatic lifecycle**: Servers start when plugin enables, but you must restart Claude Code to apply MCP server changes (enabling or disabling)398* **Automatic lifecycle**: At session startup, servers for enabled plugins connect automatically. If you enable or disable a plugin during a session, run `/reload-plugins` to connect or disconnect its MCP servers

399* **Environment variables**: Use `${CLAUDE_PLUGIN_ROOT}` for plugin-relative paths399* **Environment variables**: Use `${CLAUDE_PLUGIN_ROOT}` for plugin-relative paths

400* **User environment access**: Access to same environment variables as manually configured servers400* **User environment access**: Access to same environment variables as manually configured servers

401* **Multiple transport types**: Support stdio, SSE, and HTTP transports (transport support may vary by server)401* **Multiple transport types**: Support stdio, SSE, and HTTP transports (transport support may vary by server)

plugins.md +1 −1

Details

283 283 

284When a `--plugin-dir` plugin has the same name as an installed marketplace plugin, the local copy takes precedence for that session. This lets you test changes to a plugin you already have installed without uninstalling it first. Marketplace plugins force-enabled by managed settings are the only exception and cannot be overridden.284When a `--plugin-dir` plugin has the same name as an installed marketplace plugin, the local copy takes precedence for that session. This lets you test changes to a plugin you already have installed without uninstalling it first. Marketplace plugins force-enabled by managed settings are the only exception and cannot be overridden.

285 285 

286As you make changes to your plugin, run `/reload-plugins` to pick up the updates without restarting. Changes to LSP server configuration still require a full restart. Test your plugin components:286As you make changes to your plugin, run `/reload-plugins` to pick up the updates without restarting. This reloads commands, skills, agents, hooks, plugin MCP servers, and plugin LSP servers. Test your plugin components:

287 287 

288* Try your skills with `/plugin-name:skill-name`288* Try your skills with `/plugin-name:skill-name`

289* Check that agents appear in `/agents`289* Check that agents appear in `/agents`

Details

53 "Read(./.env)",53 "Read(./.env)",

54 "Read(./.env.*)",54 "Read(./.env.*)",

55 "Read(./secrets/**)"55 "Read(./secrets/**)"

56 ]56 ],

57 },

58 "disableBypassPermissionsMode": "disable"57 "disableBypassPermissionsMode": "disable"

59 }58 }

59 }

60 ```60 ```

61 </Step>61 </Step>

62 62 

settings.md +1 −1

Details

197| `prefersReducedMotion` | Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility | `true` |197| `prefersReducedMotion` | Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility | `true` |

198| `fastModePerSessionOptIn` | When `true`, fast mode does not persist across sessions. Each session starts with fast mode off, requiring users to enable it with `/fast`. The user's fast mode preference is still saved. See [Require per-session opt-in](/en/fast-mode#require-per-session-opt-in) | `true` |198| `fastModePerSessionOptIn` | When `true`, fast mode does not persist across sessions. Each session starts with fast mode off, requiring users to enable it with `/fast`. The user's fast mode preference is still saved. See [Require per-session opt-in](/en/fast-mode#require-per-session-opt-in) | `true` |

199| `teammateMode` | How [agent team](/en/agent-teams) teammates display: `auto` (picks split panes in tmux or iTerm2, in-process otherwise), `in-process`, or `tmux`. See [set up agent teams](/en/agent-teams#set-up-agent-teams) | `"in-process"` |199| `teammateMode` | How [agent team](/en/agent-teams) teammates display: `auto` (picks split panes in tmux or iTerm2, in-process otherwise), `in-process`, or `tmux`. See [set up agent teams](/en/agent-teams#set-up-agent-teams) | `"in-process"` |

200| `feedbackSurveyRate` | Probability (0–1) that the session quality survey appears when eligible. Enterprise admins can set this to control how often the survey is shown to users. A value of `0.05` means 5% of eligible sessions | `0.05` |200| `feedbackSurveyRate` | Probability (0–1) that the [session quality survey](/en/data-usage#session-quality-surveys) appears when eligible. Set to `0` to suppress entirely. Useful when using Bedrock, Vertex, or Foundry where the default sample rate does not apply | `0.05` |

201 201 

202### Worktree settings202### Worktree settings

203 203 

statusline.md +6 −4

Details

290 MODEL=$(echo "$input" | jq -r '.model.display_name')290 MODEL=$(echo "$input" | jq -r '.model.display_name')

291 PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)291 PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)

292 292 

293 # Build progress bar: printf creates spaces, tr replaces with blocks293 # Build progress bar: printf -v creates a run of spaces, then

294 # ${var// /▓} replaces each space with a block character

294 BAR_WIDTH=10295 BAR_WIDTH=10

295 FILLED=$((PCT * BAR_WIDTH / 100))296 FILLED=$((PCT * BAR_WIDTH / 100))

296 EMPTY=$((BAR_WIDTH - FILLED))297 EMPTY=$((BAR_WIDTH - FILLED))

297 BAR=""298 BAR=""

298 [ "$FILLED" -gt 0 ] && BAR=$(printf "%${FILLED}s" | tr ' ' '')299 [ "$FILLED" -gt 0 ] && printf -v FILL "%${FILLED}s" && BAR="${FILL// /}"

299 [ "$EMPTY" -gt 0 ] && BAR="${BAR}$(printf "%${EMPTY}s" | tr ' ' '')"300 [ "$EMPTY" -gt 0 ] && printf -v PAD "%${EMPTY}s" && BAR="${BAR}${PAD// /}"

300 301 

301 echo "[$MODEL] $BAR $PCT%"302 echo "[$MODEL] $BAR $PCT%"

302 ```303 ```


522 else BAR_COLOR="$GREEN"; fi523 else BAR_COLOR="$GREEN"; fi

523 524 

524 FILLED=$((PCT / 10)); EMPTY=$((10 - FILLED))525 FILLED=$((PCT / 10)); EMPTY=$((10 - FILLED))

525 BAR=$(printf "%${FILLED}s" | tr ' ' '█')$(printf "%${EMPTY}s" | tr ' ' '░')526 printf -v FILL "%${FILLED}s"; printf -v PAD "%${EMPTY}s"

527 BAR="${FILL// /█}${PAD// /░}"

526 528 

527 MINS=$((DURATION_MS / 60000)); SECS=$(((DURATION_MS % 60000) / 1000))529 MINS=$((DURATION_MS / 60000)); SECS=$(((DURATION_MS % 60000) / 1000))

528 530 

sub-agents.md +4 −0

Details

184 184 

185**Plugin subagents** come from [plugins](/en/plugins) you've installed. They appear in `/agents` alongside your custom subagents. See the [plugin components reference](/en/plugins-reference#agents) for details on creating plugin subagents.185**Plugin subagents** come from [plugins](/en/plugins) you've installed. They appear in `/agents` alongside your custom subagents. See the [plugin components reference](/en/plugins-reference#agents) for details on creating plugin subagents.

186 186 

187<Note>

188 For security reasons, plugin subagents do not support the `hooks`, `mcpServers`, or `permissionMode` frontmatter fields. These fields are ignored when loading agents from a plugin. If you need them, copy the agent file into `.claude/agents/` or `~/.claude/agents/`. You can also add rules to [`permissions.allow`](/en/settings#permission-settings) in `settings.json` or `settings.local.json`, but these rules apply to the entire session, not just the plugin subagent.

189</Note>

190 

187### Write subagent files191### Write subagent files

188 192 

189Subagent files use YAML frontmatter for configuration, followed by the system prompt in Markdown:193Subagent files use YAML frontmatter for configuration, followed by the system prompt in Markdown: