Changes on
31 changes detected
--- a/agent-teams.md
+++ b/agent-teams.md
@@ -496,5 +496,5 @@
Explore related approaches for parallel work and delegation:
* **Lightweight delegation** : [subagents](</docs/en/sub-agents>) spawn helper agents for research or verification within your session, better for tasks that don’t need inter-agent coordination
- * **Manual parallel sessions** : [Git worktrees](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>) let you run multiple Claude Code sessions yourself without automated team coordination
+ * **Manual parallel sessions** : [Git worktrees](</docs/en/worktrees>) let you run multiple Claude Code sessions yourself without automated team coordination
* **Compare approaches** : see the [subagent vs agent team](</docs/en/features-overview#compare-similar-features>) comparison for a side-by-side breakdown
Show diff (103 lines)
--- a/best-practices.md
+++ b/best-practices.md
@@ -40,15 +40,15 @@
Separate research and planning from implementation to avoid solving the wrong problem.
-Letting Claude jump straight to coding can produce code that solves the wrong problem. Use [Plan Mode](</docs/en/common-workflows#use-plan-mode-for-safe-code-analysis>) to separate exploration from execution. The recommended workflow has four phases:
+Letting Claude jump straight to coding can produce code that solves the wrong problem. Use [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) to separate exploration from execution. The recommended workflow has four phases:
1
Explore
-Enter Plan Mode. Claude reads files and answers questions without making changes.
-
-claude (Plan Mode)
+Enter plan mode. Claude reads files and answers questions without making changes.
+
+claude (plan mode)
read /src/auth and understand how we handle sessions and login.
also look at how we manage environment variables for secrets.
@@ -59,7 +59,7 @@
Ask Claude to create a detailed implementation plan.
-claude (Plan Mode)
+claude (plan mode)
I want to add Google OAuth. What files need to change?
What's the session flow? Create a plan.
@@ -70,9 +70,9 @@
Implement
-Switch back to Normal Mode and let Claude code, verifying against its plan.
-
-claude (Normal Mode)
+Switch out of plan mode and let Claude code, verifying against its plan.
+
+claude (default mode)
implement the OAuth flow from your plan. write tests for the
callback handler, run the test suite and fix any failures.
@@ -83,11 +83,11 @@
Ask Claude to commit with a descriptive message and create a PR.
-claude (Normal Mode)
+claude (default mode)
commit with a descriptive message and open a PR
-Plan Mode is useful, but also adds overhead.For tasks where the scope is clear and the fix is small (like fixing a typo, adding a log line, or renaming a variable) ask Claude to do it directly.Planning is most useful when you’re uncertain about the approach, when the change modifies multiple files, or when you’re unfamiliar with the code being modified. If you could describe the diff in one sentence, skip the plan.
+Plan mode is useful, but also adds overhead.For tasks where the scope is clear and the fix is small (like fixing a typo, adding a log line, or renaming a variable) ask Claude to do it directly.Planning is most useful when you’re uncertain about the approach, when the change modifies multiple files, or when you’re unfamiliar with the code being modified. If you could describe the diff in one sentence, skip the plan.
* * *
@@ -439,14 +439,9 @@
Resume conversations
-Run `claude --continue` to pick up where you left off, or `--resume` to choose from recent sessions.
-
-Claude Code saves conversations locally. When a task spans multiple sessions, you don’t have to re-explain the context:
-
- claude --continue # Resume the most recent conversation
- claude --resume # Select from recent conversations
-
-Use `/rename` to give sessions descriptive names like `"oauth-migration"` or `"debugging-memory-leak"` so you can find them later. Treat sessions like branches: different workstreams can have separate, persistent contexts.
+Name sessions with `/rename` and treat them like branches: each workstream gets its own persistent context.
+
+Claude Code saves conversations locally, so when a task spans multiple sittings you don’t have to re-explain the context. Run `claude --continue` to pick up the most recent session, or `claude --resume` to choose from a list. Give sessions descriptive names like `oauth-migration` so you can find them later. See [Manage sessions](</docs/en/sessions>) for the full set of resume, branch, and naming controls.
* * *
@@ -466,7 +461,7 @@
Use `claude -p "prompt"` in CI, pre-commit hooks, or scripts. Add `--output-format stream-json` for streaming JSON output.
-With `claude -p "your prompt"`, you can run Claude non-interactively, without a session. Non-interactive mode is how you integrate Claude into CI pipelines, pre-commit hooks, or any automated workflow. The output formats let you parse results programmatically: plain text, JSON, or streaming JSON.
+With `claude -p "your prompt"`, you can run Claude non-interactively, without a session. [Non-interactive mode](</docs/en/headless>) is how you integrate Claude into CI pipelines, pre-commit hooks, or any automated workflow. The output formats let you parse results programmatically: plain text, JSON, or streaming JSON.
# One-off queries
claude -p "Explain what this project does"
@@ -485,11 +480,12 @@
Run multiple Claude sessions in parallel to speed up development, run isolated experiments, or start complex workflows.
-There are three main ways to run parallel sessions:
-
- * [Claude Code desktop app](</docs/en/desktop#work-in-parallel-with-sessions>): Manage multiple local sessions visually. Each session gets its own isolated worktree.
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>): Run on Anthropic’s secure cloud infrastructure in isolated VMs.
- * [Agent teams](</docs/en/agent-teams>): Automated coordination of multiple sessions with shared tasks, messaging, and a team lead.
+Pick the parallel approach that fits how much coordination you want to do yourself:
+
+ * [Worktrees](</docs/en/worktrees>): run separate CLI sessions in isolated git checkouts so edits don’t collide
+ * [Desktop app](</docs/en/desktop#work-in-parallel-with-sessions>): manage multiple local sessions visually, each in its own worktree
+ * [Claude Code on the web](</docs/en/claude-code-on-the-web>): run sessions on Anthropic-managed cloud infrastructure in isolated VMs
+ * [Agent teams](</docs/en/agent-teams>): automated coordination of multiple sessions with shared tasks, messaging, and a team lead
Beyond parallelizing work, multiple sessions enable quality-focused workflows. A fresh context improves code review since Claude won’t be biased toward code it just wrote. For example, use a Writer/Reviewer pattern:
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -57,7 +57,7 @@
This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you keep early context in full detail and only compress the parts that are using up space. You can type optional instructions to guide what the summary focuses on.
-Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [fork](</docs/en/how-claude-code-works#resume-or-fork-sessions>) instead (`claude --continue --fork-session`).
+Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [fork](</docs/en/sessions#branch-a-session>) instead (`claude --continue --fork-session`).
##
--- a/claude-directory.md
+++ b/claude-directory.md
@@ -75,7 +75,7 @@
`settings.json`| Project and global| ✓| Permissions, hooks, env vars, model defaults| [Settings](</docs/en/settings>)
`settings.local.json`| Project only| | Your personal overrides, auto-gitignored| [Settings scopes](</docs/en/settings#settings-files>)
`.mcp.json`| Project only| ✓| Team-shared MCP servers| [MCP scopes](</docs/en/mcp#mcp-installation-scopes>)
-`.worktreeinclude`| Project only| ✓| Gitignored files to copy into new worktrees| [Worktrees](</docs/en/common-workflows#copy-gitignored-files-to-worktrees>)
+`.worktreeinclude`| Project only| ✓| Gitignored files to copy into new worktrees| [Worktrees](</docs/en/worktrees#copy-gitignored-files-into-worktrees>)
`skills/<name>/SKILL.md`| Project and global| ✓| Reusable prompts invoked with `/name` or auto-invoked| [Skills](</docs/en/skills>)
`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>)
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -110,7 +110,7 @@
`--tools`| Restrict which built-in tools Claude can use. Use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"`| `claude --tools "Bash,Edit,Read"`
`--verbose`| Enable verbose logging, shows full turn-by-turn output| `claude --verbose`
`--version`, `-v`| Output the version number| `claude -v`
-`--worktree`, `-w`| Start Claude in an isolated [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>) at `<repo>/.claude/worktrees/<name>`. If no name is given, one is auto-generated| `claude -w feature-auth`
+`--worktree`, `-w`| Start Claude in an isolated [git worktree](</docs/en/worktrees>) at `<repo>/.claude/worktrees/<name>`. If no name is given, one is auto-generated| `claude -w feature-auth`
###
--- a/code-review.md
+++ b/code-review.md
@@ -258,7 +258,7 @@
* **After every push** : runs on each push, multiplying cost by the number of pushes
* **Manual** : no reviews until someone comments `@claude review` on a PR
-In any mode, commenting `@claude review` opts the PR into push-triggered reviews, so additional cost accrues per push after that comment. To run a single review without subscribing to future pushes, comment `@claude review once` instead. Costs appear on your Anthropic bill regardless of whether your organization uses AWS Bedrock or Google Vertex AI for other Claude Code features. To set a monthly spend cap for Code Review, go to [claude.ai/admin-settings/usage](<https://claude.ai/admin-settings/usage>) and configure the limit for the Claude Code Review service. Monitor spend via the weekly cost chart in analytics or the per-repo average cost column in admin settings.
+In any mode, commenting `@claude review` opts the PR into push-triggered reviews, so additional cost accrues per push after that comment. To run a single review without subscribing to future pushes, comment `@claude review once` instead. Costs appear on your Anthropic bill regardless of whether your organization uses Amazon Bedrock or Google Vertex AI for other Claude Code features. To set a monthly spend cap for Code Review, go to [claude.ai/admin-settings/usage](<https://claude.ai/admin-settings/usage>) and configure the limit for the Claude Code Review service. Monitor spend via the weekly cost chart in analytics or the per-repo average cost column in admin settings.
##
--- a/commands.md
+++ b/commands.md
@@ -11,7 +11,7 @@
`/add-dir <path>`| Add a working directory for file access during the current session. Most `.claude/` configuration is [not discovered](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) from the added directory. You can later resume the session from the added directory with `--continue` or `--resume`
`/agents`| Manage [agent](</docs/en/sub-agents>) configurations
`/autofix-pr [prompt]`| Spawn a [Claude Code on the web](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) session that watches the current branch’s PR and pushes fixes when CI fails or reviewers leave comments. Detects the open PR from your checked-out branch with `gh pr view`; to watch a different PR, check out its branch first. By default the remote session is told to fix every CI failure and review comment; pass a prompt to give it different instructions, for example `/autofix-pr only fix lint and type errors`. Requires the `gh` CLI and access to [Claude Code on the web](</docs/en/claude-code-on-the-web#who-can-use-claude-code-on-the-web>)
-`/batch <instruction>`| **[Skill](</docs/en/skills#bundled-skills>).** Orchestrate large-scale changes across a codebase in parallel. Researches the codebase, decomposes the work into 5 to 30 independent units, and presents a plan. Once approved, spawns one background agent per unit in an isolated [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>). Each agent implements its unit, runs tests, and opens a pull request. Requires a git repository. Example: `/batch migrate src/ from Solid to React`
+`/batch <instruction>`| **[Skill](</docs/en/skills#bundled-skills>).** Orchestrate large-scale changes across a codebase in parallel. Researches the codebase, decomposes the work into 5 to 30 independent units, and presents a plan. Once approved, spawns one background agent per unit in an isolated [git worktree](</docs/en/worktrees>). Each agent implements its unit, runs tests, and opens a pull request. Requires a git repository. Example: `/batch migrate src/ from Solid to React`
`/branch [name]`| Create a branch of the current conversation at this point. Switches you into the branch and preserves the original, which you can return to with `/resume`. Alias: `/fork`. When [`CLAUDE_CODE_FORK_SUBAGENT`](</docs/en/env-vars>) is set, `/fork` instead spawns a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) and is no longer an alias for this command
`/btw <question>`| Ask a quick [side question](</docs/en/interactive-mode#side-questions-with-%2Fbtw>) without adding to the conversation
`/chrome`| Configure [Claude in Chrome](</docs/en/chrome>) settings
Show diff (833 lines)
--- a/common-workflows.md
+++ b/common-workflows.md
@@ -4,15 +4,30 @@
>
> Use this file to discover all available pages before exploring further.
-This page covers practical workflows for everyday development: exploring unfamiliar code, debugging, refactoring, writing tests, creating PRs, and managing sessions. Each section includes example prompts you can adapt to your own projects. For higher-level patterns and tips, see [Best practices](</docs/en/best-practices>).
-
-##
+This page collects short recipes for everyday development. For higher-level guidance on prompting and context management, see [Best practices](</docs/en/best-practices>). This page covers:
+
+ * Prompt recipes for exploring code, fixing bugs, refactoring, testing, PRs, and documentation
+ * Resume previous conversations so a task can span multiple sittings
+ * Run parallel sessions with worktrees so concurrent edits don’t collide
+ * Plan before editing to review changes before they touch disk
+ * Delegate research to subagents to keep your main context clean
+ * Pipe Claude into scripts for CI and batch processing
+
+##
+
+
+
+Prompt recipes
+
+These are prompt patterns for everyday tasks like exploring unfamiliar code, debugging, refactoring, writing tests, and creating PRs. Each works in any Claude Code surface; adapt the wording to your project.
+
+###
Understand new codebases
-###
+####
@@ -54,7 +69,7 @@
* Ask about coding conventions and patterns used in the project
* Request a glossary of project-specific terms
-###
+####
@@ -88,7 +103,7 @@
* * *
-##
+###
@@ -122,7 +137,7 @@
* * *
-##
+###
@@ -162,159 +177,34 @@
* * *
-##
-
-
-
-Use specialized subagents
-
-Suppose you want to use specialized AI subagents to handle specific tasks more effectively.
-
-1
-
-View available subagents
-
- /agents
-
-This shows all available subagents and lets you create new ones.
-
-2
-
-Use subagents automatically
-
-Claude Code automatically delegates appropriate tasks to specialized subagents:
-
- review my recent code changes for security issues
-
- run all tests and fix any failures
-
-3
-
-Explicitly request specific subagents
-
- use the code-reviewer subagent to check the auth module
-
- have the debugger subagent investigate why users can't log in
+###
+
+
+
+Work with tests
+
+Suppose you need to add tests for uncovered code.
+
+1
+
+Identify untested code
+
+ find functions in NotificationsService.swift that are not covered by tests
+
+2
+
+Generate test scaffolding
+
+ add tests for the notification service
+
+3
+
+Add meaningful test cases
+
+ add test cases for edge conditions in the notification service
4
-Create custom subagents for your workflow
-
- /agents
-
-Then select “Create New subagent” and follow the prompts to define:
-
- * A unique identifier that describes the subagent’s purpose (for example, `code-reviewer`, `api-designer`).
- * When Claude should use this agent
- * Which tools it can access
- * A system prompt describing the agent’s role and behavior
-
-Tips:
-
- * Create project-specific subagents in `.claude/agents/` for team sharing
- * Use descriptive `description` fields to enable automatic delegation
- * Limit tool access to what each subagent actually needs
- * Check the [subagents documentation](</docs/en/sub-agents>) for detailed examples
-
-* * *
-
-##
-
-
-
-Use Plan Mode for safe code analysis
-
-Plan Mode instructs Claude to create a plan by analyzing the codebase with read-only operations, perfect for exploring codebases, planning complex changes, or reviewing code safely. In Plan Mode, Claude uses [`AskUserQuestion`](</docs/en/tools-reference>) to gather requirements and clarify your goals before proposing a plan.
-
-###
-
-
-
-When to use Plan Mode
-
- * **Multi-step implementation** : When your feature requires making edits to many files
- * **Code exploration** : When you want to research the codebase thoroughly before changing anything
- * **Interactive development** : When you want to iterate on the direction with Claude
-
-###
-
-
-
-How to use Plan Mode
-
-**Turn on Plan Mode during a session** You can switch into Plan Mode during a session using **Shift+Tab** to cycle through permission modes. If you are in Normal Mode, **Shift+Tab** first switches into Auto-Accept Mode, indicated by `⏵⏵ accept edits on` at the bottom of the terminal. A subsequent **Shift+Tab** will switch into Plan Mode, indicated by `⏸ plan mode on`. **Start a new session in Plan Mode** To start a new session in Plan Mode, use the `--permission-mode plan` flag:
-
- claude --permission-mode plan
-
-**Run “headless” queries in Plan Mode** You can also run a query in Plan Mode directly with `-p` (that is, in [“headless mode”](</docs/en/headless>)):
-
- claude --permission-mode plan -p "Analyze the authentication system and suggest improvements"
-
-###
-
-
-
-Example: Planning a complex refactor
-
- claude --permission-mode plan
-
- I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.
-
-Claude analyzes the current implementation and create a comprehensive plan. Refine with follow-ups:
-
- What about backward compatibility?
-
- How should we handle database migration?
-
-Press `Ctrl+G` to open the plan in your default text editor, where you can edit it directly before Claude proceeds.
-
-When you accept a plan, Claude automatically names the session from the plan content. The name appears on the prompt bar and in the session picker. If you’ve already set a name with `--name` or `/rename`, accepting a plan won’t overwrite it.
-
-###
-
-
-
-Configure Plan Mode as default
-
- // .claude/settings.json
- {
- "permissions": {
- "defaultMode": "plan"
- }
- }
-
-See [settings documentation](</docs/en/settings#available-settings>) for more configuration options.
-
-* * *
-
-##
-
-
-
-Work with tests
-
-Suppose you need to add tests for uncovered code.
-
-1
-
-Identify untested code
-
- find functions in NotificationsService.swift that are not covered by tests
-
-2
-
-Generate test scaffolding
-
- add tests for the notification service
-
-3
-
-Add meaningful test cases
-
- add test cases for edge conditions in the notification service
-
-4
-
Run and verify tests
run the new tests and fix any failures
@@ -323,7 +213,7 @@
* * *
-##
+###
@@ -349,11 +239,11 @@
enhance the PR description with more context about the security improvements
-When you create a PR using `gh pr create`, the session is automatically linked to that PR. To return to it later, run `claude --from-pr <number>` or paste the PR URL into the `/resume` picker search.
+When you create a PR using `gh pr create`, the session is automatically linked to that PR. To return to it later, run `claude --from-pr <number>` or paste the PR URL into the [`/resume` picker](</docs/en/sessions#use-the-session-picker>) search.
Review Claude’s generated PR before submitting and ask Claude to highlight potential risks or considerations.
-##
+###
@@ -393,7 +283,7 @@
* * *
-##
+###
@@ -403,7 +293,7 @@
* * *
-##
+###
@@ -457,7 +347,7 @@
* * *
-##
+###
@@ -498,426 +388,7 @@
* * *
-##
-
-
-
-Use extended thinking (thinking mode)
-
-[Extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) is enabled by default, giving Claude space to reason through complex problems step-by-step before responding. This reasoning is visible in verbose mode, which you can toggle on with `Ctrl+O`. During extended thinking, the spinner shows inline progress hints such as “still thinking” and “almost done thinking” to indicate Claude is actively working. Additionally, [models that support effort](</docs/en/model-config#adjust-effort-level>) use adaptive reasoning: instead of a fixed thinking token budget, the model dynamically decides whether and how much to think based on your effort level setting and the task at hand. Adaptive reasoning lets Claude respond faster to routine prompts and reserve deeper thinking for steps that benefit from it. Extended thinking is particularly valuable for complex architectural decisions, challenging bugs, multi-step implementation planning, and evaluating tradeoffs between different approaches.
-
-Phrases like “think”, “think hard”, and “think more” are interpreted as regular prompt instructions and don’t allocate thinking tokens.
-
-###
-
-
-
-Configure thinking mode
-
-Thinking is enabled by default, but you can adjust or disable it.
-
-Scope| How to configure| Details
----|---|---
-**Effort level**| Run `/effort`, adjust in `/model`, or set [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars>)| Control thinking depth on [supported models](</docs/en/model-config#adjust-effort-level>)
-**`ultrathink` keyword**| Include “ultrathink” anywhere in your prompt| Adds an in-context instruction telling the model to reason more on that turn. Does not change the effort level itself; see [Adjust effort level](</docs/en/model-config#adjust-effort-level>) for that
-**Toggle shortcut**| Press `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle thinking on/off for the current session (all models). May require [terminal configuration](</docs/en/terminal-config>) to enable Option key shortcuts
-**Global default**| Use `/config` to toggle thinking mode| Sets your default across all projects (all models).
-Saved as `alwaysThinkingEnabled` in `~/.claude/settings.json`
-**Limit token budget**| Set [`MAX_THINKING_TOKENS`](</docs/en/env-vars>) environment variable| Limit the thinking budget to a specific number of tokens. On models with adaptive reasoning, only `0` applies unless adaptive reasoning is disabled. Example: `export MAX_THINKING_TOKENS=10000`
-
-To view Claude’s thinking process, press `Ctrl+O` to toggle verbose mode and see the internal reasoning displayed as gray italic text.
-
-###
-
-
-
-How extended thinking works
-
-Extended thinking controls how much internal reasoning Claude performs before responding. More thinking provides more space to explore solutions, analyze edge cases, and self-correct mistakes. On [models that support effort](</docs/en/model-config#adjust-effort-level>), thinking uses adaptive reasoning: the model dynamically allocates thinking tokens based on the effort level you select. This is the recommended way to tune the tradeoff between speed and reasoning depth. If you want Claude to think more or less often than your effort level would otherwise produce, you can also say so directly in your prompt or in `CLAUDE.md`. With older models, thinking uses a fixed token budget drawn from your output allocation. The budget varies by model; see [`MAX_THINKING_TOKENS`](</docs/en/env-vars>) for per-model ceilings. You can limit the budget with that environment variable, or disable thinking entirely via `/config` or the `Option+T`/`Alt+T` toggle. On models with adaptive reasoning, `MAX_THINKING_TOKENS` only applies when set to `0` to disable thinking, or when `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` reverts the model to the fixed budget. `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` applies to Opus 4.6 and Sonnet 4.6 only. Opus 4.7 always uses adaptive reasoning and does not support a fixed thinking budget. See [environment variables](</docs/en/env-vars>).
-
-You’re charged for all thinking tokens used even when thinking summaries are redacted. In interactive mode, thinking appears as a collapsed stub by default. Set `showThinkingSummaries: true` in `settings.json` to show full summaries.
-
-* * *
-
-##
-
-
-
-Resume previous conversations
-
-When starting Claude Code, you can resume a previous session:
-
- * `claude --continue` continues the most recent conversation in the current directory
- * `claude --resume` opens a conversation picker or resumes by name
- * `claude --from-pr 123` resumes sessions linked to a specific pull request
-
-From inside an active session, use `/resume` to switch to a different conversation. When the selected session is old and large enough that re-reading it would consume a substantial share of your usage limits, `--resume`, `--continue`, and `/resume` offer to resume from a summary instead of loading the full transcript. This prompt is not available on Amazon Bedrock, Google Cloud Vertex AI, or Microsoft Foundry. Sessions are stored per project directory. By default, the `/resume` picker shows interactive sessions from the current worktree, with keyboard shortcuts to widen the list to other worktrees or projects, search, preview, and rename. Sessions started elsewhere that added the current directory with `/add-dir` are also included by default. See Use the session picker below for the full shortcut reference. When you select a session from another worktree of the same repository, Claude Code resumes it directly without requiring you to switch directories first. Selecting a session from an unrelated project copies a `cd` and resume command to your clipboard instead. Resuming by name resolves across the current repository and its worktrees. Both `claude --resume <name>` and `/resume <name>` look for an exact match and resume it directly, even if the session lives in a different worktree. When the name is ambiguous, `claude --resume <name>` opens the picker with the name pre-filled as a search term. `/resume <name>` from inside a session reports an error instead, so run `/resume` with no argument to open the picker and choose. Sessions created by `claude -p` or SDK invocations do not appear in the picker, but you can still resume one by passing its session ID directly to `claude --resume <session-id>`.
-
-###
-
-
-
-Name your sessions
-
-Give sessions descriptive names to find them later. This is a best practice when working on multiple tasks or features.
-
-1
-
-Name the session
-
-Name a session at startup with `-n`:
-
- claude -n auth-refactor
-
-Or use `/rename` during a session, which also shows the name on the prompt bar:
-
- /rename auth-refactor
-
-You can also rename any session from the picker: run `/resume`, navigate to a session, and press `Ctrl+R`.
-
-2
-
-Resume by name later
-
-From the command line:
-
- claude --resume auth-refactor
-
-Or from inside an active session:
-
- /resume auth-refactor
-
-###
-
-
-
-Use the session picker
-
-The `/resume` command (or `claude --resume` without arguments) opens an interactive session picker with these features: **Keyboard shortcuts in the picker:**
-
-Shortcut| Action
----|---
-`↑` / `↓`| Navigate between sessions
-`→` / `←`| Expand or collapse grouped sessions
-`Enter`| Select and resume the highlighted session
-`Space`| Preview the session content. `Ctrl+V` also works on terminals that do not capture it as paste
-`Ctrl+R`| Rename the highlighted session
-`/` or any printable character other than `Space`| Enter search mode and filter sessions. Paste a GitHub, GitHub Enterprise, GitLab, or Bitbucket pull or merge request URL to find the session that created it
-`Ctrl+A`| Show sessions from all projects on this machine. Press again to restore the current repository
-`Ctrl+W`| Show sessions from all worktrees of the current repository. Press again to restore the current worktree. Only shown in multi-worktree repositories
-`Ctrl+B`| Filter to sessions from your current git branch. Press again to show sessions from all branches
-`Esc`| Exit the picker or search mode
-
-**Session organization:** The picker displays sessions with helpful metadata:
-
- * Session name if set, otherwise the conversation summary or first user prompt
- * Time elapsed since last activity
- * Message count
- * Git branch (if applicable)
- * Project path, shown after widening to all projects with `Ctrl+A`
-
-Forked sessions (created with `/branch`, `/rewind`, or `--fork-session`) are grouped together under their root session, making it easier to find related conversations.
-
-Tips:
-
- * **Name sessions early** : Use `/rename` when starting work on a distinct task: it’s much easier to find “payment-integration” than “explain this function” later
- * Use `--continue` for quick access to your most recent conversation in the current directory
- * Use `--resume session-name` when you know which session you need
- * Use `--resume` (without a name) when you need to browse and select
- * For scripts, use `claude --continue --print "prompt"` to resume in non-interactive mode
- * Press `Space` in the picker to preview a session before resuming it
- * The resumed conversation starts with the same model and configuration as the original
-
-How it works:
-
- 1. **Conversation Storage** : All conversations are automatically saved locally with their full message history
- 2. **Message Deserialization** : When resuming, the entire message history is restored to maintain context
- 3. **Tool State** : Tool usage and results from the previous conversation are preserved
- 4. **Context Restoration** : The conversation resumes with all previous context intact
-
-* * *
-
-##
-
-
-
-Run parallel Claude Code sessions with Git worktrees
-
-When working on multiple tasks at once, you need each Claude session to have its own copy of the codebase so changes don’t collide. Git worktrees solve this by creating separate working directories that each have their own files and branch, while sharing the same repository history and remote connections. This means you can have Claude working on a feature in one worktree while fixing a bug in another, without either session interfering with the other. Use the `--worktree` (`-w`) flag to create an isolated worktree and start Claude in it. The value you pass becomes the worktree directory name and branch name:
-
- # Start Claude in a worktree named "feature-auth"
- # Creates .claude/worktrees/feature-auth/ with a new branch
- claude --worktree feature-auth
-
- # Start another session in a separate worktree
- claude --worktree bugfix-123
-
-If you omit the name, Claude generates a random one automatically:
-
- # Auto-generates a name like "bright-running-fox"
- claude --worktree
-
-Worktrees are created at `<repo>/.claude/worktrees/<name>` and branch from the default remote branch, which is where `origin/HEAD` points. The worktree branch is named `worktree-<name>`. The base branch is not configurable through a Claude Code flag or setting. `origin/HEAD` is a reference stored in your local `.git` directory that Git set once when you cloned. If the repository’s default branch later changes on GitHub or GitLab, your local `origin/HEAD` keeps pointing at the old one, and worktrees will branch from there. To re-sync your local reference with whatever the remote currently considers its default:
-
- git remote set-head origin -a
-
-This is a standard Git command that only updates your local `.git` directory. Nothing on the remote server changes. If you want worktrees to base off a specific branch rather than the remote’s default, set it explicitly with `git remote set-head origin your-branch-name`. For full control over how worktrees are created, including choosing a different base per invocation, configure a [WorktreeCreate hook](</docs/en/hooks#worktreecreate>). The hook replaces Claude Code’s default `git worktree` logic entirely, so you can fetch and branch from whatever ref you need. You can also ask Claude to “work in a worktree” or “start a worktree” during a session, and it will create one automatically.
-
-###
-
-
-
-Subagent worktrees
-
-Subagents can also use worktree isolation to work in parallel without conflicts. Ask Claude to “use worktrees for your agents” or configure it in a [custom subagent](</docs/en/sub-agents#supported-frontmatter-fields>) by adding `isolation: worktree` to the agent’s frontmatter. Each subagent gets its own worktree that is automatically cleaned up when the subagent finishes without changes.
-
-###
-
-
-
-Worktree cleanup
-
-When you exit a worktree session, Claude handles cleanup based on whether you made changes:
-
- * **No changes** : the worktree and its branch are removed automatically
- * **Changes or commits exist** : Claude prompts you to keep or remove the worktree. Keeping preserves the directory and branch so you can return later. Removing deletes the worktree directory and its branch, discarding all uncommitted changes and commits
-
-Subagent worktrees orphaned by a crash or an interrupted parallel run are removed automatically at startup once they are older than your [`cleanupPeriodDays`](</docs/en/settings#available-settings>) setting, provided they have no uncommitted changes, no untracked files, and no unpushed commits. Worktrees you create with `--worktree` are never removed by this sweep. To clean up worktrees outside of a Claude session, use manual worktree management.
-
-Add `.claude/worktrees/` to your `.gitignore` to prevent worktree contents from appearing as untracked files in your main repository.
-
-###
-
-
-
-Copy gitignored files to worktrees
-
-Git worktrees are fresh checkouts, so they don’t include untracked files like `.env` or `.env.local` from your main repository. To automatically copy these files when Claude creates a worktree, add a `.worktreeinclude` file to your project root. The file uses `.gitignore` syntax to list which files to copy. Only files that match a pattern and are also gitignored get copied, so tracked files are never duplicated.
-
-.worktreeinclude
-
- .env
- .env.local
- config/secrets.json
-
-This applies to worktrees created with `--worktree`, subagent worktrees, and parallel sessions in the [desktop app](</docs/en/desktop#work-in-parallel-with-sessions>).
-
-###
-
-
-
-Manage worktrees manually
-
-For more control over worktree location and branch configuration, create worktrees with Git directly. This is useful when you need to check out a specific existing branch or place the worktree outside the repository.
-
- # Create a worktree with a new branch
- git worktree add ../project-feature-a -b feature-a
-
- # Create a worktree with an existing branch
- git worktree add ../project-bugfix bugfix-123
-
- # Start Claude in the worktree
- cd ../project-feature-a && claude
-
- # Clean up when done
- git worktree list
- git worktree remove ../project-feature-a
-
-Learn more in the [official Git worktree documentation](<https://git-scm.com/docs/git-worktree>).
-
-Remember to initialize your development environment in each new worktree according to your project’s setup. Depending on your stack, this might include running dependency installation (`npm install`, `yarn`), setting up virtual environments, or following your project’s standard setup process.
-
-###
-
-
-
-Non-git version control
-
-Worktree isolation works with git by default. For other version control systems like SVN, Perforce, or Mercurial, configure [WorktreeCreate and WorktreeRemove hooks](</docs/en/hooks#worktreecreate>) to provide custom worktree creation and cleanup logic. When configured, these hooks replace the default git behavior when you use `--worktree`, so `.worktreeinclude` is not processed. Copy any local configuration files inside your hook script instead. For automated coordination of parallel sessions with shared tasks and messaging, see [agent teams](</docs/en/agent-teams>).
-
-* * *
-
-##
-
-
-
-Get notified when Claude needs your attention
-
-When you kick off a long-running task and switch to another window, you can set up desktop notifications so you know when Claude finishes or needs your input. This uses the `Notification` [hook event](</docs/en/hooks-guide#get-notified-when-claude-needs-input>), which fires whenever Claude is waiting for permission, idle and ready for a new prompt, or completing authentication.
-
-1
-
-Add the hook to your settings
-
-Open `~/.claude/settings.json` and add a `Notification` hook that calls your platform’s native notification command:
-
- * macOS
-
- * Linux
-
- * Windows
-
- {
- "hooks": {
- "Notification": [
- {
- "matcher": "",
- "hooks": [
- {
- "type": "command",
- "command": "osascript -e 'display notification \"Claude Code needs your attention\" with title \"Claude Code\"'"
- }
- ]
- }
- ]
- }
- }
-
- {
- "hooks": {
- "Notification": [
- {
- "matcher": "",
- "hooks": [
- {
- "type": "command",
- "command": "notify-send 'Claude Code' 'Claude Code needs your attention'"
- }
- ]
- }
- ]
- }
- }
-
- {
- "hooks": {
- "Notification": [
- {
- "matcher": "",
- "hooks": [
- {
- "type": "command",
- "command": "powershell.exe -Command \"[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')\""
- }
- ]
- }
- ]
- }
- }
-
-If your settings file already has a `hooks` key, merge the `Notification` entry into it rather than overwriting. You can also ask Claude to write the hook for you by describing what you want in the CLI.
-
-2
-
-Optionally narrow the matcher
-
-By default the hook fires on all notification types. To fire only for specific events, set the `matcher` field to one of these values:
-
-Matcher| Fires when
----|---
-`permission_prompt`| Claude needs you to approve a tool use
-`idle_prompt`| Claude is done and waiting for your next prompt
-`auth_success`| Authentication completes
-`elicitation_dialog`| An MCP server opens an elicitation form
-`elicitation_complete`| An MCP elicitation form is submitted or dismissed
-`elicitation_response`| An MCP elicitation response is sent back to the server
-
-3
-
-Verify the hook
-
-Type `/hooks` and select `Notification` to confirm the hook appears. Selecting it shows the command that will run. To test it end-to-end, ask Claude to run a command that requires permission and switch away from the terminal, or ask Claude to trigger a notification directly.
-
-For the complete event schema and notification types, see the [Notification reference](</docs/en/hooks#notification>).
-
-* * *
-
-##
-
-
-
-Use Claude as a unix-style utility
-
-###
-
-
-
-Add Claude to your verification process
-
-Suppose you want to use Claude Code as a linter or code reviewer. **Add Claude to your build script:**
-
- // package.json
- {
- ...
- "scripts": {
- ...
- "lint:claude": "claude -p 'you are a linter. please look at the changes vs. main and report any issues related to typos. report the filename and line number on one line, and a description of the issue on the second line. do not return any other text.'"
- }
- }
-
-Tips:
-
- * Use Claude for automated code review in your CI/CD pipeline
- * Customize the prompt to check for specific issues relevant to your project
- * Consider creating multiple scripts for different types of verification
-
-###
-
-
-
-Pipe in, pipe out
-
-Suppose you want to pipe data into Claude, and get back data in a structured format. **Pipe data through Claude:**
-
- cat build-error.txt | claude -p 'concisely explain the root cause of this build error' > output.txt
-
-Tips:
-
- * Use pipes to integrate Claude into existing shell scripts
- * Combine with other Unix tools for powerful workflows
- * Consider using `--output-format` for structured output
-
-###
-
-
-
-Control output format
-
-Suppose you need Claude’s output in a specific format, especially when integrating Claude Code into scripts or other tools.
-
-1
-
-Use text format (default)
-
- cat data.txt | claude -p 'summarize this data' --output-format text > summary.txt
-
-This outputs just Claude’s plain text response (default behavior).
-
-2
-
-Use JSON format
-
- cat code.py | claude -p 'analyze this code for bugs' --output-format json > analysis.json
-
-This outputs a JSON array of messages with metadata including cost and duration.
-
-3
-
-Use streaming JSON format
-
- cat log.txt | claude -p 'parse this log file for errors' --output-format stream-json
-
-This outputs a series of JSON objects in real-time as Claude processes the request. Each message is a valid JSON object, but the entire output is not valid JSON if concatenated.
-
-Tips:
-
- * Use `--output-format text` for simple integrations where you just need Claude’s response
- * Use `--output-format json` when you need the full conversation log
- * Use `--output-format stream-json` for real-time output of each conversation turn
-
-* * *
-
-##
+###
@@ -936,7 +407,7 @@
* * *
-##
+###
@@ -944,7 +415,7 @@
Claude has built-in access to its documentation and can answer questions about its own features and limitations.
-###
+####
@@ -976,20 +447,80 @@
+Resume previous conversations
+
+When a task spans multiple sittings, pick up where you left off instead of re-explaining context. Claude Code saves every conversation locally.
+
+ claude --continue
+
+This resumes the most recent session in the current directory; if there isn’t one yet, it prints `No conversation found to continue` and exits. Use `claude --resume` to choose from a list, or `/resume` from inside a running session. See [Manage sessions](</docs/en/sessions>) for naming, branching, and the full picker reference.
+
+##
+
+
+
+Run parallel sessions with worktrees
+
+Work on a feature in one terminal while Claude fixes a bug in another, without the edits colliding. Each worktree is a separate checkout on its own branch.
+
+ claude --worktree feature-auth
+
+Run the same command with a different name in a second terminal to start an isolated parallel session. See [Worktrees](</docs/en/worktrees>) for cleanup, `.worktreeinclude`, and non-git VCS support.
+
+##
+
+
+
+Plan before editing
+
+For changes you want to review before they touch disk, switch to plan mode. Claude reads files and proposes a plan but makes no edits until you approve.
+
+ claude --permission-mode plan
+
+You can also press `Shift+Tab` mid-session to toggle into plan mode. See [Plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) for the approval flow and editing the plan in your text editor.
+
+##
+
+
+
+Delegate research to subagents
+
+Exploring a large codebase fills your context with file reads. Delegate the exploration so only the findings come back.
+
+ use a subagent to investigate how our auth system handles token refresh
+
+The subagent reads files in its own context window and reports a summary. See [Subagents](</docs/en/sub-agents>) for defining custom agents with their own tools and prompts.
+
+##
+
+
+
+Pipe Claude into scripts
+
+Run Claude non-interactively for CI, pre-commit hooks, or batch processing. Stdin and stdout work like any Unix tool.
+
+ git log --oneline -20 | claude -p "summarize these recent commits"
+
+See [Non-interactive mode](</docs/en/headless>) for output formats, permission flags, and fan-out patterns.
+
+##
+
+
+
Next steps
## Best practices
Patterns for getting the most out of Claude Code
-## How Claude Code works
-
-Understand the agentic loop and context management
+## Manage sessions
+
+Resume, name, and branch conversations
+
+## Worktrees
+
+Run isolated parallel sessions
## Extend Claude Code
Add skills, hooks, MCP, subagents, and plugins
-
-## Reference implementation
-
-Clone the development container reference implementation
--- a/costs.md
+++ b/costs.md
@@ -218,7 +218,7 @@
For longer or more complex work, these habits help avoid wasted tokens from going down the wrong path:
- * **Use plan mode for complex tasks** : Press Shift+Tab to enter [plan mode](</docs/en/common-workflows#use-plan-mode-for-safe-code-analysis>) before implementation. Claude explores the codebase and proposes an approach for your approval, preventing expensive re-work when the initial direction is wrong.
+ * **Use plan mode for complex tasks** : Press Shift+Tab to enter [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) before implementation. Claude explores the codebase and proposes an approach for your approval, preventing expensive re-work when the initial direction is wrong.
* **Course-correct early** : If Claude starts heading the wrong direction, press Escape to stop immediately. Use `/rewind` or double-tap Escape to restore conversation and code to a previous checkpoint.
* **Give verification targets** : Include test cases, paste screenshots, or define expected output in your prompt. When Claude can verify its own work, it catches issues before you need to request fixes.
* **Test incrementally** : Write one file, test it, then continue. This catches issues early when they’re cheap to fix.
Show diff (215 lines)
--- a/deep-links.md
+++ b/deep-links.md
@@ -0,0 +1,212 @@
+> ## 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.
+
+A deep link is a `claude-cli://` URL that opens Claude Code in a new terminal window. The URL can carry a working directory and a prompt to pre-fill. This lets you share a one-click starting point for a task: anyone with Claude Code installed who clicks the link sees a session open with the prompt already typed. The prompt is populated but not sent until you press Enter. Because a deep link is a URL, you can put one anywhere a link can go:
+
+ * An incident runbook step that opens the affected service’s repo with a diagnostic prompt
+ * A monitoring alert or dashboard that links to an investigation prompt for a specific metric
+ * A README or wiki page that opens the project with an onboarding prompt
+ * A CI failure notification that pre-fills the failing job’s name
+
+This page covers how to build a link, embed one in a runbook or trigger it from the shell, and manage or disable handler registration on each platform.
+
+Deep links require Claude Code v2.1.91 or later.
+
+##
+
+
+
+How it works
+
+The `claude-cli://` prefix is a custom URL scheme that Claude Code registers with your operating system, similar to how `mailto:` links open your email client. The link can live on a web page, in a wiki, in a Slack message, or in any app that renders links. When you click one:
+
+ 1. The browser or app hands the URL to your operating system.
+ 2. The operating system recognizes the `claude-cli://` prefix and starts Claude Code on your machine.
+ 3. A new terminal window opens with Claude Code running in the directory the link specified, and the link’s prompt text already in the input box.
+ 4. You read the prompt, edit it if you want, and press Enter to send it.
+
+The link itself can be hosted anywhere, but the session always opens locally on the computer where you clicked. See Registration and supported platforms for which terminal emulator opens on each operating system.
+
+The platform that displays the link must allow custom URL schemes. GitHub-rendered Markdown allows `http` and `https` but strips schemes like `claude-cli://` in READMEs, issues, pull requests, and wikis. Only the link text shows, with no link behind it and the URL hidden. See Troubleshooting for a workaround.
+
+###
+
+
+
+What a launched session shows
+
+A deep link never executes anything on its own. The link only chooses a directory and fills the prompt box. If you click a link from a page you do not trust, the prompt is still inert: nothing reaches the model until you read what was filled in and press Enter. When the session opens, a banner above the input shows that an external link launched it and which directory it selected. For prompts over 1,000 characters, the banner tells you to scroll and review the full text before pressing Enter, since long prompts can push instructions off screen. Permission rules, `CLAUDE.md`, and trust prompts for the selected directory apply the same way as for any other session.
+
+##
+
+
+
+Build a link
+
+Every deep link starts with `claude-cli://open`, which is the only path the handler accepts, followed by optional query parameters. The minimal form opens Claude Code in your home directory with an empty prompt:
+
+ claude-cli://open
+
+Add parameters to control where the session starts and what the prompt box contains:
+
+Parameter| Description
+---|---
+`q`| Text to pre-fill in the prompt box. [URL-encode](<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent>) the value. Use `%0A` for line breaks in multi-line prompts. Maximum 5,000 characters.
+`cwd`| Absolute path to use as the working directory. Network and UNC paths are rejected.
+`repo`| A GitHub `owner/name` slug. Claude Code resolves it to a local clone it has seen before and starts there. If you have no matching clone, the session opens in your home directory instead.
+
+`cwd` and `repo` are two ways to set the working directory. If you pass both, `cwd` takes precedence and `repo` is ignored, even if the `cwd` path does not exist. The following link points at a repository called `acme/payments` with a two-line diagnostic prompt. Replace `acme/payments` with your repository’s `owner/name` slug when you build your own:
+
+ claude-cli://open?repo=acme/payments&q=Investigate%20the%20failed%20deploy%20of%20payments-api.%0ACheck%20recent%20commits%20to%20main%20and%20the%20last%20successful%20build.
+
+Clicking it opens a new terminal window, starts Claude Code in your local clone of `acme/payments`, and fills the prompt box with the decoded text:
+
+ Investigate the failed deploy of payments-api.
+ Check recent commits to main and the last successful build.
+
+You can edit the prompt before pressing Enter to send it. If you have no local clone of the repository, the session opens in your home directory instead. See Choose between `cwd` and `repo` for how the local path is selected when you have multiple clones or worktrees.
+
+###
+
+
+
+Choose between `cwd` and `repo`
+
+Use `cwd` when everyone who clicks the link has the project at the same absolute path, such as a standardized devcontainer or VM image. Use `repo` when the link is shared and each person clones to a different location. Claude Code resolves the slug to a local path as follows:
+
+ * Each time you run `claude` in a Git repository, that directory’s filesystem path is recorded against the repository’s GitHub `owner/name` slug.
+ * When a deep link arrives, `repo` opens whichever matching path you used most recently. Multiple clones and worktrees are tracked separately, so it picks the one you worked in last.
+ * The lookup only finds paths where you have already run Claude Code at least once.
+ * The link does not change which branch is checked out. The session opens in whatever state that directory is currently in.
+
+The launched session shows which path it picked and when that clone last fetched from the remote, so you can tell if you are looking at stale code.
+
+##
+
+
+
+Examples
+
+The sections below show two common ways to use a deep link: as a Markdown link in a document and as a command in a script or shell alias.
+
+###
+
+
+
+Embed a link in a runbook
+
+A deep link in a runbook gives whoever is triaging a one-click way to start investigating in the right repository with a prepared prompt. The platform that renders the runbook must allow custom URL schemes. GitHub-rendered Markdown does not allow `claude-cli://`, so a deep link in a GitHub README, issue, or wiki shows only its label with no clickable link. See the troubleshooting note for a workaround. The prompt is part of the URL and must be URL-encoded. To produce the encoded value, pass your prompt text through `encodeURIComponent` in a browser console or any URL encoder. The example below adds an investigation entry point to an incident runbook for a service called `web-gateway`:
+
+ ## High 5xx rate on web-gateway
+
+ 1. Acknowledge the page in PagerDuty.
+ 2. [Open Claude Code in the gateway repo](claude-cli://open?repo=acme/web-gateway&q=5xx%20rate%20is%20elevated%20on%20web-gateway.%20Check%20recent%20deploys%2C%20error%20logs%20from%20the%20last%2030%20minutes%2C%20and%20open%20incidents%20in%20Linear.)
+ 3. Post initial findings in #incident.
+
+To use this in your own runbook, replace `acme/web-gateway` with your service’s repository slug. This allows engineers with Claude Code installed and a local clone of that repository to click step 2 and start investigating with the prompt ready to send.
+
+###
+
+
+
+Open a link from the shell
+
+You can also open a deep link from a shell script, alias, or automation rather than by clicking it. Call your operating system’s URL-opening command with the link as the argument.
+
+ * macOS
+
+ * Linux
+
+ * Windows
+
+The built-in `open` command passes the URL to the registered `claude-cli://` handler:
+
+ open "claude-cli://open?repo=acme/payments&q=review%20open%20PRs"
+
+Most desktop environments provide `xdg-open`, which passes the URL to the registered handler:
+
+ xdg-open "claude-cli://open?repo=acme/payments&q=review%20open%20PRs"
+
+In PowerShell, `Start-Process` passes the URL to the registered handler:
+
+ Start-Process "claude-cli://open?repo=acme/payments&q=review%20open%20PRs"
+
+In `cmd.exe`, `start` treats its first quoted argument as a window title, so pass an empty title before the URL:
+
+ start "" "claude-cli://open?repo=acme/payments&q=review%20open%20PRs"
+
+##
+
+
+
+Registration and supported platforms
+
+Claude Code registers the `claude-cli://` handler with your operating system the first time you start an interactive session on macOS, Linux, and Windows. You do not run a separate install command. Registration writes to user-level locations only:
+
+Platform| Handler location
+---|---
+macOS| `~/Applications/Claude Code URL Handler.app`
+Linux| `claude-code-url-handler.desktop` under `$XDG_DATA_HOME/applications`, defaulting to `~/.local/share/applications`
+Windows| `HKEY_CURRENT_USER\Software\Classes\claude-cli`
+
+The handler launches Claude Code in a detected terminal emulator. On macOS, Claude Code remembers the terminal from your most recent interactive session and reuses it, supporting iTerm2, Ghostty, kitty, Alacritty, WezTerm, and Terminal.app. On Linux it honors the `$TERMINAL` environment variable, then `x-terminal-emulator`, then a list of common emulators. On Windows it prefers Windows Terminal, then PowerShell, then `cmd.exe`. To prevent registration entirely, set [`disableDeepLinkRegistration`](</docs/en/settings>) to `"disable"` in `settings.json`. To enforce this across an organization so users cannot re-enable it, set it in [managed settings](</docs/en/server-managed-settings>) instead.
+
+##
+
+
+
+Open a VS Code tab instead of a terminal
+
+The VS Code extension registers its own handler at `vscode://anthropic.claude-code/open`, which opens a Claude Code editor tab rather than a terminal window. See [Launch a VS Code tab from other tools](</docs/en/vs-code#launch-a-vs-code-tab-from-other-tools>) for that URL’s parameters.
+
+##
+
+
+
+Troubleshooting
+
+###
+
+
+
+Clicking the link does nothing
+
+The handler likely is not registered yet. Start an interactive `claude` session once on that machine, exit, and try the link again. If you are on Linux without a desktop environment, `xdg-open` may have nothing to dispatch to.
+
+###
+
+
+
+The link renders as plain text instead of being clickable
+
+Some Markdown renderers only allow `http` and `https` links and strip other URL schemes. GitHub does this in READMEs, issues, pull requests, and wikis: `[label](claude-cli://...)` renders as just `label`, with no link and the URL removed. On these platforms, put the deep link in a code block so readers can see the URL and paste it into their browser’s address bar.
+
+###
+
+
+
+The session opens in my home directory instead of the repo
+
+The `repo` parameter only resolves to clones Claude Code has already seen. Run `claude` inside the clone once so its path is recorded, or switch the link to use `cwd` with an absolute path.
+
+###
+
+
+
+The link opens the wrong terminal
+
+On macOS, start `claude` in your preferred terminal once and the next deep link will use it. On Linux, set the `$TERMINAL` environment variable to your preferred emulator’s command name. On Windows, the order is fixed: install Windows Terminal if you want links to open there instead of a PowerShell or `cmd.exe` window.
+
+##
+
+
+
+Learn more
+
+These pages cover related ways to launch or extend Claude Code sessions:
+
+ * [Skills](</docs/en/skills>): store a long runbook prompt as a `/skill` in the repo so the deep link’s `q` parameter only has to name it
+ * [Non-interactive mode](</docs/en/headless>): run Claude from a script and capture the output without opening a terminal
--- a/desktop.md
+++ b/desktop.md
@@ -328,7 +328,7 @@
Work in parallel with sessions
-Click **\+ New session** in the sidebar, or press **Cmd+N** on macOS or **Ctrl+N** on Windows, to work on multiple tasks in parallel. Press **Ctrl+Tab** and **Ctrl+Shift+Tab** to cycle through sessions in the sidebar. For Git repositories, each session gets its own isolated copy of your project using [Git worktrees](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>), so changes in one session don’t affect other sessions until you commit them. Worktrees are stored in `<project-root>/.claude/worktrees/` by default. You can change this to a custom directory in Settings → Claude Code under “Worktree location”. You can also set a branch prefix that gets prepended to every worktree branch name, which is useful for keeping Claude-created branches organized. To remove a worktree when you’re done, hover over the session in the sidebar and click the archive icon. To have sessions archive themselves when their pull request merges or closes, turn on **Auto-archive after PR merge or close** in Settings → Claude Code. Auto-archive only applies to local sessions that have finished running. To include gitignored files like `.env` in new worktrees, create a [`.worktreeinclude` file](</docs/en/common-workflows#copy-gitignored-files-to-worktrees>) in your project root.
+Click **\+ New session** in the sidebar, or press **Cmd+N** on macOS or **Ctrl+N** on Windows, to work on multiple tasks in parallel. Press **Ctrl+Tab** and **Ctrl+Shift+Tab** to cycle through sessions in the sidebar. For Git repositories, each session gets its own isolated copy of your project using [Git worktrees](</docs/en/worktrees>), so changes in one session don’t affect other sessions until you commit them. Worktrees are stored in `<project-root>/.claude/worktrees/` by default. You can change this to a custom directory in Settings → Claude Code under “Worktree location”. You can also set a branch prefix that gets prepended to every worktree branch name, which is useful for keeping Claude-created branches organized. To remove a worktree when you’re done, hover over the session in the sidebar and click the archive icon. To have sessions archive themselves when their pull request merges or closes, turn on **Auto-archive after PR merge or close** in Settings → Claude Code. Auto-archive only applies to local sessions that have finished running. To include gitignored files like `.env` in new worktrees, create a [`.worktreeinclude` file](</docs/en/worktrees#copy-gitignored-files-into-worktrees>) in your project root.
Session isolation requires [Git](<https://git-scm.com/downloads>). Most Macs include Git by default. Run `git --version` in Terminal to check. On Windows, Git is required for the Code tab to work: [download Git for Windows](<https://git-scm.com/downloads/win>), install it, and restart the app. If you run into Git errors, ask Claude in the [Cowork tab](<https://claude.com/product/cowork>) to help troubleshoot your setup.
@@ -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/common-workflows#use-extended-thinking-thinking-mode>) 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 always uses adaptive reasoning and has no fixed-budget mode.
###
--- a/errors.md
+++ b/errors.md
@@ -531,7 +531,7 @@
Claude Code adjusts these values automatically on the Anthropic API. You typically see this error on Amazon Bedrock or Google Vertex AI when [`MAX_THINKING_TOKENS`](</docs/en/env-vars>) is set higher than the provider’s output limit, or when plan mode raises the thinking budget. **What to do:**
* Lower `MAX_THINKING_TOKENS`, or raise [`CLAUDE_CODE_MAX_OUTPUT_TOKENS`](</docs/en/env-vars>) above the thinking budget
- * See [Extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) for how the budget interacts with output length
+ * See [Extended thinking](</docs/en/model-config#extended-thinking>) for how the budget interacts with output length
###
--- a/github-actions.md
+++ b/github-actions.md
@@ -54,7 +54,7 @@
* You must be a repository admin to install the GitHub app and add secrets
* The GitHub app will request read & write permissions for Contents, Issues, and Pull requests
- * This quickstart method is only available for direct Claude API users. If you’re using AWS Bedrock or Google Vertex AI, please see the Using with AWS Bedrock & Google Vertex AI section.
+ * This quickstart method is only available for direct Claude API users. If you’re using Amazon Bedrock or Google Vertex AI, see the Using with Amazon Bedrock & Google Vertex AI section.
##
@@ -320,7 +320,7 @@
-Using with AWS Bedrock & Google Vertex AI
+Using with Amazon Bedrock & Google Vertex AI
For enterprise environments, you can use Claude Code GitHub Actions with your own cloud infrastructure. This approach gives you control over data residency and billing while maintaining the same functionality.
@@ -347,7 +347,7 @@
-For AWS Bedrock:
+For Amazon Bedrock:
1. An AWS account with Amazon Bedrock enabled
2. GitHub OIDC Identity Provider configured in AWS
@@ -399,7 +399,7 @@
Choose your cloud provider and set up secure authentication:
-AWS Bedrock
+Amazon Bedrock
**Configure AWS to allow GitHub Actions to authenticate securely without storing credentials.**
@@ -496,7 +496,7 @@
-For AWS Bedrock
+For Amazon Bedrock
1. **For AWS Authentication** :
* `AWS_ROLE_TO_ASSUME`
@@ -508,13 +508,13 @@
Create workflow files
-Create GitHub Actions workflow files that integrate with your cloud provider. The examples below show complete configurations for both AWS Bedrock and Google Vertex AI:
-
-AWS Bedrock workflow
+Create GitHub Actions workflow files that integrate with your cloud provider. The examples below show complete configurations for both Amazon Bedrock and Google Vertex AI:
+
+Amazon Bedrock workflow
**Prerequisites:**
- * AWS Bedrock access enabled with Claude model permissions
+ * Amazon Bedrock access enabled with Claude model permissions
* GitHub configured as an OIDC identity provider in AWS
* IAM role with Bedrock permissions that trusts GitHub Actions
@@ -698,7 +698,7 @@
`anthropic_api_key`| Claude API key| Yes**
`github_token`| GitHub token for API access| No
`trigger_phrase`| Custom trigger phrase (default: “@claude”)| No
-`use_bedrock`| Use AWS Bedrock instead of Claude API| No
+`use_bedrock`| Use Amazon Bedrock instead of Claude API| No
`use_vertex`| Use Google Vertex AI instead of Claude API| No
*Prompt is optional - when omitted for issue/PR comments, Claude responds to trigger phrase
--- a/gitlab-ci-cd.md
+++ b/gitlab-ci-cd.md
@@ -18,7 +18,7 @@
* **Automated implementation** : Turn issues into working code with a single command or mention
* **Project-aware** : Claude follows your `CLAUDE.md` guidelines and existing code patterns
* **Simple setup** : Add one job to `.gitlab-ci.yml` and a masked CI/CD variable
- * **Enterprise-ready** : Choose Claude API, AWS Bedrock, or Google Vertex AI to meet data residency and procurement needs
+ * **Enterprise-ready** : Choose Claude API, Amazon Bedrock, or Google Vertex AI to meet data residency and procurement needs
* **Secure by default** : Runs in your GitLab runners with your branch protection and approvals
##
@@ -32,7 +32,7 @@
1. **Event-driven orchestration** : GitLab listens for your chosen triggers (for example, a comment that mentions `@claude` in an issue, MR, or review thread). The job collects context from the thread and repository, builds prompts from that input, and runs Claude Code.
2. **Provider abstraction** : Use the provider that fits your environment:
* Claude API (SaaS)
- * AWS Bedrock (IAM-based access, cross-region options)
+ * Amazon Bedrock (IAM-based access, cross-region options)
* Google Vertex AI (GCP-native, Workload Identity Federation)
3. **Sandboxed execution** : Each interaction runs in a container with strict network and filesystem rules. Claude Code enforces workspace-scoped permissions to constrain writes. Every change flows through an MR so reviewers see the diff and approvals still apply.
@@ -104,7 +104,7 @@
After adding the job and your `ANTHROPIC_API_KEY` variable, test by running the job manually from **CI/CD** → **Pipelines** , or trigger it from an MR to let Claude propose updates in a branch and open an MR if needed.
-To run on AWS Bedrock or Google Vertex AI instead of the Claude API, see the Using with AWS Bedrock & Google Vertex AI section below for authentication and environment setup.
+To run on Amazon Bedrock or Google Vertex AI instead of the Claude API, see the Using with Amazon Bedrock & Google Vertex AI section below for authentication and environment setup.
###
@@ -116,7 +116,7 @@
1. **Configure provider access** :
* **Claude API** : Create and store `ANTHROPIC_API_KEY` as a masked CI/CD variable
- * **AWS Bedrock** : **Configure GitLab** → **AWS OIDC** and create an IAM role for Bedrock
+ * **Amazon Bedrock** : **Configure GitLab** → **AWS OIDC** and create an IAM role for Bedrock
* **Google Vertex AI** : **Configure Workload Identity Federation for GitLab** → **GCP**
2. **Add project credentials for GitLab API operations** :
* Use `CI_JOB_TOKEN` by default, or create a Project Access Token with `api` scope
@@ -172,11 +172,11 @@
-Using with AWS Bedrock & Google Vertex AI
+Using with Amazon Bedrock & Google Vertex AI
For enterprise environments, you can run Claude Code entirely on your cloud infrastructure with the same developer experience.
- * AWS Bedrock
+ * Amazon Bedrock
* Google Vertex AI
@@ -186,7 +186,7 @@
Prerequisites
-Before setting up Claude Code with AWS Bedrock, you need:
+Before setting up Claude Code with Amazon Bedrock, you need:
1. An AWS account with Amazon Bedrock access to the desired Claude models
2. GitLab configured as an OIDC identity provider in AWS IAM
@@ -215,11 +215,11 @@
Add variables in Settings → CI/CD → Variables:
- # For AWS Bedrock:
+ # For Amazon Bedrock:
- AWS_ROLE_TO_ASSUME
- AWS_REGION
-Use the AWS Bedrock job example above to exchange the GitLab job token for temporary AWS credentials at runtime.
+Use the Amazon Bedrock job example above to exchange the GitLab job token for temporary AWS credentials at runtime.
###
@@ -307,7 +307,7 @@
-AWS Bedrock job example (OIDC)
+Amazon Bedrock job example (OIDC)
**Prerequisites:**
--- a/glossary.md
+++ b/glossary.md
@@ -178,7 +178,7 @@
Extended thinking
-Visible step-by-step reasoning the model performs before responding. You can cap thinking tokens with `MAX_THINKING_TOKENS` or adjust the effort level. Thinking appears in gray italic text in the terminal. Learn more: [Use extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>)
+Visible step-by-step reasoning the model performs before responding. You can cap thinking tokens with `MAX_THINKING_TOKENS` or adjust the effort level. Thinking appears in gray italic text in the terminal. Learn more: [Use extended thinking](</docs/en/model-config#extended-thinking>)
##
@@ -422,7 +422,7 @@
Worktree isolation
-An isolation mode that runs Claude in a separate git worktree under `.claude/worktrees/`, enabled with the `-w` flag or `isolation: worktree` in subagent config. Changes stay on a separate branch in a separate directory, so parallel agents don’t overwrite each other’s files. Learn more: [Run parallel sessions with git worktrees](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>)
+An isolation mode that runs Claude in a separate git worktree under `.claude/worktrees/`, enabled with the `-w` flag or `isolation: worktree` in subagent config. Changes stay on a separate branch in a separate directory, so parallel agents don’t overwrite each other’s files. Learn more: [Run parallel sessions with git worktrees](</docs/en/worktrees>)
* * *
--- a/headless.md
+++ b/headless.md
@@ -61,6 +61,32 @@
Examples
These examples highlight common CLI patterns. For CI and other scripted calls, add `--bare` so they don’t pick up whatever happens to be configured locally.
+
+###
+
+
+
+Pipe data through Claude
+
+Non-interactive mode reads stdin, so you can pipe data in and redirect the response out like any other command-line tool. This example pipes a build log into Claude and writes the explanation to a file:
+
+ cat build-error.txt | claude -p 'concisely explain the root cause of this build error' > output.txt
+
+With `--output-format json`, the response payload includes `total_cost_usd` and a per-model cost breakdown, so scripted callers can track spend per invocation without consulting the [usage dashboard](</docs/en/costs>).
+
+###
+
+
+
+Add Claude to a build script
+
+You can wrap a non-interactive call in a script to use Claude as a project-specific linter or reviewer. This `package.json` script pipes the diff against `main` into Claude and asks it to report typos. Piping the diff means Claude doesn’t need Bash permission to read it, and the escaped double quotes keep the script portable to Windows:
+
+ {
+ "scripts": {
+ "lint:claude": "git diff main | claude -p \"you are a typo linter. for each typo in this diff, report filename:line on one line and the issue on the next. return nothing else.\""
+ }
+ }
###
--- a/hooks.md
+++ b/hooks.md
@@ -2121,7 +2121,7 @@
WorktreeCreate
-When you run `claude --worktree` or a [subagent uses `isolation: "worktree"`](</docs/en/sub-agents#choose-the-subagent-scope>), Claude Code creates an isolated working copy using `git worktree`. If you configure a WorktreeCreate hook, it replaces the default git behavior, letting you use a different version control system like SVN, Perforce, or Mercurial. Because the hook replaces the default behavior entirely, [`.worktreeinclude`](</docs/en/common-workflows#copy-gitignored-files-to-worktrees>) is not processed. If you need to copy local configuration files like `.env` into the new worktree, do it inside your hook script. The hook must return the absolute path to the created worktree directory. Claude Code uses this path as the working directory for the isolated session. Command hooks print it on stdout; HTTP hooks return it via `hookSpecificOutput.worktreePath`. This example creates an SVN working copy and prints the path for Claude Code to use. Replace the repository URL with your own:
+When you run `claude --worktree` or a [subagent uses `isolation: "worktree"`](</docs/en/sub-agents#choose-the-subagent-scope>), Claude Code creates an isolated working copy using `git worktree`. If you configure a WorktreeCreate hook, it replaces the default git behavior, letting you use a different version control system like SVN, Perforce, or Mercurial. Because the hook replaces the default behavior entirely, [`.worktreeinclude`](</docs/en/worktrees#copy-gitignored-files-into-worktrees>) is not processed. If you need to copy local configuration files like `.env` into the new worktree, do it inside your hook script. The hook must return the absolute path to the created worktree directory. Claude Code uses this path as the working directory for the isolated session. Command hooks print it on stdout; HTTP hooks return it via `hookSpecificOutput.worktreePath`. This example creates an SVN working copy and prints the path for Claude Code to use. Replace the repository URL with your own:
{
"hooks": {
--- a/hooks-guide.md
+++ b/hooks-guide.md
@@ -158,6 +158,19 @@
]
}
}
+
+The empty `matcher` fires on all notification types. To fire only on specific events, set it to one of these values:
+
+Matcher| Fires when
+---|---
+`permission_prompt`| Claude needs you to approve a tool use
+`idle_prompt`| Claude is done and waiting for your next prompt
+`auth_success`| Authentication completes
+`elicitation_dialog`| An MCP server opens an elicitation form
+`elicitation_complete`| An MCP elicitation form is submitted or dismissed
+`elicitation_response`| An MCP elicitation response is sent back to the server
+
+Type `/hooks` and select `Notification` to confirm the hook is registered. For the full event schema, see the [Notification reference](</docs/en/hooks#notification>).
###
--- a/how-claude-code-works.md
+++ b/how-claude-code-works.md
@@ -110,7 +110,7 @@
Work across branches
-Each Claude Code conversation is a session tied to your current directory. The `/resume` picker shows sessions from the current worktree by default, with keyboard shortcuts to widen the list to other worktrees or projects. See [Resume previous conversations](</docs/en/common-workflows#resume-previous-conversations>) for the full list of picker shortcuts and how name resolution works. Claude sees your current branch’s files. When you switch branches, Claude sees the new branch’s files, but your conversation history stays the same. Claude remembers what you discussed even after switching. Since sessions are tied to directories, you can run parallel Claude sessions by using [git worktrees](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>), which create separate directories for individual branches.
+Each Claude Code conversation is a session tied to your current directory. The `/resume` picker shows sessions from the current worktree by default, with keyboard shortcuts to widen the list to other worktrees or projects. See [Manage sessions](</docs/en/sessions#use-the-session-picker>) for the full list of picker shortcuts and how name resolution works. Claude sees your current branch’s files. When you switch branches, Claude sees the new branch’s files, but your conversation history stays the same. Claude remembers what you discussed even after switching. Since sessions are tied to directories, you can run parallel Claude sessions by using [git worktrees](</docs/en/worktrees>), which create separate directories for individual branches.
###
@@ -118,11 +118,7 @@
Resume or fork sessions
-When you resume a session with `claude --continue` or `claude --resume`, you pick up where you left off using the same session ID. New messages append to the existing conversation. Your full conversation history is restored, but session-scoped permissions are not. You’ll need to re-approve those. To branch off and try a different approach without affecting the original session, use the `--fork-session` flag:
-
- claude --continue --fork-session
-
-This creates a new session ID while preserving the conversation history up to that point. The original session remains unchanged. Like resume, forked sessions don’t inherit session-scoped permissions. **Same session in multiple terminals** : If you resume the same session in multiple terminals, both terminals write to the same session file. Messages from both get interleaved, like two people writing in the same notebook. Nothing corrupts, but the conversation becomes jumbled. Each terminal only sees its own messages during the session, but if you resume that session later, you’ll see everything interleaved. For parallel work from the same starting point, use `--fork-session` to give each terminal its own clean session.
+Resuming a session with `claude --continue` or `claude --resume` reopens it under the same session ID and appends new messages to the existing conversation. Forking with `--fork-session` or `/branch` copies the history into a new session ID, leaving the original unchanged. For the resume flags, the `/resume` picker, naming, and what happens when the same session is open in two terminals, see [Manage sessions](</docs/en/sessions>).
###
--- a/legal-and-compliance.md
+++ b/legal-and-compliance.md
@@ -27,7 +27,7 @@
Commercial agreements
-Whether you’re using the Claude API directly (1P) or accessing it through AWS Bedrock or Google Vertex (3P), your existing commercial agreement will apply to Claude Code usage, unless we’ve mutually agreed otherwise.
+Whether you’re using the Claude API directly (1P) or accessing it through Amazon Bedrock or Google Vertex (3P), your existing commercial agreement will apply to Claude Code usage, unless we’ve mutually agreed otherwise.
##
--- a/model-config.md
+++ b/model-config.md
@@ -198,7 +198,15 @@
`xhigh`| Best results for most coding and agentic tasks. Recommended 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
-The effort scale is calibrated per model, so the same level name does not represent the same underlying value across models. For one-off deep reasoning without changing your session setting, include “ultrathink” in your prompt. This adds an in-context instruction telling the model to reason more on that turn; it does not change the effort level sent to the API.
+The effort scale is calibrated per model, so the same level name does not represent the same underlying value across models.
+
+####
+
+
+
+Use ultrathink for one-off deep reasoning
+
+Include `ultrathink` anywhere in your prompt to request deeper reasoning on that turn without changing your session effort setting. Claude Code recognizes the keyword and adds an in-context instruction. The effort level sent to the API is unchanged. Other phrases such as “think”, “think hard”, and “think more” are passed through as ordinary prompt text and are not recognized as keywords.
####
@@ -229,6 +237,22 @@
+Extended thinking
+
+Extended thinking is the reasoning Claude emits before responding. On models that support adaptive reasoning, the effort level is the primary control for how much thinking happens; the settings below turn thinking on or off and control how it displays.
+
+Control| How to set it
+---|---
+Toggle for the current session| Press `Option+T` on macOS or `Alt+T` on Windows and Linux. May require [terminal configuration](</docs/en/terminal-config>) for Option-key shortcuts
+Set the global default| Run `/config` and toggle thinking mode. Saved as `alwaysThinkingEnabled` in `~/.claude/settings.json`
+Disable regardless of effort| Set [`MAX_THINKING_TOKENS=0`](</docs/en/env-vars>). Other values apply only with a fixed thinking budget
+
+Thinking output is collapsed by default. Press `Ctrl+O` to toggle verbose mode and see the reasoning as gray italic text. Interactive sessions on the Anthropic API receive redacted thinking blocks by default, so set `showThinkingSummaries: true` in [settings](</docs/en/settings>) if you want the full summaries available when you expand. You are charged for all thinking tokens generated, even when collapsed or redacted.
+
+###
+
+
+
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.
@@ -330,14 +354,14 @@
`ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION`| Display description for the pinned Opus model in the `/model` picker. Defaults to `Custom Opus model` when not set
`ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES`| Comma-separated list of capabilities the pinned Opus model supports
-The same `_NAME`, `_DESCRIPTION`, and `_SUPPORTED_CAPABILITIES` suffixes are available for `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`, and `ANTHROPIC_CUSTOM_MODEL_OPTION`. Claude Code enables features like effort levels and [extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) by matching the model ID against known patterns. Provider-specific IDs such as Bedrock ARNs or custom deployment names often don’t match these patterns, leaving supported features disabled. Set `_SUPPORTED_CAPABILITIES` to tell Claude Code which features the model actually supports:
+The same `_NAME`, `_DESCRIPTION`, and `_SUPPORTED_CAPABILITIES` suffixes are available for `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`, and `ANTHROPIC_CUSTOM_MODEL_OPTION`. Claude Code enables features like effort levels and extended thinking by matching the model ID against known patterns. Provider-specific IDs such as Bedrock ARNs or custom deployment names often don’t match these patterns, leaving supported features disabled. Set `_SUPPORTED_CAPABILITIES` to tell Claude Code which features the model actually supports:
Capability value| Enables
---|---
`effort`| Effort levels and the `/effort` command
`xhigh_effort`| The `xhigh` effort level
`max_effort`| The `max` effort level
-`thinking`| [Extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>)
+`thinking`| Extended thinking
`adaptive_thinking`| Adaptive reasoning that dynamically allocates thinking based on task complexity
`interleaved_thinking`| Thinking between tool calls
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -920,7 +920,7 @@
* Tracking usage trends across teams or individuals
* Identifying high-usage sessions for optimization
-Cost metrics are approximations. For official billing data, refer to your API provider (Claude Console, AWS Bedrock, or Google Cloud Vertex).
+Cost metrics are approximations. For official billing data, refer to your API provider (Claude Console, Amazon Bedrock, or Google Cloud Vertex).
###
--- a/overview.md
+++ b/overview.md
@@ -118,7 +118,7 @@
Customize with instructions, skills, and hooks
-[`CLAUDE.md`](</docs/en/memory>) is a markdown file you add to your project root that Claude Code reads at the start of every session. Use it to set coding standards, architecture decisions, preferred libraries, and review checklists. Claude also builds [auto memory](</docs/en/memory#auto-memory>) as it works, saving learnings like build commands and debugging insights across sessions without you writing anything.Create [custom commands](</docs/en/skills>) to package repeatable workflows your team can share, like `/review-pr` or `/deploy-staging`.[Hooks](</docs/en/hooks>) let you run shell commands before or after Claude Code actions, like auto-formatting after every file edit or running lint before a commit.
+[`CLAUDE.md`](</docs/en/memory>) is a markdown file you add to your project root that Claude Code reads at the start of every session. Use it to set coding standards, architecture decisions, preferred libraries, and review checklists. Claude also builds [auto memory](</docs/en/memory#auto-memory>) as it works, saving learnings like build commands and debugging insights across sessions without you writing anything.Create [skills](</docs/en/skills>) to package repeatable workflows your team can share, like `/review-pr` or `/deploy-staging`.[Hooks](</docs/en/hooks>) let you run shell commands before or after Claude Code actions, like auto-formatting after every file edit or running lint before a commit.
Run agent teams and build custom agents
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -108,7 +108,15 @@
claude --permission-mode plan
-Press `Shift+Tab` again to leave plan mode without approving a plan. When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can:
+Press `Shift+Tab` again to leave plan mode without approving a plan.
+
+###
+
+
+
+Review and approve a plan
+
+When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can:
* Approve and start in auto mode
* Approve and accept edits
@@ -116,7 +124,21 @@
* Keep planning with feedback
* Refine with [Ultraplan](</docs/en/ultraplan>) for browser-based review
-Each approve option also offers to clear the planning context first.
+Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings#available-settings>) is enabled, each approve option also offers to clear the planning context first. Accepting a plan also names the session from the plan content automatically, unless you’ve already set a name with `--name` or `/rename`.
+
+###
+
+
+
+Set plan mode as the default
+
+To make plan mode the default for a project, set `defaultMode` in `.claude/settings.json`:
+
+ {
+ "permissions": {
+ "defaultMode": "plan"
+ }
+ }
##
--- a/remote-control.md
+++ b/remote-control.md
@@ -58,7 +58,7 @@
`--remote-control-session-name-prefix <prefix>`| Prefix for auto-generated 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.
`--spawn <mode>`| How the server creates sessions.
• `same-dir` (default): all sessions share the current working directory, so they can conflict if editing the same files.
-• `worktree`: each on-demand session gets its own [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>). Requires a git repository.
+• `worktree`: each on-demand session gets its own [git worktree](</docs/en/worktrees>). Requires a git repository.
• `session`: single-session mode. Serves exactly one session and rejects additional connections. Set at startup only.
Press `w` at runtime to toggle between `same-dir` and `worktree`.
`--capacity <N>`| Maximum number of concurrent sessions. Default is 32. Cannot be used with `--spawn=session`.
--- a/settings.md
+++ b/settings.md
@@ -172,7 +172,7 @@
`allowManagedHooksOnly`| (Managed settings only) Only managed hooks, SDK hooks, and hooks from plugins force-enabled in managed settings `enabledPlugins` are loaded. User, project, and all other plugin hooks are blocked. See Hook configuration| `true`
`allowManagedMcpServersOnly`| (Managed settings only) Only `allowedMcpServers` from managed settings are respected. `deniedMcpServers` still merges from all sources. Users can still add MCP servers, but only the admin-defined allowlist applies. See [Managed MCP configuration](</docs/en/mcp#managed-mcp-configuration>)| `true`
`allowManagedPermissionRulesOnly`| (Managed settings only) Prevent user and project settings from defining `allow`, `ask`, or `deny` permission rules. Only rules in managed settings apply. See [Managed-only settings](</docs/en/permissions#managed-only-settings>)| `true`
-`alwaysThinkingEnabled`| Enable [extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) by default for all sessions. Typically configured via the `/config` command rather than editing directly| `true`
+`alwaysThinkingEnabled`| Enable [extended thinking](</docs/en/model-config#extended-thinking>) by default for all sessions. Typically configured via the `/config` command rather than editing directly| `true`
`apiKeyHelper`| Custom script, to be executed in `/bin/sh`, to generate an auth value. This value will be sent as `X-Api-Key` and `Authorization: Bearer` headers for model requests| `/bin/generate_temp_api_key.sh`
`attribution`| Customize attribution for git commits and pull requests. See Attribution settings| `{"commit": "🤖 Generated with Claude Code", "pr": ""}`
`autoMemoryDirectory`| Custom directory for [auto memory](</docs/en/memory#storage-location>) storage. Accepts `~/`-expanded paths. Not accepted in project settings (`.claude/settings.json`) to prevent shared repos from redirecting memory writes to sensitive locations. Accepted from policy, local, and user settings| `"~/my-memory-dir"`
@@ -185,13 +185,13 @@
`awsCredentialExport`| Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](</docs/en/amazon-bedrock#advanced-credential-configuration>))| `/bin/generate_aws_grant.sh`
`blockedMarketplaces`| (Managed settings only) Blocklist of marketplace sources. Enforced on marketplace add and on plugin install, update, refresh, and auto-update, so a marketplace added before the policy was set cannot be used to fetch plugins. Blocked sources are checked before downloading, so they never touch the filesystem. See [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>)| `[{ "source": "github", "repo": "untrusted/plugins" }]`
`channelsEnabled`| (Managed settings only) Allow [channels](</docs/en/channels>) for Team and Enterprise users. Unset or `false` blocks channel message delivery regardless of what users pass to `--channels`| `true`
-`cleanupPeriodDays`| Session files older than this period are deleted at startup (default: 30 days, minimum 1). Setting to `0` is rejected with a validation error. Also controls the age cutoff for automatic removal of [orphaned subagent worktrees](</docs/en/common-workflows#worktree-cleanup>) at startup. To disable transcript writes entirely, set the [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](</docs/en/env-vars>) environment variable, or in non-interactive mode (`-p`) use the `--no-session-persistence` flag or the `persistSession: false` SDK option.| `20`
+`cleanupPeriodDays`| Session files older than this period are deleted at startup (default: 30 days, minimum 1). Setting to `0` is rejected with a validation error. Also controls the age cutoff for automatic removal of [orphaned subagent worktrees](</docs/en/worktrees#clean-up-worktrees>) at startup. To disable transcript writes entirely, set the [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](</docs/en/env-vars>) environment variable, or in non-interactive mode (`-p`) use the `--no-session-persistence` flag or the `persistSession: false` SDK option.| `20`
`companyAnnouncements`| Announcement to display to users at startup. If multiple announcements are provided, they will be cycled through at random.| `["Welcome to Acme Corp! Review our code guidelines at docs.acme.com"]`
`defaultShell`| Default shell for input-box `!` commands. Accepts `"bash"` (default) or `"powershell"`. Setting `"powershell"` routes interactive `!` commands through PowerShell on Windows. Requires `CLAUDE_CODE_USE_POWERSHELL_TOOL=1`. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>)| `"powershell"`
`deniedMcpServers`| When set in managed-settings.json, denylist of MCP servers that are explicitly blocked. Applies to all scopes including managed servers. Denylist takes precedence over allowlist. See [Managed MCP configuration](</docs/en/mcp#managed-mcp-configuration>)| `[{ "serverName": "filesystem" }]`
`disableAllHooks`| Disable all [hooks](</docs/en/hooks>) and any custom [status line](</docs/en/statusline>)| `true`
`disableAutoMode`| Set to `"disable"` to prevent [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) from being activated. Removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. Most useful in [managed settings](</docs/en/permissions#managed-settings>) where users cannot override it| `"disable"`
-`disableDeepLinkRegistration`| Set to `"disable"` to prevent Claude Code from registering the `claude-cli://` protocol handler with the operating system on startup. Deep links let external tools open a Claude Code session with a pre-filled prompt via `claude-cli://open?q=...`. The `q` parameter supports multi-line prompts using URL-encoded newlines (`%0A`). Useful in environments where protocol handler registration is restricted or managed separately| `"disable"`
+`disableDeepLinkRegistration`| Set to `"disable"` to prevent Claude Code from registering the `claude-cli://` protocol handler with the operating system on startup. [Deep links](</docs/en/deep-links>) let external tools open a Claude Code session with a pre-filled prompt. Useful in environments where protocol handler registration is restricted or managed separately| `"disable"`
`disabledMcpjsonServers`| List of specific MCP servers from `.mcp.json` files to reject| `["filesystem"]`
`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`
`editorMode`| Key binding mode for the input prompt: `"normal"` or `"vim"`. Default: `"normal"`. Appears in `/config` as **Editor mode**| `"vim"`
@@ -223,7 +223,7 @@
`prUrlTemplate`| URL template for the PR badge shown in the footer and in tool-result summaries. Substitutes `{host}`, `{owner}`, `{repo}`, `{number}`, and `{url}` from the `gh`-reported PR URL. Use to point PR links at an internal code-review tool instead of `github.com`. Does not affect `#123` autolinks in Claude’s prose| `"https://reviews.example.com/{owner}/{repo}/pull/{number}"`
`respectGitignore`| Control whether the `@` file picker respects `.gitignore` patterns. When `true` (default), files matching `.gitignore` patterns are excluded from suggestions| `false`
`showClearContextOnPlanAccept`| Show the “clear context” option on the plan accept screen. Defaults to `false`. Set to `true` to restore the option| `true`
-`showThinkingSummaries`| Show [extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) summaries in interactive sessions. When unset or `false` (default in interactive mode), thinking blocks are redacted by the API and shown as a collapsed stub. Redaction only changes what you see, not what the model generates: to reduce thinking spend, [lower the budget or disable thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) instead. Non-interactive mode (`-p`) and SDK callers always receive summaries regardless of this setting| `true`
+`showThinkingSummaries`| Show [extended thinking](</docs/en/model-config#extended-thinking>) summaries in interactive sessions. When unset or `false` (default in interactive mode), thinking blocks are redacted by the API and shown as a collapsed stub. Redaction only changes what you see, not what the model generates: to reduce thinking spend, [lower the budget or disable thinking](</docs/en/model-config#extended-thinking>) instead. Non-interactive mode (`-p`) and SDK callers always receive summaries regardless of this setting| `true`
`showTurnDuration`| Show turn duration messages after responses, e.g. “Cooked for 1m 6s”. Default: `true`. Appears in `/config` as **Show turn duration**| `false`
`skipWebFetchPreflight`| Skip the [WebFetch domain safety check](</docs/en/data-usage#webfetch-domain-safety-check>) that sends each requested hostname to `api.anthropic.com` before fetching. Set to `true` in environments that block traffic to Anthropic, such as Bedrock, Vertex AI, or Foundry deployments with restrictive egress. When skipped, WebFetch attempts any URL without consulting the blocklist| `true`
`spinnerTipsEnabled`| Show tips in the spinner while Claude is working. Set to `false` to disable tips (default: `true`)| `false`
@@ -270,7 +270,7 @@
`worktree.symlinkDirectories`| Directories to symlink from the main repository into each worktree to avoid duplicating large directories on disk. No directories are symlinked by default| `["node_modules", ".cache"]`
`worktree.sparsePaths`| Directories to check out in each worktree via git sparse-checkout (cone mode). Only the listed paths are written to disk, which is faster in large monorepos| `["packages/my-app", "shared/utils"]`
-To copy gitignored files like `.env` into new worktrees, use a [`.worktreeinclude` file](</docs/en/common-workflows#copy-gitignored-files-to-worktrees>) in your project root instead of a setting.
+To copy gitignored files like `.env` into new worktrees, use a [`.worktreeinclude` file](</docs/en/worktrees#copy-gitignored-files-into-worktrees>) in your project root instead of a setting.
###
Show diff (221 lines)
--- a/skills.md
+++ b/skills.md
@@ -4,7 +4,7 @@
>
> Use this file to discover all available pages before exploring further.
-Skills extend what Claude can do. Create a `SKILL.md` file with instructions, and Claude adds it to its toolkit. Claude uses skills when relevant, or you can invoke one directly with `/skill-name`. Create a skill when you keep pasting the same playbook, checklist, or multi-step procedure into chat, or when a section of CLAUDE.md has grown into a procedure rather than a fact. Unlike CLAUDE.md content, a skill’s body loads only when it’s used, so long reference material costs almost nothing until you need it.
+Skills extend what Claude can do. Create a `SKILL.md` file with instructions, and Claude adds it to its toolkit. Claude uses skills when relevant, or you can invoke one directly with `/skill-name`. Create a skill when you keep pasting the same instructions, checklist, or multi-step procedure into chat, or when a section of CLAUDE.md has grown into a procedure rather than a fact. Unlike CLAUDE.md content, a skill’s body loads only when it’s used, so long reference material costs almost nothing until you need it.
For built-in commands like `/help` and `/compact`, and bundled skills like `/debug` and `/simplify`, see the [commands reference](</docs/en/commands>).**Custom commands have been merged into skills.** A file at `.claude/commands/deploy.md` and a skill at `.claude/skills/deploy/SKILL.md` both create `/deploy` and work the same way. Your existing `.claude/commands/` files keep working. Skills add optional features: a directory for supporting files, frontmatter to control whether you or Claude invokes them, and the ability for Claude to load them automatically when relevant.
@@ -16,7 +16,7 @@
Bundled skills
-Claude Code includes a set of bundled skills that are available in every session, including `/simplify`, `/batch`, `/debug`, `/loop`, and `/claude-api`. Unlike most built-in commands, which execute fixed logic directly, bundled skills are prompt-based: they give Claude a detailed playbook and let it orchestrate the work using its tools. You invoke them the same way as any other skill, by typing `/` followed by the skill name. Bundled skills are listed alongside built-in commands in the [commands reference](</docs/en/commands>), marked **Skill** in the Purpose column.
+Claude Code includes a set of bundled skills that are available in every session, including `/simplify`, `/batch`, `/debug`, `/loop`, and `/claude-api`. Unlike most built-in commands, which execute fixed logic directly, bundled skills are prompt-based: they give Claude detailed instructions and let it orchestrate the work using its tools. You invoke them the same way as any other skill, by typing `/` followed by the skill name. Bundled skills are listed alongside built-in commands in the [commands reference](</docs/en/commands>), marked **Skill** in the Purpose column.
##
@@ -30,7 +30,7 @@
Create your first skill
-This example creates a skill that teaches Claude to explain code using visual diagrams and analogies. Since it uses default frontmatter, Claude can load it automatically when you ask how something works, or you can invoke it directly with `/explain-code`.
+This example creates a skill that summarizes the uncommitted changes in your git repository and flags anything risky. It pulls the live diff into the prompt before Claude reads it, so the response is grounded in your actual working tree rather than what Claude can guess from open files. Claude loads the skill automatically when you ask about your changes, or you can invoke it directly with `/summarize-changes`.
1
@@ -38,40 +38,41 @@
Create a directory for the skill in your personal skills folder. Personal skills are available across all your projects.
- mkdir -p ~/.claude/skills/explain-code
+ mkdir -p ~/.claude/skills/summarize-changes
2
Write SKILL.md
-Every skill needs a `SKILL.md` file with two parts: YAML frontmatter (between `---` markers) that tells Claude when to use the skill, and markdown content with instructions Claude follows when the skill is invoked. The directory name becomes the `/slash-command`, and the `description` helps Claude decide when to load it automatically.Create `~/.claude/skills/explain-code/SKILL.md`:
-
- ---
- description: Explains code with visual diagrams and analogies. Use when explaining how code works, teaching about a codebase, or when the user asks "how does this work?"
- ---
-
- When explaining code, always include:
-
- 1. **Start with an analogy**: Compare the code to something from everyday life
- 2. **Draw a diagram**: Use ASCII art to show the flow, structure, or relationships
- 3. **Walk through the code**: Explain step-by-step what happens
- 4. **Highlight a gotcha**: What's a common mistake or misconception?
-
- Keep explanations conversational. For complex concepts, use multiple analogies.
+Every skill needs a `SKILL.md` file with two parts: YAML frontmatter between `---` markers that tells Claude when to use the skill, and markdown content with the instructions Claude follows when the skill runs. The directory name becomes the command you type, and the `description` helps Claude decide when to load the skill automatically.Save this to `~/.claude/skills/summarize-changes/SKILL.md`:
+
+ ---
+ description: Summarizes uncommitted changes and flags anything risky. Use when the user asks what changed, wants a commit message, or asks to review their diff.
+ ---
+
+ ## Current changes
+
+ !`git diff HEAD`
+
+ ## Instructions
+
+ Summarize the changes above in two or three bullet points, then list any risks you notice such as missing error handling, hardcoded values, or tests that need updating. If the diff is empty, say there are no uncommitted changes.
+
+The `!`git diff HEAD`` line uses dynamic context injection: Claude Code runs the command and replaces the line with its output before Claude sees the skill content, so the instructions arrive with the current diff already inlined.
3
Test the skill
-You can test it two ways:**Let Claude invoke it automatically** by asking something that matches the description:
-
- How does this code work?
+Open a git project, make a small edit to any file, and start Claude Code by running `claude`. You can test the skill two ways.**Let Claude invoke it automatically** by asking something that matches the description:
+
+ What did I change?
**Or invoke it directly** with the skill name:
- /explain-code src/auth/login.ts
-
-Either way, Claude should include an analogy and ASCII diagram in its explanation.
+ /summarize-changes
+
+Either way, Claude should respond with a short summary of your edit and a list of risks.
###
@@ -192,7 +193,7 @@
Field| Required| Description
---|---|---
`name`| No| Display name for the skill. If omitted, uses the directory name. Lowercase letters, numbers, and hyphens only (max 64 characters).
-`description`| Recommended| What the skill does and when to use it. Claude uses this to decide when to apply the skill. If omitted, uses the first paragraph of markdown content. Front-load the key use case: the combined `description` and `when_to_use` text is truncated at 1,536 characters in the skill listing to reduce context usage.
+`description`| Recommended| What the skill does and when to use it. Claude uses this to decide when to apply the skill. If omitted, uses the first paragraph of markdown content. Put the key use case first: the combined `description` and `when_to_use` text is truncated at 1,536 characters in the skill listing to reduce context usage.
`when_to_use`| No| Additional context for when Claude should invoke the skill, such as trigger phrases or example requests. Appended to `description` in the skill listing and counts toward the 1,536-character cap.
`argument-hint`| No| Hint shown during autocomplete to indicate expected arguments. Example: `[issue-number]` or `[filename] [format]`.
`arguments`| No| Named positional arguments for `$name` substitution in the skill content. Accepts a space-separated string or a YAML list. Names map to argument positions in order.
@@ -310,7 +311,7 @@
Pre-approve tools for a skill
-The `allowed-tools` field grants permission for the listed tools while the skill is active, so Claude can use them without prompting you for approval. It does not restrict which tools are available: every tool remains callable, and your [permission settings](</docs/en/permissions>) still govern tools that are not listed. This skill lets Claude run git commands without per-use approval whenever you invoke it:
+The `allowed-tools` field grants permission for the listed tools while the skill is active, so Claude can use them without prompting you for approval. It does not restrict which tools are available: every tool remains callable, and your [permission settings](</docs/en/permissions>) still govern tools that are not listed. For skills checked into a project’s `.claude/skills/` directory, `allowed-tools` takes effect after you accept the workspace trust dialog for that folder, the same as permission rules in `.claude/settings.json`. Review project skills before trusting a repository, since a skill can grant itself broad tool access. This skill lets Claude run git commands without per-use approval whenever you invoke it:
---
name: commit
@@ -410,7 +411,7 @@
To disable this behavior for skills and custom commands from user, project, plugin, or additional-directory sources, set `"disableSkillShellExecution": true` in [settings](</docs/en/settings>). Each command is replaced with `[shell command execution disabled by policy]` instead of being run. Bundled and managed skills are not affected. This setting is most useful in [managed settings](</docs/en/permissions#managed-settings>), where users cannot override it.
-To enable [extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) in a skill, include the word “ultrathink” anywhere in your skill content.
+To request deeper reasoning when a skill runs, include `ultrathink` anywhere in the skill content. See [Use ultrathink for one-off deep reasoning](</docs/en/model-config#use-ultrathink-for-one-off-deep-reasoning>).
###
@@ -507,12 +508,12 @@
mkdir -p ~/.claude/skills/codebase-visualizer/scripts
-Create `~/.claude/skills/codebase-visualizer/SKILL.md`. The description tells Claude when to activate this Skill, and the instructions tell Claude to run the bundled script:
+Save this to `~/.claude/skills/codebase-visualizer/SKILL.md`. The description tells Claude when to activate this Skill, and the instructions tell Claude to run the bundled script. The script path uses `${CLAUDE_SKILL_DIR}` so it resolves correctly whether the skill is installed at the personal, project, or plugin level:
---
name: codebase-visualizer
description: Generate an interactive collapsible tree visualization of your codebase. Use when exploring a new repo, understanding project structure, or identifying large files.
- allowed-tools: Bash(python *)
+ allowed-tools: Bash(python3 *)
---
# Codebase Visualizer
@@ -524,7 +525,7 @@
Run the visualization script from your project root:
```bash
- python ~/.claude/skills/codebase-visualizer/scripts/visualize.py .
+ python3 ${CLAUDE_SKILL_DIR}/scripts/visualize.py .
```
This creates `codebase-map.html` in the current directory and opens it in your default browser.
@@ -536,13 +537,13 @@
- **Colors**: Different colors for different file types
- **Directory totals**: Shows aggregate size of each folder
-Create `~/.claude/skills/codebase-visualizer/scripts/visualize.py`. This script scans a directory tree and generates a self-contained HTML file with:
+Save this to `~/.claude/skills/codebase-visualizer/scripts/visualize.py`. This script scans a directory tree and generates a self-contained HTML file with:
* A **summary sidebar** showing file count, directory count, total size, and number of file types
* A **bar chart** breaking down the codebase by file type (top 8 by size)
* A **collapsible tree** where you can expand and collapse directories, with color-coded file type indicators
-The script requires Python but uses only built-in libraries, so there are no packages to install:
+The script requires Python 3 but uses only built-in libraries, so there are no packages to install:
#!/usr/bin/env python3
"""Generate an interactive collapsible tree visualization of a codebase."""
@@ -550,6 +551,7 @@
import json
import sys
import webbrowser
+ from html import escape
from pathlib import Path
from collections import Counter
@@ -638,7 +640,7 @@
{lang_bars}
</div>
<div class="main">
- <h1>📁 {data["name"]}</h1>
+ <h1>📁 {escape(data["name"])}</h1>
<ul class="tree" id="root"></ul>
</div>
</div>
@@ -646,11 +648,12 @@
const data = {json.dumps(data)};
const colors = {json.dumps(colors)};
function fmt(b) {{ if (b < 1024) return b + ' B'; if (b < 1048576) return (b/1024).toFixed(1) + ' KB'; return (b/1048576).toFixed(1) + ' MB'; }}
+ function esc(s) {{ return s.replace(/[&<>"']/g, c => ({{"&":"&","<":"<",">":">",'"':""","'":"'"}}[c])); }}
function render(node, parent) {{
if (node.children) {{
const det = document.createElement('details');
det.open = parent === document.getElementById('root');
- det.innerHTML = `<summary><span class="folder">📁 ${{node.name}}</span><span class="size">${{fmt(node.size)}}</span></summary>`;
+ det.innerHTML = `<summary><span class="folder">📁 ${{esc(node.name)}}</span><span class="size">${{fmt(node.size)}}</span></summary>`;
const ul = document.createElement('ul'); ul.className = 'tree';
node.children.sort((a,b) => (b.children?1:0)-(a.children?1:0) || a.name.localeCompare(b.name));
node.children.forEach(c => render(c, ul));
@@ -658,7 +661,7 @@
const li = document.createElement('li'); li.appendChild(det); parent.appendChild(li);
}} else {{
const li = document.createElement('li'); li.className = 'file';
- li.innerHTML = `<span class="dot" style="background:${{colors[node.ext]||'#6b7280'}}"></span>${{node.name}}<span class="size">${{fmt(node.size)}}</span>`;
+ li.innerHTML = `<span class="dot" style="background:${{colors[node.ext]||'#6b7280'}}"></span>${{esc(node.name)}}<span class="size">${{fmt(node.size)}}</span>`;
parent.appendChild(li);
}}
}}
@@ -676,9 +679,9 @@
print(f'Generated {out.absolute()}')
webbrowser.open(f'file://{out.absolute()}')
-See all 131 lines
-
-To test, open Claude Code in any project and ask “Visualize this codebase.” Claude runs the script, generates `codebase-map.html`, and opens it in your browser. This pattern works for any visual output: dependency graphs, test coverage reports, API documentation, or database schema visualizations. The bundled script does the heavy lifting while Claude handles orchestration.
+See all 133 lines
+
+To test, open Claude Code in any project and ask “Visualize this codebase.” Claude runs the script, generates `codebase-map.html`, and opens it in your browser. This pattern works for any visual output: dependency graphs, test coverage reports, API documentation, or database schema visualizations. The bundled script does the work while Claude handles orchestration.
##
@@ -716,7 +719,7 @@
Skill descriptions are cut short
-Skill descriptions are loaded into context so Claude knows what’s available. All skill names are always included, but if you have many skills, descriptions are shortened to fit the character budget, which can strip the keywords Claude needs to match your request. The budget scales dynamically at 1% of the context window, with a fallback of 8,000 characters. To raise the limit, set the `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable. Or trim the `description` and `when_to_use` text at the source: front-load the key use case, since each entry’s combined text is capped at 1,536 characters regardless of budget.
+Skill descriptions are loaded into context so Claude knows what’s available. All skill names are always included, but if you have many skills, descriptions are shortened to fit the character budget, which can strip the keywords Claude needs to match your request. The budget scales dynamically at 1% of the context window, with a fallback of 8,000 characters. To raise the limit, set the `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable. Or trim the `description` and `when_to_use` text at the source: put the key use case first, since each entry’s combined text is capped at 1,536 characters regardless of budget.
##
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -49,7 +49,7 @@
Claude delegates to Explore when it needs to search or understand a codebase without making changes. This keeps exploration results out of your main conversation context.When invoking Explore, Claude specifies a thoroughness level: **quick** for targeted lookups, **medium** for balanced exploration, or **very thorough** for comprehensive analysis.
-A research agent used during [plan mode](</docs/en/common-workflows#use-plan-mode-for-safe-code-analysis>) to gather context before presenting a plan.
+A research agent used during [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) to gather context before presenting a plan.
* **Model** : Inherits from main conversation
* **Tools** : Read-only tools (denied access to Write and Edit tools)
@@ -248,7 +248,7 @@
`memory`| No| Persistent memory scope: `user`, `project`, or `local`. Enables cross-session learning
`background`| No| Set to `true` to always run this subagent as a background task. Default: `false`
`effort`| No| Effort level when this subagent is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model
-`isolation`| No| Set to `worktree` to run the subagent in a temporary [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>), giving it an isolated copy of the repository. The worktree is automatically cleaned up if the subagent makes no changes
+`isolation`| No| Set to `worktree` to run the subagent in a temporary [git worktree](</docs/en/worktrees>), giving it an isolated copy of the repository. The worktree is automatically cleaned up if the subagent makes no changes
`color`| No| Display color for the subagent in the task list and transcript. Accepts `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` or the `agent` setting). [Commands](</docs/en/commands>) and [skills](</docs/en/skills>) are processed. Prepended to any user-provided prompt
--- a/tools-reference.md
+++ b/tools-reference.md
@@ -16,7 +16,7 @@
`CronList`| Lists all scheduled tasks in the session| No
`Edit`| Makes targeted edits to specific files| Yes
`EnterPlanMode`| Switches to plan mode to design an approach before coding| No
-`EnterWorktree`| Creates an isolated [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>) and switches into it. Pass a `path` to switch into an existing worktree of the current repository instead of creating a new one. Not available to subagents| No
+`EnterWorktree`| Creates an isolated [git worktree](</docs/en/worktrees>) and switches into it. Pass a `path` to switch into an existing worktree of the current repository instead of creating a new one. Not available to subagents| No
`ExitPlanMode`| Presents a plan for approval and exits plan mode| Yes
`ExitWorktree`| Exits a worktree session and returns to the original directory. Not available to subagents| No
`Glob`| Finds files based on pattern matching| No
--- a/vs-code.md
+++ b/vs-code.md
@@ -91,7 +91,7 @@
* **Permission modes** : click the mode indicator at the bottom of the prompt box to switch modes. In normal mode, Claude asks permission before each action. In Plan mode, Claude describes what it will do and waits for approval before making changes. VS Code automatically opens the plan as a full markdown document where you can add inline comments to give feedback before Claude begins. In auto-accept mode, Claude makes edits without asking. Set the default in VS Code settings under `claudeCode.initialPermissionMode`.
* **Command menu** : click `/` or type `/` to open the command menu. Options include attaching files, switching models, toggling extended thinking, viewing plan usage (`/usage`), and starting a [Remote Control](</docs/en/remote-control>) session (`/remote-control`). The Customize section provides access to MCP servers, hooks, memory, permissions, and plugins. Items with a terminal icon open in the integrated terminal.
* **Context indicator** : the prompt box shows how much of Claude’s context window you’re using. Claude automatically compacts when needed, or you can run `/compact` manually.
- * **Extended thinking** : lets Claude spend more time reasoning through complex problems. Toggle it on via the command menu (`/`). Claude’s reasoning appears in the conversation as collapsed blocks: click a block to read it, or press `Ctrl+O` to expand or collapse every thinking block in the session. See [Extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) for details.
+ * **Extended thinking** : lets Claude spend more time reasoning through complex problems. Toggle it on via the command menu (`/`). Claude’s reasoning appears in the conversation as collapsed blocks: click a block to read it, or press `Ctrl+O` to expand or collapse every thinking block in the session. See [Extended thinking](</docs/en/model-config#extended-thinking>) for details.
* **Multi-line input** : press `Shift+Enter` to add a new line without sending. This also works in the “Other” free-text input of question dialogs.
###
@@ -113,7 +113,7 @@
Resume past conversations
-Click the **Session history** button at the top of the Claude Code panel to access your conversation history. You can search by keyword or browse by time (Today, Yesterday, Last 7 days, etc.). Click any conversation to resume it with the full message history. New sessions receive AI-generated titles based on your first message. Hover over a session to reveal rename and remove actions: rename to give it a descriptive title, or remove to delete it from the list. For more on resuming sessions, see [Common workflows](</docs/en/common-workflows#resume-previous-conversations>).
+Click the **Session history** button at the top of the Claude Code panel to access your conversation history. You can search by keyword or browse by time (Today, Yesterday, Last 7 days, etc.). Click any conversation to resume it with the full message history. New sessions receive AI-generated titles based on your first message. Hover over a session to reveal rename and remove actions: rename to give it a descriptive title, or remove to delete it from the list. For more on resuming sessions, see [Manage sessions](</docs/en/sessions>).
###
@@ -266,11 +266,27 @@
Launch a VS Code tab from other tools
-The extension registers a URI handler at `vscode://anthropic.claude-code/open`. Use it to open a new Claude Code tab from your own tooling: a shell alias, a browser bookmarklet, or any script that can open a URL. If VS Code isn’t already running, opening the URL launches it first. If VS Code is already running, the URL opens in whichever window is currently focused. Invoke the handler with your operating system’s URL opener. On macOS:
+The extension registers a URI handler at `vscode://anthropic.claude-code/open`. Use it to open a new Claude Code tab from your own tooling: a shell alias, a browser bookmarklet, or any script that can open a URL. If VS Code isn’t already running, opening the URL launches it first. If VS Code is already running, the URL opens in whichever window is currently focused. Invoke the handler with your operating system’s URL opener.
+
+ * macOS
+
+ * Linux
+
+ * Windows
open "vscode://anthropic.claude-code/open"
-Use `xdg-open` on Linux or `start` on Windows. The handler accepts two optional query parameters:
+ xdg-open "vscode://anthropic.claude-code/open"
+
+In PowerShell:
+
+ Start-Process "vscode://anthropic.claude-code/open"
+
+In `cmd.exe`, `start` treats its first quoted argument as a window title, so pass an empty title before the URL:
+
+ start "" "vscode://anthropic.claude-code/open"
+
+The handler accepts two optional query parameters:
Parameter| Description
---|---
@@ -280,6 +296,8 @@
For example, to open a tab pre-filled with “review my changes”:
vscode://anthropic.claude-code/open?prompt=review%20my%20changes
+
+To launch a terminal session instead of a VS Code tab, use the CLI’s `claude-cli://` handler. See [Launch sessions from links](</docs/en/deep-links>).
##
@@ -423,7 +441,7 @@
claude --worktree feature-auth
-Each worktree maintains independent file state while sharing git history. This prevents Claude instances from interfering with each other when working on different tasks. For more details, see [Run parallel sessions with Git worktrees](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>).
+Each worktree maintains independent file state while sharing git history. This prevents Claude instances from interfering with each other when working on different tasks. For more details, see [Run parallel sessions with Git worktrees](</docs/en/worktrees>).
##
--- a/zero-data-retention.md
+++ b/zero-data-retention.md
@@ -11,7 +11,7 @@
* [Server-managed settings](</docs/en/server-managed-settings>)
* Audit logs
-ZDR for Claude Code on Claude for Enterprise applies only to Anthropic’s direct platform. For Claude deployments on AWS Bedrock, Google Vertex AI, or Microsoft Foundry, refer to those platforms’ data retention policies.
+ZDR for Claude Code on Claude for Enterprise applies only to Anthropic’s direct platform. For Claude deployments on Amazon Bedrock, Google Vertex AI, or Microsoft Foundry, refer to those platforms’ data retention policies.
##