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
- DIRECT: retrieval-based next-question suggestions for conversational agents — burkov · 2026-10-16
- Claude Code and Codex now autocomplete the user's next action — tokenbender · 2026-10-16
- Hermes Agent ships official Reverse Engineer Anything plugin with one-command setup — Teknium · 2026-10-16
- MLExpert: 35B MoE Agent Trained to Autonomously Handle Machine Learning Engineering — Shangheng Du · 2026-10-16
- Cowork-Gym: Alibaba Synthesizes 64.9K Agent Work Environments, Boosting Qwen by 8.7 Points — Anni Zou · 2026-10-16
- MMSearch-OPD: Joint RL and On-Policy Distillation for Long-Horizon Multimodal Search Agents — PekingUniversity · 2026-10-16