shell
Run bash commands inside an isolated Linux sandbox instead of the host, with support for foreground or background execution, timeouts, output retrieval, and job control.
Instructions
Run a shell command (bash) inside an isolated Linux sandbox, not on the host machine. The host directory /app is mounted in the sandbox at /workspace; the command starts in /workspace and only files under that directory are shared with the host. The working directory persists between calls, but environment variables and shell state (aliases, functions) do not. Do not rely on cd across parallel calls: each starts in the directory current when it starts, and the last to finish sets it. Default timeout is 120 seconds, maximum 600 seconds (timeout_ms). Use run_in_background for servers and other long-running processes; it returns a job id to use with shell_output, shell_kill and shell_list. Interactive programs (editors, pagers, prompts waiting for input) are not supported. Paths in output under /workspace are shown as host paths under /app. To read or edit files, use your file tools with host paths (/app) rather than shell commands.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The shell command to run | |
| timeout_ms | No | Timeout in milliseconds | |
| description | No | Short description of what the command does | |
| run_in_background | No | Run as a background job and return a job id |