Agents need to be isolated. Containers are not foulproof, but can serve as a first level of protection, as long as one remains aware of its shortcomings.
agentcubicle is a tool some of us use and maintain, and if some are interested I could show how to use it. It’s designed to allow to use either opencode (with our internal models, for example), claude, or both.