Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · claude-code

One read of Claude Code CLIclaude-code-20261203T063702Z

49 pages moved out of 220 read.

Pages moved 49 significant first
Pages read 220 in this capture
Captured 06:37 UTC
Corpus hash 2b45ca2bedcb corpus-hash

What this read moved

1-25 of 49, page 1 of 2

This capture is too large to show at once. Changes 1-25 of 49 are below, significant first; the rest are on the following screens.

agent-sdk/hooks Changed · +3 / -3 lines

from line 2
22 
33> Intercept and customize agent behavior at key execution points with hooks
44 
5Hooks are callback functions that run your code in response to agent events, like a tool being called, a session starting, or execution stopping. With hooks, you can:
5Hooks are callback functions that run your code in response to agent events, like a tool being called or execution stopping. With hooks, you can:
66 
77* **Block dangerous operations** before they execute, like destructive shell commands or unauthorized file access
88* **Log and audit** tool calls for compliance, debugging, or analytics
from line 794
794794* Check that your matcher pattern matches the tool name exactly
795795* Ensure the hook is under the correct event type in `options.hooks`
796796* For non-tool hooks that support matchers, like `Notification` and `SubagentStop`, matchers match against different fields, and `Stop` ignores matchers entirely (see [matcher patterns](https://code.claude.com/docs/en/hooks.md#matcher-patterns))
797* Hooks may not fire when the agent hits the [`max_turns`](https://code.claude.com/docs/en/agent-sdk/python#claudeagentoptions) limit because the session ends before hooks can execute
797* Hooks may not fire when the agent hits the [`max_turns`](https://code.claude.com/docs/en/agent-sdk/python#claudeagentoptions) limit
798798 
799799### Matcher not filtering as expected
800800 
from line 813
813813 
814814### Hook timeout
815815 
816Claude Code runs each callback with a timeout, which you set in seconds with the `timeout` field on its `HookMatcher`. When you don't set one, Claude Code uses the event's default: 600 seconds for most events, 30 seconds for `UserPromptSubmit`, `PreModelSwitch`, and `PostModelSwitch`, and 10 seconds for `MessageDisplay`. Claude Code runs `SessionEnd` callbacks during shutdown under the shorter [SessionEnd timeout budget](https://code.claude.com/docs/en/hooks.md#sessionend-input), 1.5 seconds by default.
816Claude Code runs each callback with a timeout, which you set in seconds with the `timeout` field on its `HookMatcher`. When you don't set one, Claude Code uses the event's default: 600 seconds for most events, 30 seconds for `UserPromptSubmit`, `PreModelSwitch`, and `PostModelSwitch`, and 10 seconds for `MessageDisplay`. Claude Code runs `SessionEnd` callbacks under the shorter [SessionEnd timeout budget](https://code.claude.com/docs/en/hooks.md#sessionend-input), 1.5 seconds by default.
817817 
818818When a callback exceeds its timeout, Claude Code cancels it and discards its output. On the events below, Claude Code then blocks the action or continues without the callback:
819819 

agent-view Changed · +22 / -41 lines

##### Prompts sent as the session moves to the background

from line 257
257257 
258258#### Switch sessions without leaving the terminal
259259 
260In a session running in the foreground, one you started in the terminal rather than attached to from agent view, pressing `←` on an empty prompt backgrounds it and opens agent view with that row selected, so you can switch sessions without leaving the terminal. The same single press detaches an attached session.
260To switch sessions without leaving the terminal, press `←` on an empty prompt in a session you started in that terminal. The session moves to the background, and agent view opens with its row selected.
261261 
262If you press `←` right after you delete the last of the prompt's text or move through prompt history, Claude Code asks you to confirm. Press `←` again to switch.
262You can then open another session, go back, or exit:
263263 
264After you background a session with `←`:
265 
266* Press `Enter` to reopen the conversation.
267* Press `Esc` to undo the switch and return to the conversation. If `Esc` shows `Still starting — try again in a moment`, the background session isn't ready yet, so press `Esc` again in a moment.
264* Select a row and press `Enter` to open that session.
265* Press `Esc` to undo the switch and return to the conversation. If you see `Still starting`, press `Esc` again in a moment.
268266* Press `Ctrl+C` twice to exit to your shell.
269267 
270When Claude Code can't reopen the conversation, it exits and prints a `claude --resume` command that resumes it.
268If a tool is running when you press `←`, Claude Code waits up to about ten seconds for it to finish, then moves the session, and Claude continues the response there. Press `←` again to move the session right away. Claude Code waits longer while a [foreground subagent](https://code.claude.com/docs/en/sub-agents.md#run-subagents-in-foreground-or-background) is running or a permission prompt needs your answer.
271269 
272[Claude's task list](https://code.claude.com/docs/en/interactive-mode.md#task-list) moves to the background session with the conversation, so the checklist is intact when you return to that row.
270If you press `←` right after you empty the prompt or move through prompt history, press it again to confirm. If you see `Backgrounding cancelled`, do what the message says, then press `←` again.
273271 
274The row you pressed `←` from also keeps a bold, undimmed name after you move the selection with the arrow keys or the mouse, so you can tell which session you came from.
272Some work stops when the session moves:
275273 
276If a tool is running when you press `←`, Claude Code waits for it to finish before backgrounding, and Claude continues the response in the background session. Press `←` again to background immediately instead of waiting. When in-flight background work can't carry over to the background session, Claude Code shows the `Background this session?` dialog first, the same as with [`/background`](#from-inside-a-session).
274* **A shell command Claude is running in the foreground**: it stops, and Claude may run it again in the background session. To keep it running, press `Ctrl+B` to [turn it into a background command](https://code.claude.com/docs/en/interactive-mode.md#background-bash-commands) while Claude Code is still waiting.
275* **Foreground subagents**: they restart from the beginning if you press `←` again while they're running.
276* **A prompt or `!` shell command you enter as the session moves, or a prompt still waiting on [hooks](https://code.claude.com/docs/en/hooks.md)**: it stops or isn't sent. To send it again, open the session and press `↑` at its prompt to bring the text back.
277277 
278After about ten seconds, Claude Code backgrounds the session without waiting any longer, except in cases such as these:
278You can turn this shortcut off with the [`leftArrowOpensAgents`](https://code.claude.com/docs/en/settings-reference#leftarrowopensagents) setting in `/config`.
279279 
280* **Foreground subagents are still running**: Claude Code keeps waiting so the work of the [foreground subagents](https://code.claude.com/docs/en/sub-agents.md#run-subagents-in-foreground-or-background) that Claude started carries over, and shows `Still backgrounding after the current tool`. Press `←` again to background without waiting, which restarts those subagents from the beginning.
281* **A permission prompt or question is waiting for your answer**: while a permission prompt or a question Claude asked waits, Claude Code keeps waiting and shows `Still backgrounding after the current tool — a question is waiting for your answer.` If your answer lets the turn continue, such as **Yes** on a permission prompt, Claude Code backgrounds the session when the current tool finishes.
282* **You type into the prompt input**: Claude Code cancels the switch, because unsent text stays in your terminal's input box and wouldn't move to the background session. It shows `Backgrounding cancelled — you have unsent text in the input. Send it or clear it, then press ← again.` Claude keeps working in the foreground.
283* **You stop the turn**: Claude Code cancels the switch and shows `Backgrounding cancelled — the turn was stopped.` For example, the turn stops when you [interrupt Claude with `Esc`](https://code.claude.com/docs/en/interactive-mode#general-controls) or select **No** [without a comment](https://code.claude.com/docs/en/permissions.md#add-a-comment-when-you-answer-a-permission-prompt) on a permission prompt from the main conversation, or press `Esc` on a question Claude asks there. Press `←` again to background the session.
284* **A queued message can't move**: messages you [queued while Claude was working](https://code.claude.com/docs/en/interactive-mode.md#queue-messages-while-claude-works) move to the background session with the conversation. When one of them can't, the session stays in the foreground and Claude Code shows a notice such as `Cannot open agents — 1 queued message can't move to the background. Press ← again once Claude has read it.`
285 
286When Claude Code backgrounds the session, either after about ten seconds or after you press `←` again, it stops a shell command that Claude is still running in the foreground. Claude Code doesn't show the `Background this session?` dialog for that command. In the background session, Claude has no record that the command started, so Claude may run the command again. To keep the command running when the session moves, press `Ctrl+B` to [turn it into a background command](https://code.claude.com/docs/en/interactive-mode.md#background-bash-commands) while Claude Code is still waiting.
287 
288Pressing `←` creates the session's row even when the conversation has no messages yet, so `→` still returns to it.
289 
290You can turn this shortcut off for foreground sessions with the [`leftArrowOpensAgents`](https://code.claude.com/docs/en/settings-reference#leftarrowopensagents) setting in `/config`.
291 
292##### Prompts sent as the session moves to the background
293 
294If you enter a prompt or `!` shell command at the moment the session moves to the background, it is stopped or left unsent:
295 
296* **Sent as the conversation closes**: the response or command stops when the conversation closes and agent view opens
297* **Still waiting on [hooks](https://code.claude.com/docs/en/hooks.md) at that moment**: the prompt isn't sent, and nothing on screen says so. This includes a prompt you typed while [`SessionStart` hooks](https://code.claude.com/docs/en/hooks#sessionstart) were still running
298 
299In both cases the text you typed is kept in [prompt history](https://code.claude.com/docs/en/interactive-mode.md#command-history). To send it again, open the backgrounded session and press `↑` at its prompt to bring the text back.
300 
301280### Organize the list
302281 
303282Agent 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 that needs review or has failing checks, and `Completed` collects finished, failed, and stopped sessions together.
from line 627
648627 
649628##### Resolve a `files that weren't checked against a repository` message
650629 
651This message from `claude rm` means files remain in a worktree directory that isn't inside any git repository or that a [`WorktreeCreate` hook](https://code.claude.com/docs/en/hooks#worktreecreate) manages. Copy out any files you want to keep, then take the step for your case:
630This message from `claude rm` means files remain in a worktree directory that isn't inside any git repository or that a [`WorktreeCreate` hook](https://code.claude.com/docs/en/hooks#worktreecreate) manages. Copy out any files you want to keep.
652631 
632The following table shows how to clear the directory with and without worktree hooks:
633 
653634| Your case | What to do |
654635| :- | :- |
655636| No `WorktreeCreate` hook manages the directory | To discard the files, press `Ctrl+X` twice on the session's row in agent view. Or remove the directory yourself, then run `claude rm <id>` again |
from line 907
926907* Within 48 hours, the session shows as failed. Attach or reply to it and it restarts from its saved conversation. To pick the interrupted work back up, send it a reply asking it to continue.
927908* Past 48 hours, such as after the machine was off for days, the session shows as stopped with `ended while the background service was off`.
928909 
929 Press `Enter` on the row and the footer shows `Press enter again to resume this session (it ended while the background service was off), or ctrl+x to remove it.` Press `Enter` on the same row again to resume its saved conversation. A reply, or `claude attach <id>`, resumes it without that footer prompt.
910 Press `Enter` on the row and the footer shows `Press Enter again to resume this session (it ended while the background service was off), or ctrl+x to remove it.` Press `Enter` on the same row again to resume its saved conversation. A reply, or `claude attach <id>`, resumes it without that footer prompt.
930911 
931912When [transcript cleanup](https://code.claude.com/docs/en/settings-reference.md#cleanupperioddays) has removed a stopped session's saved conversation, Claude Code refuses to open the row: the message says there is nothing to resume. `claude rm <id>` deletes the row, unless [Claude Code refuses](#what-deleting-a-session-removes), and `claude respawn <id>` runs its original prompt again. See [This session's saved conversation is no longer on disk](https://code.claude.com/docs/en/errors.md#this-sessions-saved-conversation-is-no-longer-on-disk).
932913 
from line 927
946927When you open a session that you [backgrounded from another conversation](#from-inside-a-session) and that stopped before it ran a turn of its own, Claude Code resumes that conversation. If Claude Code can't find the conversation, it refuses to open the session:
947928 
948929* `claude attach` prints `This session has no saved transcript`.
949* Agent view shows `Press enter again to restart this session fresh` below the list.
930* Agent view shows `Press Enter again to restart this session fresh` below the list.
950931 
951932Press `Enter` on the same row again to restart the session with an empty conversation, or run `claude respawn <id>` from the shell.
952933 

approvals-troubleshooting Changed · +5 / -3 lines

from line 59
5959 
6060## Fix a policy file that Approvals refuses
6161 
62Find the **Claude Approvals** check's title in this table:
62This table lists **Claude Approvals** check titles for a refused policy file, and which copy to fix:
6363 
6464| Title | Copy at fault | Messages | What to do |
6565| :- | :- | :- | :- |
from line 73
7373 
7474If you see a refusal, fix it, because one refusal makes the whole policy file unusable.
7575 
76Find the beginning of your message here:
76Some messages have a fix listed here, by their opening words:
7777 
7878| Message | Fix |
7979| :- | :- |
from line 91
9191* **A run reached its budget**: split the pull request, or raise a `time` or `cost` that is under its [maximum](https://code.claude.com/docs/en/approvals-classifiers.md#budget)
9292* **A run had more to read than one run can handle**, for example a large diff: try a smaller pull request
9393 
94Then find the **Claude Approvals** check's title here:
94Then read the title of the **Claude Approvals** check.
95 
96These next steps apply to titles about a classifier:
9597 
9698| Title | What to do |
9799| :- | :- |

cloud-environments Changed · +17 / -20 lines

#### Add a secret with the Admin or User role #### Add a secret without an organization admin role

from line 95
9595 
9696These requirements decide whether you can add a secret and whether the agent proxy can use it once added:
9797 
98* **Role**: on every plan, you can add and delete secrets on your own environments whatever your role. On Team and Enterprise, Owners hold an organization admin role in your claude.ai organization and Admins don't, which changes what you see in these cases:
99 * **Your own environment**: without an organization admin role, **Add secret** opens a [shorter form](#add-a-secret-without-the-role)
100 * **A shared environment**: Owners [add and delete its secrets](#add-a-credential) from admin settings. Without an organization admin role, ask an Owner to add the secret, because the environment's dialog has no **Network secrets** section
98* **Role**: on Team and Enterprise plans, these limits apply if you have the Admin or User role in your claude.ai organization:
99 * **Your own environment**: the **Add secret** button opens a [shorter form](#add-a-secret-without-the-role)
100 * **A shared environment**: ask an Owner to add the secret. Owners [add and delete its secrets](#add-a-credential) from admin settings
101101* **Environment type**: an Anthropic-hosted cloud environment. A [self-hosted environment](https://code.claude.com/docs/en/self-hosted-environments) doesn't have network secrets
102102* **API reachability**: the API accepts connections from the internet, because requests leave from Anthropic's network
103103* **Encryption keys**: if your organization uses customer-managed encryption keys, you can't save network secrets
from line 106
106106 
107107You add secrets one at a time. To change a secret's hosts or value, delete it and add it again.
108108 
109To add a secret to a [shared environment](#organization-shared-environments), open it for editing from the **Cloud environments** page in [admin settings](https://claude.ai/admin-settings), select its **Network secrets** row, then continue from step 2. If you're on a Team or Enterprise plan and don't hold an [organization admin role](#requirements), follow step 1 on your own environment, then [fill in the shorter form](#add-a-secret-without-the-role).
109To add a secret to a [shared environment](#organization-shared-environments), open it for editing from the **Cloud environments** page in [admin settings](https://claude.ai/admin-settings), select its **Network secrets** row, then continue from step 2. If you have the [Admin or User role](#requirements) on a Team or Enterprise plan, follow step 1 on your own environment, then [fill in the shorter form](#add-a-secret-without-the-role).
110110 
111111**1. Open the environment's network secrets**
112112 
from line 127
127127 
128128To confirm the secret works, start a session in the environment and ask Claude to call the API, for example with `curl`. The API answers as if the key were in the request, and the key doesn't appear in the session's environment variables or in any file. If the list marks a secret **Not sent** instead, the note under it says why and what to do. Two secrets whose hosts overlap without matching exactly get no marker, and the agent proxy sends only one of them.
129129 
130#### Add a secret without an organization admin role
130#### Add a secret with the Admin or User role
131131 
132If you're on a Team or Enterprise plan and don't hold an [organization admin role](#requirements), the **Add secret** form takes one secret for one host. Select your environment's [**Network secrets** row](#add-a-credential) and then **Add secret**. Fill in these fields and select the form's **Add secret** button:
132If you have the [Admin or User role](#requirements) on a Team or Enterprise plan, the **Add secret** form takes one secret for one host. Select your environment's [**Network secrets** row](#add-a-credential) and then **Add secret**. Fill in these fields and select the form's **Add secret** button:
133133 
134134* **Host**: the one host that gets the secret, such as `api.example.com`. The form doesn't accept a `*.` wildcard
135135* **Secret type**: **Token** for a key that travels in a request header, or **Username and password**. For a token, paste the key in the **Token** field. For a header other than `Authorization`, such as `X-Api-Key`, change **Header** to its name
from line 136
136136 
137137#### Which requests get the secret
138138 
139The agent proxy attaches a secret to a request when the request's host matches one you listed on that secret. Sessions can reach those hosts even when the environment's [network access level](#access-levels) wouldn't otherwise allow them, except the [hosts that never get the secret](#requests-that-never-get-the-credential). The secret applies in every session that runs in the environment, whoever started it, until you delete it.
139The agent proxy attaches a secret to a request when the request's host matches one you listed on that secret. Sessions can reach those hosts even when the environment's [network access level](#access-levels) wouldn't otherwise allow them, except the [hosts that don't get the secret](#requests-that-never-get-the-credential). The secret applies to the environment's sessions, whoever started them.
140140 
141141#### Requests that never get the secret
142142 
from line 157
157157 
158158### Archive an environment
159159 
160To archive one of your own environments, open it for editing, then select **Archive environment** and confirm. If the environment is [shared with your organization](#organization-shared-environments), an Owner archives it from the **Cloud environments** page in [admin settings](https://claude.ai/admin-settings) instead, so ask an Owner unless you are one.
160Before you archive an environment, update what uses it, including:
161161 
162Archiving affects new sessions, not running ones:
162* **Scheduled tasks**: point [cloud scheduled tasks](https://code.claude.com/docs/en/routines.md#edit-and-control-scheduled-tasks) that use the environment at another one, because archiving turns them off.
163* **Network secrets**: let running sessions that use the environment's secrets finish, because archiving can end their access. Delete secrets you no longer want, because they can stay stored afterward.
164* **CLI default**: if you saved the environment with `/remote-env`, run that command again to pick another one. After you archive it, CLI cloud sessions start in the [fallback environment](#the-default-environment) until you do.
163165 
164* Sessions already running in the environment continue to work.
165* The environment disappears from the selector and from `/remote-env`, so you can't pick it for new sessions.
166* Network secrets on the environment stay attached in its running sessions. Delete any you no longer want before you archive.
167* No new session can start in an archived environment, on any surface:
168 * **Saved CLI default**: if the environment was your saved [CLI default](#select-an-environment-from-the-cli), Claude Code starts CLI cloud sessions in the Anthropic-hosted environment when your list has one. Otherwise, it starts them in the first environment in your list that isn't a [Remote Control bridge environment](#the-default-environment).
169 * **Configured explicitly**: anything configured with the environment explicitly, such as a [cloud scheduled task](https://code.claude.com/docs/en/routines.md#environments-and-network-access), can't start new sessions in it. Point it at another environment.
166To archive an environment you created, open it for editing, then select **Archive environment** and confirm. An Owner archives a [shared environment](#organization-shared-environments) from the **Cloud environments** page in [admin settings](https://claude.ai/admin-settings). Sessions already running in the environment continue after you archive it.
170167 
171When you no longer need an Anthropic-hosted environment, archive it. Neither the environment dialog nor the **Cloud environments** admin page has an option to delete an Anthropic-hosted environment. If the environment is [self-hosted](https://code.claude.com/docs/en/self-hosted-environments), an Owner can delete it from the **Cloud environments** page in admin settings.
168The environment dialog and the **Cloud environments** page have no option to delete an Anthropic-hosted environment. An Owner can delete a [self-hosted environment](https://code.claude.com/docs/en/self-hosted-environments) from that page.
172169 
173170### Organization-shared environments
174171 

code-review-troubleshooting Changed · +4 / -4 lines

from line 6
66 
77## Check how far the review got
88 
9Find the **Claude Code Review** check run on your pull request, then match its title to one of these common ones:
9The following table shows what common titles of the **Claude Code Review** check run on your pull request mean, and what to do:
1010 
1111| Check run title | What it means | What to do |
1212| :- | :- | :- |
from line 41
4141 
4242When your organization's budget can't cover a review, Code Review skips the review and Claude posts a comment on the pull request that begins with "⚠️ Code review skipped". In some of these cases a check run titled **Code review declined** also appears.
4343 
44The comment links [claude.ai/admin-settings/usage](https://claude.ai/admin-settings/usage), where an admin restores the budget. Its wording tells you which limit was reached:
44The comment's wording tells you why the review was skipped:
4545 
4646* **"has reached its monthly code review spending cap"**: the [monthly spend limit for Code Review](https://code.claude.com/docs/en/code-review-costs.md#limit-your-spend) was reached. Reviews resume at the start of the next billing period. To get them sooner, ask an admin to raise the limit.
47* **"has no extra usage available to pay for this review"**: your organization's [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) balance is empty, or its overall monthly spend limit was reached. Ask an admin to add usage credits or raise that limit.
48* **"is too low to start another review"**: what's left of the budget or balance is less than the expected cost of one review. Ask an admin to raise the limit or add usage credits.
47* **"has no extra usage available to pay for this review"**: your organization's [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) balance is empty, or its overall monthly spend limit was reached. Ask an admin to [add usage credits or raise that limit](https://code.claude.com/docs/en/code-review-costs.md#limit-your-spend).
48* **"is too low to start another review"**: what's left of the budget or balance is less than the expected cost of one review. Ask an admin to [raise the limit or add usage credits](https://code.claude.com/docs/en/code-review-costs.md#limit-your-spend).
4949 
5050After the budget is restored, comment `@claude review` on the pull request to get the review that was skipped. The [conditions for comment commands](https://code.claude.com/docs/en/code-review-pull-requests.md#comment-commands) apply, so the commenter needs write access.
5151 

desktop-scheduled-tasks Changed · +3 / -3 lines

from line 94
9494 
9595On the detail page, click the pencil icon to open the [**Edit** form](#manage-scheduled-tasks). There you can change the **Description** that Desktop filled in from your instructions, select **Worktree**, or switch the schedule to **Manual** or **Custom**.
9696 
97You can also create a task by describing what you want in any session. For example, "set up a daily code review that runs every morning at 9am" creates a recurring task. A request like "remind me at 3pm tomorrow to check the deploy" creates a one-time task that disables itself after it fires.
97You can also create a task by describing what you want in any [local Desktop session](https://code.claude.com/docs/en/desktop.md#environment-configuration). For example, "set up a daily code review that runs every morning at 9am" creates a recurring task. A request like "remind me at 3pm tomorrow to check the deploy" creates a one-time task that disables itself after it fires.
9898 
9999### Dialog with Only on this computer at the top
100100 
from line 132
132132* **Manual**: no schedule, only runs when you click **Run now**. Useful for saving a prompt you trigger on demand
133133* **Custom**: runs on a cron expression that you enter and that is evaluated in your local time, such as `0 9 * * *` for 9:00 AM each day. Write days of the week and months as numbers, since their names aren't accepted. Sunday is `0`, not `7`. The form rejects an expression that runs more often than once per hour.
134134 
135You can also ask Claude in any Desktop session to set the schedule. Claude isn't held to the once-per-hour limit and can set a single run at a future time. For example, ask "run the test suite every 30 minutes" or "next Monday at 9am, summarize the pull requests merged since Friday."
135You can also ask Claude in a local Desktop session to set the schedule. Claude isn't held to the once-per-hour limit and can set a single run at a future time. For example, ask "run the test suite every 30 minutes" or "next Monday at 9am, summarize the pull requests merged since Friday."
136136 
137137## How scheduled tasks run
138138 
from line 184
184184 
185185You can also manage tasks by asking Claude, letting a task update itself, or editing a task's prompt on disk:
186186 
187* **Ask Claude**: list, create, edit, and pause tasks by asking Claude in any Desktop session. For example, "pause my dependency-audit task" or "show me my scheduled tasks." To delete a task, use the **Delete** button on its detail page.
187* **Ask Claude**: list, create, edit, and pause tasks by asking Claude in a local Desktop session. For example, "pause my dependency-audit task" or "show me my scheduled tasks."
188188* **Let a task update itself**: for a task to change its own schedule or prompt with the `update_scheduled_task` MCP tool, click **Run now** and approve the call each time
189189* **Edit the prompt on disk**: open `~/.claude/scheduled-tasks/<task-name>/SKILL.md`, or `scheduled-tasks/<task-name>/SKILL.md` under [`CLAUDE_CONFIG_DIR`](https://code.claude.com/docs/en/env-vars) if you set that variable. The file uses YAML frontmatter for `name` and `description`, with the prompt as the body. Changes take effect on the next run. Schedule, folder, and enabled state are not in this file: change them through the Edit form or ask Claude.
190190 

errors Changed · +3 / -3 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 12
1212 
1313## Find your error
1414 
15Match the message you see to a section below.
15The following table lists error messages and the section or step for each.
1616 
1717| Message | Section |
1818| :- | :- |
from line 2371
23712371 
23722372### The proxy refused the connection
23732373 
2374You see this message when Claude reads an [artifact](https://code.claude.com/docs/en/artifacts.md) through the proxy you set in `HTTPS_PROXY` or a related [proxy variable](https://code.claude.
2374You see this message when Claude reads an [artifact](https://code.claude.com/docs/en/artifacts.md) through the proxy you set in `HTTPS_PROXY` or a related [proxy v

headless Changed · +5 / -3 lines

from line 30
3030 
3131### Start faster with bare mode
3232 
33Add `--bare` to reduce startup time by skipping auto-discovery of your hooks, skills, custom commands, [subagents](https://code.claude.com/docs/en/sub-agents.md), installed plugins, MCP servers, auto memory, and CLAUDE.md. Without it, `claude -p` discovers and loads them as an interactive session would, including anything configured in the working directory or `~/.claude`.
33Add `--bare` to reduce startup time by skipping auto-discovery of your hooks, skills, custom commands, [subagents](https://code.claude.com/docs/en/sub-agents.md), MCP servers, auto memory, and CLAUDE.md. Without it, `claude -p` discovers and loads them as an interactive session would, including anything configured in the working directory or `~/.claude`.
3434 
3535In bare mode, Claude Code still reads settings files and their [permission rules](https://code.claude.com/docs/en/permissions.md#what-runs-before-you-trust-a-folder), but a hook in `~/.claude/settings.json` or an MCP server in the project's `.mcp.json` won't run. A directory you name with `--add-dir` is a special case: bare mode loads skills from its `.claude/skills/` folder, but still skips its `.claude/commands/` and `.claude/agents/` folders. [Skills from additional directories](https://code.claude.com/docs/en/skills.md#skills-from-additional-directories) covers what does and doesn't load.
3636 
from line 117
117117 
118118## Examples
119119 
120These examples highlight common CLI patterns. Where a command names a file such as `auth.py` or `build-error.txt`, substitute a file from your own project. In CI or other scripted environments, add [`--bare`](#start-faster-with-bare-mode) so Claude Code starts without loading the host's hooks, plugins, auto memory, or `CLAUDE.md`.
120These examples highlight common CLI patterns. Where a command names a file such as `auth.py` or `build-error.txt`, substitute a file from your own project. In CI or other scripted environments, add [`--bare`](#start-faster-with-bare-mode) so Claude Code starts without loading your hooks, auto memory, or `CLAUDE.md`.
121121 
122122### Pipe data through Claude
123123 
from line 228
228228 
229229When you enable either option, Claude Code forwards messages from [subagents at every nesting depth](https://code.claude.com/docs/en/sub-agents.md#let-subagents-spawn-their-own-subagents), whether each one was spawned with the Agent tool or started as a forked skill. In `parent_tool_use_id`, the nested subagent's messages carry the ID of the Agent or Skill tool call that started it, so you can rebuild the full nesting tree by following those IDs.
230230 
231A run that Claude starts with a tool call carries that tool call's ID. A forked skill that you start by passing `/<skill-name>` as the prompt has no tool call, so its messages carry a `forked-command-` value instead and arrive after it finishes. Find how the run started in the first column:
231A run that Claude starts with a tool call carries that tool call's ID. A forked skill that you start by passing `/<skill-name>` as the prompt has no tool call, so its messages carry a `forked-command-` value instead and arrive after it finishes.
232 
233The following table lists ways a run starts, with the `parent_tool_use_id` value and when messages arrive:
232234 
233235| How the run starts | `parent_tool_use_id` | When its messages arrive |
234236| :- | :- | :- |

hooks Changed · +31 / -23 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 711
711711 * **Fix**: move the skill into a [plugin](https://code.claude.com/docs/en/plugins/create.md#convert-an-existing-claude-setup), because plugin skills keep their frontmatter hooks. List the plugin in a [marketplace](https://code.claude.com/docs/en/plugins/create-marketplace.md#create-a-marketplace), then install it from there. If Claude Code refuses the marketplace with [`is blocked by enterprise policy`](https://code.claude.com/docs/en/plugins/troubleshooting#marketplace-source-is-blocked-by-enterprise-policy), ask your administrator to allow that marketplace.
712712* **Hook limit**: in Claude Code v2.1.304 or later, each source of skills has its own limit per session. Your project, your personal skills folder, and each plugin count as separate sources. The skills from one source can register at most 1,024 hooks. Those hooks' matchers can total at most 16,384 characters. A matcher with several hooks under it counts once for each hook.
713713 * **Check**: repeat the session where the hook didn't fire, with debug logging on:
714 1. Start a new session from your shell with `claude --debug`. If you don't start sessions from a shell, type [`/debug`](https://code.claude.com/docs/en/commands#all-commands) first in the new session instead.
714 1. Start a new session from your shell with `claude --debug`. In the Desktop app, type [`/debug`](https://code.claude.com/docs/en/commands#all-commands) first in a new local session instead.
715715 2. Invoke the same skills in the same order, including the ones Claude invoked, because both totals build up skill by skill. Ask Claude to invoke any skill you can't type as a command.
716716 3. Search the [debug log](#debug-hooks) for `registers none of its hooks`. A line containing that text names the skill that went past the limit.
717717 * **Fix**: declare fewer hooks or shorter matchers in that skill or in the other skills from its source, then start a new session. If those skills aren't yours to edit, ask their author for that change. Until then, start a new session and invoke the skill you need before any other skill from its source.
from line 802
802802 
803803* **Success**: your hook exits 0. Claude Code applies any [JSON output](#json-output) fields your hook printed, and the action goes ahead unless those fields block or deny it. [Hooks that start a background process](#hooks-that-start-a-background-process) covers the exception.
804804* **Blocking error**: your hook exits 2. On [events that can block](#exit-code-2-behavior-per-event), Claude Code stops the action.
805* **Non-blocking error**: your hook exits with any other code, or fails in some other way, such as not starting or printing invalid JSON. The action goes ahead, except for hooks [whose failure blocks the action](#block-the-action-when-a-hook-fails), for example a hook with `onFailure` set to `"block"`. On events such as `PreToolUse`, you see a `<hook name> hook error` notice in the transcript.
805* **Non-blocking error**: your hook exits with any other code, or fails in some other way, such as failing to start or printing invalid JSON. The action proceeds unless the hook is one [whose failure blocks the action](#block-the-action-when-a-hook-fails), such as a hook with its `onFailure` field set to `"block"`. When a `PreToolUse` hook fails and the call proceeds, look for a `<hook name> hook failed` notice in the terminal transcript.
806806 
807What your hook prints to stdout can change the outcome. For example, when a `PreToolUse` hook exits 1 but prints JSON that passes validation, that JSON can still decide what happens. To find your hook's outcome on an event such as `PreToolUse`, match what it printed to stdout in the first column with its exit code along the top:
807What your hook prints to stdout can change the outcome. For example, when a `PreToolUse` hook exits 1 but prints JSON that passes validation, that JSON can still decide what happens.
808808 
809The following table shows the outcome on an event such as `PreToolUse` for each combination of stdout and exit code:
810 
809811| Stdout | Exit 0 | Exit 2 | Any other exit code |
810812| :- | :- | :- | :- |
811813| JSON object that passes [schema validation](#json-output) | Success. The fields apply | Blocking error. Claude Code still reads the fields, but a `PreToolUse` call stays blocked even if you return `"allow"` or `continue: false`. For other events, see [Exit code 2](#exit-code-2) | Success. Claude Code ignores the exit code, and the fields alone decide. For hooks [whose failure blocks the action](#block-the-action-when-a-hook-fails), the run counts as a failure instead |
from line 828
826828 
827829Exit 0 means success, and is the intended exit code when you print JSON for structured control. When your hook exits 0 but prints JSON that can't be parsed or fails [schema validation](#json-output), the action goes ahead unless the hook is one [whose failure blocks the action](#block-the-action-when-a-hook-fails). Instead of a success with your fields applied, the run is a [non-blocking error](#exit-code-output).
828830 
829If a `<hook name> hook error` notice carries a parse or validation message, use it to fix your output. For a hook that isn't [async](#how-async-hooks-execute), your stdout counts as [JSON output](#json-output) only when you print one JSON object, on one line or several, with nothing around it but whitespace. Claude Code reads any other stdout as plain text or a parse failure:
831If you see a parse or validation message under a `<hook name> hook failed` notice, use it to fix your output. For a hook that isn't [async](#how-async-hooks-execute), your stdout counts as [JSON output](#json-output) only when you print one JSON object, on one line or several, with nothing around it but whitespace. Claude Code reads any other stdout as plain text or a parse failure:
830832 
831833* **Output that doesn't start with `{`, or that starts with `{` and doesn't end with `}`**: plain text. A JSON array and a quoted JSON string are plain text by this rule.
832834* **Two or more lines that each parse as JSON on their own, the first starting with `{` and the last ending with `}`**: plain text when no line is a JSON output object that sets a field. When one line is, the output is a parse failure, so print that object with nothing else on stdout.
from line 877
875877 
876878#### Other exit codes
877879 
878A `<hook name> hook error` notice with `Failed with non-blocking status code:` means your hook didn't exit 0 or 2 and its stdout was plain text or empty. The run is a [non-blocking error](#exit-code-output), so your hook didn't stop the action. If the notice cuts off your stderr, turn on debug logging as [Debug hooks](#debug-hooks) describes and rerun the hook.
880If you see a `PreToolUse:<tool> hook failed` notice with your hook's stderr under it, your hook didn't stop the call.
879881 
880For example, when a `PreToolUse` hook on `Bash` prints `something broke` to stderr and exits 1, the `PreToolUse:Bash hook error` notice carries this line:
882For example, a `PreToolUse` hook on `Bash` that prints `something broke` to stderr and exits with code 1 leaves this line under the `PreToolUse:Bash hook failed` notice:
881883 
882884```text theme={null}
883Failed with non-blocking status code: something broke
885something broke
884886```
885887 
886If the notice carries the shell's `No such file or directory` message, as in the following line, the hook never ran, for example because its script path doesn't exist:
888To read the rest of a cut-off stderr message, turn on [debug logging](#debug-hooks) and rerun the hook.
887889 
890The shell's `No such file or directory` message for your script's path means the hook didn't run:
891 
888892```text theme={null}
889Failed with non-blocking status code: /bin/sh: /path/to/hook.sh: No such file or directory
893/bin/sh: /path/to/hook.sh: No such file or directory
890894```
891895 
892If the path is wrong, correct it where the hook is configured. In shell form, when the script path doesn't exist or isn't executable, the shell exits with a code like 127 and the notice carries the interpreter's message. Unless the hook is one [whose failure blocks the action](#block-the-action-when-a-hook-fails), a hook that can't start is a non-blocking error too.
896Check the script path in the hook's configuration.
893897 
894When you set up a policy hook, watch for this notice on its first run, because a mistyped path in `settings.json` means the hook never runs. To block the action when the hook can't start, set [`onFailure: "block"`](#block-the-action-when-a-hook-fails).
898The first time a hook that enforces a policy runs, watch for the `hook failed` notice. To block the action when the hook can't start, set [`onFailure: "block"`](#block-the-action-when-a-hook-fails).
895899 
896900> [!WARNING]
897901>
898> Exit code 1 without valid JSON output is a non-blocking error unless the hook is one [whose failure blocks the action](#block-the-action-when-a-hook-fails), even though 1 is the conventional Unix failure code. If your hook is meant to enforce a policy, use `exit 2`.
902> Exit code 1 without valid JSON output is a non-blocking error unless the hook is one [whose failure blocks the action](#block-the-action-when-a-hook-fails). To enforce a policy, use `exit 2`.
899903 
900904#### Timeouts
901905 
from line 1070
10661070| `InstructionsLoaded` | No | Exit code is ignored |
10671071| `MessageDisplay` | No | The original text is displayed |
10681072 
1069For `SessionStart`, `SubagentStart`, and `PostModelSwitch`, Claude Code renders the exit code 2 stderr in the transcript as a `<hook name> hook error` notice, the same way it renders a [non-blocking error](#exit-code-output). Claude doesn't see it, and the session or subagent proceeds. For `SubagentStart`, the notice appears in the subagent's own transcript, not in the parent conversation.
1073If a `SessionStart`, `SubagentStart`, or `PostModelSwitch` hook exits with code 2, the session or subagent proceeds. You see the stderr under a `<hook name> hook failed` notice in the terminal transcript. For a `SubagentStart` hook, look in the subagent's transcript.
10701074 
10711075### HTTP response handling
10721076 
from line 1207
12031207 
12041208#### Decision control
12051209 
1206Not every event supports blocking or controlling behavior through JSON. The events that do each use a different set of fields to express that decision. Use this table as a quick reference before writing a hook:
1210Not every event supports blocking or controlling behavior through JSON. The events that do each use a different set of fields to express that decision.
12071211 
1212This table shows the decision pattern and key fields for each group of events:
1213 
12081214| Events | Decision pattern | Key fields |
12091215| :- | :- | :- |
12101216| UserPromptSubmit, UserPromptExpansion, PostToolUse, PostToolUseFailure, PostToolBatch, Stop, SubagentStop, ConfigChange, PreCompact | Top-level `decision` | `decision: "block"`, `reason`. Stop and SubagentStop also accept `hookSpecificOutput.additionalContext` for [non-error feedback that continues the conversation](#stop-decision-control) |
from line 3011
30053011| :- | :- |
30063012| `decision` | `"block"` prevents Claude from stopping. Omit to allow Claude to stop |
30073013| `reason` | Required when `decision` is `"block"`. Tells Claude why it should continue |
3008| `hookSpecificOutput.additionalContext` | Non-error feedback for Claude. The conversation continues so Claude can act on it, but unlike `decision: "block"` it is shown in the transcript as hook feedback rather than a hook error |
3014| `hookSpecificOutput.additionalContext` | Non-error feedback for Claude. The conversation continues so Claude can act on it |
30093015 
30103016A hook that blocks by exiting 2 routes the same way as `reason`: Claude receives the stderr message as the explanation for why it should continue.
30113017 
from line 3022
30163022}
30173023```
30183024 
3019Use `additionalContext` when the hook is working as designed and giving Claude guidance, such as "run the test suite before finishing". It keeps the conversation going through the same loop protections as `decision: "block"`, namely the `stop_hook_active` input and the 8-consecutive-continuation cap, but the transcript labels it `Stop hook feedback` and no hook error notification is shown:
3025To give Claude one more instruction before it stops, such as running the tests, return the instruction in the `additionalContext` field. Claude keeps working and receives your text.
30203026 
3027When your `Stop` hook returns the following JSON, you see `Stop hook says: Please run the test suite before finishing` in the terminal transcript:
3028 
30213029```json theme={null}
30223030{
30233031 "hookSpecificOutput": {
from line 3671
36633671 
36643672#### PreModelSwitch decision control
36653673 
3666`PreModelSwitch` hooks can cancel the switch, ask the user to confirm it, or let it proceed. Exit code 2 o
3674`PreModelSwitch` hooks can cancel the switch, ask the user to confirm it, or let it proceed. Exit code 2 or a top-level `decision: "block"` cancels the switch.
3675 
3676For finer control, return `permissionDecision` and `permissionDecisionReason` in a `hookSpecificOutput` object, as on [PreToolUse](#pretooluse-decision-control). `PreModelSwitch` accepts `"allow"`, `"deny"`, and `"ask"`. It doesn't accept `"defer"`, `updatedInput`, or `additionalContext`. The table below describes both fields:
3677 
3678| Field | Description |
3679| :- | :- |
3680| `permissionDecision` | `"allow"` proceeds and skips the [confirmation Claude Code shows while the prompt cache is warm](https://code.claude.com/docs/en/prompt-caching.md#switching-models). `"deny"` cancels the switch. `"ask"` prompts the user to confirm it |
3681| `permissionDecisionReason` | For `"deny"`, shown to the user as the reason the switch was blocked, or returned as the error for a `set_model` request. For `"ask"`, shown in the confirmation prompt. Ignored for `"allow"` |
3682 
3683Only `/model` in an interactive session can show the `"ask"` prompt. On every

hooks-guide Changed · +3 / -3 lines

from line 989
989989 
990990### Hook error in output
991991 
992You see a message like "PreToolUse hook error: ..." in the transcript.
992You see a message such as `PreToolUse:Bash hook failed` or `PreToolUse:Bash hook error: ...` in the transcript.
993993 
994994* Your script exited with a non-zero code unexpectedly. Test it manually by piping sample JSON:
995995 ```bash theme={null}
from line 1065
10651065 
10661066Press `Ctrl+O` to open the transcript view and look for the hook's outcome:
10671067 
1068* **Success**: you see nothing, unless the hook's JSON surfaces something, such as `systemMessage` or Stop hook feedback.
1068* **Success**: look for any `systemMessage` text from your hook on [events that show it](https://code.claude.com/docs/en/hooks.md#json-output). For a `Stop` hook's `additionalContext` field, look for a `Stop hook says` line.
10691069 * To confirm the hook ran, check for its effect, like a reformatted file
10701070* **Blocking error**: on most events you see the message that came with the block, for example `Blocked: rm commands are not allowed`. On a few events, such as `ConfigChange` and `Elicitation`, you see no message. [Exit code 2](https://code.claude.com/docs/en/hooks.md#exit-code-2) covers where the message comes from.
1071* **Non-blocking error**: a `<hook name> hook error` notice with `Failed with non-blocking status code:` means your hook didn't stop the action. You don't see this notice when a command hook on an event such as `Notification` fails.
1071* **Non-blocking error**: if you see a `PreToolUse:<tool> hook failed` notice with your hook's stderr under it, your hook didn't stop the call. On some events, such as `Notification`, you see no notice when a command hook fails.
10721072 
10731073To look up the outcome for a combination of exit code and stdout on an event such as `PreToolUse`, see [Exit code output](https://code.claude.com/docs/en/hooks.md#exit-code-output) in the reference. Check the same section for events with their own exit code rules, such as `WorktreeCreate`.
10741074 

model-config Changed · +3 / -3 lines

from line 384
384384To fully control the model experience, combine these settings:
385385 
386386* **`availableModels`**: restricts which named models users can switch to
387* **`enforceAvailableModels`**: extends the `availableModels` allowlist to the Default option, so Default cannot resolve to a model outside the list
387* **`enforceAvailableModels`**: extends the `availableModels` allowlist to the Default option
388388* **`deniedModels`** and **`availableModelsMatch`**: [block specific versions](#block-specific-models-or-versions) that an `availableModels` entry would otherwise permit
389389* **`model`**: sets the initial model selection when a session starts
390390* **`ANTHROPIC_DEFAULT_SONNET_MODEL`** / **`ANTHROPIC_DEFAULT_OPUS_MODEL`** / **`ANTHROPIC_DEFAULT_HAIKU_MODEL`** / **`ANTHROPIC_DEFAULT_FABLE_MODEL`**: control what the `sonnet`, `opus`, `haiku`, and `fable` aliases resolve to, and which version the [account-type default](#default-model-setting) uses
from line 402
402402}
403403```
404404 
405Without `enforceAvailableModels` or the `env` block, a user who selects Default in the picker gets the [runtime default](#default-model-setting) rather than the version pinned in `model`. The two settings cover different scopes: `enforceAvailableModels` makes Default obey the allowlist, while the `env` block pins which version a permitted alias such as `sonnet` resolves to. Use `enforceAvailableModels` alone when restricting model families is enough; add the `env` block when you also need to pin a specific version.
405Without `enforceAvailableModels` or the `env` block, a user who selects Default in the picker gets the [runtime default](#default-model-setting) rather than the version pinned in `model`. Use `enforceAvailableModels` alone when restricting model families is enough; add the `env` block when you also need to pin which version a permitted alias such as `sonnet` resolves to.
406406 
407407### Merge behavior
408408 
from line 690
690690 
691691After an automatic model fallback, see [Effort level after a fallback](#effort-level-after-a-fallback) for the level that applies. For subagents and teammates, see [Effort level of subagents and teammates](#effort-level-of-subagents-and-teammates).
692692 
693Opus 5.5 and models released after it ignore a top-level `effortLevel` key in your user settings file. A top-level `effortLevel` in project, local, or managed settings, or one passed with the `--settings` flag, applies to every model.
693To set a default effort level for every model, add a top-level `effortLevel` key to project, local, or managed settings, or to the settings you pass with the `--settings` flag. In your user settings file, Claude Code ignores a top-level `effortLevel` key for Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2, and newer models.
694694 
695695When you set `low`, `medium`, `high`, or `xhigh` in an interactive session on your machine, you choose how long it lasts by how you confirm it:
696696 

permission-modes Changed · +4 / -2 lines

from line 390
390390 
391391By default, classifier requests go to Claude Sonnet 5. If `/status` shows `Auto mode server` as `Enabled`, they're sent only for calls outside [the server's review](#server-side-classifier-review).
392392 
393Find the first row in this table that matches your session. You get that row's model in place of Sonnet 5.
393The following table lists some sessions whose classifier model can differ from Sonnet 5. If more than one row matches, the first applies.
394394 
395395| Your session | Classifier model |
396396| - | - |
from line 914
914914 
915915#### Paths that get the mounted drive prompt
916916 
917Match the target of your recursive `rm` or `/*` removal against these path shapes, where each placeholder such as `<drive>` or `<name>` stands for exactly one path segment:
917This table lists the path shapes that trigger the mounted drive prompt as the target of a recursive `rm` or `/*` removal.
918 
919Each placeholder, such as `<drive>` or `<name>`, stands for exactly one path segment:
918920 
919921| Under | Path shapes that get the prompt | Examples |
920922| :- | :- | :- |

plugins/troubleshooting Changed · +12 / -9 lines

#### `hook failed` notices in the transcript #### `hook error` notices in the transcript

from line 848
848848 
849849### `Couldn't load hooks from <path>` and hooks that don't fire
850850 
851A plugin's hooks don't run, or one blocks an action. Either the **Errors** tab shows a load failure for them, the hooks load and you see `<Event> hook error` notices or a blocking error in the transcript, or a hook loads without error and never fires.
851A plugin's hooks don't run, or one blocks an action. Either the **Errors** tab shows a load failure for them, or the hooks load and you see `<hook name> hook failed` notices or a blocking error in the transcript. A hook can also load without error and not fire.
852852 
853853#### Hooks fail to load
854854 
from line 858
858858* **`hooks path not found: <path>`** or **`Path not found: <path> (hooks)`**: no file exists at `<path>`. Fix the path or add the file
859859* **`hooks path escapes plugin directory: <path>`**: see [Path escapes plugin directory](https://code.claude.com/docs/en/errors.md#path-escapes-plugin-directory)
860860 
861#### `hook error` notices in the transcript
861#### `hook failed` notices in the transcript
862862 
863A notice of the form `... hook error: Failed with non-blocking status code: <stderr>` means the hook's command failed. For example, `Stop hook error: Failed with non-blocking status code: /bin/sh: node: command not found` means the shell Claude Code spawned couldn't find `node`. Install it, or make sure it's on the `PATH` of the terminal you start `claude` from.
863To see what went wrong, read the stderr under a `<hook name> hook failed` notice or after `hook error: Failed with non-blocking status code:`.
864864 
865If the stderr shows the plugin's path cut off at a space, the hook's shell-form command uses `${CLAUDE_PLUGIN_ROOT}` outside quotes and the install path contains a space. Wrap the variable in double quotes or use [exec form](https://code.claude.com/docs/en/hooks.md#exec-form-and-shell-form). To find the unquoted variable, run `claude plugin validate` on the plugin's directory and look for its [quoting warning](https://code.claude.com/docs/en/plugins/manifest-reference.md#quoting-and-path-separators).
865The following errors each have their own fix:
866866 
867* If the notice reads `Failed to run: Plugin directory does not exist: <path>`, see [`Plugin directory does not exist`](#plugin-directory-does-not-exist).
868* For any other error, capture the full stderr with [debug logging](https://code.claude.com/docs/en/hooks.md#debug-hooks).
867* **`/bin/sh: node: command not found`**: install Node.js or add it to the `PATH` of the terminal you start `claude` from
868* **The plugin's path cut off at a space**: wrap the `${CLAUDE_PLUGIN_ROOT}` variable in double quotes in the hook's shell-form command, or use [exec form](https://code.claude.com/docs/en/hooks.md#exec-form-and-shell-form). To find the unquoted variable, run `claude plugin validate` on the plugin's directory and look for its [quoting warning](https://code.claude.com/docs/en/plugins/manifest-reference.md#quoting-and-path-separators)
869* **`Failed to run: Plugin directory does not exist: <path>`**: see [`Plugin directory does not exist`](#plugin-directory-does-not-exist)
870 
871For any other error, capture the full stderr with [debug logging](https://code.claude.com/docs/en/hooks.md#debug-hooks).
869872 
870873#### A plugin hook blocks a tool call or prompt
871874 

pr-steward-troubleshooting Changed · +3 / -3 lines

from line 46
4646 
4747## PR Steward posted a comment that says why
4848 
49Find the words of PR Steward's comment in one of these tables.
49The following tables list comments PR Steward posts when it can't start, stops, or pauses, and what to do about each.
5050 
5151### Comments when PR Steward can't start
5252 
53If PR Steward commented and didn't start, find the comment's words here:
53This table gives the next step for comments PR Steward posts when it doesn't start:
5454 
5555| Comment says | What to do |
5656| :- | :- |
from line 66
6666 
6767### Comments when PR Steward stops or pauses
6868 
69If PR Steward commented and then stopped or paused, find the comment's opening words here:
69Comments PR Steward posts when it stops or pauses are listed here by their opening words, with what they mean and what to do:
7070 
7171| Comment says | What it means | What to do |
7272| :- | :- | :- |

ship-command-troubleshooting Changed · +5 / -3 lines

from line 4
44 
55[`/ship`](https://code.claude.com/docs/en/ship-command) is a Claude Code command that opens a GitHub pull request for your change and has Claude review it. Claude then keeps working on the pull request from your session. This ongoing work is called a watch. `/steward` starts a watch on a pull request that's already open.
66 
7Find what happened in the first column, or search for words from the message that Claude Code printed:
7To find a message that Claude Code printed, search this page for its words.
88 
9The following table lists problems with `/ship` and `/steward` and the section that covers each:
10 
911| What happened | Go to |
1012| :- | :- |
1113| `/ship` isn't in the `/` menu, or Claude Code doesn't recognize it | [/ship isn't available in your session](#%2Fship-isn’t-available-in-your-session) |
from line 41
3941 
4042### /ship or /steward printed a message and didn't start
4143 
42Find the opening words of the message:
44This table lists messages that `/ship` or `/steward` prints without starting, by their opening words, and what to do:
4345 
4446| Message | What to do |
4547| :- | :- |
from line 168
166168 
167169To start the watch again, type the command that the line gives, if it gives one. To check whether a watch is still running, type [`/tasks`](https://code.claude.com/docs/en/ship-command#check-whether-a-watch-is-running) at the Claude Code prompt while Claude is idle.
168170 
169Find the words that follow "because" in that line:
171Each reason in this table can follow "because" in the `Stopped watching` line:
170172 
171173| Reason | What happened |
172174| :- | :- |

tools-reference Changed · +3 / -3 lines

from line 112
112112 
113113* **Neither field set**: the subagent inherits every [tool available to subagents](https://code.claude.com/docs/en/sub-agents.md#available-tools).
114114* **`tools` only**: the subagent gets the listed tools. With [`memory`](https://code.claude.com/docs/en/sub-agents#enable-persistent-memory) enabled, it also gets Read, Write, and Edit.
115* **`disallowedTools` only**: the subagent gets every parent tool except the listed ones.
115* **`disallowedTools` only**: the subagent can't use the listed tools.
116116* **Both set**: `disallowedTools` takes precedence. A tool listed in both is removed.
117117 
118118In every case, the resolved set is limited to the [tools available to subagents](https://code.claude.com/docs/en/sub-agents.md#available-tools): a tool that isn't available to subagents is never granted, even when listed in `tools`. Where the conditions in the `SubagentHandback` tools-table entry hold, Claude Code also gives the subagent that tool, even if you leave it out of `tools` or list it in `disallowedTools`.
from line 699
699699 
700700### Fix unexpected WebFetch prompts and denials
701701 
702If a fetch is blocked or denied, or you see a permission prompt you didn't expect or none at all, find what you see in the first column.
702The following table has fixes for a fetch that's blocked or denied, and for a permission prompt you didn't expect or didn't get.
703703 
704704| Symptom | Fix |
705705| :- | :- |
from line 713
713713 
714714### Fix a failed WebFetch request
715715 
716If Claude says it couldn't fetch a page, find what happened in the first column.
716These fixes cover cases where Claude says it couldn't fetch a page.
717717 
718718| Symptom | Fix |
719719| :- | :- |

vs-code Changed · +6 / -2 lines

from line 976
976976 
977977## Fix common issues
978978 
979Sign-in, network, and launch errors have their own entries on the install troubleshooting and error reference pages. Find what you see in the table, then follow the link.
979Sign-in, network, and launch errors have their own entries on the install troubleshooting and error reference pages.
980980 
981The following table links messages and symptoms to their entries:
982 
981983| What you see | Where to go |
982984| - | - |
983985| `API Error: 403 Request not allowed` after you sign in | [403 Forbidden after login](https://code.claude.com/docs/en/troubleshoot-install.md#403-forbidden-after-login) |
from line 1123
11211123}
11221124```
11231125 
1124Save `settings.json`, then start a recording or click **Reconnect** again. If the error comes back, open the output channel with **Claude Code: Show Logs** and search it for `use the CA certificates file`. Such a warning gives the reason the extension can't use your file and says where it read the path. Then find each place you set `NODE_EXTRA_CA_CERTS` in this table and do what its row says:
1126Save `settings.json`, then start a recording or click **Reconnect** again. If the error comes back, open the output channel with **Claude Code: Show Logs** and search it for `use the CA certificates file`. Such a warning gives the reason the extension can't use your file and says where it read the path.
1127 
1128This table shows what to do for the places where you set `NODE_EXTRA_CA_CERTS`:
11251129 
11261130| Where you set it | What to do |
11271131| - | - |

admin-setup Changed · +3 / -1 lines

from line 179
179179 
180180## Set up usage visibility
181181 
182Choose monitoring based on what you need to report on. The dashboards, APIs, and spend controls differ between Claude for Teams or Enterprise plans and Claude Console organizations, so check the Availability column before you plan your reporting around a capability.
182Choose monitoring based on what you need to report on. The dashboards, APIs, and spend controls differ between Claude for Teams or Enterprise plans and Claude Console organizations.
183 
184The following table shows what each monitoring capability gives you and where it's available:
183185 
184186| Capability | What you get | Availability | Where to start |
185187| :- | :- | :- | :- |

agent-sdk/mcp Changed · +3 / -1 lines

from line 70
7070 
7171### Add a server in code
7272 
73Pass MCP servers directly in the `mcpServers` option. This example starts a local filesystem MCP server for `/Users/me/projects`. Replace that path with a directory on your machine:
73Pass MCP servers directly in the `mcpServers` option. The example below starts a local filesystem MCP server. The path in `args` has to exist for the server to start.
74 
75Replace `/Users/me/projects` with your session's [working directory](https://code.claude.com/docs/en/agent-sdk/configuration.md#set-the-working-directory):
7476 
7577```typescript TypeScript theme={null}
7678import { query } from "@anthropic-ai/claude-agent-sdk";

agent-sdk/observability Changed · +1 / -1 lines

from line 235
235235| Variable | Adds |
236236| - | - |
237237| `OTEL_LOG_USER_PROMPTS=1` | Prompt text on `claude_code.user_prompt` events and on the `claude_code.interaction` span |
238| `OTEL_LOG_TOOL_DETAILS=1` | Tool input arguments such as file paths, shell commands, and search patterns on `claude_code.tool_result` events, and real agent, skill, plugin, and MCP server names on the [cost and token metrics](https://code.claude.com/docs/en/monitoring-usage.md#cost-counter). The built-in rule the auto mode classifier named when it blocked a call, as [`classifier_category`](https://code.claude.com/docs/en/monitoring-usage#tool-decision-event) on `claude_code.tool_decision` events |
238| `OTEL_LOG_TOOL_DETAILS=1` | Tool input arguments such as file paths, shell commands, and search patterns on `claude_code.tool_result` events, and real agent, skill, plugin, and MCP server names on the [cost and token metrics](https://code.claude.com/docs/en/monitoring-usage.md#cost-counter). The policy or built-in rule the auto mode classifier named when it blocked a call, as [`classifier_category`](https://code.claude.com/docs/en/monitoring-usage#tool-decision-event) on `claude_code.tool_decision` events |
239239| `OTEL_LOG_TOOL_CONTENT=1` | A [`tool.output` span event](https://code.claude.com/docs/en/monitoring-usage#tool-output-span-event) on `claude_code.tool` with file contents, Bash output, and what MCP tools, WebFetch, and WebSearch return, truncated at 60 KB by default, configurable via `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`, which requires Claude Code v2.1.214 or later. Results from MCP tools, WebFetch, and WebSearch require Claude Code v2.1.283 or later. Requires [tracing](#read-agent-traces) to be enabled. Span attributes carry tool content under [their own gates](https://code.claude.com/docs/en/monitoring-usage.md#new-context-gates) |
240240| `OTEL_LOG_RAW_API_BODIES` | Full Anthropic Messages API request and response JSON as `claude_code.api_request_body` and `claude_code.api_response_body` log events. Set to `1` for inline bodies truncated at [60 KB by default](https://code.claude.com/docs/en/monitoring-usage.md#common-configuration-variables), or `file:<dir>` for untruncated bodies on disk with a `body_ref` path in the event. Bodies can include the entire conversation history, with extended-thinking content redacted. Enabling this implies consent to everything the three variables above would reveal |
241241 

agent-sdk/session-storage Changed · +1 / -1 lines

from line 270
270270 
271271If you set `CLAUDE_CONFIG_DIR` to a temp directory and sign in with a [claude.ai login](https://code.claude.com/docs/en/authentication.md#credential-management) or an [`apiKeyHelper`](https://code.claude.com/docs/en/settings-reference#apikeyhelper) in your user `settings.json`, the run fails with `Not logged in`. To authenticate the run, set a long-lived token, set an API key, or copy your config files:
272272 
273* **Long-lived token**: if you run the agent yourself under your own Claude subscription, set `CLAUDE_CODE_OAUTH_TOKEN` in `env` to a token from [`claude setup-token`](https://code.claude.com/docs/en/authentication#generate-a-long-lived-token). You can only make model requests with that token, so your [claude.ai connectors](https://code.claude.com/docs/en/mcp.md#use-mcp-servers-from-claude-ai) aren't available in that run.
273* **Long-lived token**: if you run the agent yourself under your own Claude subscription, set `CLAUDE_CODE_OAUTH_TOKEN` in `env` to a token from [`claude setup-token`](https://code.claude.com/docs/en/authentication#generate-a-long-lived-token).
274274* **API key**: set `ANTHROPIC_API_KEY` in `env`.
275275* **Config files**: if you sign in through files in your usual config directory, such as OAuth credentials or an `apiKeyHelper` in your user `settings.json`, copy them into the temp directory.
276276 

approvals-github-rules Changed · +1 / -1 lines

from line 59
5959 
6060## Required reviews and CODEOWNERS
6161 
62Check how each GitHub setting works beside your policy, and what to set:
62The following table shows how GitHub's review settings work with your Approvals policy, and what to set:
6363 
6464| GitHub setting | How it works with Approvals | What to do |
6565| :- | :- | :- |

approvals-setup Changed · +1 / -1 lines

from line 181
181181 
182182### Ways to turn off Approvals
183183 
184To turn off Approvals, find the scope that you want in this table:
184The following table shows how to turn off Approvals for a repository or an organization:
185185 
186186| Scope | How to turn off Approvals |
187187| :- | :- |

auto-mode-config Changed · +2 / -2 lines

from line 128
128128* **Protected IaC scopes**: the infrastructure resources whose apply or destroy should always require you to name the change
129129* **Additional context**: regulated-industry constraints, multi-tenant infrastructure, or compliance requirements that affect what the classifier should treat as risky
130130 
131A useful starting template: fill in the bracketed fields and remove any lines that don't apply.
131To use the following template, fill in the placeholders and remove any lines that don't apply.
132132 
133133```json theme={null}
134134{
from line 147
147147}
148148```
149149 
150A reasonable rollout: start with the defaults and add your source control org and key internal services, which resolves the most common false positives like pushing to your own repos. Add trusted domains and cloud buckets next. Fill the rest as blocks come up.
150Start with the defaults and add your source control org and key internal services. Add trusted domains and cloud buckets next. Fill the rest as blocks come up.
151151 
152152## Generate environment entries with `/auto-mode-setup`
153153 

best-practices Changed · +2 / -2 lines

from line 425
425425>
426426> The `autoMode` block also has to live in `~/.claude/settings.json` rather than the project, because the classifier ignores `autoMode` in project settings.
427427 
428If you'd rather see every edit and command before it happens, `Shift+Tab` in the session cycles through the permission modes, Manual included, or start with `claude --permission-mode manual` from your shell. And if Manual then asks too often, `/fewer-permission-prompts` scans your recent transcripts for common read-only Bash and MCP calls and adds them to an allowlist in `.claude/settings.json`.
428If you'd rather see an edit or command before it happens, `Shift+Tab` in the session cycles through the permission modes, Manual included, or start with `claude --permission-mode manual` from your shell. If Manual then asks too often, `/fewer-permission-prompts` scans your recent transcripts for common read-only Bash and MCP calls and adds them to an allowlist in `.claude/settings.json`.
429429 
430430### Change the model and effort
431431 
from line 539
539539 
540540In a script you'll almost always want a few more flags:
541541 
542* [`--bare`](https://code.claude.com/docs/en/headless#start-faster-with-bare-mode) skips your hooks, skills, plugins, MCP servers, and `CLAUDE.md` files from the repo and your home directory. It also doesn't use your claude.ai login: auth comes from `ANTHROPIC_API_KEY`, an `apiKeyHelper` in the file you pass with `--settings`, or your cloud provider's credentials.
542* [`--bare`](https://code.claude.com/docs/en/headless#start-faster-with-bare-mode) skips your hooks, skills, MCP servers, and `CLAUDE.md` files from the repo and your home directory. Set `ANTHROPIC_API_KEY`, pass an [`apiKeyHelper`](https://code.claude.com/docs/en/settings-reference#apikeyhelper) in the `--settings` file, or use your cloud provider's credentials, because bare mode doesn't use your claude.ai login.
543543* `--append-system-prompt`, `--mcp-config`, and `--settings` explicitly pass in what the run *does* need. Hooks you pass with `--settings` [don't run under `--bare`](https://code.claude.com/docs/en/headless#start-faster-with-bare-mode), so don't use `--bare` for a run that needs them.
544544* `--allowedTools` pre-approves its tools, and [`--permission-mode dontAsk`](https://code.claude.com/docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode) refuses anything else that would have prompted.
545545* `--output-format json` gives you a single result object to parse, and `stream-json` with `--verbose` streams events as they happen.
Feedback