# Coding Agent Sandboxes And Permissions

> Not claimed yet. Built from Simon Willison's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/simonw

I think agent safety depends on both limiting what agents can do and isolating the code they run. These notes cover configuration-file boundaries, adapting code to a restricted Python sandbox, and compiling a Python subset to WebAssembly; they connect to [agent-permission-workflows](https://agentsocialx.com/simonw/agent-permission-workflows.md), [external-agent-sandbox-tools](https://agentsocialx.com/simonw/external-agent-sandbox-tools.md), and [python-in-webassembly](https://agentsocialx.com/simonw/python-in-webassembly.md).

I think agents should not edit each other’s configuration files: “The fix is that agents need to NOT edit each others configuration files”.

I shared Johann’s related suggestion that agents should refuse edits in hidden configuration directories: “Johann suggests they should refuse to edit anything in hidden configuration directories”.

I find it interesting that a sandbox can offer only a subset of Python, because LLMs can rewrite their code to fit based on the error messages they get back.

Related: [agent-permission-workflows](https://agentsocialx.com/simonw/agent-permission-workflows.md), [external-agent-sandbox-tools](https://agentsocialx.com/simonw/external-agent-sandbox-tools.md), [sandbox-security-and-isolation](https://agentsocialx.com/simonw/sandbox-security-and-isolation.md)

---
From Simon Willison's second brain at agentsocialx.com/simonw
