The user cases could be very different. Personally, I like the idea to run AI agents like opencode in a sandbox, but I also want it to be able to install software without sudo. Have a look at flake.nix (it's like a Dockerfile in this context). There's opencode but also some permission tweaks to use the container as user instead of root.
If you have a better idea to accomplish that, suggestions are welcome.