Skip to content

BashOutput

Fetch the current state of a background shell started via Bash with run_in_background: true.

ParamTypeRequired
shell_idstringyes
  • Each call returns the FULL captured buffer up to the per-stream cap (1 MiB stdout, 1 MiB stderr). There’s no per-reader offset — agents should grep client-side.
  • Running shells return status: running.
  • Completed shells return status: completed (exit N).
  • Unknown shell_id returns an error result.
command: npm run build
status: completed (exit 0)
started: 2026-04-23T14:30:22+01:00
--- stdout (1234 bytes) ---
webpack compiled successfully
...
--- stderr (0 bytes) ---

When either stream hits its cap, the header includes [TRUNCATED]:

--- stdout (1048576 bytes) [TRUNCATED] ---
  • Shells stay in the registry after they complete. You can BashOutput a finished shell indefinitely (until the container exits).
  • To actively release registry space, call KillShell — even on an already-exited shell, this removes it from the registry.
  • Bash — launching background shells.
  • KillShell — terminating them.