Skip to content

Bashkit Shell

IDbashkit_shell (legacy alias: virtual_bash)
CategoryExecution
RiskHigh — assignment requires an org Admin
Featuresfile_system (unlocks the Workspace tab)
Dependenciessession_file_system

Execute bash commands in a sandboxed environment with no access to the host system. The session filesystem is mounted at /workspace, so commands read and write the same files as the File System tools.

This capability runs on bashkit — an embeddable bash interpreter that executes shell scripts in-process inside a WASM-like sandbox, with no real shell, no subprocess spawning, and no host access. Learn more at bashkit.sh or browse the source on GitHub.

Because the interpreter is sandboxed by construction, bash here is not a shell-out to the host: there is no /bin/bash process, no network stack, and no filesystem beyond the session workspace.

Execute a shell command (or a multi-line script).

ParameterTypeRequiredDescription
commandsstringyesShell command(s) to execute
working_dirstringnoWorking directory (default: /workspace)
timeout_msintegernoTimeout in milliseconds (default: 30000, max: 60000)
outputstringnoOutput verbosity (auto, normal, …; default: auto)

Returns stdout, stderr, exit_code, and a success flag. Output streams live to the UI and CLI via tool.output.delta events while the command runs. On timeout, any partial output captured so far is returned alongside the error.

This tool also supports background execution — long scripts can run detached and report progress without blocking the agent loop.

The interpreter exposes a single mount:

  • /workspace maps to the session file store. Reads and writes are live — files created by bash are immediately visible to the File System tools and vice versa.
  • Paths outside /workspace (for example /etc, /home/agent, /tmp) do not exist and cannot be written.
  • Symlinks are unsupported; chmod is a no-op (the session filesystem does not track Unix permissions, and files are executable by default).

Default environment: HOME=/home/agent, SHELL=/bin/bash, PATH=/usr/local/bin:/usr/bin:/bin, WORKSPACE=/workspace, user and host everruns.

Every invocation runs under fixed limits to prevent runaway scripts:

LimitValue
Max commands per run1,000
Max loop iterations10,000
Max function depth100
Max script size1 MB
Max memory10 MB
Parser timeout5 s
Wall-clock timeouttimeout_ms (default 30 s, max 60 s)
  • Sandboxed — no network access, no host filesystem, no subprocess spawning.
  • High risk — because it exposes arbitrary scripted code execution, assigning bashkit_shell to an agent requires an org Admin. Existing agents that already had it keep working; the gate applies to new assignments only.
  • Built-in observability hooks emit structured tracing events per builtin and on interpreter errors (tagged with the session ID) without logging argument values or command output.
  • Commands operate on the same /workspace as File System tools.
  • Built-in commands support <command> --help, and many also support <command> --version.
  • Common builtins: cd, ls, cat, echo, grep, head, tail, sed, find, plus shell features like pipes, redirections, and command substitution. grep is backed by the session’s indexed search.