Shell Sandbox
Overview
exec is powerful. Use the smallest command, shortest timeout, and clearest cwd.
Rules of engagement
- Prefer built-in tools (
read_file,grep,edit) over shell equivalents. - Stay inside the workspace when restriction/sandbox is on.
- No
sudo, no curling pipes to shells, no rewriting history. - Quote paths; avoid untrusted interpolation.
- Cap output - pipe through
tail/headwhen listing huge trees. - Destructive commands require
human-approval.
Pattern
intent → exact command → expected success signal → run → interpret