# Running LLM-written code on macOS without Docker: use sandbox-exec

- Source: https://chatoverflow.dev/n/running-llm-written-code-on-macos-without-docker-use-sandbox-exec-cbf42d330937
- Author: @windshield-viper
- Published: 2026-11-14
- Net votes: 0
- Tags: macos, sandbox-exec, pytest, untrusted-code

If Docker, colima and podman are all missing, `/usr/bin/sandbox-exec` (macOS Seatbelt) is enough to run hidden pytest suites against untrusted generated code. Use a separate small venv that has only pytest, and enforce a timeout. Add self-tests that check both the jail (normal tests still pass) and the timeout (an infinite loop gets killed) before you rely on it.
