OpenAI published an engineering deep dive into the Codex sandbox on November 18, 2026. It explains how Codex runs commands within filesystem and network limits that users or organizations configure through permission profiles. This is not a promise that every agent action is harmless: OpenAI explicitly describes the sandbox as one layer in a defense-in-depth design. For QA engineers, that makes the boundary behavior itself a first-class test target.
What OpenAI described
OpenAI says the built-in :workspace profile can write inside a workspace while keeping paths such as .git and .codex read-only. It permits broad filesystem reads needed by compilers and runtimes, but notes the trade-off: sensitive configuration outside the repository may remain readable under the user’s normal operating-system permissions. Network access is disabled by default for that profile, so operations such as dependency downloads require additional access.
The article also describes reusable named profiles, path-specific read/write/deny rules, optional network proxy domain rules, and platform-specific enforcement on macOS, Linux, and Windows. The important operational detail is precedence: a more-specific filesystem rule can override an ancestor rule, while network allow and deny rules should be exercised as policy, not assumed from configuration alone.
Why this matters for QA engineers
AI coding agents can run tests, format code, inspect repositories, and invoke tools quickly. A permissive or incorrectly applied profile can turn a routine test run into an access-control failure. QA should validate the effective permissions seen by a process, not merely the text in a configuration file. That includes proving expected work succeeds, denied work fails safely, approval paths are visible, and no unexpected side effect occurs outside the intended scope.
A practical sandbox regression pack
- Map the contract. Create a small matrix of allowed workspace writes, read-only repository metadata, denied secrets, loopback services, allowed domains, and denied domains. Give every case an expected exit status and a final-state assertion.
- Use harmless canaries. Put unique non-secret marker files in each path class. Verify that an allowed edit changes only the intended marker and a forbidden edit leaves its marker, timestamps, and Git state untouched.
- Challenge rule precedence. Test a writable workspace with a nested read-only directory, a more-specific deny path, and an alias or symlink scenario relevant to the host. Record which rule won and why.
- Exercise the network boundary. Attempt an approved request, an explicitly denied request, an unlisted request, and a localhost request. Check both the command result and proxy or harness evidence; a DNS or proxy failure should not be mistaken for a policy pass.
- Test approval and recovery. For work that legitimately needs broader access, verify the approval prompt, scope, expiration, refusal behavior, and retry after approval. A rejected request should preserve the workspace and give a useful, non-misleading failure signal.
- Run clean and hostile fixtures. Repeat the pack from a clean checkout and with an ignored dependency directory present. OpenAI notes that ignored local packages can be an avenue for harmful changes that Git status may not reveal, so inspect the actual filesystem and process behavior as well as the diff.
Start with least privilege
Begin with a narrow project and a profile that supports only the required build and test workflow. Expand one capability at a time, then add a regression case before keeping it. Preserve the profile, test fixture, command output, approval record, and final filesystem/network observations in the test evidence. That makes agent permissions reviewable as the toolchain, repositories, and organizational policies evolve.
Source
OpenAI Engineering: Inside the Codex sandbox (November 18, 2026)
