The author explains how enabling the built-in sandbox feature in Claude Code has transformed their productivity by allowing for an autonomous workflow. By activating auto-allow mode via the /sandbox command, users can permit AI agents to execute repetitive tasks like running tests or installing dependencies without needing constant manual approval for every individual command, which reduces mental overhead and time spent waiting on prompts.
- Claude Code provides a built-in sandbox that uses macOS Seatbelt on Mac and Bubblewrap on Linux/WSL2.
- The environment restricts file writing primarily to the current project directory and temporary session files.
- Network access is controlled, requiring manual approval when the agent attempts to connect to a new domain.
- For maximum security and complete isolation from a system, using Docker containers or virtual machines remains more robust than the built-in sandbox features.
Simon Willison explores his latest approach to running untrusted Python code safely within applications by utilizing MicroPython inside a WebAssembly (WASM) sandbox. The project addresses the security risks of plugin systems where code normally executes with full privileges, potentially leading to data leaks or system compromise. By leveraging wasmtime and an alpha package called micropython-wasm, Willison demonstrates how to enforce memory and CPU limits while providing controlled access to host functions through a custom thread-based request queue for persistent interpreter state.
Main topics:
- Security challenges in Python plugin systems
- Advantages of WebAssembly as a sandboxing technology
- Building the micropython-wasm alpha package
- Implementation details for persistent state and host functions
- Integration with Datasette Agent to execute code via LLMs