Bash
Execute a shell command. On Unix/Linux systems Claurst runs commands viabash -c; on Windows it falls back to cmd /C.
Tool name: BashPermission:
Execute — always prompts unless BypassPermissions mode
Parameters
Shell command to execute.
Maximum execution time in milliseconds. The Rust implementation uses seconds with a default of 120 s and a hard cap of 600 s. The TypeScript implementation’s default is 120 000 ms (2 minutes).
Human-readable summary of what the command does, shown in the permission prompt.
When
true, the command is launched as a background task and a task_id is returned immediately instead of waiting for completion. Not available when CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1 is set.Override the sandbox for this single call. Requires the user to have sandbox mode configured; has no effect if sandbox is not enabled.
Return value
Standard output from the command.
Standard error from the command.
true if the command was killed due to timeout or user interruption.Task ID when
run_in_background is true.Human-readable explanation of the exit code when it is non-zero.
true when stdout contains base64-encoded image data.Sandboxing
When enabled, Claurst uses platform-native sandboxing to restrict what commands can do:| Platform | Sandbox technology |
|---|---|
| Linux | bwrap (bubblewrap) |
| macOS | sandbox-exec |
| Windows | No sandbox available |
dangerouslyDisableSandbox: true to bypass sandboxing for a single call when you know the command needs full system access.
Auto-backgrounding
Long-running commands are managed automatically:- After 2 seconds a progress indicator is shown.
- In the TypeScript implementation, commands that run longer than 120 seconds are automatically moved to a background task. In Kairos/assistant mode the threshold is 15 seconds.
Permission behavior
| Mode | Behavior |
|---|---|
Default | Always prompts |
AcceptEdits | Prompts for write/execute commands; auto-approves read-only commands |
BypassPermissions | Auto-approves everything |
Plan | All shell commands are denied |
Example
PowerShell
Execute a Windows PowerShell command. Mirrors theBash interface but targets PowerShell (pwsh on non-Windows platforms, powershell -NoProfile -NonInteractive on Windows).
Tool name: PowerShellPermission:
Execute
Parameters
PowerShell command or script block to execute.
Maximum execution time in milliseconds.
Human-readable description shown in the permission prompt.
Launch as a background task. Not available when
CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1.Override sandbox mode for this call.
Return value
Same fields asBash: stdout, stderr, interrupted, backgroundTaskId, returnCodeInterpretation, isImage.
Notes
Start-Sleepand baresleepcommands are detected and rejected; useSleepToolinstead.- Common PowerShell read operations (
Get-Content,Get-ChildItem,Get-Process, etc.) are classified as read-only and auto-approved inAcceptEditsmode.
Example
WebFetch
Fetch a URL and return its content. HTML responses are converted to Markdown before being returned. Large responses may be summarized. Tool name:WebFetchPermission: Per-hostname rules. Pre-approved hostnames do not trigger a prompt.
Parameters
Fully-qualified URL to fetch (HTTP or HTTPS).
Instruction describing what to extract or summarize from the fetched content. When the response exceeds the size threshold, a Haiku model call applies this prompt to distill the content.
Return value
Final URL after any redirects.
HTTP status code.
HTTP status text (e.g.
"OK", "Not Found").Processed content: Markdown-converted HTML, or a model-generated summary when the content was too large.
Response size in bytes.
Time to fetch and process the response.
Notes
- HTML is stripped of scripts and styles and converted to Markdown. The Rust implementation uses a manual state machine for HTML stripping.
- The Rust implementation uses a 30-second timeout and follows up to 10 redirects.
- The User-Agent sent by the Rust implementation is
Claude-Code/1.0. - Responses larger than 100 000 characters are truncated.
Example
WebSearch
Search the web and return titles, URLs, and snippets. Tool name:WebSearchPermission: Always prompts (permission behavior is
passthrough).
Parameters
Search query. Minimum 2 characters.
Restrict results to these domains (TypeScript implementation only).
Exclude results from these domains (TypeScript implementation only).
Maximum number of results to return (Rust implementation).
Return value
The query that was executed.
Array of search results, or a string message when no results were found.
Time taken to complete the search (TypeScript implementation).
Search backends
| Implementation | Backend |
|---|---|
| TypeScript | Anthropic web_search_20250305 beta tool; available on first-party, Vertex, and Foundry API providers only |
| Rust | Brave Search API if BRAVE_SEARCH_API_KEY is set; falls back to DuckDuckGo Instant Answer API |