---
id: "action-provide-bash"
type: "action-item"
source_timestamps: ["§ Bash + Code as a General Purpose Tool"]
tags: ["tool-use", "autonomy"]
related: ["concept-bash-general-tool", "prereq-react-loop"]
action: "Ship harnesses with a bash tool to allow models to autonomously write and execute code."
outcome: "Reduces the need for exhaustive pre-built tools and increases agent autonomy."
speakers: ["Vivek Trivedy"]
---
# Provide Bash/Code Execution

## Action

**Ship harnesses with a bash tool to allow models to autonomously write and execute code.**

## How

Instead of building a massive library of pre-configured tools for every edge case, give agents a general-purpose bash tool and code execution environment. This lets the model:

- Write scripts on the fly to solve problems autonomously.
- Inspect the environment (`ls`, `cat`, `grep`) without dedicated tools.
- Compose existing UNIX utilities in arbitrary combinations.

This is the operational expression of [[concept-bash-general-tool]] and the natural evolution of the [[prereq-react-loop|ReAct loop]] toward general-purpose action spaces.

## Expected Outcome

Reduces the need for exhaustive pre-built tools and dramatically increases agent autonomy on novel tasks.

## Caveat

Sandbox the bash environment. Add audit logging. In high-risk deployments, weigh the autonomy gains against the governance costs of arbitrary shell access.
