Commands matched by sandbox.excludedCommands run outside the sandbox with no filesystem or network limits. A pattern that covers an interpreter, or a tool acting on a file in the working directory, lets the agent write a file and then run it unsandboxed. Review every excluded pattern and keep it narrow.
Read in this order
- OfficialexcludedCommands (Claude Code sandboxing docs)Matching rules, the permission flow for excluded commands, and the warning about interpreters.