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 builds custom Windows sandbox for Codex coding agent after existing tools proved insufficient
OpenAI has implemented a custom sandbox for its Codex coding agent on Windows after determining that existing Windows isolation tools—AppContainer, Windows Sandbox, and Mandatory Integrity Control—could not adequately balance safety and functionality. The solution uses synthetic SIDs and write-restricted tokens to constrain file writes and network access without requiring administrator privileges.
OpenAI launches Daybreak security initiative with GPT-5.5-Cyber and Codex Security agent
OpenAI has launched Daybreak, a security-focused AI initiative that uses the Codex Security agent and new GPT-5.5-Cyber models to automatically detect and patch software vulnerabilities. The release follows Anthropic's Claude Mythos announcement by one month.
Xcode 26.5 adds message queuing and clarifying questions for AI coding assistants
Apple released Xcode 26.5 with two new Coding Intelligence features: the ability to queue multiple messages to AI coding assistants without waiting for responses, and agent support for asking clarifying questions before executing tasks. The update builds on agentic coding capabilities introduced in Xcode 26.3, which allowed developers to integrate tools like OpenAI Codex and Anthropic's Claude directly into the IDE.
OpenAI launches Daybreak cybersecurity platform with GPT-5.5 variants for vulnerability detection
OpenAI has launched Daybreak, a cybersecurity platform built on three GPT-5.5 model variants designed to detect software vulnerabilities, generate patches, and validate fixes in enterprise codebases. The platform directly competes with Anthropic's Mythos and includes partnerships with eight major security companies including Cisco, Cloudflare, and CrowdStrike.
Comments
Loading...