SpyBara
Go Premium

Documentation 2026-05-12 22:57 UTC to 2026-05-13 23:01 UTC

25 files changed +268 −195. View all changes and history on the product overview
2026
Sun 31 06:39 Sat 30 06:23 Fri 29 06:38 Thu 28 06:37 Wed 27 06:42 Tue 26 06:33 Sun 24 06:25 Sat 23 06:18 Fri 22 06:33 Thu 21 06:36 Wed 20 06:35 Tue 19 06:34 Mon 18 23:59 Sun 17 01:01 Fri 15 22:58 Thu 14 17:02 Wed 13 23:01 Tue 12 22:57 Mon 11 23:00 Sun 10 23:03 Sat 9 04:57 Fri 8 22:00 Thu 7 22:59 Tue 5 23:00 Mon 4 22:58 Sat 2 18:14 Fri 1 18:19

admin-setup.md +3 −1

Details

24 24 

25## Choose your API provider25## Choose your API provider

26 26 

27Claude Code connects to Claude through one of several API providers. Your choice affects billing, authentication, and which compliance posture you inherit.27Claude Code connects to Claude through one of several API providers. Your choice affects billing, authentication, which compliance posture you inherit, and which Claude Code features your developers can use.

28 28 

29| Provider | Choose this when |29| Provider | Choose this when |

30| :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------------ |30| :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------------ |


34| Google Vertex AI | You want to inherit existing GCP compliance controls and billing |34| Google Vertex AI | You want to inherit existing GCP compliance controls and billing |

35| Microsoft Foundry | You want to inherit existing Azure compliance controls and billing |35| Microsoft Foundry | You want to inherit existing Azure compliance controls and billing |

36 36 

37Some Claude Code features require a Claude.ai account. [Claude Code on the web](/en/claude-code-on-the-web), [Routines](/en/routines), [Code Review](/en/code-review), [Remote Control](/en/remote-control), and the [Chrome extension](/en/chrome) are not available through Console API keys or cloud-provider credentials alone. If you deploy through Bedrock, Vertex, or Foundry, plan whether developers also need Claude for Teams or Enterprise seats. Each feature page lists its plan requirements.

38 

37For the full provider comparison covering authentication, regions, and feature parity, see the [enterprise deployment overview](/en/third-party-integrations). Each provider's auth setup is in [Authentication](/en/authentication).39For the full provider comparison covering authentication, regions, and feature parity, see the [enterprise deployment overview](/en/third-party-integrations). Each provider's auth setup is in [Authentication](/en/authentication).

38 40 

39Proxy and firewall requirements in [Network configuration](/en/network-config) apply regardless of provider. If you want a single endpoint in front of multiple providers or centralized request logging, see [LLM gateway](/en/llm-gateway).41Proxy and firewall requirements in [Network configuration](/en/network-config) apply regardless of provider. If you want a single endpoint in front of multiple providers or centralized request logging, see [LLM gateway](/en/llm-gateway).

Details

68Each source loads settings from a specific location, where `<cwd>` is the working directory you pass via the `cwd` option, or the process's current directory if unset. For the full type definition, see [`SettingSource`](/en/agent-sdk/typescript#settingsource) (TypeScript) or [`SettingSource`](/en/agent-sdk/python#settingsource) (Python).68Each source loads settings from a specific location, where `<cwd>` is the working directory you pass via the `cwd` option, or the process's current directory if unset. For the full type definition, see [`SettingSource`](/en/agent-sdk/typescript#settingsource) (TypeScript) or [`SettingSource`](/en/agent-sdk/python#settingsource) (Python).

69 69 

70| Source | What it loads | Location |70| Source | What it loads | Location |

71| :---------- | :---------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------- |71| :---------- | :---------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

72| `"project"` | Project CLAUDE.md, `.claude/rules/*.md`, project skills, project hooks, project `settings.json` | `<cwd>/.claude/` and each parent directory up to the filesystem root (stopping when a `.claude/` is found or no more parents exist) |72| `"project"` | Project CLAUDE.md, `.claude/rules/*.md`, project skills, project hooks, project `settings.json` | `<cwd>/.claude/` for `settings.json` and hooks; `<cwd>` and every parent directory for CLAUDE.md and rules; `<cwd>` and every parent directory up to the repository root for skills |

73| `"user"` | User CLAUDE.md, `~/.claude/rules/*.md`, user skills, user settings | `~/.claude/` |73| `"user"` | User CLAUDE.md, `~/.claude/rules/*.md`, user skills, user settings | `~/.claude/` |

74| `"local"` | CLAUDE.local.md (gitignored), `.claude/settings.local.json` | `<cwd>/` |74| `"local"` | CLAUDE.local.md, `.claude/settings.local.json` | `<cwd>/.claude/` for `settings.local.json`; `<cwd>` and every parent directory for CLAUDE.local.md |

75 75 

76Omitting `settingSources` is equivalent to `["user", "project", "local"]`.76Omitting `settingSources` is equivalent to `["user", "project", "local"]`.

77 77 

78The `cwd` option determines where the SDK looks for project settings. If neither `cwd` nor any of its parent directories contains a `.claude/` folder, project-level features won't load.78The `cwd` option determines where the SDK looks for project-level inputs. CLAUDE.md and rules load from `<cwd>` and from every parent directory. Skills load from `<cwd>` and from every parent directory up to the repository root. Project `settings.json` and hooks load only from `<cwd>/.claude/` with no parent-directory fallback.

79 79 

80### What settingSources does not control80### What settingSources does not control

81 81 


98### CLAUDE.md load locations98### CLAUDE.md load locations

99 99 

100| Level | Location | When loaded |100| Level | Location | When loaded |

101| :-------------------- | :--------------------------------------------- | :-------------------------------------------------------------------------------------------------- |101| :-------------------- | :---------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------- |

102| Project (root) | `<cwd>/CLAUDE.md` or `<cwd>/.claude/CLAUDE.md` | `settingSources` includes `"project"` |102| Project (root) | `<cwd>/CLAUDE.md` or `<cwd>/.claude/CLAUDE.md` | `settingSources` includes `"project"` |

103| Project rules | `<cwd>/.claude/rules/*.md` | `settingSources` includes `"project"` |103| Project rules | `<cwd>/.claude/rules/*.md` and `.claude/rules/*.md` in every parent directory | `settingSources` includes `"project"` |

104| Project (parent dirs) | `CLAUDE.md` files in directories above `cwd` | `settingSources` includes `"project"`, loaded at session start |104| Project (parent dirs) | `CLAUDE.md` files in directories above `cwd` | `settingSources` includes `"project"`, loaded at session start |

105| Project (child dirs) | `CLAUDE.md` files in subdirectories of `cwd` | `settingSources` includes `"project"`, loaded on demand when the agent reads a file in that subtree |105| Project (child dirs) | `CLAUDE.md` files in subdirectories of `cwd` | `settingSources` includes `"project"`, loaded on demand when the agent reads a file in that subtree |

106| Local (gitignored) | `<cwd>/CLAUDE.local.md` | `settingSources` includes `"local"` |106| Local | `<cwd>/CLAUDE.local.md` and `CLAUDE.local.md` in every parent directory | `settingSources` includes `"local"` |

107| User | `~/.claude/CLAUDE.md` | `settingSources` includes `"user"` |107| User | `~/.claude/CLAUDE.md` | `settingSources` includes `"user"` |

108| User rules | `~/.claude/rules/*.md` | `settingSources` includes `"user"` |108| User rules | `~/.claude/rules/*.md` | `settingSources` includes `"user"` |

109 109 

Details

108 108 

109#### Create an output style109#### Create an output style

110 110 

111An output style is a markdown file with a `name` and `description` in its frontmatter, followed by the prompt content. Save it to `~/.claude/output-styles/` for a user-level style available in every project, or `.claude/output-styles/` in your repository for a project-level style you can commit and share with your team.111An output style is a markdown file with [frontmatter](/en/output-styles#frontmatter) for metadata, followed by the prompt content. Save it to `~/.claude/output-styles/` for a user-level style available in every project, or `.claude/output-styles/` in your repository for a project-level style you can commit and share with your team.

112 112 

113The example below defines a code-review persona. Save it as `~/.claude/output-styles/code-reviewer.md` to make it available across projects:113By default, a custom output style replaces the `claude_code` preset's software engineering instructions with your own. To keep them and layer your instructions on top, set `keep-coding-instructions: true` in the frontmatter. Keep them when your agent is still doing software engineering work. Leave them out when you're replacing the role entirely.

114 

115The example below defines a code-review persona that keeps the coding instructions, since reviewing code still benefits from Claude Code's security and code-quality guidance. Save it as `~/.claude/output-styles/code-reviewer.md` to make it available across projects:

114 116 

115```markdown ~/.claude/output-styles/code-reviewer.md theme={null}117```markdown ~/.claude/output-styles/code-reviewer.md theme={null}

116---118---

117name: Code Reviewer119name: Code Reviewer

118description: Thorough code review assistant120description: Thorough code review assistant

121keep-coding-instructions: true

119---122---

120 123 

121You are an expert code reviewer.124You are an expert code reviewer.


299The four customization methods differ in where they live, how they're shared, and what they preserve from the `claude_code` preset.302The four customization methods differ in where they live, how they're shared, and what they preserve from the `claude_code` preset.

300 303 

301| Feature | CLAUDE.md | Output Styles | `systemPrompt` with append | Custom `systemPrompt` |304| Feature | CLAUDE.md | Output Styles | `systemPrompt` with append | Custom `systemPrompt` |

302| ----------------------- | ---------------- | --------------- | -------------------------- | ---------------------- |305| ----------------------- | ---------------- | ------------------------- | -------------------------- | ---------------------- |

303| **Persistence** | Per-project file | Saved as files | Session only | Session only |306| **Persistence** | Per-project file | Saved as files | Session only | Session only |

304| **Reusability** | Per-project | Across projects | Code duplication | Code duplication |307| **Reusability** | Per-project | Across projects | Code duplication | Code duplication |

305| **Management** | On filesystem | CLI + files | In code | In code |308| **Management** | On filesystem | CLI + files | In code | In code |

306| **Default tools** | Preserved | Preserved | Preserved | Lost (unless included) |309| **Default tools** | Preserved | Preserved | Preserved | Lost (unless included) |

307| **Built-in safety** | Maintained | Maintained | Maintained | Must be added |310| **Built-in safety** | Maintained | Maintained | Maintained | Must be added |

308| **Environment context** | Automatic | Automatic | Automatic | Must be provided |311| **Environment context** | Automatic | Automatic | Automatic | Must be provided |

309| **Customization level** | Additions only | Replace default | Additions only | Complete control |312| **Customization level** | Additions only | Replace or extend default | Additions only | Complete control |

310| **Version control** | With project | Yes | With code | With code |313| **Version control** | With project | Yes | With code | With code |

311| **Scope** | Project-specific | User or project | Code session | Code session |314| **Scope** | Project-specific | User or project | Code session | Code session |

312 315 

Details

7> Build production AI agents with Claude Code as a library7> Build production AI agents with Claude Code as a library

8 8 

9<Note>9<Note>

10 The Claude Code SDK has been renamed to the Claude Agent SDK. If you're migrating from the old SDK, see the [Migration Guide](/en/agent-sdk/migration-guide).10 Starting June 15, 2026, Agent SDK and `claude -p` usage on subscription plans will draw from a new monthly Agent SDK credit, separate from your interactive usage limits. See [Use the Claude Agent SDK with your Claude plan](https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan) for details.

11</Note>11</Note>

12 12 

13Build AI agents that autonomously read files, run commands, search the web, edit code, and more. The Agent SDK gives you the same tools, agent loop, and context management that power Claude Code, programmable in Python and TypeScript.13Build AI agents that autonomously read files, run commands, search the web, edit code, and more. The Agent SDK gives you the same tools, agent loop, and context management that power Claude Code, programmable in Python and TypeScript.

14 14 

15<Note>

16 Opus 4.7 (`claude-opus-4-7`) requires Agent SDK v0.2.111 or later. If you see a `thinking.type.enabled` API error, see [Troubleshooting](/en/agent-sdk/quickstart#troubleshooting).

17</Note>

18 

19<CodeGroup>15<CodeGroup>

20 ```python Python theme={null}16 ```python Python theme={null}

21 import asyncio17 import asyncio

Details

25Unlike subagents (which can be defined programmatically), Skills must be created as filesystem artifacts. The SDK does not provide a programmatic API for registering Skills.25Unlike subagents (which can be defined programmatically), Skills must be created as filesystem artifacts. The SDK does not provide a programmatic API for registering Skills.

26 26 

27<Note>27<Note>

28 Skills are discovered through the filesystem setting sources. With default `query()` options, the SDK loads user and project sources, so skills in `~/.claude/skills/` and `<cwd>/.claude/skills/` are available. If you set `settingSources` explicitly, include `'user'` or `'project'` to keep skill discovery, or use the [`plugins` option](/en/agent-sdk/plugins) to load skills from a specific path.28 Skills are discovered through the filesystem setting sources. With default `query()` options, the SDK loads user and project sources, so skills in `~/.claude/skills/`, `<cwd>/.claude/skills/`, and `.claude/skills/` in any parent directory of `<cwd>` up to the repository root are available. If you set `settingSources` explicitly, include `'user'` or `'project'` to keep skill discovery, or use the [`plugins` option](/en/agent-sdk/plugins) to load skills from a specific path.

29</Note>29</Note>

30 30 

31## Using Skills with the SDK31## Using Skills with the SDK


252 252 

253For more details on `settingSources`/`setting_sources`, see the [TypeScript SDK reference](/en/agent-sdk/typescript#settingsource) or [Python SDK reference](/en/agent-sdk/python#settingsource).253For more details on `settingSources`/`setting_sources`, see the [TypeScript SDK reference](/en/agent-sdk/typescript#settingsource) or [Python SDK reference](/en/agent-sdk/python#settingsource).

254 254 

255**Check working directory**: The SDK loads Skills relative to the `cwd` option. Ensure it points to a directory containing `.claude/skills/`:255**Check working directory**: The SDK loads Skills from `.claude/skills/` in the `cwd` option and in every parent directory up to the repository root. Ensure `cwd` points at or below the directory containing `.claude/skills/`, within the same repository:

256 256 

257<CodeGroup>257<CodeGroup>

258 ```python Python theme={null}258 ```python Python theme={null}

259 # Ensure your cwd points to the directory containing .claude/skills/259 # Ensure your cwd points to the directory containing .claude/skills/

260 options = ClaudeAgentOptions(260 options = ClaudeAgentOptions(

261 cwd="/path/to/project", # Must contain .claude/skills/261 cwd="/path/to/project", # .claude/skills/ here or in a parent directory

262 setting_sources=["user", "project"], # Loads skills from these sources262 setting_sources=["user", "project"], # Loads skills from these sources

263 skills="all",263 skills="all",

264 )264 )


267 ```typescript TypeScript theme={null}267 ```typescript TypeScript theme={null}

268 // Ensure your cwd points to the directory containing .claude/skills/268 // Ensure your cwd points to the directory containing .claude/skills/

269 const options = {269 const options = {

270 cwd: "/path/to/project", // Must contain .claude/skills/270 cwd: "/path/to/project", // .claude/skills/ here or in a parent directory

271 settingSources: ["user", "project"], // Loads skills from these sources271 settingSources: ["user", "project"], // Loads skills from these sources

272 skills: "all"272 skills: "all"

273 };273 };

agent-view.md +132 −54

Details

6 6 

7> Dispatch and manage many Claude Code sessions from one screen. Agent view shows what every session is doing and which ones need your input.7> Dispatch and manage many Claude Code sessions from one screen. Agent view shows what every session is doing and which ones need your input.

8 8 

9Agent view, opened with `claude agents`, is one screen for all your background sessions: what's running, what needs your input, and what's done. Dispatch new sessions, watch their state at a glance instead of scrolling through transcripts, and step in only when one needs you. Sessions keep running in the background without a terminal attached.9Agent view, opened with `claude agents`, is one screen for all your background sessions: what's running, what needs your input, and what's done. Dispatch new sessions, watch their state at a glance instead of scrolling through transcripts, and step in only when one needs you. Each background session is a full Claude Code conversation that keeps running without a terminal attached, so you can open it, reply, and leave whenever you want.

10 10 

11Use agent view when you have several independent tasks Claude can work on at once, such as fixing a bug, reviewing a pull request, or investigating a log. When you want to work through a problem together, attach to a session and use Claude Code interactively as usual.11<img src="https://mintcdn.com/claude-code/1B48Qz2Z9hac4SLG/images/agent-view-light.png?fit=max&auto=format&n=1B48Qz2Z9hac4SLG&q=85&s=7a186c96ed47d6700d084d77e786be65" className="dark:hidden" alt="Agent view in a terminal: the header shows Claude Code v2.1.140, the model, the working directory, and a summary count. Sessions are grouped under Needs input, Working, and Completed, with a dispatch input at the bottom and a footer of keyboard hints." width="1772" height="780" data-path="images/agent-view-light.png" />

12 12 

13Sessions in agent view run independently and report only to you. To compare with subagents, agent teams, and worktrees, see [Run agents in parallel](/en/agents).13<img src="https://mintcdn.com/claude-code/1B48Qz2Z9hac4SLG/images/agent-view-dark.png?fit=max&auto=format&n=1B48Qz2Z9hac4SLG&q=85&s=a5bed7434bae368faea3a8f023b52aa2" className="hidden dark:block" alt="Agent view in a terminal: the header shows Claude Code v2.1.140, the model, the working directory, and a summary count. Sessions are grouped under Needs input, Working, and Completed, with a dispatch input at the bottom and a footer of keyboard hints." width="1772" height="780" data-path="images/agent-view-dark.png" />

14 

15Use agent view when you have several independent tasks Claude can work on without you watching every step. Dispatch a bug fix, a pull request review, and a flaky-test investigation as three rows, keep working in another window, and check back when a row shows it needs you or has a result.

16 

17When you want to work more directly in any agent's session, attach to the row to enter the full conversation.

18 

19To compare agent view with subagents, agent teams, and worktrees, see [Run agents in parallel](/en/agents).

14 20 

15<Note>21<Note>

16 Agent view is a research preview and requires Claude Code v2.1.139 or later. Check your version with `claude --version`. The interface and keyboard shortcuts may change as the feature evolves, and administrators can disable agent view for an organization with the [`disableAgentView`](#how-background-sessions-are-hosted) managed setting.22 Agent view is in research preview and requires Claude Code v2.1.139 or later. Check your version with `claude --version`. The interface and keyboard shortcuts may change as the feature evolves.

17</Note>23</Note>

18 24 

19This page covers:25This page covers:

20 26 

21* [Quick start](#quick-start)27* [Quick start](#quick-start): give Claude a task to work on in the background, check on it, and step in when needed

22* [Monitor sessions with agent view](#monitor-sessions-with-agent-view), including state icons, peeking and replying, attaching, organizing, and keyboard shortcuts28* [Monitor sessions with agent view](#monitor-sessions-with-agent-view), including state icons, peeking and replying, attaching, organizing, and keyboard shortcuts

23* [Dispatch new agents](#dispatch-new-agents) from agent view, from inside a session, or from the shell29* [Dispatch new agents](#dispatch-new-agents) from agent view, from inside a session, or from your shell

24* [Manage sessions from the shell](#manage-sessions-from-the-shell)30* [Manage sessions from the shell](#manage-sessions-from-the-shell)

25* [How background sessions are hosted](#how-background-sessions-are-hosted) by the supervisor process31* [How background sessions are hosted](#how-background-sessions-are-hosted) by the supervisor process

26 32 

27## Quick start33## Quick start

28 34 

29This walkthrough opens agent view, dispatches a session, replies from the peek panel, and attaches for the full conversation.35This walkthrough covers the core agent view loop: dispatch a task, watch its row update as Claude works, peek to check on it and reply, and attach for the full conversation. The session you dispatch keeps running after you close agent view, so you can leave and come back to it.

30 36 

31<Steps>37<Steps>

32 <Step title="Open agent view">38 <Step title="Open agent view">


36 claude agents42 claude agents

37 ```43 ```

38 44 

39 Agent view opens with an input at the bottom and a table that fills in as sessions start. Press `Esc` at any time to exit. Your sessions keep running.45 Agent view opens with an input at the bottom and a table that fills in as sessions start. Press `Esc` at any time to return to your shell. Your sessions keep running while you're away and reappear the next time you open agent view.

40 </Step>46 </Step>

41 47 

42 <Step title="Dispatch a session">48 <Step title="Dispatch a session">

43 Type a prompt in the input and press `Enter`. A new session starts and appears as a row showing whether it's working, waiting on you, or done. Repeat to run several sessions in parallel. Each one uses your subscription quota independently, so see [Limitations](#limitations) before dispatching many at once.49 Type a prompt describing a task and press `Enter`. A new background session starts on that task and appears as a row showing whether it's working, waiting on you, or done. The new session uses the model shown in the agent view header and the same [permission mode](#permission-mode-and-settings) you'd get running `claude` in that directory.

50 

51 Every prompt you enter here starts its own new session. Typing another prompt and pressing `Enter` launches a second session alongside the first rather than sending a follow-up to it. You can run several in parallel this way.

52 

53 Each session uses your subscription quota independently, so see [Limitations](#limitations) before dispatching many at once.

44 </Step>54 </Step>

45 55 

46 <Step title="Peek and reply">56 <Step title="Peek and reply">

47 Select a row with the arrow keys and press `Space` to see what the session is doing or what it needs from you. Type a reply and press `Enter` to send it without leaving agent view.57 Select a row with the arrow keys and press `Space` to open the peek panel. It shows the session's most recent output, or the question it's waiting on, rather than the full transcript. Type a reply and press `Enter` to send it without leaving agent view.

48 </Step>58 </Step>

49 59 

50 <Step title="Attach and detach">60 <Step title="Attach and detach">

51 Press `Enter` or `→` on a row to attach when you want the full conversation. The session takes over the terminal exactly as if you had run `claude`. Press `←` on an empty prompt to detach and return to the table.61 Press `Enter` or `→` on a row to attach when you want the full conversation. The session takes over the terminal exactly as if you had run `claude`. Press `←` on an empty prompt to detach and return to the table.

52 </Step>62 </Step>

53</Steps>

54 63 

55To bring an existing interactive session into agent view, run `/bg` inside it, or press `←` on an empty prompt to background the session and open agent view in one step. The session keeps running in the background and appears as a row. To start a new background session directly from the shell, run `claude --bg "<prompt>"`.64 <Step title="Bring an existing session in">

65 To move a session you already have open into agent view, run `/bg` inside it, or press `←` on an empty prompt to background it and open agent view in one step. The session keeps running and appears as a row alongside the ones you dispatched.

66 </Step>

67</Steps>

56 68 

57You can use `claude agents` as your primary entry point instead of `claude`: dispatch every task from agent view, attach when you want the full conversation, and press `←` to return to the table.69You can use `claude agents` as your primary entry point instead of `claude`: dispatch every task from agent view, attach when you want the full conversation, and press `←` to return to the table.

58 70 


60 72 

61Run `claude agents` to open agent view. It takes over the full terminal and lists every session grouped by state, with pinned sessions and the ones that need you at the top. Each row shows the session's name, current activity, and how long ago it last changed.73Run `claude agents` to open agent view. It takes over the full terminal and lists every session grouped by state, with pinned sessions and the ones that need you at the top. Each row shows the session's name, current activity, and how long ago it last changed.

62 74 

63The list covers every background session under your [config directory](#how-background-sessions-are-hosted), regardless of which project or worktree it's working in, so a session started in one repository and another started in a different worktree both appear together. Interactive sessions you have open in other terminals don't appear until you [background them](#from-inside-a-session), and [subagents](/en/sub-agents) running inside a session aren't listed as separate rows.75The list shows every background session you've started, across all your projects. A session working in one repository and another in a different worktree both appear here, regardless of which directory you opened agent view from. Interactive sessions you have open in other terminals don't appear until you [background them](#from-inside-a-session). [Subagents](/en/sub-agents) and [teammates](/en/agent-teams) a session spawns aren't listed as separate rows.

64 76 

65```text theme={null}77```text theme={null}

66Pinned78Pinned

67 ✽ clawd walk cycle Write assets/sprites/clawd-walk.png 3m79 ✽ clawd walk cycle Write assets/sprites/clawd-walk.png 3m

68 80 

69Ready for review81Ready for review

70 ∙ jump physics github.com/anthropics/example/pull/2048 ● 2h82 ∙ jump physics github.com/example/game/pull/2048 ● 2h

71 83 

72Needs input84Needs input

73 ✻ power-up design needs input: double jump or wall climb? 1m85 ✻ power-up design needs input: double jump or wall climb? 1m


82 … 6 more94 … 6 more

83```95```

84 96 

85Each row's icon carries two signals. The indicator tells you the session's state, and the icon's shape tells you whether the underlying process is still running. The states are:97### Read session state

98 

99Each row starts with an icon whose color and animation show the session's state:

100 

101| State | Icon shows as | What it means |

102| :---------- | :------------ | :----------------------------------------------------------------------- |

103| Working | Animated | Claude is actively running tools or generating a response |

104| Needs input | Yellow | Claude is waiting on a specific question or permission decision from you |

105| Idle | Dimmed | The session has nothing to do and is ready for your next prompt |

106| Completed | Green | The task finished successfully |

107| Failed | Red | The task ended with an error |

108| Stopped | Grey | The session was stopped with `Ctrl+X` or `claude stop` |

86 109 

87| Indicator | State | What it means |110Separately, the icon's shape shows whether the underlying process is running:

88| :-------- | :---------- | :--------------------------------------------------------------------------- |

89| Animated | Working | Claude is actively running tools or generating a response |

90| Yellow | Needs input | Claude is waiting for your input, usually a permission decision or an answer |

91| Dimmed | Idle | The session is waiting for input but isn't blocked on a specific question |

92| Green | Completed | The task finished successfully |

93| Red | Failed | The task ended with an error |

94| Grey | Stopped | The session was stopped with `Ctrl+X` or `claude stop` |

95 111 

96The icon's shape tells you whether the underlying process is still running. A `✻`, or an animated `✽` while Claude is working, means the session is alive and you can reply to it immediately. A `∙` means the process has exited, but you can still peek, reply, or attach: Claude restarts the session from where it left off. A `✢` is a [`/loop`](/en/commands) session sleeping between iterations, with the row showing its run count and a countdown to the next iteration.112| Shape | What it means |

113| :------------------ | :---------------------------------------------------------------------------------------------------------------- |

114| `✻` or animated `✽` | The session process is alive and replies immediately |

115| `∙` | The process has exited. You can still peek, reply, or attach, and Claude restarts from where it left off |

116| `✢` | A [`/loop`](/en/scheduled-tasks) session sleeping between iterations. The row shows its run count and a countdown |

97 117 

98Background sessions don't need any terminal open to keep working. A separate [supervisor process](#how-background-sessions-are-hosted) runs them, so you can close agent view, close your shell, or start a new interactive session and your dispatched work keeps going.118Background sessions don't need any terminal open to keep working. A separate [supervisor process](#the-supervisor-process) runs them, so you can close agent view, close your shell, or start a new interactive session and your dispatched work keeps going.

99 119 

100Sessions persist on disk: closing your terminal or an auto-update doesn't lose them, and reopening `claude agents` shows them all. If your machine sleeps or shuts down, running sessions stop; restart them with `claude respawn --all`.120Session state persists on disk through auto-updates and supervisor restarts. If your machine sleeps or shuts down, running sessions stop; restart them with `claude respawn --all`.

101 121 

102The one-line summary in each row is generated by your configured [Haiku-class model](/en/model-config) so the row can tell you what the session is doing, what it needs, or what it produced without opening the transcript. While a session is actively working, the summary refreshes at most once every 15 seconds, plus once when each turn ends. Each refresh is one short Haiku-class request through your normal provider, billed and handled under the same [data usage terms](/en/data-usage) as the session itself.122### Row summaries

123 

124The one-line summary in each row is generated by a [Haiku-class model](/en/model-config) so the row can tell you what the session is doing, what it needs, or what it produced without opening the transcript. While a session is actively working, the summary refreshes at most once every 15 seconds, plus once when each turn ends.

125 

126Each refresh is one short Haiku-class request through your normal provider, billed and handled under the same [data usage terms](/en/data-usage) as the session itself.

127 

128### Pull request status

103 129 

104When a session opens a pull request, a status dot appears at the right edge of the row, linked to the pull request in terminals that support hyperlinks. When the session has opened more than one pull request, the count appears before the dot and the color reflects whichever one most needs attention.130When a session opens a pull request, a status dot appears at the right edge of the row, linked to the pull request in terminals that support hyperlinks. When the session has opened more than one pull request, the count appears before the dot and the color reflects whichever one most needs attention.

105 131 


122 148 

123### Attach to a session149### Attach to a session

124 150 

125Press `Enter` or `→` on a selected row to attach, or press `Alt+1` through `Alt+9` to attach directly to the Nth session in the focused group. Agent view is replaced by the full interactive session, exactly as if you had run `claude` in that directory. When you attach, Claude posts a short recap of what happened while you were away.151Press `Enter` or `→` on a selected row to attach. Agent view is replaced by the full interactive session, exactly as if you had run `claude` in that directory. When you attach, Claude posts a short recap of what happened while you were away.

126 152 

127While attached, the session behaves like any other Claude Code session: every [command](/en/commands), keyboard shortcut, and feature works.153While attached, the session behaves like any other Claude Code session: every [command](/en/commands), keyboard shortcut, and feature works.

128 154 


134 160 

135### Organize the list161### Organize the list

136 162 

137Agent view groups sessions by state, with sessions that need input above sessions that are working or done. Press `Ctrl+S` to switch to grouping by directory instead. Your choice is saved across runs. Within a group, pin a session to the top with `Ctrl+T`, reorder with `Shift+↑` and `Shift+↓`, or press `Enter` on a group header to collapse it. To remove a session, press `Ctrl+X` to stop it and `Ctrl+X` again within two seconds to delete it. Pressing `Ctrl+X` on a group header deletes every session in that group after confirmation.163Agent view groups sessions so the ones that need input are at the top, with `Ready for review` and `Needs input` above `Working` and `Completed`. These group names don't map one-to-one to the [states](#read-session-state) above: a session moves to `Ready for review` when it has an open pull request, and `Completed` collects finished, failed, and stopped sessions together. Press `Ctrl+S` to group by directory instead. Your choice persists across runs.

164 

165Within a group:

166 

167* Press `Ctrl+T` to pin a session to the top

168* Press `Shift+↑` or `Shift+↓` to reorder sessions

169* Press `Ctrl+R` to rename a session

170* Press `Enter` on a group header to collapse it

138 171 

139Older completed sessions fold into a "… N more" row to keep the list short. Failures and sessions with an open pull request always stay visible.172To remove a session from the list, press `Ctrl+X` to stop it and `Ctrl+X` again within two seconds to delete it. Pressing `Ctrl+X` on a group header deletes every session in that group after confirmation.

140 173 

141### Filter the list174Deleting removes the session from agent view and cleans up its [worktree](#how-file-edits-are-isolated), including any uncommitted changes in it, so push or commit work you want to keep before deleting. The conversation transcript stays on disk and remains available through `claude --resume`.

175 

176Older completed sessions fold into a `… N more` row to keep the list short. Failures and sessions with an open pull request always stay visible.

177 

178### Filter sessions

142 179 

143Type in the dispatch input to filter instead of dispatching:180Type in the dispatch input to filter instead of dispatching:

144 181 

145| Filter | Shows |182| Filter | Shows |

146| :---------------------- | :-------------------------------------------------------------------------- |183| :---------------------- | :------------------------------------------------------------------------------------------------------- |

147| `a:<name>` | Sessions running the named agent |184| `a:<name>` | Sessions running the named agent |

148| `s:<state>` | Sessions in the given state, such as `s:blocked` for sessions that need you |185| `s:<state>` | Sessions in the given state, such as `s:working`. Also accepts `s:blocked` for everything waiting on you |

149| `#<number>` or a PR URL | The session working on that pull request |186| `#<number>` or a PR URL | The session working on that pull request |

150 187 

151### Keyboard shortcuts188### Keyboard shortcuts

152 189 

153Press `?` in agent view to see every shortcut. The most common ones:190Press `?` in agent view to see every shortcut in context. The table below summarizes them.

154 191 

155| Shortcut | Action |192| Shortcut | Action |

156| :-------------------- | :----------------------------------------------------------------------- |193| :-------------------- | :---------------------------------------------------------------------------------- |

157| `↑` / `↓` | Move between rows |194| `↑` / `↓` | Move between rows |

158| `Enter` | Attach to the selected session, or dispatch if there's text in the input |195| `Enter` | Attach to the selected session, or dispatch if there's text in the input |

159| `Space` | Open or close the peek panel for the selected session |196| `Space` | Open or close the peek panel for the selected session |

160| `Shift+Enter` | Dispatch and attach immediately |197| `Shift+Enter` | Dispatch and attach immediately |

161| `→` | Attach to the selected session |198| `→` | Attach to the selected session |

162| `Alt+1`..`Alt+9` | Attach to the Nth session in the focused group |199| `Alt+1`..`Alt+9` | Attach to session 1–9 in the current group |

163| `Tab` | Browse all subagents, or apply the highlighted suggestion |200| `Tab` | On an empty input, browse all subagents. Otherwise apply the highlighted suggestion |

164| `Ctrl+S` | Switch grouping between state and directory |201| `Ctrl+S` | Switch grouping between state and directory |

165| `Ctrl+T` | Pin or unpin the selected session |202| `Ctrl+T` | Pin or unpin the selected session |

166| `Ctrl+R` | Rename the selected session |203| `Ctrl+R` | Rename the selected session |


177 214 

178### From agent view215### From agent view

179 216 

180Type a prompt in the input at the bottom of agent view and press `Enter` to start a new background session. The session is named automatically from the prompt. You can rename it later with `Ctrl+R`. Paste an image into the prompt to include a screenshot or diagram with the task.217Type a prompt in the input at the bottom of agent view and press `Enter` to start a new background session. The session is named automatically from the prompt; rename it later with `Ctrl+R`.

218 

219Paste an image into the prompt to include a screenshot or diagram with the task.

181 220 

182Prefix or mention parts of the prompt to control how the session starts:221Prefix or mention parts of the prompt to control how the session starts:

183 222 


190| `#<number>` or a pull request URL | If a session is already working on that PR, select it instead of dispatching |229| `#<number>` or a pull request URL | If a session is already working on that PR, select it instead of dispatching |

191| `Shift+Enter` | Dispatch and immediately attach to the new session |230| `Shift+Enter` | Dispatch and immediately attach to the new session |

192 231 

193Type `/` to dispatch a [skill](/en/skills). Packaging a recurring task as a skill lets you start the same workflow many times from agent view without retyping the prompt. Press `Tab` on an empty input to browse every dispatchable subagent, or to apply the highlighted suggestion when suggestions are showing.232Packaging a recurring task as a [skill](/en/skills) lets you start the same workflow from agent view repeatedly without retyping the prompt.

194 233 

195When the same `@name` matches both a subagent and a sibling repository, the subagent takes precedence. The first-word form without `@` also applies to any subagent name, so a prompt that begins with a word matching one of your subagent names dispatches that subagent. Use the `@` form when you want to be explicit.234When the same `@name` matches both a subagent and a sibling repository, the subagent takes precedence. The bare first-word match also applies, so a prompt that happens to begin with one of your subagent names dispatches that subagent rather than treating the word as plain text. Use the `@` form when you want to be explicit, or start the prompt with a different word to avoid the match.

196 235 

197#### Dispatch to a specific directory236#### Dispatch to a specific directory

198 237 


206 245 

207### From inside a session246### From inside a session

208 247 

209Run `/background` or its alias `/bg` to detach the current conversation and keep it running. Pass a prompt such as `/bg run the test suite and fix any failures` to send one more instruction before detaching.248Run `/background` or its alias `/bg` to move the current conversation into a background session. Pass a prompt such as `/bg run the test suite and fix any failures` to give one more instruction first.

249 

250Backgrounding from an interactive session starts a fresh process that resumes from the saved conversation, so running subagents, [monitors](/en/tools-reference#monitor-tool), and background commands do not transfer to it. Claude asks you to confirm before backgrounding when any are running. Once in the background, the session can start new subagents, monitors, and background commands, and those keep running across later detach and reattach.

210 251 

211### From the shell252### From your shell

212 253 

213Pass `--bg` to start a session that goes straight to the background:254Pass `--bg` to start a session that goes straight to the background:

214 255 


234 275 

235### How file edits are isolated276### How file edits are isolated

236 277 

237Every background session, whether started from agent view, `/bg`, or `claude --bg`, starts in your working directory but is blocked from writing files there. When the session needs to edit files, Claude moves it into an isolated [git worktree](/en/worktrees) under `.claude/worktrees/` automatically, so parallel sessions can read the same checkout but each writes to its own. The block doesn't apply when the session is already inside a worktree, when the working directory isn't a git repository, or to writes outside the working directory.278Every background session, whether started from agent view, `/bg`, or `claude --bg`, starts in your working directory. Before editing files, Claude moves the session into an isolated [git worktree](/en/worktrees) under `.claude/worktrees/`, so parallel sessions can read the same checkout but each writes to its own. Claude skips this when the session is already under `.claude/worktrees/`, when the working directory isn't a git repository, or for writes outside the working directory.

279 

280Outside a git repository, sessions write to the working directory directly and aren't isolated from each other, so avoid dispatching parallel sessions that edit the same files.

238 281 

239The worktree is removed when you delete the session, so merge or push the changes you want to keep before you delete. To find a session's worktree path, peek the session or attach and check its working directory.282The worktree is removed when you delete the session, so merge or push the changes you want to keep before you delete. To find a session's worktree path, peek the session or attach and check its working directory.

240 283 

241To make a subagent always run in its own worktree regardless of how it was started, set [`isolation: worktree`](/en/sub-agents#supported-frontmatter-fields) in its frontmatter.284To make a subagent always run in its own worktree regardless of how it was started, set [`isolation: worktree`](/en/sub-agents#supported-frontmatter-fields) in its frontmatter.

242 285 

286### Set the model

287 

288The model name shown in the agent view header is the dispatch default. New sessions you start from the input use this model, which is the same setting [`/model`](/en/model-config) controls in any session.

289 

290Each background session can run on a different model. To override it for one session:

291 

292* From the shell, pass `--model` with `claude --bg`.

293* Attach to a running session and run `/model` there. The change persists if the session is respawned.

294* Dispatch a [subagent](/en/sub-agents) whose frontmatter sets a `model` field.

295 

243### Permission mode and settings296### Permission mode and settings

244 297 

245A dispatched session reads its [settings](/en/settings) and [permission mode](/en/permissions) from the directory it runs in, the same as if you had started `claude` there. Dispatching from the agent view input doesn't pass a permission mode, so the session uses the `defaultMode` from that directory's settings or the `permissionMode` from the dispatched [subagent's frontmatter](/en/sub-agents#supported-frontmatter-fields).298A dispatched session reads its [settings](/en/settings) and [permission mode](/en/permissions) from the directory it runs in, the same as if you had started `claude` there. Dispatching from the agent view input doesn't pass a permission mode, so the session uses the `defaultMode` from that directory's settings or the `permissionMode` from the dispatched [subagent's frontmatter](/en/sub-agents#supported-frontmatter-fields).


248 301 

249## Manage sessions from the shell302## Manage sessions from the shell

250 303 

251Every background session has a short ID you can use from the shell. These commands are useful for scripting or when you don't want to open agent view.304Every background session has a short ID you can use from the shell. The ID is printed when you start a session with `claude --bg`, and each session's ID is its directory name under `~/.claude/jobs/`. These commands are useful for scripting or when you don't want to open agent view.

252 305 

253| Command | Purpose |306| Command | Purpose |

254| :--------------------- | :----------------------------------------------------- |307| :--------------------- | :----------------------------------------------------------------------------------------- |

255| `claude agents` | Open agent view |308| `claude agents` | Open agent view |

256| `claude attach <id>` | Attach to a session in this terminal |309| `claude attach <id>` | Attach to a session in this terminal |

257| `claude logs <id>` | Print the session's recent output |310| `claude logs <id>` | Print the session's recent output |

258| `claude stop <id>` | Stop a session. Also accepts `claude kill` |311| `claude stop <id>` | Stop a session. Also accepts `claude kill` |

259| `claude respawn <id>` | Restart a stopped session with its conversation intact |312| `claude respawn <id>` | Restart a stopped session with its conversation intact |

260| `claude respawn --all` | Restart every stopped session |313| `claude respawn --all` | Restart every stopped session |

261| `claude rm <id>` | Remove a session from the list |314| `claude rm <id>` | Remove a session from the list. Cleans up its worktree if there are no uncommitted changes |

262 315 

263## How background sessions are hosted316## How background sessions are hosted

264 317 

265Background sessions are hosted by a per-user supervisor process, separate from your terminal and from agent view. It starts automatically the first time you background a session or open agent view, and you don't manage it directly. The supervisor and its sessions authenticate with the same credentials as your interactive sessions and make no additional network connections beyond the model API.318Every session listed in agent view is considered a background session, whether or not you're currently attached to it. By contrast, a session started by running `claude` directly is tied to that terminal and ends when it closes, unless you [send it to the background](#from-inside-a-session).

319 

320### The supervisor process

321 

322Background sessions are hosted by a per-user supervisor process, separate from your terminal and from agent view. The supervisor starts automatically the first time you background a session or open agent view, and you don't manage it directly.

323 

324The supervisor and its sessions authenticate with the same credentials as your interactive sessions and make no additional network connections beyond the model API.

325 

326Each background session is its own Claude Code process, managed by the supervisor rather than tied to your terminal. A session that's actively working, waiting for your input, or has a terminal attached keeps its process running.

266 327 

267Each background session is its own Claude Code process, parented to the supervisor rather than to your terminal. A session that's actively working, waiting for your input, or has a terminal attached keeps its process running. Once a session finishes and sits unattached for about an hour, the supervisor stops its process to free resources. The transcript and state stay on disk, and the next time you attach, peek, or reply, the supervisor starts a fresh process from where it left off. When every session has finished and no terminal is connected, the supervisor itself exits and starts again the next time you background a session or open agent view.328Once a session finishes and sits unattached for about an hour, the supervisor stops its process to free resources. The transcript and state stay on disk, and the next time you attach, peek, or reply, the supervisor starts a fresh process from where it left off. When every session has finished and no terminal is connected, the supervisor itself exits and starts again the next time you need it.

268 329 

269The supervisor watches the installed Claude Code binary on disk and restarts into the new version after the regular [auto-updater](/en/setup#auto-updates) replaces it. This is a local file watch, not a network check. Background sessions are detached processes, so they keep running through the restart and the new supervisor reconnects to them.330The supervisor watches the installed Claude Code binary on disk and restarts into the new version after the regular [auto-updater](/en/setup#auto-updates) replaces it. This is a local file watch, not a network check. Background sessions are detached processes, so they keep running through the restart and the new supervisor reconnects to them.

270 331 

332### Where state is stored

333 

271Session state is stored under your Claude Code config directory. If you set [`CLAUDE_CONFIG_DIR`](/en/env-vars), the supervisor uses that directory instead of `~/.claude` and runs as a separate instance with its own sessions.334Session state is stored under your Claude Code config directory. If you set [`CLAUDE_CONFIG_DIR`](/en/env-vars), the supervisor uses that directory instead of `~/.claude` and runs as a separate instance with its own sessions.

272 335 

273| Path | Contents |336| Path | Contents |


276| `~/.claude/daemon/roster.json` | List of running background sessions, used to reconnect after a restart |339| `~/.claude/daemon/roster.json` | List of running background sessions, used to reconnect after a restart |

277| `~/.claude/jobs/<id>/state.json` | Per-session state shown in agent view |340| `~/.claude/jobs/<id>/state.json` | Per-session state shown in agent view |

278 341 

342### Turn off agent view

343 

279To turn off background agents and agent view entirely, set the `disableAgentView` [setting](/en/settings) to `true` or set the `CLAUDE_CODE_DISABLE_AGENT_VIEW` environment variable. Administrators can enforce this through [managed settings](/en/permissions#managed-settings).344To turn off background agents and agent view entirely, set the `disableAgentView` [setting](/en/settings) to `true` or set the `CLAUDE_CODE_DISABLE_AGENT_VIEW` environment variable. Administrators can enforce this through [managed settings](/en/permissions#managed-settings).

280 345 

281## Troubleshooting346## Troubleshooting

282 347 

348### `claude agents` lists subagents instead of opening agent view

349 

350If `claude agents` prints a count followed by your configured subagents and then exits, agent view is unavailable in your environment. Earlier versions didn't open agent view in every environment, including when connected through Bedrock, Vertex AI, or Foundry. Run `claude update` to install the latest version.

351 

352If agent view still does not open after updating, check whether it has been [turned off](#turn-off-agent-view) by a setting or environment variable.

353 

283### Agent view opens with no sessions354### Agent view opens with no sessions

284 355 

285Agent view is empty until you dispatch your first session. Type a prompt in the input at the bottom and press `Enter`.356Agent view is empty until you dispatch your first session. Type a prompt in the input at the bottom and press `Enter`.

286 357 

287### Sessions show as stopped after waking your machine358### Cannot open agents because background tasks are running

359 

360If pressing `←` to background the current session shows `Cannot open agents — N background task(s) running`, the session has in-flight work such as a subagent, a workflow, or a background shell command, and the shortcut won't silently abandon it. Run `/tasks` to see what's running, then `/bg` to confirm abandoning them. See [From inside a session](#from-inside-a-session) for what does and doesn't transfer when you background.

361 

362### Prompt rejected as too short

363 

364The dispatch input expects a task description, not a conversational opener. A prompt shorter than four characters is rejected with a `Too short` hint so a stray keystroke doesn't start a session. Describe what you want the session to do, such as `investigate the flaky checkout test`.

365 

366### Sessions show as failed after waking your machine

288 367 

289Background sessions don't survive sleep or shutdown. Attach, peek, or reply to any stopped session and it restarts from where it left off. To restart all of them at once, run `claude respawn --all`.368Background sessions don't survive sleep or shutdown, so sessions that were running show as failed after you wake. Attach, peek, or reply to any of them and the session restarts from where it left off. To restart all of them at once, run `claude respawn --all`.

290 369 

291### A session is slow to respond after attaching370### A session is slow to respond after attaching

292 371 


298 377 

299## Limitations378## Limitations

300 379 

301Agent view is a research preview. Current limitations to be aware of:380Agent view is in research preview with the following limitations:

302 381 

303* **Rate limits apply**: background sessions consume your subscription usage the same as interactive sessions, so running ten agents in parallel uses quota roughly ten times as fast as running one.382* **Rate limits apply**: background sessions consume your subscription usage the same as interactive sessions, so running ten agents in parallel uses quota roughly ten times as fast as running one.

304* **Sessions are local**: background sessions run on your machine and stop if it sleeps or shuts down.383* **Sessions are local**: background sessions run on your machine and stop if it sleeps or shuts down.

305* **Worktrees are deleted with the session**: merge or push changes before deleting a session that edited files in its own worktree.384* **Worktrees are deleted with the session**: merge or push changes before deleting a session that edited files in its own worktree.

306 385 

307## Next steps386## Related resources

308 387 

309Now that you understand agent view, explore these related features:388For other ways to run Claude in parallel, see:

310 389 

311* [Run agents in parallel](/en/agents): compare agent view with subagents, agent teams, and worktrees390* [Run agents in parallel](/en/agents): compare agent view with subagents, agent teams, and worktrees

312* [Subagents](/en/sub-agents): define reusable agent configurations with custom prompts, tools, and isolation

313* [Agent teams](/en/agent-teams): coordinate multiple sessions that message each other391* [Agent teams](/en/agent-teams): coordinate multiple sessions that message each other

314* [Claude Code on the web](/en/claude-code-on-the-web): run sessions in a managed cloud environment instead of locally392* [Claude Code on the web](/en/claude-code-on-the-web): run sessions in a managed cloud environment instead of locally

Details

143 143 

144### Generate a long-lived token144### Generate a long-lived token

145 145 

146<Note>

147 Starting June 15, 2026, Agent SDK and `claude -p` usage on subscription plans will draw from a new monthly Agent SDK credit, separate from your interactive usage limits. See [Use the Claude Agent SDK with your Claude plan](https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan) for details.

148</Note>

149 

146For CI pipelines, scripts, or other environments where interactive browser login isn't available, generate a one-year OAuth token with `claude setup-token`:150For CI pipelines, scripts, or other environments where interactive browser login isn't available, generate a one-year OAuth token with `claude setup-token`:

147 151 

148```bash theme={null}152```bash theme={null}

Details

33Cloud sessions need access to your GitHub repositories to clone code and push branches. You can grant access in two ways:33Cloud sessions need access to your GitHub repositories to clone code and push branches. You can grant access in two ways:

34 34 

35| Method | How it works | Best for |35| Method | How it works | Best for |

36| :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------- |36| :--------------- | :------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------- |

37| **GitHub App** | Install the Claude GitHub App on specific repositories during [web onboarding](/en/web-quickstart). Access is scoped per repository. | Teams that want explicit per-repo authorization |37| **GitHub App** | Authorize the Claude GitHub App during [web onboarding](/en/web-quickstart). | Browser onboarding; teams that want [Auto-fix](#auto-fix-pull-requests) |

38| **`/web-setup`** | Run `/web-setup` in your terminal to sync your local `gh` CLI token to your Claude account. Access matches whatever your `gh` token can see. | Individual developers who already use `gh` |38| **`/web-setup`** | Run `/web-setup` in your terminal to sync your local `gh` CLI token to your Claude account. | Individual developers who already use `gh` |

39 

40<Note>

41 With either method, a cloud session can access any repository the connecting GitHub account can see, not just the repositories the Claude GitHub App is installed on. App installation enables PR webhooks for [Auto-fix](#auto-fix-pull-requests); it is not a session-level access control. To restrict which repositories your team can reach from cloud sessions, restrict access on GitHub itself, for example by limiting team or repository membership for the connected GitHub accounts.

42</Note>

39 43 

40Either method works. [`/schedule`](/en/routines) checks for either form of access and prompts you to run `/web-setup` if neither is configured. See [Connect from your terminal](/en/web-quickstart#connect-from-your-terminal) for the `/web-setup` walkthrough.44Either method works. [`/schedule`](/en/routines) checks for either form of access and prompts you to run `/web-setup` if neither is configured. See [Connect from your terminal](/en/web-quickstart#connect-from-your-terminal) for the `/web-setup` walkthrough.

41 45 


739* **From the mobile app**: tell Claude to auto-fix the PR, for example "watch this PR and fix any CI failures or review comments"743* **From the mobile app**: tell Claude to auto-fix the PR, for example "watch this PR and fix any CI failures or review comments"

740* **Any existing PR**: paste the PR URL into a session and tell Claude to auto-fix it744* **Any existing PR**: paste the PR URL into a session and tell Claude to auto-fix it

741 745 

746Auto-fix is a per-PR toggle. To stop monitoring, open the CI status bar in the web session and clear the **Auto-fix** toggle, or tell Claude to stop watching the PR.

747 

742### How Claude responds to PR activity748### How Claude responds to PR activity

743 749 

744When auto-fix is active, Claude receives GitHub events for the PR including new review comments and CI check failures. For each event, Claude investigates and decides how to proceed:750When auto-fix is active, Claude receives GitHub events for the PR including new review comments and CI check failures. For each event, Claude investigates and decides how to proceed:


772 778 

773* Check [status.claude.com](https://status.claude.com) for cloud session incidents779* Check [status.claude.com](https://status.claude.com) for cloud session incidents

774* Retry after a minute, as capacity is provisioned on demand780* Retry after a minute, as capacity is provisioned on demand

775* Confirm your repository is reachable. Private repositories require either the GitHub App installed with access to that repository, or a `gh` token synced via `/web-setup`. See [GitHub authentication options](#github-authentication-options).781* Confirm your repository is reachable. The connecting GitHub account must have access to the repository on GitHub, either through the Claude GitHub App authorization or a `gh` token synced via `/web-setup` — installing the App on the repository is not required. See [GitHub authentication options](#github-authentication-options).

776 782 

777### Remote Control session expired or access denied783### Remote Control session expired or access denied

778 784 

commands.md +2 −2

Details

61| `/diff` | Open an interactive diff viewer showing uncommitted changes and per-turn diffs. Use left/right arrows to switch between the current git diff and individual Claude turns, and up/down to browse files |61| `/diff` | Open an interactive diff viewer showing uncommitted changes and per-turn diffs. Use left/right arrows to switch between the current git diff and individual Claude turns, and up/down to browse files |

62| `/doctor` | Diagnose and verify your Claude Code installation and settings. Results show with status icons. Press `f` to have Claude fix any reported issues |62| `/doctor` | Diagnose and verify your Claude Code installation and settings. Results show with status icons. Press `f` to have Claude fix any reported issues |

63| `/effort [level\|auto]` | Set the model [effort level](/en/model-config#adjust-effort-level). Accepts `low`, `medium`, `high`, `xhigh`, or `max`; available levels depend on the model and `max` is session-only. `auto` resets to the model default. Without an argument, opens an interactive slider; use left and right arrows to pick a level and `Enter` to apply. Takes effect immediately without waiting for the current response to finish |63| `/effort [level\|auto]` | Set the model [effort level](/en/model-config#adjust-effort-level). Accepts `low`, `medium`, `high`, `xhigh`, or `max`; available levels depend on the model and `max` is session-only. `auto` resets to the model default. Without an argument, opens an interactive slider; use left and right arrows to pick a level and `Enter` to apply. Takes effect immediately without waiting for the current response to finish |

64| `/exit` | Exit the CLI. Alias: `/quit` |64| `/exit` | Exit the CLI. In an attached [background session](/en/agent-view#attach-to-a-session), this detaches and the session keeps running. Alias: `/quit` |

65| `/export [filename]` | Export the current conversation as plain text. With a filename, writes directly to that file. Without, opens a dialog to copy to clipboard or save to a file |65| `/export [filename]` | Export the current conversation as plain text. With a filename, writes directly to that file. Without, opens a dialog to copy to clipboard or save to a file |

66| `/extra-usage` | Configure extra usage to keep working when rate limits are hit |66| `/extra-usage` | Configure extra usage to keep working when rate limits are hit |

67| `/fast [on\|off]` | Toggle [fast mode](/en/fast-mode) on or off |67| `/fast [on\|off]` | Toggle [fast mode](/en/fast-mode) on or off |


122| `/theme` | Change the color theme. Includes an `auto` option that matches your terminal's light or dark background, light and dark variants, colorblind-accessible (daltonized) themes, ANSI themes that use your terminal's color palette, and any [custom themes](/en/terminal-config#create-a-custom-theme) from `~/.claude/themes/` or plugins. Select **New custom theme…** to create one |122| `/theme` | Change the color theme. Includes an `auto` option that matches your terminal's light or dark background, light and dark variants, colorblind-accessible (daltonized) themes, ANSI themes that use your terminal's color palette, and any [custom themes](/en/terminal-config#create-a-custom-theme) from `~/.claude/themes/` or plugins. Select **New custom theme…** to create one |

123| `/tui [default\|fullscreen]` | Set the terminal UI renderer and relaunch into it with your conversation intact. `fullscreen` enables the [flicker-free alt-screen renderer](/en/fullscreen). With no argument, prints the active renderer |123| `/tui [default\|fullscreen]` | Set the terminal UI renderer and relaunch into it with your conversation intact. `fullscreen` enables the [flicker-free alt-screen renderer](/en/fullscreen). With no argument, prints the active renderer |

124| `/ultraplan <prompt>` | Draft a plan in an [ultraplan](/en/ultraplan) session, review it in your browser, then execute remotely or send it back to your terminal |124| `/ultraplan <prompt>` | Draft a plan in an [ultraplan](/en/ultraplan) session, review it in your browser, then execute remotely or send it back to your terminal |

125| `/ultrareview [PR]` | Run a deep, multi-agent code review in a cloud sandbox with [ultrareview](/en/ultrareview). Includes 3 free runs on Pro and Max through May 5, 2026, then requires [extra usage](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) |125| `/ultrareview [PR]` | Run a deep, multi-agent code review in a cloud sandbox with [ultrareview](/en/ultrareview). Includes 3 free runs on Pro and Max, then requires [extra usage](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) |

126| `/upgrade` | Open the upgrade page to switch to a higher plan tier |126| `/upgrade` | Open the upgrade page to switch to a higher plan tier |

127| `/usage` | Show session cost, plan usage limits, and activity stats. See the [cost tracking guide](/en/costs#using-the-%2Fusage-command) for subscription-specific details. `/cost` and `/stats` are aliases |127| `/usage` | Show session cost, plan usage limits, and activity stats. See the [cost tracking guide](/en/costs#using-the-%2Fusage-command) for subscription-specific details. `/cost` and `/stats` are aliases |

128| `/vim` | {/* max-version: 2.1.91 */}Removed in v2.1.92. To toggle between Vim and Normal editing modes, use `/config` → Editor mode |128| `/vim` | {/* max-version: 2.1.91 */}Removed in v2.1.92. To toggle between Vim and Normal editing modes, use `/config` → Editor mode |

env-vars.md +1 −1

Details

200| `DISABLE_PROMPT_CACHING_HAIKU` | Set to `1` to disable prompt caching for Haiku models |200| `DISABLE_PROMPT_CACHING_HAIKU` | Set to `1` to disable prompt caching for Haiku models |

201| `DISABLE_PROMPT_CACHING_OPUS` | Set to `1` to disable prompt caching for Opus models |201| `DISABLE_PROMPT_CACHING_OPUS` | Set to `1` to disable prompt caching for Opus models |

202| `DISABLE_PROMPT_CACHING_SONNET` | Set to `1` to disable prompt caching for Sonnet models |202| `DISABLE_PROMPT_CACHING_SONNET` | Set to `1` to disable prompt caching for Sonnet models |

203| `DISABLE_TELEMETRY` | Set to `1` to opt out of telemetry. Telemetry events do not include user data like code, file paths, or bash commands |203| `DISABLE_TELEMETRY` | Set to `1` to opt out of telemetry. Telemetry events do not include user data like code, file paths, or bash commands. Also disables feature flags, so some features that are still rolling out may not be available |

204| `DISABLE_UPDATES` | Set to `1` to block all updates including manual `claude update` and `claude install`. Stricter than `DISABLE_AUTOUPDATER`. Use when distributing Claude Code through your own channels and users should not self-update |204| `DISABLE_UPDATES` | Set to `1` to block all updates including manual `claude update` and `claude install`. Stricter than `DISABLE_AUTOUPDATER`. Use when distributing Claude Code through your own channels and users should not self-update |

205| `DISABLE_UPGRADE_COMMAND` | Set to `1` to hide the `/upgrade` command |205| `DISABLE_UPGRADE_COMMAND` | Set to `1` to hide the `/upgrade` command |

206| `DO_NOT_TRACK` | Set to `1` to opt out of telemetry. Equivalent to setting `DISABLE_TELEMETRY`. Honored as the [standard cross-tool convention](https://consoledonottrack.com/) |206| `DO_NOT_TRACK` | Set to `1` to opt out of telemetry. Equivalent to setting `DISABLE_TELEMETRY`. Honored as the [standard cross-tool convention](https://consoledonottrack.com/) |

fast-mode.md +1 −1

Details

22 22 

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

24* By default, `/fast` runs on Opus 4.6. To run fast mode on Opus 4.7 instead, set the [`CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE`](#use-fast-mode-on-opus-4-7) environment variable.24* By default, `/fast` runs on Opus 4.6. To run fast mode on Opus 4.7 instead, set the [`CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE`](#use-fast-mode-on-opus-4-7) environment variable.

25* Fast mode pricing is \$30/150 MTok on both Opus 4.6 and Opus 4.7.25* Fast mode pricing is $30/$150 MTok on both Opus 4.6 and Opus 4.7.

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

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

28 28 

headless.md +4 −4

Details

6 6 

7> Use the Agent SDK to run Claude Code programmatically from the CLI, Python, or TypeScript.7> Use the Agent SDK to run Claude Code programmatically from the CLI, Python, or TypeScript.

8 8 

9The [Agent SDK](/en/agent-sdk/overview) gives you the same tools, agent loop, and context management that power Claude Code. It's available as a CLI for scripts and CI/CD, or as [Python](/en/agent-sdk/python) and [TypeScript](/en/agent-sdk/typescript) packages for full programmatic control.

10 

11<Note>9<Note>

12 The CLI was previously called "headless mode." The `-p` flag and all CLI options work the same way.10 Starting June 15, 2026, Agent SDK and `claude -p` usage on subscription plans will draw from a new monthly Agent SDK credit, separate from your interactive usage limits. See [Use the Claude Agent SDK with your Claude plan](https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan) for details.

13</Note>11</Note>

14 12 

15To run Claude Code programmatically from the CLI, pass `-p` with your prompt and any [CLI options](/en/cli-reference):13The [Agent SDK](/en/agent-sdk/overview) gives you the same tools, agent loop, and context management that power Claude Code. It's available as a CLI for scripts and CI/CD, or as [Python](/en/agent-sdk/python) and [TypeScript](/en/agent-sdk/typescript) packages for full programmatic control.

14 

15To run Claude Code in non-interactive mode, pass `-p` with your prompt and any [CLI options](/en/cli-reference):

16 16 

17```bash theme={null}17```bash theme={null}

18claude -p "Find and fix the bug in auth.py" --allowedTools "Read,Edit,Bash"18claude -p "Find and fix the bug in auth.py" --allowedTools "Read,Edit,Bash"

hooks-guide.md +1 −1

Details

754| [Plugin](/en/plugins) `hooks/hooks.json` | When plugin is enabled | Yes, bundled with the plugin |754| [Plugin](/en/plugins) `hooks/hooks.json` | When plugin is enabled | Yes, bundled with the plugin |

755| [Skill](/en/skills) or [agent](/en/sub-agents) frontmatter | While the skill or agent is active | Yes, defined in the component file |755| [Skill](/en/skills) or [agent](/en/sub-agents) frontmatter | While the skill or agent is active | Yes, defined in the component file |

756 756 

757Run [`/hooks`](/en/hooks#the-hooks-menu) in Claude Code to browse all configured hooks grouped by event. To disable all hooks at once, set `"disableAllHooks": true` in your settings file.757Run [`/hooks`](/en/hooks#the-hooks-menu) in Claude Code to browse all configured hooks grouped by event. To disable hooks, set `"disableAllHooks": true` in your settings file. Hooks configured in managed settings still run unless `disableAllHooks` is also set there.

758 758 

759If you edit settings files directly while Claude Code is running, the file watcher normally picks up hook changes automatically.759If you edit settings files directly while Claude Code is running, the file watcher normally picks up hook changes automatically.

760 760 

memory.md +2 −2

Details

51 51 

52### Choose where to put CLAUDE.md files52### Choose where to put CLAUDE.md files

53 53 

54CLAUDE.md files can live in several locations, each with a different scope. More specific locations take precedence over broader ones.54CLAUDE.md files can live in several locations, each with a different scope. The table below lists them in load order, from broadest scope to most specific, so a project instruction appears in context after a user instruction.

55 55 

56| Scope | Location | Purpose | Use case examples | Shared with |56| Scope | Location | Purpose | Use case examples | Shared with |

57| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------- |57| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------- |

58| **Managed policy** | • macOS: `/Library/Application Support/ClaudeCode/CLAUDE.md`<br />• Linux and WSL: `/etc/claude-code/CLAUDE.md`<br />• Windows: `C:\Program Files\ClaudeCode\CLAUDE.md` | Organization-wide instructions managed by IT/DevOps | Company coding standards, security policies, compliance requirements | All users in organization |58| **Managed policy** | • macOS: `/Library/Application Support/ClaudeCode/CLAUDE.md`<br />• Linux and WSL: `/etc/claude-code/CLAUDE.md`<br />• Windows: `C:\Program Files\ClaudeCode\CLAUDE.md` | Organization-wide instructions managed by IT/DevOps | Company coding standards, security policies, compliance requirements | All users in organization |

59| **Project instructions** | `./CLAUDE.md` or `./.claude/CLAUDE.md` | Team-shared instructions for the project | Project architecture, coding standards, common workflows | Team members via source control |

60| **User instructions** | `~/.claude/CLAUDE.md` | Personal preferences for all projects | Code styling preferences, personal tooling shortcuts | Just you (all projects) |59| **User instructions** | `~/.claude/CLAUDE.md` | Personal preferences for all projects | Code styling preferences, personal tooling shortcuts | Just you (all projects) |

60| **Project instructions** | `./CLAUDE.md` or `./.claude/CLAUDE.md` | Team-shared instructions for the project | Project architecture, coding standards, common workflows | Team members via source control |

61| **Local instructions** | `./CLAUDE.local.md` | Personal project-specific preferences; add to `.gitignore` | Your sandbox URLs, preferred test data | Just you (current project) |61| **Local instructions** | `./CLAUDE.local.md` | Personal project-specific preferences; add to `.gitignore` | Your sandbox URLs, preferred test data | Just you (current project) |

62 62 

63CLAUDE.md and CLAUDE.local.md files in the directory hierarchy above the working directory are loaded in full at launch. Files in subdirectories load on demand when Claude reads files in those directories. See [How CLAUDE.md files load](#how-claude-md-files-load) for the full resolution order.63CLAUDE.md and CLAUDE.local.md files in the directory hierarchy above the working directory are loaded in full at launch. Files in subdirectories load on demand when Claude reads files in those directories. See [How CLAUDE.md files load](#how-claude-md-files-load) for the full resolution order.

model-config.md +1 −1

Details

238 238 

239Opus 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.239Opus 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.

240 240 

241Availability 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.241Availability varies by model and plan. On Max, Team, and Enterprise plans, Opus is automatically upgraded to 1M context with no additional configuration. This applies to both Team Standard and Team Premium seats. Sonnet with 1M context is not part of the automatic upgrade and requires [extra usage](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) on every subscription plan, including Max.

242 242 

243| Plan | Opus with 1M context | Sonnet with 1M context |243| Plan | Opus with 1M context | Sonnet with 1M context |

244| ------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |244| ------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |

output-styles.md +63 −85

Details

6 6 

7> Adapt Claude Code for uses beyond software engineering7> Adapt Claude Code for uses beyond software engineering

8 8 

9Output styles change how Claude responds, not what Claude knows. They modify the system prompt to set role, tone, and output format while keeping core capabilities like running scripts, reading and writing files, and tracking TODOs. Use one when you keep re-prompting for the same voice or format every turn, or when you want Claude to act as something other than a software engineer.9Output styles change how Claude responds, not what Claude knows. They modify the system prompt to set role, tone, and output format. Use one when you keep re-prompting for the same voice or format every turn, or when you want Claude to act as something other than a software engineer.

10 

11A custom output style adds your instructions to the system prompt and lets you choose whether to keep Claude Code's built-in software engineering instructions. Keep them when you're changing how Claude communicates but still coding, like always answering with a diagram. Leave them out when Claude isn't doing software engineering at all, like a writing assistant or data analyst.

10 12 

11For instructions about your project, conventions, or codebase, use [CLAUDE.md](/en/memory) instead.13For instructions about your project, conventions, or codebase, use [CLAUDE.md](/en/memory) instead.

12 14 

13## Built-in output styles15## Built-in output styles

14 16 

15Claude Code's **Default** output style is the existing system prompt, designed17Claude Code's **Default** output style is the existing system prompt, designed to help you complete software engineering tasks efficiently.

16to help you complete software engineering tasks efficiently.

17 18 

18There are three additional built-in output styles:19There are three additional built-in output styles:

19 20 

20* **Proactive**: Claude executes immediately, makes reasonable assumptions21* **Proactive**: Claude executes immediately, makes reasonable assumptions instead of pausing for routine decisions, and prefers action over planning. This applies the same guidance as [auto mode](/en/permission-modes#eliminate-prompts-with-auto-mode) without changing your permission mode, so you still see permission prompts before tools run.

21 instead of pausing for routine decisions, and prefers action over planning.

22 This applies the same guidance as

23 [auto mode](/en/permission-modes#eliminate-prompts-with-auto-mode) without

24 changing your permission mode, so you still see permission prompts before

25 tools run.

26 

27* **Explanatory**: Provides educational "Insights" in between helping you

28 complete software engineering tasks. Helps you understand implementation

29 choices and codebase patterns.

30 

31* **Learning**: Collaborative, learn-by-doing mode where Claude will not only

32 share "Insights" while coding, but also ask you to contribute small, strategic

33 pieces of code yourself. Claude Code will add `TODO(human)` markers in your

34 code for you to implement.

35 

36## How output styles work

37 

38Output styles directly modify Claude Code's system prompt.

39 22 

40* Custom output styles exclude instructions for coding (such as verifying code23* **Explanatory**: Provides educational "Insights" in between helping you complete software engineering tasks. Helps you understand implementation choices and codebase patterns.

41 with tests), unless `keep-coding-instructions` is true.

42* All output styles have their own custom instructions added to the end of the

43 system prompt.

44* All output styles trigger reminders for Claude to adhere to the output style

45 instructions during the conversation.

46 24 

47Token usage depends on the style. Adding instructions to the system prompt25* **Learning**: Collaborative, learn-by-doing mode where Claude will not only share "Insights" while coding, but also ask you to contribute small, strategic pieces of code yourself. Claude Code will add `TODO(human)` markers in your code for you to implement.

48increases input tokens, though prompt caching reduces this cost after the first

49request in a session. The built-in Explanatory and Learning styles produce

50longer responses than Default by design, which increases output tokens. For

51custom styles, output token usage depends on what your instructions tell Claude

52to produce.

53 26 

54## Change your output style27## Change your output style

55 28 

56Run `/config` and select **Output style** to pick a style from a menu. Your29Run `/config` and select **Output style** to pick a style from a menu. Your selection is saved to `.claude/settings.local.json` at the [local project level](/en/settings).

57selection is saved to `.claude/settings.local.json` at the

58[local project level](/en/settings).

59 30 

60To set a style without the menu, edit the `outputStyle` field directly in a31To set a style without the menu, edit the `outputStyle` field directly in a settings file:

61settings file:

62 32 

63```json theme={null}33```json theme={null}

64{34{


66}36}

67```37```

68 38 

69Because the output style is set in the system prompt at session start,39Because the output style is set in the system prompt at session start, changes take effect the next time you start a new session. This keeps the system prompt stable throughout a conversation so prompt caching can reduce latency and cost.

70changes take effect the next time you start a new session. This keeps the system

71prompt stable throughout a conversation so prompt caching can reduce latency and

72cost.

73 40 

74## Create a custom output style41## Create a custom output style

75 42 

76Custom output styles are Markdown files with frontmatter and the text that will43A custom output style is a Markdown file: frontmatter for metadata, then the instructions to add to the system prompt.

77be added to the system prompt:

78 44 

79```markdown theme={null}45<Steps>

80name: My Custom Style46 <Step title="Create a Markdown file">

81description:47 Save it at one of three levels. The file name becomes the style name unless you set `name` in the frontmatter.

82 A brief description of what this style does, to be displayed to the user

83 48 

84# Custom Style Instructions49 * User: `~/.claude/output-styles`

50 * Project: `.claude/output-styles`

51 * Managed policy: `.claude/output-styles` inside the [managed settings directory](/en/settings#settings-files)

52 </Step>

85 53 

86You are an interactive CLI tool that helps users with software engineering54 <Step title="Add frontmatter and instructions">

87tasks. [Your custom instructions here...]55 Decide whether to keep Claude Code's software engineering instructions. Set `keep-coding-instructions: true` if you're changing how Claude communicates but still want it coding the same way. Leave it out if Claude won't be doing software engineering.

88 56 

89## Specific Behaviors57 This example leads every explanation with a diagram while keeping Claude's coding behavior:

90 58 

91[Define how the assistant should behave in this style...]59 ```markdown theme={null}

92```60 ---

61 name: Diagrams first

62 description: Lead every explanation with a diagram

63 keep-coding-instructions: true

64 ---

93 65 

94You can save these files at three levels:66 When explaining code, architecture, or data flow, start with a Mermaid diagram showing the structure, then explain in prose.

95 67 

96* User: `~/.claude/output-styles`68 ## Diagram conventions

97* Project: `.claude/output-styles`69 

98* Managed policy: `.claude/output-styles` inside the [managed settings directory](/en/settings#settings-files)70 Use `flowchart TD` for control flow and `sequenceDiagram` for request paths. Keep diagrams under 15 nodes.

71 ```

72 </Step>

73 

74 <Step title="Switch to your style">

75 Run `/config` and select your style under **Output style**. It takes effect the next time you start a session.

76 </Step>

77</Steps>

99 78 

100[Plugins](/en/plugins-reference) can also ship output styles in an `output-styles/` directory.79[Plugins](/en/plugins-reference) can also ship output styles in an `output-styles/` directory.

101 80 

102### Frontmatter81### Frontmatter

103 82 

104Output style files support frontmatter for specifying metadata:83Output style files support these frontmatter fields:

105 84 

106| Frontmatter | Purpose | Default |85| Frontmatter | Purpose | Default |

107| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------- |86| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------- |

108| `name` | Name of the output style, if not the file name | Inherits from file name |87| `name` | Name of the output style, if not the file name | Inherits from file name |

109| `description` | Description of the output style, shown in the `/config` picker | None |88| `description` | Description of the output style, shown in the `/config` picker | None |

110| `keep-coding-instructions` | Whether to keep the parts of Claude Code's system prompt related to coding. | false |89| `keep-coding-instructions` | Keep Claude Code's built-in software engineering instructions | `false` |

111| `force-for-plugin` | Plugin output styles only: apply this style automatically whenever the plugin is enabled, without requiring users to select it. Overrides the user's `outputStyle` setting. If multiple enabled plugins set this, the first one loaded wins. | false |90| `force-for-plugin` | Plugin output styles only: apply this style automatically whenever the plugin is enabled, without requiring users to select it. Overrides the user's `outputStyle` setting. If multiple enabled plugins set this, Claude Code uses the first one loaded. | `false` |

112 91 

113## Comparisons to related features92## How output styles work

114 93 

115### Output Styles vs. CLAUDE.md vs. --append-system-prompt94Output styles directly modify Claude Code's system prompt.

95 

96* All output styles have their own custom instructions added to the end of the system prompt.

97* All output styles trigger reminders for Claude to adhere to the output style instructions during the conversation.

98* Custom output styles leave out Claude Code's built-in software engineering instructions, such as how to scope changes, write comments, and verify work, unless `keep-coding-instructions` is set to `true`.

116 99 

117Choose based on whether Claude should stop acting as a coding assistant or keep100Token usage depends on the style. Adding instructions to the system prompt increases input tokens, though prompt caching reduces this cost after the first request in a session. The built-in Explanatory and Learning styles produce longer responses than Default by design, which increases output tokens. For custom styles, output token usage depends on what your instructions tell Claude to produce.

118its default role and learn more. Output styles replace the software-engineering

119parts of Claude Code's system prompt with your own role and voice, so use one

120when Claude should adopt a different identity, like a writing editor or a

121data-analysis assistant. CLAUDE.md and `--append-system-prompt` both keep

122Claude Code's default identity and add to it, so use them when Claude should

123remain a coding assistant that also follows your project conventions or extra

124instructions.

125 101 

126The mechanisms differ as well. Output styles edit the system prompt directly.102## Comparisons to related features

127CLAUDE.md adds its contents as a user message after the system prompt.

128`--append-system-prompt` appends content to the end of the system prompt without

129removing anything.

130 103 

131### Output Styles vs. [Agents](/en/sub-agents)104Several features customize how Claude Code behaves. Output styles modify the system prompt directly and apply to every response. The others add instructions without changing the default system prompt, or scope them to a specific task.

132 105 

133Use an output style to change how the main conversation responds in every106| Feature | How it works | Use it when |

134session. Use a [subagent](/en/sub-agents) when you want a separately scoped107| :----------------------- | :----------------------------------------------------------- | :---------------------------------------------------------------------- |

135helper that the main conversation delegates to. Output styles affect only the108| Output styles | Modifies the system prompt | You want a different role, tone, or default response format every turn |

136system prompt of the main agent loop. Agents handle specific tasks and can carry109| [CLAUDE.md](/en/memory) | Adds a user message after the system prompt | Claude should always know your project conventions and codebase context |

137their own model, tools, and context about when to invoke them.110| `--append-system-prompt` | Appends to the system prompt without removing anything | You want a one-off addition for a single invocation |

111| [Agents](/en/sub-agents) | Runs a subagent with its own system prompt, model, and tools | You want a separately scoped helper for a focused task |

112| [Skills](/en/skills) | Loads task-specific instructions when invoked or relevant | You have a reusable workflow |

138 113 

139### Output Styles vs. [Skills](/en/skills)114## Related resources

140 115 

141Output styles modify how Claude responds (formatting, tone, structure) and are always active once selected. Skills are task-specific prompts that you invoke with `/skill-name` or that Claude loads automatically when relevant. Use output styles for consistent formatting preferences; use skills for reusable workflows and tasks.116* [Settings](/en/settings): where the `outputStyle` field lives and how settings precedence works

117* [Permission modes](/en/permission-modes): the Proactive style mirrors auto mode without changing your permission mode

118* [Plugins](/en/plugins): package and distribute output styles alongside skills, hooks, and agents

119* [Debug your configuration](/en/debug-your-config): diagnose why an output style isn't taking effect

permissions.md +2 −2

Details

290| Plugin settings in `.claude/settings.json` | `enabledPlugins` and `extraKnownMarketplaces` only |290| Plugin settings in `.claude/settings.json` | `enabledPlugins` and `extraKnownMarketplaces` only |

291| [CLAUDE.md](/en/memory) files, `.claude/rules/`, and `CLAUDE.local.md` | Only when `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` is set. `CLAUDE.local.md` additionally requires the `local` setting source, which is enabled by default |291| [CLAUDE.md](/en/memory) files, `.claude/rules/`, and `CLAUDE.local.md` | Only when `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` is set. `CLAUDE.local.md` additionally requires the `local` setting source, which is enabled by default |

292 292 

293Everything else, including subagents, commands, output styles, hooks, and other settings, is discovered only from the current working directory and its parents, your user directory at `~/.claude/`, and managed settings. To share that configuration across projects, use one of these approaches:293Subagents, commands, and output styles are discovered from the current working directory and its parents, your user directory at `~/.claude/`, and managed settings. Hooks and other `settings.json` keys load from the current working directory's `.claude/` folder with no parent-directory fallback, alongside your user `~/.claude/settings.json` and managed settings. To share that configuration across projects, use one of these approaches:

294 294 

295* **User-level configuration**: place files in `~/.claude/agents/`, `~/.claude/output-styles/`, or `~/.claude/settings.json` to make them available in every project295* **User-level configuration**: place files in `~/.claude/agents/`, `~/.claude/output-styles/`, or `~/.claude/settings.json` to make them available in every project

296* **Plugins**: package and distribute configuration as a [plugin](/en/plugins) that teams can install296* **Plugins**: package and distribute configuration as a [plugin](/en/plugins) that teams can install


355 355 

356Embedding hosts can supply additional managed policy via the SDK `managedSettings` option when [`parentSettingsBehavior`](/en/settings#settings-precedence) is set to `"merge"`; embedder values can tighten policy but not loosen it.356Embedding hosts can supply additional managed policy via the SDK `managedSettings` option when [`parentSettingsBehavior`](/en/settings#settings-precedence) is set to `"merge"`; embedder values can tighten policy but not loosen it.

357 357 

358If a permission is allowed in user settings but denied in project settings, the project setting takes precedence and the permission is blocked.358For example, if user settings allow a permission and project settings deny it, the deny rule blocks it. The reverse is also true: a user-level deny blocks a project-level allow, because deny rules from any scope are evaluated before allow rules.

359 359 

360## Example configurations360## Example configurations

361 361 

plugins.md +1 −1

Details

305claude --plugin-dir ./my-plugin.zip305claude --plugin-dir ./my-plugin.zip

306```306```

307 307 

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

309 309 

310As you make changes to your plugin, run `/reload-plugins` to pick up the updates without restarting. This reloads plugins, skills, agents, hooks, plugin MCP servers, and plugin LSP servers. Test your plugin components:310As you make changes to your plugin, run `/reload-plugins` to pick up the updates without restarting. This reloads plugins, skills, agents, hooks, plugin MCP servers, and plugin LSP servers. Test your plugin components:

311 311 

Details

170 170 

171Before enabling this setting, ensure your network policies allow connectivity to `api.anthropic.com`. If that endpoint is unreachable, the CLI exits at startup and users cannot start Claude Code.171Before enabling this setting, ensure your network policies allow connectivity to `api.anthropic.com`. If that endpoint is unreachable, the CLI exits at startup and users cannot start Claude Code.

172 172 

173As of v2.1.139, the `claude auth` subcommands such as `claude auth login` are exempt from this check, so users can re-authenticate when expired credentials are the reason the settings fetch fails.

174 

173### Security approval dialogs175### Security approval dialogs

174 176 

175Certain settings that could pose security risks require explicit user approval before being applied:177Certain settings that could pose security risks require explicit user approval before being applied:


204Server-managed settings provide centralized policy enforcement, but they operate as a client-side control. On unmanaged devices, users with admin or sudo access can modify the Claude Code binary, filesystem, or network configuration.206Server-managed settings provide centralized policy enforcement, but they operate as a client-side control. On unmanaged devices, users with admin or sudo access can modify the Claude Code binary, filesystem, or network configuration.

205 207 

206| Scenario | Behavior |208| Scenario | Behavior |

207| :--------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |209| :--------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

208| User edits the cached settings file | Tampered file applies at startup, but correct settings restore on the next server fetch |210| User edits the cached settings file | Tampered file applies at startup, but correct settings restore on the next server fetch |

209| User deletes the cached settings file | First-launch behavior occurs: settings fetch asynchronously with a brief unenforced window |211| User deletes the cached settings file | First-launch behavior occurs: settings fetch asynchronously with a brief unenforced window |

210| API is unavailable | Cached settings apply if available, otherwise managed settings are not enforced until the next successful fetch. With `forceRemoteSettingsRefresh: true`, the CLI exits instead of continuing |212| API is unavailable | Cached settings apply if available, otherwise managed settings are not enforced until the next successful fetch. With `forceRemoteSettingsRefresh: true`, the CLI exits instead of continuing, except for [`claude auth` subcommands](#enforce-fail-closed-startup) |

211| User authenticates with a different organization | Settings are not delivered for accounts outside the managed organization |213| User authenticates with a different organization | Settings are not delivered for accounts outside the managed organization |

212| User configures a [third-party model provider](#platform-availability) | Server-managed settings are bypassed. This includes setting `CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_USE_MANTLE`, `CLAUDE_CODE_USE_VERTEX`, `CLAUDE_CODE_USE_FOUNDRY`, or a non-default `ANTHROPIC_BASE_URL` |214| User configures a [third-party model provider](#platform-availability) | Server-managed settings are bypassed. This includes setting `CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_USE_MANTLE`, `CLAUDE_CODE_USE_VERTEX`, `CLAUDE_CODE_USE_FOUNDRY`, or a non-default `ANTHROPIC_BASE_URL` |

213 215 

settings.md +5 −5

Details

49 49 

50### How scopes interact50### How scopes interact

51 51 

52When the same setting is configured in multiple scopes, more specific scopes take precedence:52When the same setting appears in multiple scopes, Claude Code applies them in priority order:

53 53 

541. **Managed** (highest) - can't be overridden by anything541. **Managed** (highest) - can't be overridden by anything

552. **Command line arguments** - temporary session overrides552. **Command line arguments** - temporary session overrides


574. **Project** - overrides user settings574. **Project** - overrides user settings

585. **User** (lowest) - applies when nothing else specifies the setting585. **User** (lowest) - applies when nothing else specifies the setting

59 59 

60For example, if a permission is allowed in user settings but denied in project settings, the project setting takes precedence and the permission is blocked.60For example, if your user settings set `spinnerTipsEnabled` to `true` and project settings set it to `false`, the project value applies. Permission rules behave differently because they merge across scopes rather than override. See [Settings precedence](#settings-precedence).

61 61 

62### What uses scopes62### What uses scopes

63 63 


271| :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------ |271| :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------ |

272| `worktree.baseRef` | Which ref new worktrees branch from. `"fresh"` (default) branches from `origin/<default-branch>` for a clean tree matching the remote. `"head"` branches from your current local `HEAD`, so unpushed commits and feature-branch state are present in the worktree. Applies to `--worktree`, the `EnterWorktree` tool, and subagent isolation | `"head"` |272| `worktree.baseRef` | Which ref new worktrees branch from. `"fresh"` (default) branches from `origin/<default-branch>` for a clean tree matching the remote. `"head"` branches from your current local `HEAD`, so unpushed commits and feature-branch state are present in the worktree. Applies to `--worktree`, the `EnterWorktree` tool, and subagent isolation | `"head"` |

273| `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"]` |273| `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"]` |

274| `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"]` |274| `worktree.sparsePaths` | Directories to check out in each worktree via git sparse-checkout. Only the listed directories plus root-level files are written to disk, which is faster in large monorepos | `["packages/my-app", "shared/utils"]` |

275 275 

276To copy gitignored files like `.env` into new worktrees, use a [`.worktreeinclude` file](/en/worktrees#copy-gitignored-files-into-worktrees) in your project root instead of a setting.276To copy gitignored files like `.env` into new worktrees, use a [`.worktreeinclude` file](/en/worktrees#copy-gitignored-files-into-worktrees) in your project root instead of a setting.

277 277 


529 529 

530This hierarchy ensures that organizational policies are always enforced while still allowing teams and individuals to customize their experience. The same precedence applies whether you run Claude Code from the CLI, the [VS Code extension](/en/vs-code), or a [JetBrains IDE](/en/jetbrains).530This hierarchy ensures that organizational policies are always enforced while still allowing teams and individuals to customize their experience. The same precedence applies whether you run Claude Code from the CLI, the [VS Code extension](/en/vs-code), or a [JetBrains IDE](/en/jetbrains).

531 531 

532For example, if your user settings allow `Bash(npm run *)` but a project's shared settings deny it, the project setting takes precedence and the command is blocked.532For example, if your user settings set `permissions.defaultMode` to `acceptEdits` and a project's shared settings set it to `default`, the project value applies. The example below covers how array-valued settings such as permission rules combine instead.

533 533 

534<Note>534<Note>

535 **Array settings merge across scopes.** When the same array-valued setting (such as `sandbox.filesystem.allowWrite` or `permissions.allow`) appears in multiple scopes, the arrays are **concatenated and deduplicated**, not replaced. This means lower-priority scopes can add entries without overriding those set by higher-priority scopes, and vice versa. For example, if managed settings set `allowWrite` to `["/opt/company-tools"]` and a user adds `["~/.kube"]`, both paths are included in the final configuration.535 **Array settings merge across scopes.** When the same array-valued setting (such as `sandbox.filesystem.allowWrite` or `permissions.allow`) appears in multiple scopes, the arrays are **concatenated and deduplicated**, not replaced. This means lower-priority scopes can add entries without overriding those set by higher-priority scopes, and vice versa. For example, if managed settings set `allowWrite` to `["/opt/company-tools"]` and a user adds `["~/.kube"]`, both paths are included in the final configuration.


546* **Skills**: Custom prompts that can be invoked with `/skill-name` or loaded by Claude automatically546* **Skills**: Custom prompts that can be invoked with `/skill-name` or loaded by Claude automatically

547* **MCP servers**: Extend Claude Code with additional tools and integrations547* **MCP servers**: Extend Claude Code with additional tools and integrations

548* **Precedence**: Higher-level configurations (Managed) override lower-level ones (User/Project)548* **Precedence**: Higher-level configurations (Managed) override lower-level ones (User/Project)

549* **Inheritance**: Settings are merged, with more specific settings adding to or overriding broader ones549* **Inheritance**: Settings merge across scopes; scalar values from higher-priority scopes override, and arrays concatenate

550 550 

551### System prompt551### System prompt

552 552 

skills.md +2 −2

Details

97 97 

98Claude Code watches skill directories for file changes. Adding, editing, or removing a skill under `~/.claude/skills/`, the project `.claude/skills/`, or a `.claude/skills/` inside an `--add-dir` directory takes effect within the current session without restarting. Creating a top-level skills directory that did not exist when the session started requires restarting Claude Code so the new directory can be watched.98Claude Code watches skill directories for file changes. Adding, editing, or removing a skill under `~/.claude/skills/`, the project `.claude/skills/`, or a `.claude/skills/` inside an `--add-dir` directory takes effect within the current session without restarting. Creating a top-level skills directory that did not exist when the session started requires restarting Claude Code so the new directory can be watched.

99 99 

100#### Automatic discovery from nested directories100#### Automatic discovery from parent and nested directories

101 101 

102When you work with files in subdirectories, Claude Code automatically discovers skills from nested `.claude/skills/` directories. For example, if you're editing a file in `packages/frontend/`, Claude Code also looks for skills in `packages/frontend/.claude/skills/`. This supports monorepo setups where packages have their own skills.102Project skills load from `.claude/skills/` in your starting directory and in every parent directory up to the repository root, so starting Claude in a subdirectory still picks up skills defined at the root. When you work with files in subdirectories below your starting directory, Claude Code also discovers skills from nested `.claude/skills/` directories on demand. For example, if you're editing a file in `packages/frontend/`, Claude Code also looks for skills in `packages/frontend/.claude/skills/`. This supports monorepo setups where packages have their own skills.

103 103 

104Each skill is a directory with `SKILL.md` as the entrypoint:104Each skill is a directory with `SKILL.md` as the entrypoint:

105 105 

ultrareview.md +4 −4

Details

49Ultrareview is a premium feature that bills against extra usage rather than your plan's included usage.49Ultrareview is a premium feature that bills against extra usage rather than your plan's included usage.

50 50 

51| Plan | Included free runs | After free runs |51| Plan | Included free runs | After free runs |

52| ------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------- |52| ------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------- |

53| Pro | 3 free runs through May 5, 2026 | billed as [extra usage](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) |53| Pro | 3 free runs | billed as [extra usage](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) |

54| Max | 3 free runs through May 5, 2026 | billed as [extra usage](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) |54| Max | 3 free runs | billed as [extra usage](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) |

55| Team and Enterprise | none | billed as [extra usage](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) |55| Team and Enterprise | none | billed as [extra usage](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) |

56 56 

57Pro and Max subscribers receive three free ultrareview runs to try the feature. These three runs are a one-time allotment per account, do not refresh, and expire on May 5, 2026. After you use all three, or after the free run period ends, each review is billed to extra usage and typically costs \$5 to \$20 depending on the size of the change. A run counts once the remote session starts, so a review that you stop early or that fails to complete still uses a free run. For a paid review, extra usage is billed only for the portion that ran.57Pro and Max subscribers receive three free ultrareview runs to try the feature. These three runs are a one-time allotment per account and do not refresh. After you use all three, or after the free run period ends, each review is billed to extra usage and typically costs \$5 to \$20 depending on the size of the change. A run counts once the remote session starts, so a review that you stop early or that fails to complete still uses a free run. For a paid review, extra usage is billed only for the portion that ran.

58 58 

59Because ultrareview always bills as extra usage outside the free runs, your account or organization must have extra usage enabled before you can launch a paid review. If extra usage is not enabled, Claude Code blocks the launch and links you to the billing settings where you can turn it on. You can also run `/extra-usage` to check or change your current setting.59Because ultrareview always bills as extra usage outside the free runs, your account or organization must have extra usage enabled before you can launch a paid review. If extra usage is not enabled, Claude Code blocks the launch and links you to the billing settings where you can turn it on. You can also run `/extra-usage` to check or change your current setting.

60 60 

Details

176 176 

177### No repositories appear after connecting GitHub177### No repositories appear after connecting GitHub

178 178 

179The Claude GitHub App needs explicit access to each repository you want to use. On github.com, open **Settings → Applications → Claude → Configure** and verify your repo is listed under **Repository access**. Private repositories need the same authorization as public ones.179A cloud session can use any repository the connected GitHub account can see, regardless of which repositories the Claude GitHub App is installed on. If a repository is missing, verify the connected GitHub account has access to it on GitHub. If you also want [Auto-fix](/en/claude-code-on-the-web#auto-fix-pull-requests) for a repository, install the App on it: on github.com, open **Settings → Applications → Claude → Configure** and verify the repository is listed under **Repository access**. Private repositories need the same authorization as public ones.

180 180 

181### The page only shows a GitHub login button181### The page only shows a GitHub login button

182 182 

worktrees.md +2 −2

Details

84 84 

85When you exit a worktree session, cleanup depends on whether you made changes:85When you exit a worktree session, cleanup depends on whether you made changes:

86 86 

87* **No changes**: the worktree and its branch are removed automatically87* **No uncommitted changes, no untracked files, and no new commits**: the worktree and its branch are removed automatically. If the session has a [name](/en/sessions#name-your-sessions), Claude prompts instead so you can keep the worktree for later

88* **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 commits88* **Uncommitted changes, untracked files, or new 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 any uncommitted changes, untracked files, and commits

89* **Non-interactive runs**: worktrees created with `--worktree` alongside `-p` are not cleaned up automatically since there is no exit prompt. Remove them with `git worktree remove`89* **Non-interactive runs**: worktrees created with `--worktree` alongside `-p` are not cleaned up automatically since there is no exit prompt. Remove them with `git worktree remove`

90 90 

91Subagent worktrees orphaned by a crash or interrupted run are removed at startup once they are older than your [`cleanupPeriodDays`](/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.91Subagent worktrees orphaned by a crash or interrupted run are removed at startup once they are older than your [`cleanupPeriodDays`](/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.