Sandboxing AI agents on macOS: a hardware-isolated Alpine VM per project via Apple Virtualization

Conscious-Track5313 · reddit · 2026-09-07

The Elvean developer explains how to bring terminal-style agent execution into a normal UI app. Key choice: instead of shared-kernel containers, they use Apple's containerization Swift package on Virtualization.framework, so each container boots as its own lightweight VM on Apple Silicon—sub-second startup with hardware-level isolation. Every project gets its own Alpine Linux VM with shell, build tools, packages and network. Design calls: the live terminal is fully visible and intervenable (isolation means nothing to hide), and containers intentionally mount a shared workspace and get network access so models can work autonomously. A useful engineering writeup for anyone building local agent sandboxes.

Original post →

More from coding & agent

coding & agent channel →