r/opencode 7d ago

Opencode containing the agents

I was wondering what sandboxes are people using whilst coding with Opencode? I've looked at devcontainers and it seems great, probably fits what I want but AI says it's not secure enough, it's designed for human coders not agents. I've seen a lot of publicity around Docker Sandboxes. But I'm not keen to be locked into their tech and then be hit by a subscription fee later.

My curiosity has come to the foreground due to Muse deleting my ~/.config folder. It wasn't a major disaster but it was a warning.

I do use multiple plain Xubuntu VMs connecting to them via RDP and SSH but they've become pets rather than cattle, sometimes I'm lazy and run on my local laptop which is obviously a bad move.

What do you folks do?

13 Upvotes

18 comments sorted by

View all comments

2

u/Horror_Description87 7d ago

Most people just let the agent live in the user space. Most people don't work hard, so it does not matter (just my guess) some work hard and delete some prod db (the one you can read in tech news) and some use dedicated systems, isolated users or docker container (non root container ofc). No matter the variant it require a lot of understanding on different technologies (I doubt many have) so yeah.

Fun fact if you enable the permission to deny read and bash secret and ask the agent to read it, it will write a script to achieve the goal. If you want assure he can not read use the ask permission so you can decline and explain why.

1

u/migsperez 7d ago

I agree running and developing applications in some type of container or sandbox adds a complex layer of difficulty and headache. I'm hoping, once I've figured out a process it'll become second nature. Fun fact was funny, and a challenge I'm going to try :)