Skip to content

Built-in Tool: Shell

Document ID: TRT-102
File Path: docs/07-tool-runtime/shell.md
Version: 1.0.0
Status: Draft
Owner: AI Platform Team
Last Updated: 2026-06-27


The shell.run built-in tool executes a command inside a sandbox — for builds, tests, and scripted tasks — with strict isolation and no network by default.


ToolDescription
shell.runRun a command and capture stdout/stderr/exit code

// input
{ "command": "cargo test", "cwd": "/workspace", "timeout_ms": 60000 }
// output
{ "exit_code": 0, "stdout": "...", "stderr": "", "duration_ms": 5400 }

Output is streamed (streaming) and bounded.


fs:read:/workspace fs:write:/workspace (network: denied unless granted)

shell.run is high-risk: it is granted sparingly and is floored to a stronger sandbox for untrusted contexts (backend selection).


  • Runs as a non-root user with dropped capabilities, no-new-privileges, seccomp filtering (isolation).
  • Default-deny egress; only granted hosts reachable (network isolation).
  • CPU/memory/disk/time limits enforced; breach kills the sandbox.
  • Ephemeral: nothing persists between runs.

shell.run is side-effecting and never cached. For reproducibility, pin commands and inputs; avoid network-dependent commands.


Terminal window
wovyr tools invoke shell.run --input '{"command":"cargo build","cwd":"/workspace"}'

Used by the Code Agent to build and test.



VersionDateDescription
1.0.02026-06-27Initial Shell tool spec