Hacker News new | ask | show | jobs
by entropie 48 days ago
I used codex the first time yesterday and quickly decided I need to sandbox it and came up with a pretty easy and straightforward solution (I think).

I use nixos and use a little wrapper that wraps Codex CLI in Docker. Run codex-box /path/to/project and it starts or reuses a container with only that project bind-mounted, keeping login and history in a separate volume. It uses tmux for detaching and reattaching

https://gist.github.com/entropie/8f30b9e33e9412fda3adf2f7507...

1 comments

I was delaying it but one day Codex+GLM went ahead and did things in my ~/.dotfiles folder which I had granted only READ access for. I asked and I was given a reason which I didn't understand and didn't really want to. Right then I used sandbox-exec/safehouse (macOS) and tightened every harness installed (and the one not even installed, lest I install it later and forget to add/track them in the sb zsh init script).

But I am not satisfied. I am trying to find a really lightweight container/VM for macOS that eats very less RAM on its own and expands as needed. Because I really don't want to run an agent outside a container on my mac.

The script is working like charm. I updated the packages so it has more access to tooling (ffmpeg, rmagick etc)