Desktop app: devcontainer-like sandbox environment
Open 💬 8 comments Opened Feb 3, 2026 by marco-altran
Problem
Codex Desktop (macOS) runs tools in a host sandbox, but it's not a containerized dev environment. This makes it hard to get reproducible dependencies, isolate installs, or mirror CI.
Request
Add an optional devcontainer-like sandbox for the Desktop app:
- Use a container image or a local
devcontainer.json/Dockerfile. - Mount the workspace read/write, with configurable mounts.
- Persist caches (e.g., package managers) across runs.
- Optional network policy, and a clear UX to start/stop/rebuild the environment.
Why it helps
- Reproducible tool execution.
- Easier setup for projects with non-system dependencies.
- Reduced risk of host system contamination.
Alternatives
Codex CLI + external devcontainer, but that doesn’t integrate with the Desktop app’s sandbox/tooling.
Additional context
I searched open issues and didn’t find a Desktop app request for a devcontainer-like sandbox.
8 Comments
Related: https://github.com/openai/codex/issues/10450
Yes, we desperately need this if we want to run in "Full access" mode.
Second this even for regular mode - especially in light of all the recent supply chain attacks (axios, lite-llm). Running anything outside of docker is increasingly not possible / risks compromise of the host machine, and just wholesale disallowing npm and uv access in codex would really hamper productivity. Yes you can manually do it through just forcing codex to use docker commands but I haven’t been able to audit that this ensures no direct npm etc commands are run unsupervised in regular mode.
+1️⃣ on this. Native Docker dev container support in Codex Desktop would be a huge step forward.
VS Code already proves this model works well: define your environment in a
devcontainer.jsonorDockerfile, and all tooling runs transparently inside that container. Codex Desktop could offer the same model as an additional, opt-in execution environment, separate from the existing host sandbox.Why this matters:
The current workaround of manually instructing Codex to use Docker commands is fragile, and there’s no guarantee that direct package manager calls won’t slip through in unsupervised mode.
@patrickdobler This is what I've setup and it's actually very dangerous. I think there's a real bug right now because once Codex enters the devcontainer shell, he's not asking for approval anymore. Once the first command to enter the devcontainer has been approved, he can do r/w as he wishes and there's nothing you can do to stop it. This is a massive security hole.
This is how I've instructed him in my AGENTS.md file :
We’d also like this specifically for Docker Sandboxes.
The Codex CLI can already run well inside Docker Sandboxes, but Codex Desktop currently cannot use a Docker Sandbox as its execution environment unless you do some workarounds with SSH, but it's still fails. Looks like Codex Desktop tries to validate local auth tokens for some reason. These are substituted by Docker Sandbox, so Codex Desktop throws an error:
Docker Sandboxes provide additional value on top of simple docker containers by exposing primitives for controlling egress network and hiding secrets from agents.
This would be amazing for opensource projects. We are trying to create an AI best practises initiative for the Drupal community. The goal is a simple installer that will set up everything you need in a container to have the best experience with AI. Not just skills but everything else running in the container like playwright etc. We have an ecosystem approach for handling containers called DDEV and can already make a plugin for codex cli.
But it would be awesome if I could use the local codex.app gui to manage and interact with the codex cli running inside docker.
It would make pushing community wide adoption better as we could have a consistent environment without worrying what they have already tried themselves with AI.
Absolutely, I would say we desperately need support for remote DevContainers, similar how VS Code is able to do that already - SSH into a remote DevContainer so that Codex development can be done safely on a remote machine inside a desktop.