Codex's sandbox keeps commands on your own machine: file and network limits come from permission profiles, not a container
OpenAI has described how the Codex sandbox works: rather than moving computation into a virtual machine or container, it invokes each operating system's own isolation facilities to limit which files a command can touch and which network it can reach inside the user's existing development environment. Users set the boundaries through permission profiles, and the built-in :workspace profile allows writes inside the workspace, keeps .git and .codex read-only, and disables network access by default. OpenAI also states that these limits do not stop all harmful behavior, such as injecting code into a locally installed dependency.