Shell, Web, and Background Tasks
These tools run shell commands, fetch web pages, search the web, and manage background tasks.
They reach outside the project, so permission rules and the sandbox matter most for them.
For example, Bash with run_in_background set to true starts a long command and returns at once.
The Yes and No columns are explained on Tools.
You approve or deny each call by rule or by prompt. The switches are CLAUDE_CODE_USE_POWERSHELL_TOOL, CLAUDE_CODE_DISABLE_WEB_FETCH=1, CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1, or a deny rule. PowerShell, the WebFetch switch, and GetTask are gated.
Tools
Source: Tools Reference, Configure Permissions, Create Custom Subagents, and the program.
| Tool | Status | What It Does | How It Works | Available In | Read-Only | Parallel | Deferred |
|---|---|---|---|---|---|---|---|
Bash | Documented | Runs a shell command. | See Bash Parameters. | Main session and subagents. Kept in background subagents. | ❌ | ❌ | ❌ |
Power | Documented Gated | Runs a Windows PowerShell command. | Same parameters as Bash, but command is a PowerShell command and description has a shorter text. | Main session and subagents. Kept in background subagents. | ❌ | ❌ | ❌ |
Monitor | Documented | Streams the output of a background command or a WebSocket as notifications. | See Monitor Parameters. | Main session and subagents. Kept in background subagents. | ❌ | ✅ | ✅ |
Web | Documented Gated | Fetches a URL and applies a prompt to the page text. | url (URL string, required), prompt (string, required), offset (int, 0 or more, optional, character offset for a long page). The off switch needs 2. or later. | Main session and subagents. Kept in background subagents. | ✅ | ✅ | ✅ |
Web | Documented Gated | Searches the web. | query (string, at least 2 characters, required), allowed_ (string array, optional), blocked_ (string array, optional). | Main session and subagents. Kept in background subagents. | ✅ | ✅ | ✅ |
Task | Documented | Stops a running background task. | task_ (string, optional; also takes a teammate or named background agent by ID or name), shell_ (string, optional, deprecated). | Main session and subagents. Kept in background subagents. | ❌ | ✅ | ✅ |
Get | Undocumented Gated | Checks a background shell command by task ID. | task (string, required). | ❓ | ✅ | ✅ | ❌ |
Bash Parameters
| Parameter | What It Does | Required |
|---|---|---|
command | The shell command to run. | ✅ |
timeout | Time limit in milliseconds for a foreground command. | ❌ |
description | A short note on what the command does. | ❌ |
run_ | Starts the command as a background task and returns at once. | ❌ |
dangerously | Runs the command without the sandbox. | ❌ |
allowed_ | Network hosts that this command may reach. Offered only when the sandbox network lists are on. | ❌ |
machine | Name of an attached machine to run the call on. Offered only when machines are attached. | ❌ |
PowerShell takes the same parameters, except that it has no allowed_domains unless the network lists are on.
Source: the program (the Bash input schema).
Monitor Parameters
| Parameter | What It Does | Required |
|---|---|---|
description | Short note on what is watched, shown in notifications. | ✅ |
command | Shell command whose output lines become notifications. | ❌ |
ws | WebSocket target to stream. Give exactly one of command or ws. | ❌ |
timeout_ | Kills the monitor after this time. At least 1000, with a default and a cap. | ❌ |
persistent | Runs until Task or the end of the session, with no timeout. | ❌ |
allowed_ | Network hosts for a command monitor, offered only when the sandbox network lists are on. | ❌ |
Source: the program (the Monitor input schema).
Example
Turn on the PowerShell tool and turn off web fetching for one project.
{
"env": {
"CLAUDE_CODE_USE_POWERSHELL_TOOL": "1",
"CLAUDE_CODE_DISABLE_WEB_FETCH": "1"
}
}
How It Works
- Background subagents keep
Bash,PowerShell,Monitor,TaskStop,WebFetch, andWebSearch. See Create Custom Subagents. CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1also disables auto-backgrounding and theCtrl+Bkey (Environment Variables).- A true value for
CLAUDE_AUTO_BACKGROUND_TASKSgives theAgenttool a 120000 ms auto-background time. Source: the program (the env name). It is not in the saved docs, so it is Undocumented.