SpyBara
Go Premium

Documentation 2026-01-31 03:42 UTC to 2026-02-01 21:03 UTC

7 files changed +131 −36. View all changes and history on the product overview
2026
Sat 28 21:01 Fri 27 21:05 Thu 26 21:08 Wed 25 03:47 Tue 24 21:08 Mon 23 21:13 Sat 21 18:03 Fri 20 21:03 Thu 19 21:06 Wed 18 03:48 Tue 17 21:08 Mon 16 21:05 Sat 14 03:44 Fri 13 21:09 Thu 12 00:06 Wed 11 21:10 Tue 10 21:13 Mon 9 15:17 Sat 7 21:05 Fri 6 21:06 Thu 5 21:06 Wed 4 21:07 Tue 3 21:08 Sun 1 21:03

data-usage.md +9 −6

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.

31 

30### Data retention32### Data retention

31 33 

32Anthropic retains Claude Code data based on your account type and preferences.34Anthropic retains Claude Code data based on your account type and preferences.


82 84 

83## Default behaviors by API provider85## Default behaviors by API provider

84 86 

85By default, we disable all non-essential traffic (including error reporting, telemetry, and bug reporting functionality) when using Bedrock or Vertex. 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:87By 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:

86 88 

87| Service | Claude API | Vertex API | Bedrock API |89| Service | Claude API | Vertex API | Bedrock API | Foundry API |

88| ------------------------------- | -------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------ |90| ------------------------------- | -------------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ |

89| **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. |91| **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. |

90| **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. |92| **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. |

91| **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. |93| **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. |

94| **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. |

92 95 

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

hooks.md +79 −22

Details

61}61}

62```62```

63 63 

64The script reads the JSON input from stdin, extracts the command, and blocks it if it contains `rm -rf`:64The script reads the JSON input from stdin, extracts the command, and returns a `permissionDecision` of `"deny"` if it contains `rm -rf`:

65 65 

66```bash theme={null}66```bash theme={null}

67#!/bin/bash67#!/bin/bash


69COMMAND=$(jq -r '.tool_input.command')69COMMAND=$(jq -r '.tool_input.command')

70 70 

71if echo "$COMMAND" | grep -q 'rm -rf'; then71if echo "$COMMAND" | grep -q 'rm -rf'; then

72 echo '{"decision":"block","reason":"Destructive command blocked by hook"}'72 jq -n '{

73 hookSpecificOutput: {

74 hookEventName: "PreToolUse",

75 permissionDecision: "deny",

76 permissionDecisionReason: "Destructive command blocked by hook"

77 }

78 }'

73else79else

74 exit 0 # allow the command80 exit 0 # allow the command

75fi81fi


98 The script extracts `"rm -rf /tmp/build"` from the input and finds `rm -rf`, so it prints a decision to stdout:104 The script extracts `"rm -rf /tmp/build"` from the input and finds `rm -rf`, so it prints a decision to stdout:

99 105 

100 ```json theme={null}106 ```json theme={null}

101 { "decision": "block", "reason": "Destructive command blocked by hook" }107 {

108 "hookSpecificOutput": {

109 "hookEventName": "PreToolUse",

110 "permissionDecision": "deny",

111 "permissionDecisionReason": "Destructive command blocked by hook"

112 }

113 }

102 ```114 ```

103 115 

104 If the command had been safe (like `npm test`), the script would hit `exit 0` instead, which tells Claude Code to allow the tool call with no further action.116 If the command had been safe (like `npm test`), the script would hit `exit 0` instead, which tells Claude Code to allow the tool call with no further action.


403 415 

404The exit code from your hook command tells Claude Code whether the action should proceed, be blocked, or be ignored.416The exit code from your hook command tells Claude Code whether the action should proceed, be blocked, or be ignored.

405 417 

406**Exit 0** means success. Claude Code parses stdout for [JSON output fields](#json-output) like `decision` or `reason`. JSON output is only processed on exit 0. For most events, stdout is only shown in verbose mode (`Ctrl+O`). The exceptions are `UserPromptSubmit` and `SessionStart`, where stdout is added as context that Claude can see and act on.418**Exit 0** means success. Claude Code parses stdout for [JSON output fields](#json-output). JSON output is only processed on exit 0. For most events, stdout is only shown in verbose mode (`Ctrl+O`). The exceptions are `UserPromptSubmit` and `SessionStart`, where stdout is added as context that Claude can see and act on.

407 419 

408**Exit 2** means a blocking error. Claude Code ignores stdout and any JSON in it. Instead, stderr text is fed back to Claude as an error message. The effect depends on the event: `PreToolUse` blocks the tool call, `UserPromptSubmit` rejects the prompt, and so on. See [exit code 2 behavior](#exit-code-2-behavior-per-event) for the full list.420**Exit 2** means a blocking error. Claude Code ignores stdout and any JSON in it. Instead, stderr text is fed back to Claude as an error message. The effect depends on the event: `PreToolUse` blocks the tool call, `UserPromptSubmit` rejects the prompt, and so on. See [exit code 2 behavior](#exit-code-2-behavior-per-event) for the full list.

409 421 


445 457 

446### JSON output458### JSON output

447 459 

448You must choose one approach per hook, not both: either use exit codes alone for signaling, or exit 0 and print JSON for structured control. Claude Code only processes JSON on exit 0. If you exit 2, any JSON is ignored.460Exit codes let you allow or block, but JSON output gives you finer-grained control. Instead of exiting with code 2 to block, exit 0 and print a JSON object to stdout. Claude Code reads specific fields from that JSON to control behavior, including [decision control](#decision-control) for blocking, allowing, or escalating to the user.

449 461 

450Instead of relying on exit codes alone, hooks can print JSON to stdout on exit 0. Claude Code reads specific fields from this JSON to decide what to do next.462<Note>

463 You must choose one approach per hook, not both: either use exit codes alone for signaling, or exit 0 and print JSON for structured control. Claude Code only processes JSON on exit 0. If you exit 2, any JSON is ignored.

464</Note>

451 465 

452Your hook's stdout must contain only the JSON object. If your shell profile prints text on startup, it can interfere with JSON parsing. See [JSON validation failed](/en/hooks-guide#json-validation-failed) in the troubleshooting guide.466Your hook's stdout must contain only the JSON object. If your shell profile prints text on startup, it can interfere with JSON parsing. See [JSON validation failed](/en/hooks-guide#json-validation-failed) in the troubleshooting guide.

453 467 

454The JSON object has two parts:468The JSON object supports three kinds of fields:

455 469 

456* **Top-level fields** like `continue` and `decision` work across all events. These are listed in the table below.470* **Universal fields** like `continue` work across all events. These are listed in the table below.

457* **`hookSpecificOutput`** is a nested object for event-specific fields like `permissionDecision` or `additionalContext`. It requires a `hookEventName` field set to the event name, like `"PreToolUse"` or `"Stop"`. Each event's decision control section under [Hook events](#hook-events) documents what fields go here.471* **Top-level `decision` and `reason`** are used by some events to block or provide feedback.

472* **`hookSpecificOutput`** is a nested object for events that need richer control. It requires a `hookEventName` field set to the event name.

458 473 

459| Field | Default | Description |474| Field | Default | Description |

460| :--------------- | :------ | :---------------------------------------------------------------------------------------------------------------------------------------------------- |475| :--------------- | :------ | :------------------------------------------------------------------------------------------------------------------------- |

461| `continue` | `true` | If `false`, Claude stops processing entirely after the hook runs. Takes precedence over event-specific fields like `decision` or `permissionDecision` |476| `continue` | `true` | If `false`, Claude stops processing entirely after the hook runs. Takes precedence over any event-specific decision fields |

462| `stopReason` | none | Message shown to the user when `continue` is `false`. Not shown to Claude |477| `stopReason` | none | Message shown to the user when `continue` is `false`. Not shown to Claude |

463| `suppressOutput` | `false` | If `true`, hides stdout from verbose mode output |478| `suppressOutput` | `false` | If `true`, hides stdout from verbose mode output |

464| `systemMessage` | none | Warning message shown to the user |479| `systemMessage` | none | Warning message shown to the user |

465 480 

466This example uses a top-level field to stop Claude:481To stop Claude entirely regardless of event type:

467 482 

468```json theme={null}483```json theme={null}

469{ "continue": false, "stopReason": "Build failed, fix errors before continuing" }484{ "continue": false, "stopReason": "Build failed, fix errors before continuing" }

470```485```

471 486 

472This example uses `hookSpecificOutput` to deny a PreToolUse tool call:487#### Decision control

473 488 

474```json theme={null}489Not every event supports blocking or controlling behavior through JSON. The events that do each use a different set of fields to express that decision. Use this table as a quick reference before writing a hook:

475{490 

491| Events | Decision pattern | Key fields |

492| :-------------------------------------------------------------------- | :------------------- | :---------------------------------------------------------------- |

493| UserPromptSubmit, PostToolUse, PostToolUseFailure, Stop, SubagentStop | Top-level `decision` | `decision: "block"`, `reason` |

494| PreToolUse | `hookSpecificOutput` | `permissionDecision` (allow/deny/ask), `permissionDecisionReason` |

495| PermissionRequest | `hookSpecificOutput` | `decision.behavior` (allow/deny) |

496 

497Here are examples of each pattern in action:

498 

499<Tabs>

500 <Tab title="Top-level decision">

501 Used by `UserPromptSubmit`, `PostToolUse`, `PostToolUseFailure`, `Stop`, and `SubagentStop`. The only value is `"block"` — to allow the action to proceed, omit `decision` from your JSON, or exit 0 without any JSON at all:

502 

503 ```json theme={null}

504 {

505 "decision": "block",

506 "reason": "Test suite must pass before proceeding"

507 }

508 ```

509 </Tab>

510 

511 <Tab title="PreToolUse">

512 Uses `hookSpecificOutput` for richer control: allow, deny, or escalate to the user. You can also modify tool input before it runs or inject additional context for Claude. See [PreToolUse decision control](#pretooluse-decision-control) for the full set of options.

513 

514 ```json theme={null}

515 {

476 "hookSpecificOutput": {516 "hookSpecificOutput": {

477 "hookEventName": "PreToolUse",517 "hookEventName": "PreToolUse",

478 "permissionDecision": "deny",518 "permissionDecision": "deny",

479 "permissionDecisionReason": "Database writes are not allowed"519 "permissionDecisionReason": "Database writes are not allowed"

480 }520 }

481}521 }

482```522 ```

523 </Tab>

524 

525 <Tab title="PermissionRequest">

526 Uses `hookSpecificOutput` to allow or deny a permission request on behalf of the user. When allowing, you can also modify the tool's input or apply permission rules so the user isn't prompted again. See [PermissionRequest decision control](#permissionrequest-decision-control) for the full set of options.

527 

528 ```json theme={null}

529 {

530 "hookSpecificOutput": {

531 "hookEventName": "PermissionRequest",

532 "decision": {

533 "behavior": "allow",

534 "updatedInput": {

535 "command": "npm run lint"

536 }

537 }

538 }

539 }

540 ```

541 </Tab>

542</Tabs>

483 543 

484For extended examples including Bash command validation, prompt filtering, and auto-approval scripts, see [What you can automate](/en/hooks-guide#what-you-can-automate) in the guide and the [Bash command validator reference implementation](https://github.com/anthropics/claude-code/blob/main/examples/hooks/bash_command_validator_example.py).544For extended examples including Bash command validation, prompt filtering, and auto-approval scripts, see [What you can automate](/en/hooks-guide#what-you-can-automate) in the guide and the [Bash command validator reference implementation](https://github.com/anthropics/claude-code/blob/main/examples/hooks/bash_command_validator_example.py).

485 545 


739 799 

740#### PreToolUse decision control800#### PreToolUse decision control

741 801 

742`PreToolUse` hooks can control whether a tool call proceeds. In addition to the [JSON output fields](#json-output) available to all hooks, your hook script can return a `hookSpecificOutput` object with these event-specific fields:802`PreToolUse` hooks can control whether a tool call proceeds. Unlike other hooks that use a top-level `decision` field, PreToolUse returns its decision inside a `hookSpecificOutput` object. This gives it richer control: three outcomes (allow, deny, or ask) plus the ability to modify tool input before execution.

743 803 

744| Field | Description |804| Field | Description |

745| :------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |805| :------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |


763```823```

764 824 

765<Note>825<Note>

766 The `decision` and `reason` fields are deprecated for PreToolUse hooks.826 PreToolUse previously used top-level `decision` and `reason` fields, but these are deprecated for this event. Use `hookSpecificOutput.permissionDecision` and `hookSpecificOutput.permissionDecisionReason` instead. The deprecated values `"approve"` and `"block"` map to `"allow"` and `"deny"` respectively. Other events like PostToolUse and Stop continue to use top-level `decision` and `reason` as their current format.

767 Use `hookSpecificOutput.permissionDecision` and

768 `hookSpecificOutput.permissionDecisionReason` instead. The deprecated fields

769 `"approve"` and `"block"` map to `"allow"` and `"deny"` respectively.

770</Note>827</Note>

771 828 

772### PermissionRequest829### PermissionRequest

hooks-guide.md +5 −3

Details

348}348}

349```349```

350 350 

351Claude Code reads `permissionDecision` and cancels the tool call, then feeds `permissionDecisionReason` back to Claude as feedback. The three options are:351Claude Code reads `permissionDecision` and cancels the tool call, then feeds `permissionDecisionReason` back to Claude as feedback. These three options are specific to `PreToolUse`:

352 352 

353* `"allow"`: proceed without showing a permission prompt353* `"allow"`: proceed without showing a permission prompt

354* `"deny"`: cancel the tool call and send the reason to Claude354* `"deny"`: cancel the tool call and send the reason to Claude

355* `"ask"`: show the permission prompt to the user as normal355* `"ask"`: show the permission prompt to the user as normal

356 356 

357For `UserPromptSubmit` hooks, use `additionalContext` instead to inject text into Claude's context. See [Control behavior with JSON output](/en/hooks#json-output) in the reference for the full JSON schema. Prompt-based hooks (`type: "prompt"`) handle output differently: see [Prompt-based hooks](#prompt-based-hooks).357Other events use different decision patterns. For example, `PostToolUse` and `Stop` hooks use a top-level `decision: "block"` field, while `PermissionRequest` uses `hookSpecificOutput.decision.behavior`. See the [summary table](/en/hooks#decision-control) in the reference for a full breakdown by event.

358 

359For `UserPromptSubmit` hooks, use `additionalContext` instead to inject text into Claude's context. Prompt-based hooks (`type: "prompt"`) handle output differently: see [Prompt-based hooks](#prompt-based-hooks).

358 360 

359### Filter hooks with matchers361### Filter hooks with matchers

360 362 


604 606 

605```607```

606Shell ready on arm64608Shell ready on arm64

607{"decision": "allow"}609{"decision": "block", "reason": "Not allowed"}

608```610```

609 611 

610Claude Code tries to parse this as JSON and fails. To fix this, wrap echo statements in your shell profile so they only run in interactive shells:612Claude Code tries to parse this as JSON and fails. To fix this, wrap echo statements in your shell profile so they only run in interactive shells:

Details

270 270 

271This is useful for quick shell operations while maintaining conversation context.271This is useful for quick shell operations while maintaining conversation context.

272 272 

273## Prompt suggestions

274 

275When you first open a session, a grayed-out example command appears in the prompt input to help you get started. Claude Code picks this from your project's git history, so it reflects files you've been working on recently.

276 

277After Claude responds, suggestions continue to appear based on your conversation history, such as a follow-up step from a multi-part request or a natural continuation of your workflow.

278 

279* Press **Tab** to accept the suggestion, or press **Enter** to accept and submit

280* Start typing to dismiss it

281 

282The 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.

283 

284Suggestions are automatically skipped after the first turn of a conversation, in non-interactive mode, and in plan mode.

285 

286To disable prompt suggestions entirely, set the environment variable or toggle the setting in `/config`:

287 

288```bash theme={null}

289export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false

290```

291 

273## Task list292## Task list

274 293 

275When working on complex, multi-step work, Claude creates a task list to track progress. Tasks appear in the status area of your terminal with indicators showing what's pending, in progress, or complete.294When working on complex, multi-step work, Claude creates a task list to track progress. Tasks appear in the status area of your terminal with indicators showing what's pending, in progress, or complete.

memory.md +7 −1

Details

37- git workflow @docs/git-instructions.md37- git workflow @docs/git-instructions.md

38```38```

39 39 

40Both relative and absolute paths are allowed. In particular, importing files in user's home dir is a convenient way for your team members to provide individual instructions that are not checked into the repository. Imports are an alternative to CLAUDE.local.md that work better across multiple git worktrees.40Both relative and absolute paths are allowed. Relative paths resolve relative to the file containing the import, not the working directory. For private per-project preferences that shouldn't be checked into version control, prefer `CLAUDE.local.md`: it is automatically loaded and added to `.gitignore`.

41 

42If you work across multiple git worktrees, `CLAUDE.local.md` only exists in one. Use a home-directory import instead so all worktrees share the same personal instructions:

41 43 

42```44```

43# Individual Preferences45# Individual Preferences

44- @~/.claude/my-project-instructions.md46- @~/.claude/my-project-instructions.md

45```47```

46 48 

49<Warning>

50 The first time Claude Code encounters external imports in a project, it shows an approval dialog listing the specific files. Approve to load them; decline to skip them. This is a one-time decision per project: once declined, the dialog does not resurface and the imports remain disabled.

51</Warning>

52 

47To avoid potential collisions, imports are not evaluated inside markdown code spans and code blocks.53To avoid potential collisions, imports are not evaluated inside markdown code spans and code blocks.

48 54 

49```55```

settings.md +5 −0

Details

107 107 

108```JSON Example settings.json theme={null}108```JSON Example settings.json theme={null}

109{109{

110 "$schema": "https://json.schemastore.org/claude-code-settings.json",

110 "permissions": {111 "permissions": {

111 "allow": [112 "allow": [

112 "Bash(npm run lint)",113 "Bash(npm run lint)",


132}133}

133```134```

134 135 

136The `$schema` line in the example above points to the [official JSON schema](https://json.schemastore.org/claude-code-settings.json) for Claude Code settings. Adding it to your `settings.json` enables autocomplete and inline validation in VS Code, Cursor, and any other editor that supports JSON schema validation.

137 

135### Available settings138### Available settings

136 139 

137`settings.json` supports a number of options:140`settings.json` supports a number of options:


811| `CLAUDE_CODE_CLIENT_KEY` | Path to client private key file for mTLS authentication | |814| `CLAUDE_CODE_CLIENT_KEY` | Path to client private key file for mTLS authentication | |

812| `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 | |815| `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 | |

813| `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` | Set to `1` to disable all background task functionality, including the `run_in_background` parameter on Bash and subagent tools, auto-backgrounding, and the Ctrl+B shortcut | |816| `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` | Set to `1` to disable all background task functionality, including the `run_in_background` parameter on Bash and subagent tools, auto-backgrounding, and the Ctrl+B shortcut | |

817| `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) | |

814| `CLAUDE_CODE_EXIT_AFTER_STOP_DELAY` | Time in milliseconds to wait after the query loop becomes idle before automatically exiting. Useful for automated workflows and scripts using SDK mode | |818| `CLAUDE_CODE_EXIT_AFTER_STOP_DELAY` | Time in milliseconds to wait after the query loop becomes idle before automatically exiting. Useful for automated workflows and scripts using SDK mode | |

815| `CLAUDE_CODE_PROXY_RESOLVES_HOSTS` | Set to `true` to allow the proxy to perform DNS resolution instead of the caller. Opt-in for environments where the proxy should handle hostname resolution | |819| `CLAUDE_CODE_PROXY_RESOLVES_HOSTS` | Set to `true` to allow the proxy to perform DNS resolution instead of the caller. Opt-in for environments where the proxy should handle hostname resolution | |

816| `CLAUDE_CODE_TASK_LIST_ID` | Share a task list across sessions. Set the same ID in multiple Claude Code instances to coordinate on a shared task list. See [Task list](/en/interactive-mode#task-list) | |820| `CLAUDE_CODE_TASK_LIST_ID` | Share a task list across sessions. Set the same ID in multiple Claude Code instances to coordinate on a shared task list. See [Task list](/en/interactive-mode#task-list) | |

817| `CLAUDE_CODE_TMPDIR` | Override the temp directory used for internal temp files. Claude Code appends `/claude/` to this path. Default: `/tmp` on Unix/macOS, `os.tmpdir()` on Windows | |821| `CLAUDE_CODE_TMPDIR` | Override the temp directory used for internal temp files. Claude Code appends `/claude/` to this path. Default: `/tmp` on Unix/macOS, `os.tmpdir()` on Windows | |

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

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

824| `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](/en/interactive-mode#prompt-suggestions) | |

820| `CLAUDE_CODE_ENABLE_TASKS` | Set to `false` to temporarily revert to the previous TODO list instead of the task tracking system. Default: `true`. See [Task list](/en/interactive-mode#task-list) | |825| `CLAUDE_CODE_ENABLE_TASKS` | Set to `false` to temporarily revert to the previous TODO list instead of the task tracking system. Default: `true`. See [Task list](/en/interactive-mode#task-list) | |

821| `CLAUDE_CODE_ENABLE_TELEMETRY` | Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. See [Monitoring](/en/monitoring-usage) | |826| `CLAUDE_CODE_ENABLE_TELEMETRY` | Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. See [Monitoring](/en/monitoring-usage) | |

822| `CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS` | Override the default token limit for file reads. Useful when you need to read larger files in full | |827| `CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS` | Override the default token limit for file reads. Useful when you need to read larger files in full | |

vs-code.md +7 −4

Details

49 * **Command Palette**: `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type "Claude Code", and select an option like "Open in New Tab"49 * **Command Palette**: `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type "Claude Code", and select an option like "Open in New Tab"

50 * **Status Bar**: Click **✱ Claude Code** in the bottom-right corner of the window. This works even when no file is open.50 * **Status Bar**: Click **✱ Claude Code** in the bottom-right corner of the window. This works even when no file is open.

51 51 

52 When you first open the panel, a **Learn Claude Code** checklist appears. Work through each item by clicking **Show me**, or dismiss it with the X. To reopen it later, uncheck **Hide Onboarding** in VS Code settings under Extensions → Claude Code.

53 

52 You can drag the Claude panel to reposition it anywhere in VS Code. See [Customize your workflow](#customize-your-workflow) for details.54 You can drag the Claude panel to reposition it anywhere in VS Code. See [Customize your workflow](#customize-your-workflow) for details.

53 </Step>55 </Step>

54 56 


72For more ideas on what you can do with Claude Code, see [Common workflows](/en/common-workflows).74For more ideas on what you can do with Claude Code, see [Common workflows](/en/common-workflows).

73 75 

74<Tip>76<Tip>

75 The extension includes two built-in tutorials:77 Run "Claude Code: Open Walkthrough" from the Command Palette for a guided tour of the basics.

76 

77 * **VS Code walkthrough**: Run "Claude Code: Open Walkthrough" from the Command Palette for a guided tour of the basics.

78 * **Interactive checklist**: Click the graduation cap icon in the Claude panel header to work through features like writing code, using Plan mode, and setting up rules.

79</Tip>78</Tip>

80 79 

81## Use the prompt box80## Use the prompt box


221* **Extension settings** in VS Code: Control the extension's behavior within VS Code. Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code. You can also type `/` and select **General Config** to open settings.220* **Extension settings** in VS Code: Control the extension's behavior within VS Code. Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code. You can also type `/` and select **General Config** to open settings.

222* **Claude Code settings** in `~/.claude/settings.json`: Shared between the extension and CLI. Use for allowed commands, environment variables, hooks, and MCP servers. See [Settings](/en/settings) for details.221* **Claude Code settings** in `~/.claude/settings.json`: Shared between the extension and CLI. Use for allowed commands, environment variables, hooks, and MCP servers. See [Settings](/en/settings) for details.

223 222 

223<Tip>

224 Add `"$schema": "https://json.schemastore.org/claude-code-settings.json"` to your `settings.json` to get autocomplete and inline validation for all available settings directly in VS Code.

225</Tip>

226 

224### Extension settings227### Extension settings

225 228 

226| Setting | Default | Description |229| Setting | Default | Description |