Comment by moretti
4 days ago
Does opencode support anything similar to claude code's auto mode (https://code.claude.com/docs/en/permission-modes#eliminate-p...)?
I'd like to switch to opencode, But "yolo mode" feels risky and manually approving every command the model runs kills the flow
I run --yolo but I'm running opencode in a VM: https://github.com/marius/devmicrosandbox
Put the agent in a sandbox.
This is the only way. Auto mode is really just yolo mode with more LLM tokens billed. It may catch some weird shit but it isn't a reliable sandbox. Just lock up the LLM and let it run.
Just FYI, auto mode is free now.
2 replies →
It's the only way if you want 100% security but often a compromise between security and usability is preferred.
I'm actually working on multi harness auto mode. It's already done for Pi and I'm currently working on copilot cli port (where it is needed the most by the fa r of autopilot in copilot being so atrocious).
The correct way for auto approve to work is similar to what claude code does (a deterministic algorithm where a separate model reads what the user says and adds rules based on what the user enables).
I couldn't believe such a thing that works well doesn't exist, but it doesn't. You either have to do borderline yolo or you cannot leave a model working overnight and not find it got stuck on some silyness after an hour.
What sandboxing tools do you recommend? There's lots out there and I'm unsure which to trust.
I recommend just setting up a podman container, LLM can do it for you.
Basically Podman is a more secure version of Docker.
I would keep stuff like secret keys outside the container and sign/push commits manually.
It's still a bit young, but I've been playing around with OpenShell at home. https://github.com/NVIDIA/OpenShell
It's an NVidia product, and so far I quite like their sandboxing and policy system. I'm still getting used to the download and upload flow though, it makes it a bit more annoying to read diffs and commit (unless you let it git as a part of the policy)
https://github.com/marius/devmicrosandbox
An ec2 or vps. But no sandbox can solve the problem that a true powerful harness would need access to the source of your information like slack and jira.
I use bubblewrap, but it doesn't play all too well with client server.
apparmor in enforce mode with very strict config
[flagged]
[dead]
FWIW OC 2.0 remembers perms for a project/directory pretty solidly now, so flow-killing approvals are more a one-time thing for a given project. It's sad they can't be globally set though, so a new project pays the approval-by-tool tax.
[flagged]
[flagged]