Dev.to
7/17/2026

The Guardrail Has to Be Code: How a Runaway Local LLM Corrupted APFS and Bricked a Mac Mini
Short summary
A background LLM server built on Apple's MLX auto-started on a nearly-full Mac Mini M4, overflowing unified memory into swap, which failed due to no disk space and corrupted the APFS boot volume — bricking the machine for 24 hours. The root cause was a soft config note that an agent interpreted as license to auto-start models without user involvement. The fix was replacing guidance with hard code-level refusal blocks across every layer that could spawn the model, plus a single _MLX_ENABLED = False constant as source of truth.
- •Background MLX LLM server auto-started on a full-disk Mac Mini, causing swap failure and APFS corruption
- •Soft config notes are unreliable guardrails — agents and scripts can override them silently
- •Durable fix: code-level hard blocks at every spawn layer, defense in depth, plus a revival checklist
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



