As I’ve starting using claude code on my laptops (windows and mac) - one thing thats made me very nervous is running these agents on my local machines with access to my file system + shell. I’m well aware that running an agent within a directory does not limit its access, and I get nervous that they could be one malicious prompt away from sending my apps/files to another party (or an accident away from deleting my apps/files). I’m not sure if these are actually significant risks, and if others feel the same way (are there other risks you might also be concerned about when running agents on your machine?) I tried different approaches to sandboxing my agents on my local machine On my windows machine > Running it in a Docker Sandbox (a new Docker feature that came out this year) On my Mac > Claude Code’s built-in sandbox (which uses Apples native Seatbelt framework) The general challenge I had here is that Claude would sometimes have issues with tools/integrations and it would not be easy to troubleshoot if it was from a sandbox constraint. And if it was a sandbox constraint - the right solution was not always obvious and it felt like I’d go down a rabbit hole trying to get an integration/tool working. I recall having issues with gh/git workflows, some plugin/package installs and running some tools (e.g. for doc/pdf generation) For the Docker sbx example - I forget the specifics, but after a sbx update + PC restart my claude sessions had issues (cant recall if it was config or memories. I do remember having issues trying to background or view agents across diff sessions). I eventually caved and just resorted to going back to running claude mostly un-sandboxed. This made it easier to get going, but that still makes me incredibly nervous running more unmonitored workflows with more integrations and network access. I want to try another shot at this, but I’m curious how others are approaching this: Do you also feel the same risks with running agents un-isolated on your machine? Are you taking any steps to sandbox/isolate them? What is your setup and how are you getting past any friction this creates? Approaches I’m still considering: Use a separate machine to create proper physical separation from my personal apps/files (either dedicate one of my laptops, get a mini PC/Mac, or a virtual server - but I’m less comfortable with a headless setup) Continue tinkering with the Macs native sandbox or docker sbx to get this properly setup (or any other wrappers/harnesses with intuitive sandboxing?) submitted by /u/aj_kt
Originally posted by u/aj_kt on r/ClaudeCode
