Give your agent a sandbox
An LLM that writes code is only useful if it can run the code. Handing it your shell is one answer, and a bad one. Here is a small coding agent whose only way to run anything is a throwaway WebAssembly sandbox, and what it looks like when it has to fix a failing test suite from inside it.