Virtual Bash
| ID | virtual_bash |
| Category | Execution |
| Features | file_system (unlocks Workspace tab) |
| Dependencies | session_file_system |
Execute bash commands in a sandboxed environment with no access to the host system. Powered by bashkit, a WASM-like execution sandbox. The session filesystem is mounted at /workspace.
Execute a shell command.
| Parameter | Type | Required | Description |
|---|---|---|---|
command | string | yes | Shell command to execute |
working_dir | string | no | Working directory (default: /workspace) |
timeout | integer | no | Timeout in seconds |
Returns stdout, stderr, and exit code.
Use Cases
Section titled “Use Cases”- Code execution — run scripts, compile code, execute tests
- Data processing — pipe commands, transform files with standard Unix tools
- Environment setup — install packages, configure environments
- Build automation — run build tools, linters, formatters
Example
Section titled “Example”Agent runs a Python script and inspects the output:
User: Run the test suite
Agent: → bash("cd /workspace && python -m pytest tests/ -v") ← stdout: "tests/test_api.py::test_health PASSED\ntests/test_api.py::test_create PASSED\n2 passed in 0.34s" ← exit_code: 0- Sandboxed — no network access, no host filesystem access
- Commands operate on the same
/workspaceas File System tools - Files written by bash are immediately visible to file system tools and vice versa
- Built-in shell commands:
cd,ls,cat,echo,grep,head,tail, etc. - Resource limits prevent infinite loops
See Also
Section titled “See Also”- File System — file operations on the same workspace
- Capabilities Overview