liveBook · Manning

Command tool

As explained in Claude at Work

The command tool is a Cowork capability that executes model-generated shell commands inside the local sandbox.

Cowork’s command tool runs scripts generated by the model in a local sandbox. Approved folders are mounted into the sandbox for the session; command output returns to the model. section 3.2

Review each run before relying on its results:

  • Expand “Ran a command” to inspect the exact script. Commands use Bash or, on Windows, PowerShell. section 3.2
  • Check where the command runs and how it accesses files. Without folder approval, the folder is not mounted. section 3.2

A simple task

Counting files demonstrates command execution; searching and reading local files lets Claude build context for research. section 3.2

Figure 3.3 How Claude generates scripts in the model and then sends them to run in the sandbox
CH03 F03 Stoneman

Shows how the model generates a script and sends it to the sandbox to run. section 3.2

How Claude at Work covers it

How deep it goes
Traces script generation, sandbox execution, command output, and script inspection without detailing sandbox internals.
Examples
Counts files in a folder and searches or reads local files for task research.
What you can do after
Evaluate generated commands by inspecting scripts and understanding where they run and how they access files.
How it connects
Connects Cowork, local sandboxes, approved folders, Bash or PowerShell, and the file write tool.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Claude at Work. The section links point to the parts of the book it draws on.