Here is what I do: run a container in a folder that has my entire dev environment installed. No VMs needed. The only access the container has are the folders that are bind mounted from the host’s filesystem. The container gets network access from a transparent proxy. https://github.com/dogestreet/dev-container Much more usable than setting up a VM and you can share the same desktop environment as the host.
I did this for a while, it's pretty good but I occasionally came across dependencies that were difficult to install in containers, and other minor inconveniences. I ended up getting a mini-PC solely dedicated toward running agents in dangerous mode, it's refreshing to not have to think too much about sandboxing.
Running Claude Code dangerously (safely)
61–70 of 265 posts
Re: Running Claude Code dangerously (safely)
#62Earlier quoted context omitted.
Until it decides to delete your home directory: https://old.reddit.com/r/ClaudeAI/comments/1pgxckk/claude_cl...
You can use the /hookify plugin to add hooks for preventing dangerous commands like this.
So it's basically adding "don't delete my files pretty please" to the prompt?
EDIT: I misread, the natural language description of the rule is just a shortcut to generate the actual rule which is based on regexp patterns.
Still, it only protects you against very specific commands. Won't help you if the LLM decides to fill your disk with `cat /dev/urandom > foo` for example.
Re: Running Claude Code dangerously (safely)
#63> VirtualBox 7.2.4 shipped with a regression that causes high CPU usage on idle guests. What are the odds. I have such a love/hate relationship with VirtualBox. It's so useful but so buggy. My current installation has a bug that causes high network latency, but I'm afraid to upgrade in case it introduces new, worse bugs. VMware is a million times better, but it is also Proprietary™
Re: Running Claude Code dangerously (safely)
#64Of course it depends on exactly what you're using Claude Code for, but if your use-case involves cloning repos and then running Claude Code on that repo. I would definitely recommend isolating it (same with other similar tools). There's a load of ways that a repository owner can get an LLM agent to execute code on user's machines so not a good plan to let them run on your main laptop/desktop. Personally my approach h…
Re: Running Claude Code dangerously (safely)
#65Re: Running Claude Code dangerously (safely)
#66Re: Running Claude Code dangerously (safely)
#67I'm working on targeting both the curl|bash pattern and coding agents with this (via smart out of the box profiles). Early stages but functional. Feedback and bug reports would be appreciated.
Re: Running Claude Code dangerously (safely)
#68> VirtualBox 7.2.4 shipped with a regression that causes high CPU usage on idle guests. What are the odds. I have such a love/hate relationship with VirtualBox. It's so useful but so buggy. My current installation has a bug that causes high network latency, but I'm afraid to upgrade in case it introduces new, worse bugs. VMware is a million times better, but it is also Proprietary™
As VMWare Workstation is now free on Linux and Windows, and allows you to create and rollback snapshots. Why not use it even if proprietary?
I do believe in the whole RMS "respects the user's freedoms" spiel, so all things being equal I prefer FOSS, even if it's worse - but there are limits.
Re: Running Claude Code dangerously (safely)
#69Of course it depends on exactly what you're using Claude Code for, but if your use-case involves cloning repos and then running Claude Code on that repo. I would definitely recommend isolating it (same with other similar tools). There's a load of ways that a repository owner can get an LLM agent to execute code on user's machines so not a good plan to let them run on your main laptop/desktop. Personally my approach h…
In what situations where it require bare metal?
Re: Running Claude Code dangerously (safely)
#70Koyeb has great resources about running Claude Code in sandboxes: https://www.koyeb.com/tutorials/use-claude-agent-sdk-with-ko...