Follow Discord
Sweep 24 Nov 2026 · 22:58Z Build v2.1.332 549 read Stable v2.1.325 Latest v2.1.331 Next v2.1.332 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Tools reference changedtools-reference

Nearest release: v2.1.332, published 2 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 25 Nov 2026 00:35 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 25 Nov 2026 00:37 UTC.

Upstream edited
Recorded here
Lines+49added
Lines−23removed
From line 44 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits104to this page, all time

### Working directory and variables in PowerShell commands ### Fix unexpected WebFetch prompts and denials ### Fix a failed WebFetch request ### Fix missing or outdated page content ### Find out why WebFetch is unavailable ### When a fetch prompts, fails, or WebFetch is missing

The whole hunk

from line 44, old and new numbered
/
lines
from line 44
4444| `Read` | Reads the contents of files. See [Read tool behavior](#read-tool-behavior) | No |
4545| `ReadMcpResourceTool` | Reads a specific MCP resource by URI | No |
4646| `RemoteTrigger` | Creates, updates, runs, and lists [cloud scheduled tasks](https://code.claude.com/docs/en/routines.md), formerly routines, on claude.ai. Backs the `/schedule` command. The [`RemoteTrigger` input reference](https://code.claude.com/docs/en/agent-sdk/typescript#remotetrigger) documents every action and the organization policies that remove the tool. Cloud scheduled tasks live on claude.ai and require a Pro, Max, Ultra, Team, or Enterprise plan. This tool is therefore not accessible from Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry | No |
47| `REPL` | Runs the JavaScript that Claude writes in [Code Mode](https://code.claude.com/docs/en/code-mode.md). Available only when Code Mode is on. For how Claude Code checks the tool calls in that code, see [Permission checks](https://code.claude.com/docs/en/code-mode.md#permission-checks) | No |
4748| `ReportFindings` | Reports code-review findings as a structured list, with a file, summary, and failure scenario per finding, so Claude Code can render them instead of printing them as text. Claude calls it when active code-review instructions tell it to. A finding can also carry an optional `category` slug, such as `correctness` or `test-coverage`, shown next to the file location in the rendered list | No |
4849| `ScheduleWakeup` | Reschedules the next iteration of a [self-paced `/loop`](https://code.claude.com/docs/en/scheduled-tasks#let-claude-choose-the-interval). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don't call it directly. To end the loop instead, Claude calls it with `stop: true`, which cancels the pending wakeup. The pending wakeup appears in `session_crons` in [Stop hook input](https://code.claude.com/docs/en/hooks.md#stop-input) | No |
4950| `SearchPlugins` | Searches your claude.ai plugin catalog. Available in the same sessions as `ListPlugins` | No |
from line 147
146147 
147148### What persists between commands
148149 
149* When Claude runs `cd` in the main session, the new working directory carries over to later Bash commands as long as it stays inside the project directory or an [additional working directory](https://code.claude.com/docs/en/permissions.md#working-directories) you added with `--add-dir`, `/add-dir`, or `additionalDirectories` in settings. This includes commands Claude runs in response to your later messages.
150* In the main session, Claude's `cd` carries over to later Bash commands only from a foreground command that exits 0. The command must also end inside the project directory or an [additional working directory](https://code.claude.com/docs/en/permissions.md#working-directories), such as one you added with `--add-dir`, `/add-dir`, or `additionalDirectories` in settings.
151 * By default, if that command ends outside those directories, Claude Code resets to the project directory and appends `Shell cwd was reset to <dir>` to the tool result.
152 * To disable this carry-over, set `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1`.
150153 * Subagent sessions never carry over working directory changes.
151 * If `cd` lands outside those directories, Claude Code resets to the project directory and appends `Shell cwd was reset to <dir>` to the tool result.
152 * To disable this carry-over so every Bash command starts in the project directory, set `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1`.
153154* Environment variables don't persist. An `export` in one command won't be available in the next.
154155* Claude Code starts a non-interactive shell, sources `~/.zshrc` for Zsh or `~/.bashrc` for Bash, and applies the aliases, functions, and shell options it captures to Bash commands.
155156 
from line 508
507508* `"shell": "powershell"` on individual [command hooks](https://code.claude.com/docs/en/hooks.md#command-hook-fields): runs that hook in PowerShell. Hooks spawn PowerShell directly, so this works regardless of `CLAUDE_CODE_USE_POWERSHELL_TOOL`.
508509* `shell: powershell` in [skill frontmatter](https://code.claude.com/docs/en/skills.md#frontmatter-reference): runs `` !`command` `` blocks in PowerShell. Requires the PowerShell tool to be enabled.
509510 
510PowerShell commands follow the [same main-session working-directory reset behavior](#what-persists-between-commands) as Bash commands, including the `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR` environment variable.
511### Working directory and variables in PowerShell commands
511512 
512PowerShell commands also receive the variables hooks persist through `CLAUDE_ENV_FILE`, under the conditions in [Persisted variables in PowerShell commands](https://code.claude.com/docs/en/hooks.md#persisted-variables-in-powershell-commands). Requires Claude Code v2.1.296 or later.
513By default, when a foreground PowerShell command in the main session ends outside your [working directories](https://code.claude.com/docs/en/permissions.md#working-directories), Claude Code resets to the project directory. To reset after each command, set `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1`.
513514 
515PowerShell commands receive the variables hooks persist through `CLAUDE_ENV_FILE`, under the conditions in [Persisted variables in PowerShell commands](https://code.claude.com/docs/en/hooks.md#persisted-variables-in-powershell-commands). Requires Claude Code v2.1.296 or later.
516 
514517### Exit code 1 from searches and `git diff` in PowerShell
515518 
516519If a `grep` or `rg` search that matches nothing shows `Error: Exit code 1` when Claude runs it in the PowerShell tool, the search didn't fail. You don't need to do anything. The error can appear when the search is part of a longer command. For example, when `rg` exits with code 1, `rg foo | Out-Null` shows the error and `rg foo` doesn't.
from line 683
680683 
681684### Block a site or turn WebFetch off
682685 
683| To | Do this |
686| Goal | What to do |
684687| :- | :- |
685688| Block a domain | Add a `WebFetch(domain:...)` rule for it to `deny` |
686689| Require a prompt for a domain | Add a `WebFetch(domain:...)` rule for it to `ask` |
687690| Turn WebFetch off | Add `WebFetch` to `deny`, or set [`CLAUDE_CODE_DISABLE_WEB_FETCH`](https://code.claude.com/docs/en/env-vars#variables) to `1` |
688| Do any of these for your organization | Put the rule in [managed settings](https://code.claude.com/docs/en/managed-settings.md) |
689691 
690692Outside the sandbox, if Bash is allowed, Claude can still use `curl`, `wget`, or other tools to reach any URL. See [Tool-specific permission rules](https://code.claude.com/docs/en/permissions.md#tool-specific-permission-rules).
691693 
692### When a fetch prompts, fails, or WebFetch is missing
694To apply a `WebFetch` rule to your organization, put it in [managed settings](https://code.claude.com/docs/en/managed-settings.md).
693695 
694Claude's reply can leave out anything on the page that Claude didn't ask about. In the terminal, press `Ctrl+O` to see what Claude asked and the answer it received.
696### Fix unexpected WebFetch prompts and denials
695697 
696| What you notice | What to do |
698If 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.
699 
700| Symptom | Fix |
697701| :- | :- |
698| Claude says a page doesn't cover something you know is there | Ask Claude to fetch the page again and tell it what to look for. For the raw page, ask it to run `curl` on the URL through the Bash tool. |
699| Claude leaves out the end of a long page, or says part of it wasn't read | Ask Claude to fetch the next part of the page. This requires Claude Code v2.1.290 or later. The [`web-fetch` subagent](#web-fetch-subagent) reads pages of up to about 48,000 characters in full, and WebFetch reads the first 100,000 when Claude calls it. |
700| Claude describes a page as it was before a recent change | WebFetch reuses its copy of a page for 15 minutes. To change how long, set [`CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS`](https://code.claude.com/docs/en/env-vars#variables). |
701| Claude says the download ran out of time | A download fails after five minutes. To change the limit, set [`CLAUDE_CODE_WEBFETCH_DEADLINE_MS`](https://code.claude.com/docs/en/env-vars#variables). |
702| Claude reports a redirect and stops there | Ask Claude to fetch the new URL. When a redirect changes the host by more than adding or dropping `www.`, WebFetch returns the new URL and no page content. |
703| Claude can't fetch a local or intranet server | WebFetch [refuses `localhost`](https://code.claude.com/docs/en/errors#webfetch-cannot-fetch-localhost) and any other hostname without a dot. Ask Claude to reach the server with `curl` through the Bash tool. |
704| In a cloud session, Claude says the network blocks the domain | An allow rule isn't enough there. Also [add the domain](https://code.claude.com/docs/en/cloud-environments.md#allow-specific-domains) to the cloud environment's network access. |
702| A fetch fails for a domain you allowed | The URL also has to pass the [WebFetch domain safety check](https://code.claude.com/docs/en/data-usage.md#webfetch-domain-safety-check), unless you turn the check off with [`skipWebFetchPreflight`](https://code.claude.com/docs/en/settings-reference#skipwebfetchpreflight). See [WebFetch domain safety check failed](https://code.claude.com/docs/en/errors.md#webfetch-domain-safety-check-failed). |
705703| In auto mode, a fetch is blocked and you see no prompt | Add an allow rule for the domain. If the classifier blocked the fetch, you can also open `/permissions` in the terminal and [approve the fetch](https://code.claude.com/docs/en/auto-mode-config.md#review-denials) under the **Recently blocked** tab so Claude can retry. |
706704| In `claude -p` or the Agent SDK, a fetch is denied | These runs [start in Manual mode](https://code.claude.com/docs/en/permission-modes.md#which-mode-a-non-interactive-run-starts-in), and a call that needs approval is denied. Add an allow rule or start in auto mode. |
707| A fetch fails for a domain you allowed | The URL also has to pass the [WebFetch domain safety check](https://code.claude.com/docs/en/data-usage.md#webfetch-domain-safety-check), unless you turn the check off with [`skipWebFetchPreflight`](https://code.claude.com/docs/en/settings-reference#skipwebfetchpreflight). See [WebFetch domain safety check failed](https://code.claude.com/docs/en/errors.md#webfetch-domain-safety-check-failed). |
708705| A rule in your own settings file has no effect | If your organization sets [`allowManagedPermissionRulesOnly`](https://code.claude.com/docs/en/settings-reference#allowmanagedpermissionrulesonly), Claude Code ignores the rule. Ask your administrator to add it to managed settings. |
709706| Prompts continue after you add the domain to the sandbox's [`allowedDomains`](https://code.claude.com/docs/en/settings-reference#sandbox-network-alloweddomains) | WebFetch doesn't read that list, so add a WebFetch allow rule |
710707| No prompt for a domain you didn't allow | Claude Code skips the prompt for a built-in set of preapproved documentation domains, and in `auto` and `bypassPermissions` modes. To require the prompt anyway, add an `ask` rule for the domain. Sandboxed Bash commands don't inherit the preapproved set. |
711708| A claude.ai artifact link brings another prompt | See [Read an artifact shared with you](https://code.claude.com/docs/en/artifacts.md#read-an-artifact-shared-with-you) |
712| Claude can't fetch any page | Run `/status` in the session. If the `Organization configuration` line lists `HIPAA`, WebFetch is off: see [What developers see in Claude Code](https://code.claude.com/docs/en/hipaa-setup.md#what-developers-see-in-claude-code). If the `Organization policy` line reports that the policy didn't load and names web fetch, follow any fix the line names. WebFetch becomes available again without a restart once a policy that allows it loads. |
713709 
710### Fix a failed WebFetch request
711 
712If Claude says it couldn't fetch a page, find what happened in the first column.
713 
714| Symptom | Fix |
715| :- | :- |
716| In a cloud session, Claude says the network blocks the domain | An allow rule isn't enough there. Also [add the domain](https://code.claude.com/docs/en/cloud-environments.md#allow-specific-domains) to the cloud environment's network access. |
717| Claude can't fetch a local or intranet server | WebFetch [refuses `localhost`](https://code.claude.com/docs/en/errors#webfetch-cannot-fetch-localhost) and any other hostname without a dot. Ask Claude to reach the server with `curl` through the Bash tool. |
718| Claude reports a redirect and stops there | Ask Claude to fetch the new URL. When a redirect changes the host by more than adding or dropping `www.`, WebFetch returns the new URL and no page content. |
719| Claude says the download ran out of time | A download fails after five minutes. To change the limit, set [`CLAUDE_CODE_WEBFETCH_DEADLINE_MS`](https://code.claude.com/docs/en/env-vars#variables). |
720 
721### Fix missing or outdated page content
722 
723Claude's reply can leave out anything on the page that Claude didn't ask about. In the terminal, press `Ctrl+O` to see what Claude asked and the answer it received.
724 
725| Symptom | Fix |
726| :- | :- |
727| Claude says a page doesn't cover something you know is there | Ask Claude to fetch the page again and tell it what to look for. For the raw page, ask it to run `curl` on the URL through the Bash tool. |
728| Claude leaves out the end of a long page, or says part of it wasn't read | Ask Claude to fetch the next part of the page. This requires Claude Code v2.1.290 or later. The [`web-fetch` subagent](#web-fetch-subagent) reads pages of up to about 48,000 characters in full, and WebFetch reads the first 100,000 when Claude calls it. |
729| Claude describes a page as it was before a recent change | WebFetch reuses its copy of a page for 15 minutes. To change how long, set [`CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS`](https://code.claude.com/docs/en/env-vars#variables). |
730 
731### Find out why WebFetch is unavailable
732 
733If Claude can't fetch any page, run `/status` in the session and check the `Organization configuration` and `Organization policy` lines:
734 
735* **`Organization configuration` lists `HIPAA`**: WebFetch is off. See [What developers see in Claude Code](https://code.claude.com/docs/en/hipaa-setup.md#what-developers-see-in-claude-code).
736* **`Organization policy` reports that the policy didn't load and names web fetch**: follow any fix the line names. WebFetch becomes available again without a restart once a policy that allows it loads.
737 
738If `/status` shows neither, look for `WebFetch` under `deny` in a [settings file](https://code.claude.com/docs/en/settings.md#find-or-create-your-settings-files), or for `CLAUDE_CODE_DISABLE_WEB_FETCH` set to `1`. To turn WebFetch back on, remove the rule, or unset the variable and start a new session. Ask your administrator to remove a rule that's in [managed settings](https://code.claude.com/docs/en/settings.md#check-what-your-organization-enforces).
739 
714740### The web-fetch subagent
715741 
716742`web-fetch` is the [subagent](https://code.claude.com/docs/en/sub-agents.md#built-in-subagents) built into Claude Code that reads web pages for Claude. When Claude needs a page, it calls the [Agent tool](#agent-tool-behavior) to pass `web-fetch` the URL and a question about the page. The subagent calls WebFetch, reads the page, and sends Claude the answer.
from line 762
736762 
737763Your `WebFetch` [permission rules](https://code.claude.com/docs/en/permissions.md#webfetch) apply to the pages the `web-fetch` subagent fetches, and so do the `PreToolUse` and `PostToolUse` [hooks](https://code.claude.com/docs/en/hooks.md) that match `WebFetch`.
738764 
739| If you rely on | With the subagent | What to do |
765| Your configuration | What changes with the subagent | What to do |
740766| :- | :- | :- |
741767| CLAUDE.md instructions about which pages to fetch | The subagent starts without your CLAUDE.md files, including your organization's managed one | Restrict fetches with `WebFetch` permission rules |
742768| `SubagentStart` or `SubagentStop` hooks | Only the hooks defined in [managed settings](https://code.claude.com/docs/en/managed-settings.md) run for this subagent | In any other settings file, use a `PreToolUse` or `PostToolUse` hook that matches `WebFetch` |
Feedback