r/opencode • u/SirSpix • Nov 01 '26
Best way to isolate OpenCode projects
Hey all,
I know this might be a basic question that gets asked a lot, but I'm still a beginner and my head is spinning a bit with all the options, so thanks for your patience! :)
I'm looking for the best way to completely isolate my OpenCode harness projects on Ubuntu.
(I use OpenChamber as GUI)
My goal is zero cross-contamination: no shared agent memory, no leaking coding styles, etc. Each project needs to be a total blank slate.
Some projects use Docker, others run natively. I need a solution that is simple to implement but reasonably secure.
What’s the cleanest move here? Messing with XDG env vars? Running the harness inside Docker containers? Or going nuclear with separate Ubuntu system users?
How do you keep your AI agents from bleeding into each other?
Thanks in advance for the support! :)
View all comments
1
u/cenderis Nov 01 '26
I run opencode using a bubblewrap script which limits access to the current git checkout and read-only access to some other useful directories that I think will be helpful. (More or less, I add extra directories as necessary, some read-write.) That seems to have worked OK so far, together with opencode's normal permissions.