Should a code-reviewer agent ever have Bash access?

by•

I have a subagent specifically set up to review code without touching any files.

The problem is I kept Bash access enabled so it could run local test suites and git diff. But leaving Bash open technically lets the model modify files via CLI commands if it hallucinates which ruins the whole "read-only" constraint.

Do you drop CLI access entirely to keep the sandbox 100% safe or do you keep Bash and rely on system prompts to keep the agent in line?

7 views

Add a comment

Replies

Best

I'd keep Bash and let hooks do the blocking. A line in the prompt is a request, a hook is a wall. We run 78 hooks and 25 deny rules, and that's where the real limits live, not in the system prompt.