Repository navigation
Description
Summary
In the Codex Windows Desktop App, the native Windows elevated sandbox is configured with workspace-write permissions, but Python fails to create a new directory inside an authorized workspace.
The issue reproduces using only Python's standard library, without loading the application pipeline, MinerU, or OCR components.
The failure prevents a PDF-to-EPUB conversion project from creating its working directories.
Environment
- Product: Codex Windows Desktop App
- Codex Core: 0.160.0 (verified)
- Desktop App version: 26.1007.11041 (previously observed; current version not reconfirmed)
- Operating system: Windows 10 Pro, version 22H2
- OS Build: 19045.6466
- Windows Sandbox mode:
elevated - Sandbox permissions:
workspace-write - Execution identity:
codexsandboxoffline, medium integrity - Python version: 3.10.11
- Workspace:
D:\@codex Projects\PDFtoEPUB - Working directory:
D:\@codex Projects\PDFtoEPUB\app\Books_Converter-Local-A770
Steps to Reproduce
- Use Codex Windows Desktop App with Windows Sandbox set to
elevated. - Configure permissions as
workspace-write. - Ensure the PDFtoEPUB workspace is included in the effective writable roots.
- Use Python 3.10.11 with the working directory shown above.
- Run the following minimal Python script using the same Python executable and execution mechanism as the affected pipeline:
from pathlib import Path
from uuid import uuid4
parent = Path(
r"D:\@codex Projects\PDFtoEPUB\output Epub\_audit\work"
).resolve()
target = parent / (
"civil_law_w4_selective_p001_p010_p040-"
"c1f3b030cb40e925-fresh-" + uuid4().hex
)
parent.mkdir(parents=True, exist_ok=True)
target.mkdir(exist_ok=False)The parent directory already exists. The failure occurs when attempting to create the new child directory.
The original reproduction used Python 3.10.11 with process-local offline model environment settings.
Actual Behavior
The operation target.mkdir(exist_ok=False) fails with:
PermissionError: [WinError 5] Access is denied
errno = 13
winerror = 5
The captured traceback ends at:
Python310\Lib\pathlib.py, line 1175
self._accessor.mkdir(self, mode)
The failure was reproduced on October 8, 2026, at approximately 16:48 UTC.
The target directory was not created. No OCR or PDF conversion was started.
Expected Behavior
When the workspace is explicitly included in the effective writable roots and the sandbox is configured with workspace-write permissions, creating a new directory inside the authorized workspace should succeed unless another documented restriction applies.
Elevated vs. Unelevated Sandbox
- Elevated: FAIL — WinError 5 confirmed.
- Unelevated: NOT TESTED.
The elevated sandbox has been preserved to avoid weakening existing security isolation.
Diagnostic Findings
The following investigations have already been completed:
- Confirmed that the effective writable roots include the PDFtoEPUB workspace.
- Confirmed that the Windows elevated sandbox initialization completed with
errors=[]. - Confirmed that the parent directory is an ordinary directory, not a symbolic link or reparse point.
- Inspected NTFS permissions. Inherited Modify permissions exist for the sandbox group; no explicit Deny entry was identified.
- Checked Microsoft Defender Operational events. No corresponding denial event was found.
- Windows Security access-denial telemetry could not be fully inspected.
- A separate short-name UUID directory creation test succeeded from the workspace root, although its exact Python executable and security token were not independently captured.
- Reproduced WinError 5 with the pipeline's Python executable and working directory, without importing any application code or starting MinerU.
The existing-parent mkdir(parents=True, exist_ok=True) call succeeded, but this only confirmed the existing directory and does not establish that a new directory could be created.
The root cause remains undetermined.
Logs
Existing Windows Sandbox diagnostic logs are available upon request but are not attached to this public report.
No files from .sandbox-secrets are included.
Requested Assistance
Could the Codex team investigate:
- Whether effective writable-root enforcement differs between individual Codex command invocations.
- Whether process security tokens or working-directory-specific sandbox policies could explain the difference between successful and failed directory creation.
- Whether Windows Sandbox or filesystem-filter telemetry identifies the actual access denial.
- Whether there is an officially supported repair procedure for the elevated sandbox that preserves existing isolation.
I would prefer to resolve this issue without disabling the sandbox, enabling unrestricted filesystem access, or manually weakening Windows security policies.
Thank you for your assistance.
Activity
github-actions commentedon Oct 9, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
workspace-write: Python-created directory becomes inaccessible to the sandbox token #51874Powered by Codex Action
jobimtg commentedon Nov 23, 2026
Additional Windows workspace-write directory-creation failure (root cause unconfirmed)
I have a similar symptom, but have not established that it shares this issue's root cause.
Recorded failure
os.mkdirfailed withPermissionError: [WinError 5] Access is deniedfor a new child directory inside the declared writable root.<PROFILE_WORKSPACE>\<NEW_STAGING_DIRECTORY>.Environment and evidence limits
10.0.26300.0; edition and complete servicing revision are unverified.26.1111.9664.0. The failure-time App/Core version and actual Windows sandbox backend are unverified.workspace-write.3.13.15; the failure-time interpreter identity was not captured.Existing read-only findings
2026-11-23T00:30:00Z–01:05:00Z. This does not exclude a security-layer denial.No new reproduction, security-setting changes or sandbox bypasses were attempted while preparing this comment.
Could maintainers provide a supported, non-destructive way to identify the active Core/backend and the exact denying layer, and an applicable official repair/version if known? Any remedy must preserve workspace-write isolation without Full Access, elevation, ACL changes or disabling Windows protection.