Running Local AI Coding Agents: How to Sandbox Against Prompt Injections and Accidents
aj_kt · reddit · 2026-08-13
Running AI agents with direct file system and shell access locally raises significant security concerns. The author notes that without restrictions, agents are just one malicious prompt injection or accident away from leaking or deleting sensitive files.
To isolate risks, the author experimented with sandboxing: using Docker Sandbox on Windows and Claude Code's built-in Seatbelt-based sandbox on Mac. However, they found that sandbox constraints frequently break tool integrations, Git workflows, and package installations, making troubleshooting a nightmare. Eventually, the author resorted to running Claude mostly un-sandboxed for friction reduction, which feels incredibly unsafe for unmonitored workflows.
The author asks the community whether strict physical or system-level isolation is necessary for local agents and how to balance security with development efficiency.
Related event: Docker Sandboxes Reshape Permission Models for AI Coding Agents(3 posts)→
More from coding & agent
- Microsoft exec explains AI governance with a 4-step closet-cleaning method — donasarkar · 2026-11-30
- Catching steps your AI agent silently skipped: declare required actions per task — Ok-Machine7983 · 2026-11-30
- Rollikey: open-core MCP airlock and LIFO rollback proxy for AI agents — Rollikey · 2026-11-30
- MoonBit 1.0 RC Ships with Stable Compiler, Targeting February 2027 Release — harryshum · 2026-11-30
- A wall of 600 recent AI agent projects, ranked purely by code merit — EmuAfter5933 · 2026-11-30
- 6 MCP servers ate 30k tokens before the first prompt: a Claude Code slimming recipe — for-entire-phonly · 2026-11-30