Wrong dev containers command for devcontainer.secure.json

Open 💬 2 comments Opened May 17, 2026 by pipoe2h

https://github.com/openai/codex/blob/e7bffc5a20e92cbc64d6c16a1b257d0b2e4cd5df/.devcontainer/README.md?plain=1#L25-L31

These steps in the documentation don't work:

  1. Dev Containers only accepts a config file named devcontainer.json or .devcontainer.json
  2. Open Folder in Container as the name indicates, lets you choose a folder, not a file.

I'm not sure if these are the instructions pushed to https://developers.openai.com/codex/agent-approvals-security#run-codex-in-dev-containers, since I couldn't find the repo for that site.

View original on GitHub ↗

2 Comments

kiwigitops · 3 months ago

Taking a look — will open a small docs PR shortly clarifying that the VS Code Dev Containers UI only auto-discovers configs named devcontainer.json (so devcontainer.secure.json must be launched via the CLI, or copied/symlinked into a subfolder named devcontainer.json).

kiwigitops · 3 months ago

Heads up — I prepared a one-line docs PR for this on a fork (kiwigitops/codex@docs/devcontainer-vscode-instructions) but it looks like this repo doesn't accept external PRs (createPullRequest returns 404 from forks, and all recent merges are from openai-internal branches). Posting the proposed diff here in case a maintainer wants to land it directly:

- In VS Code, choose **Dev Containers: Open Folder in Container...** and select `.devcontainer/devcontainer.secure.json`.
+ VS Code's Dev Containers UI only auto-discovers configs named `devcontainer.json` (at `.devcontainer/devcontainer.json` or `.devcontainer/<name>/devcontainer.json`), so `devcontainer.secure.json` is not selectable from the UI directly. To launch the secure profile from VS Code, either use the CLI command above, or copy/symlink `.devcontainer/devcontainer.secure.json` to `.devcontainer/secure/devcontainer.json` and then run **Dev Containers: Reopen in Container...** and pick **secure**.