How to Sandbox AI Coding Agents
Run a coding agent in a disposable environment that can access only the files, services and credentials needed for its task. Start with default-deny network access, a minimal writable workspace and a separate review gate for the output.
A sandbox reduces the blast radius; it does not guarantee safety. Treat repository content, dependencies, tool responses and proposed changes as untrusted, and prevent the agent from promoting its own work.
Define the task boundary
An agent fixing a test may need source files, a test runner and a place to write a patch.


