bash_tool primitive runs arbitrary shell commands inside the chat’s sandbox. Combined with the pre-installed stack, the model can do anything a developer can do.
Languages
| Runtime | Version |
|---|---|
| Python | 3.12.3 (107 packages, incl. pandas/numpy/opencv/playwright) |
| Node.js | 22 (21 packages, incl. TypeScript/pdf-lib/mermaid-cli) |
| Bun | latest |
| Java | OpenJDK 21 |
Behavior
- Streaming output. The tool streams stdout/stderr back to the model with 15-second heartbeats — no silent hangs.
- Truncation-aware. Output caps at 30K chars (first 15K + last 15K), so a runaway grep doesn’t blow the context window.
- Semantic exit codes.
grepreturning1is treated as “no match,” not an error. - Timeout. Commands die after
COMMAND_TIMEOUTseconds (default120). Override per call.
Typical patterns
Data wranglingWhen to prefer a skill
If a task fits a skill (docx, xlsx, pptx, pdf, playwright-cli, …), the skill has curated scripts that are faster, safer, and produce more polished output than hand-rolled bash. The model picks automatically based on the<available_skills> block in its system prompt.
Related
- Skills reference
- Sub-agents — for multi-step, autonomous tasks
