OpenAI builds custom Windows sandbox for Codex coding agent without admin privileges
OpenAI developed a custom sandbox implementation for its Codex coding agent on Windows after existing tools like AppContainer and Windows Sandbox failed to meet requirements. The solution uses synthetic SIDs and write-restricted tokens to constrain file writes and network access without requiring administrator privileges.
OpenAI builds custom Windows sandbox for Codex coding agent without admin privileges
OpenAI has implemented a custom sandbox for its Codex coding agent on Windows after determining that native Windows isolation tools were insufficient for developer workflows. The solution allows Codex to run securely on Windows without requiring administrator privileges.
The problem: No adequate Windows isolation
Before September 2025, Codex on Windows lacked sandbox implementation, forcing users to either approve nearly every command manually or enable Full Access mode with no restrictions. Codex runs locally on developer machines through CLI, IDE extensions, or desktop apps with full user permissions by default.
OpenAI evaluated three existing Windows isolation mechanisms:
AppContainer: Microsoft's native capability-based sandbox proved too narrow for Codex's open-ended developer workflows involving shells, Git, Python, package managers, and arbitrary build tools.
Windows Sandbox: Microsoft's disposable lightweight VM offered strong isolation but couldn't operate directly on users' actual checkouts and environments. Additionally, Windows Sandbox is unavailable on Windows Home editions.
Mandatory Integrity Control (MIC): While elegant conceptually, marking workspaces as low-integrity would make them writable by any low-integrity process on the system, creating broader security risks than targeted sandbox constraints.
The solution: Synthetic SIDs and write-restricted tokens
OpenAI's engineering team, led by David Wiesen, built what they call the "unelevated sandbox" using two Windows primitives:
Synthetic SIDs for identity: Security identifiers (SIDs) in Windows tie to permissions. OpenAI created synthetic SIDs specifically for the Codex sandbox that don't correspond to real users but can appear in access control lists (ACLs).
Write-restricted tokens for constraint: These special process tokens require two checks for write operations to succeed: the normal user identity must have permission, and at least one SID in the token's restricted list must also be granted access. This allows precise control over where Codex can modify files.
The implementation creates a synthetic SID called "sandbox-write" that is granted write, execute, and delete access only to specific directories like the current workspace. The sandbox runs without requiring administrator elevation.
Technical implementation
Every Codex command launches in a sandboxed environment from the start. The operating system enforces constraints that propagate down the entire process tree, ensuring all descendant processes stay within the same security boundary.
According to OpenAI, Codex's default mode allows the agent to read files almost anywhere and write files only within the user's workspace (the directory where Codex is running), with no internet access unless explicitly specified.
What this means
This implementation brings Windows Codex functionality to parity with macOS (which uses Seatbelt) and Linux (which uses seccomp or bubblewrap) without requiring users to grant administrator privileges. The solution demonstrates a practical approach to sandboxing AI coding agents that need to perform arbitrary developer tasks while maintaining security boundaries. The design choice to avoid elevation is particularly significant for enterprise environments where developers often lack admin rights on their machines.
Related Articles
OpenAI releases GPT-5.6 in three tiers with limited government-coordinated rollout
OpenAI announced GPT-5.6, a three-tier model series launching through a limited preview coordinated with the U.S. government. The models—Sol, Terra, and Luna—are priced from $1/$6 to $5/$30 per million input/output tokens and introduce new max and ultra reasoning modes.
Apple adds Google Gemini to Xcode 26.6 as third coding assistant option alongside Claude and OpenAI Codex
Apple released Xcode 26.6 on June 25, 2026, adding Google Gemini as a third AI coding assistant option for developers. The IDE now supports Gemini alongside Anthropic Claude Agent and OpenAI Codex, plus compatibility with other agents through the Agent Client Protocol.
OpenAI previews GPT-5.6 to select partners with three variants priced from $1 to $30 per million tokens
OpenAI has begun previewing its GPT-5.6 series to a limited group of trusted partners after government review. The release includes three variants: Sol at $5 input/$30 output per million tokens, Terra at $2.50/$15, and Luna at $1/$6.
OpenAI restricts GPT-5.6 rollout to government-approved partners, calls arrangement unsustainable
OpenAI released its GPT-5.6 model lineup to a limited group of "trusted partners" after the U.S. government requested restrictions on the rollout. The company released three models—Sol ($5/$30 per million tokens), Terra ($2.50/$15), and Luna ($1/$6)—but said the government-mandated preview "shouldn't become the long-term default."
Comments
Loading...