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
Shows how the model generates a script and sends it to the sandbox to run. section 3.2
