Skip to content

Windows sandbox setup fails with a long runtime path #47892

Open

Description

@joelmitz

What version of Codex CLI is running?

codex-cli 0.156.1

What subscription do you have?

Plus / Team

Which model were you using?

GPT-6-luna

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

PowerShell 7.6.6

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1790270781s since unix epoch",
  "overallStatus": "fail",
  "codexVersion": "0.156.1",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "C:\\Users\\joel\\.codex\\app-server-control\\app-server-control.sock",
        "daemon state dir": "C:\\Users\\joel\\.codex\\app-server-daemon",
        "dedicated pid file": "C:\\Users\\joel\\.codex\\app-server-daemon\\daemon.pid (missing)",
        "dedicated update-loop pid file": "C:\\Users\\joel\\.codex\\app-server-daemon\\daemon-updater.pid (missing)",
        "mode": "ephemeral",
        "pid file": "C:\\Users\\joel\\.codex\\app-server-daemon\\app-server.pid (missing)",
        "settings": "C:\\Users\\joel\\.codex\\app-server-daemon\\settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "C:\\Users\\joel\\.codex\\app-server-daemon\\app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 1
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "C:\\Users\\joel\\.codex\\auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "warning",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "C:\\Users\\joel\\.codex",
        "active thread overrides": "not inspected",
        "config.toml": "C:\\Users\\joel\\.codex\\config.toml",
        "config.toml parse": "ok",
        "configuration load ms": "41",
        "configuration scope": "invocation config, including cloud-managed policy",
        "cwd": "C:\\Users\\joel\\projects\\babelbiblenet-v2",
        "enabled feature flags": "<redacted>",
        "feature flag overrides": "none",
        "feature flags enabled": "51",
        "log dir": "C:\\Users\\joel\\.codex\\log",
        "mcp servers": "2",
        "model": "gpt-6-luna",
        "model provider": "openai",
        "sqlite home": "C:\\Users\\joel\\.codex",
        "startup warning": "Codex is ignoring 1 unrecognized configuration setting. Check for typos or deprecated settings.\n  user (C:\\Users\\joel\\.codex\\config.toml): `projects.\\\\wsl.localhost\\Ubuntu-24.04\\home\\joel\\projects\\babelbiblenet-v2.memories` is ignored.",
        "startup warning MCP": "0",
        "startup warning deprecated": "1",
        "startup warning hooks": "0",
        "startup warning plugins": "0",
        "startup warning skills": "0",
        "startup warnings": "1"
      },
      "remediation": null,
      "durationMs": 0
    },
    "desktop.app.version": {
      "id": "desktop.app.version",
      "category": "desktop",
      "status": "ok",
      "summary": "the desktop application is installed",
      "details": {
        "log directory": "$HOME\\AppData\\Local\\Codex/Logs",
        "running": "false",
        "version": "26.915.4065.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "desktop.app_server.handshake": {
      "id": "desktop.app_server.handshake",
      "category": "desktop",
      "status": "ok",
      "summary": "the desktop application is not running",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "desktop.security.enforcement": {
      "id": "desktop.security.enforcement",
      "category": "desktop",
      "status": "ok",
      "summary": "no locally visible recent Codex security enforcement was found",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git executable found; execution not verified",
      "details": {
        ".git entry": "directory",
        "PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
        "PATH git entries": "1",
        "git execution": "not inspected (PATH helpers are not executed)",
        "repo detected": "true",
        "repo root": "C:\\Users\\joel\\projects\\babelbiblenet-v2",
        "selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
      },
      "remediation": null,
      "durationMs": 18
    },
    "git.worktree.dev_drive": {
      "id": "git.worktree.dev_drive",
      "category": "git",
      "status": "warning",
      "summary": "this worktree is not on a Windows Dev Drive; moving it to a trusted Dev Drive can significantly improve repository and filesystem performance",
      "details": {},
      "remediation": "create a trusted Windows Dev Drive for source repositories: https://learn.microsoft.com/en-us/<redacted>",
      "durationMs": 2
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "C:\\nvm4w\\nodejs\\codex.cmd",
        "PATH codex #2": "C:\\Users\\joel\\AppData\\Roaming\\npm\\codex.cmd",
        "PATH codex entries": "2",
        "current executable": "C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
        "install context": "npm (package C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
        "managed by Vite+": "false",
        "managed by bun": "false",
        "managed by npm": "true",
        "managed by pnpm": "false",
        "managed package root": "C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex",
        "npm update target": "not inspected (PATH helpers are not executed)"
      },
      "remediation": null,
      "durationMs": 16
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "2",
        "disabled servers": "1",
        "stdio servers": "2"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "managed proxy": "not configured",
        "proxy env vars": "none",
        "respect system proxy": "disabled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "ChatGPT inference URL": "https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)",
        "desktop assets CDN": "https://persistent.oaistatic.com/codex-app-prod/<redacted> reachable (HTTP 200)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 260
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 2 IPv6, first IPv6",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 821
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on windows-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
        "install method": "npm (package C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
        "platform": "windows-x86_64",
        "version": "0.156.1"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search command found (bundled); execution not verified",
      "details": {
        "search command": "C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path\\rg.exe",
        "search command readiness": "file exists",
        "search provider": "bundled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.filesystem_paths": {
      "id": "sandbox.filesystem_paths",
      "category": "sandbox",
      "status": "ok",
      "summary": "configured filesystem paths listed; probes disabled on Windows",
      "details": {
        "operation": "resolve paths only; read/write access is not tested",
        "path 1": "C:\\Users\\joel\\.agents\\skills\\agmsg (write); not probed on Windows (network authentication risk)",
        "path 1 source": "effective filesystem policy (entry provenance unavailable)",
        "path 2": "C:\\Users\\joel\\.agents\\skills\\agmsg\\.agents (read); not probed on Windows (network authentication risk)",
        "path 2 source": "effective filesystem policy (entry provenance unavailable)",
        "path 3": "C:\\Users\\joel\\.agents\\skills\\agmsg\\.codex (read); not probed on Windows (network authentication risk)",
        "path 3 source": "effective filesystem policy (entry provenance unavailable)",
        "path 4": "C:\\Users\\joel\\.agents\\skills\\agmsg\\.git (read); not probed on Windows (network authentication risk)",
        "path 4 source": "effective filesystem policy (entry provenance unavailable)",
        "path 5": "C:\\Users\\joel\\projects\\agmsg (write); not probed on Windows (network authentication risk)",
        "path 5 source": "effective filesystem policy (entry provenance unavailable)",
        "path 6": "C:\\Users\\joel\\projects\\agmsg\\.agents (read); not probed on Windows (network authentication risk)",
        "path 6 source": "effective filesystem policy (entry provenance unavailable)",
        "path 7": "C:\\Users\\joel\\projects\\agmsg\\.codex (read); not probed on Windows (network authentication risk)",
        "path 7 source": "effective filesystem policy (entry provenance unavailable)",
        "path 8": "C:\\Users\\joel\\projects\\agmsg\\.git (read); not probed on Windows (network authentication risk)",
        "path 8 source": "effective filesystem policy (entry provenance unavailable)",
        "paths checked": "8 of 8",
        "probe budgets": "2 seconds per path, 8 seconds total, at most 32 paths"
      },
      "remediation": null,
      "durationMs": 3
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "fail",
      "summary": "elevated Windows sandbox provisioning recorded a structured failure",
      "details": {
        "approval policy": "OnRequest",
        "codex-linux-sandbox helper": "none",
        "denied-read glob rules": "0",
        "denied-read restrictions": "false",
        "denied-read rules": "0",
        "error code": "helper_unknown_error",
        "execve wrapper helper": "none",
        "filesystem sandbox": "restricted",
        "glob scan max depth": "unbounded",
        "managed filesystem source": "none",
        "network sandbox": "restricted",
        "sandbox backend": "elevated",
        "sandbox provisioning": "failed"
      },
      "issues": [
        {
          "severity": "fail",
          "cause": "elevated Windows sandbox provisioning recorded a structured failure",
          "measured": "helper_unknown_error",
          "expected": null,
          "remedy": "repair or reinstall the Codex CLI from an approved distribution",
          "fields": [
            "error code"
          ]
        }
      ],
      "remediation": "repair or reinstall the Codex CLI from an approved distribution",
      "durationMs": 2
    },
    "security.endpoint": {
      "id": "security.endpoint",
      "category": "security",
      "status": "warning",
      "summary": "endpoint protection detected; Codex exclusions are unverified",
      "details": {
        "Codex exclusions": "not verified",
        "endpoint products": "Microsoft Defender",
        "exclusion targets": "signed Codex app; codex.exe; codex-windows-sandbox-setup.exe; codex-command-runner.exe; codex-code-mode-host.exe"
      },
      "issues": [
        {
          "severity": "warning",
          "cause": "Microsoft Defender can interfere with Codex. Verify Codex exclusions.",
          "measured": "not verified",
          "expected": "Codex application and helper exclusions",
          "remedy": "Microsoft Defender: Add a certificate or executable-path exclusion for Codex and its helpers. If Attack Surface Reduction blocks Codex, add a rule exclusion. If Controlled Folder Access blocks Codex, allow the app.",
          "fields": [
            "Codex exclusions"
          ]
        }
      ],
      "remediation": "ask your security administrator to verify Codex exclusions and required helper allowances",
      "durationMs": 60
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "C:\\Users\\joel\\.codex (dir)",
        "active rollout files": "82 files, 111350298 total bytes, 1357930 average bytes",
        "archived rollout files": "6 files, 24941513 total bytes, 4156918 average bytes",
        "goals DB": "C:\\Users\\joel\\.codex\\goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "C:\\Users\\joel\\.codex\\logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "C:\\Users\\joel\\.codex\\log (missing)",
        "memories DB": "C:\\Users\\joel\\.codex\\memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "memories v2 DB": "C:\\Users\\joel\\.codex\\memories_v2_1.sqlite (missing)",
        "memories v2 DB integrity": "skipped (missing)",
        "queue DB": "C:\\Users\\joel\\.codex\\queue_1.sqlite (file)",
        "queue DB integrity": "ok",
        "sqlite home": "C:\\Users\\joel\\.codex (dir)",
        "state DB": "C:\\Users\\joel\\.codex\\state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "C:\\Users\\joel\\.codex\\thread_history_1.sqlite (file)",
        "thread history DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 1961
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "82",
        "rollout DB active rows": "82",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "6",
        "rollout DB archived rows": "6",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=88",
        "rollout DB rows": "88",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "subagent:other=39, cli=26, vscode=20, subagent:thread_spawn=3",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 353
    },
    "system.disk": {
      "id": "system.disk",
      "category": "disk",
      "status": "ok",
      "summary": "sufficient free disk space (1552.3 GiB)",
      "details": {
        "CODEX_HOME available": "1552.3 GiB",
        "failure threshold": "1.0 GiB",
        "warning threshold": "5.0 GiB",
        "worktree available": "1552.3 GiB"
      },
      "remediation": null,
      "durationMs": 0
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language ja-JP",
      "details": {
        "EDITOR": "not set",
        "VISUAL": "not set",
        "os": "Windows 10.0.26200 (Windows 11 Professional) [64-bit]",
        "os language": "ja-JP",
        "os type": "Windows",
        "os version": "10.0.26200"
      },
      "remediation": null,
      "durationMs": 1
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "COLORTERM": "truecolor",
        "TERM": "xterm-256color",
        "color output": "enabled",
        "console input code page": "932",
        "console output code page": "932",
        "stderr console mode": "0x00000007 (VT processing: true)",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout console mode": "0x00000007 (VT processing: true)",
        "stdout is terminal": "true",
        "terminal": "unknown",
        "terminal size": "93x39"
      },
      "remediation": null,
      "durationMs": 7
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "git repo root",
        "terminal title project value": "babelbiblenet-v2",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.156.1",
        "check for update on startup": "true",
        "desktop application": "OpenAI.Codex",
        "desktop latest build": "26.917.9434.0",
        "desktop update status": "available",
        "last checked at": "2026-09-24T13:55:07.785260300Z",
        "latest version": "0.156.1",
        "latest version status": "current version is not older",
        "npm update target": "not inspected (PATH helpers are not executed)",
        "update action": "npm install -g @openai/codex",
        "version cache": "C:\\Users\\joel\\.codex\\version.json"
      },
      "remediation": null,
      "durationMs": 329
    }
  }
}

What issue are you seeing?

Windows native sandbox で、通常のコマンド実行前に sandbox setup refresh が繰り返し失敗しま
す。毎回「サンドボックス外で再試行」すると同じコマンドは成功します。

ログのエラー:
runtime read/execute validation failed: CreateFileW failed
対象は Codex 内蔵 cua_node runtime の pnpm-store にある
@rollup/plugin-typescript/12.1.2 配下の 282 文字のパスです。

対象ディレクトリは存在し、CodexSandboxUsers に ReadAndExecute ACL が付与されています。読み
取り専用の Win32 検査では、通常形式のパスが ERROR_PATH_NOT_FOUND (3) になり、同じパスに \?
\ を付けると開けました。

Codex のセットアップヘルパーが長いパスを正しく扱えず、sandboxed command の起動を妨げている
可能性があります。ヘルパー自身の Win32 エラー番号も記録し、runtime パス検証で extended-
length path を扱えるようにしてほしいです。

What steps can reproduce the bug?

Uploaded thread: 01a0d42a-3b99-7cf1-be2c-972dc9afdd20

What is the expected behavior?

いちいち「サンドボックス外で再試行して」と指示しなくても、repo内ファイルを読み書きできるようになる

Additional information

No response

Activity

  1. added
    CLIIssues related to the Codex CLI
    windows-osIssues related to Codex on Windows systems
    sandboxIssues related to permissions or sandboxing
    on Sep 24, 2026
  2. github-actions commented on Sep 24, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. changed the title [-]Windows サンドボックスが長い runtime パスでセットアップに失敗する[/-] [+]Windows sandbox setup fails with a long runtime path[/+] on Sep 24, 2026
  4. github-actions commented on Sep 24, 2026

    @github-actions
    Contributor

    English translation:

    What version of Codex CLI is running?

    codex-cli 0.156.1

    What subscription do you have?

    Plus / Team

    Which model were you using?

    GPT-6-luna

    What platform is your computer?

    Microsoft Windows NT 10.0.26200.0 x64

    What terminal emulator and version are you using (if applicable)?

    PowerShell 7.6.6

    Codex doctor report

    {
      "schemaVersion": 1,
      "generatedAt": "1790270781s since unix epoch",
      "overallStatus": "fail",
      "codexVersion": "0.156.1",
      "checks": {
        "app_server.status": {
          "id": "app_server.status",
          "category": "app-server",
          "status": "ok",
          "summary": "background server is not running",
          "details": {
            "control socket": "C:\\Users\\joel\\.codex\\app-server-control\\app-server-control.sock",
            "daemon state dir": "C:\\Users\\joel\\.codex\\app-server-daemon",
            "dedicated pid file": "C:\\Users\\joel\\.codex\\app-server-daemon\\daemon.pid (missing)",
            "dedicated update-loop pid file": "C:\\Users\\joel\\.codex\\app-server-daemon\\daemon-updater.pid (missing)",
            "mode": "ephemeral",
            "pid file": "C:\\Users\\joel\\.codex\\app-server-daemon\\app-server.pid (missing)",
            "settings": "C:\\Users\\joel\\.codex\\app-server-daemon\\settings.json (missing)",
            "status": "not running",
            "update-loop pid file": "C:\\Users\\joel\\.codex\\app-server-daemon\\app-server-updater.pid (missing)"
          },
          "remediation": null,
          "durationMs": 1
        },
        "auth.credentials": {
          "id": "auth.credentials",
          "category": "auth",
          "status": "ok",
          "summary": "auth is configured",
          "details": {
            "auth file": "C:\\Users\\joel\\.codex\\auth.json",
            "auth storage mode": "File",
            "stored API key": "false",
            "stored ChatGPT tokens": "true",
            "stored agent identity": "false",
            "stored auth mode": "chatgpt"
          },
          "remediation": null,
          "durationMs": 0
        },
        "config.load": {
          "id": "config.load",
          "category": "config",
          "status": "warning",
          "summary": "config loaded",
          "details": {
            "CODEX_HOME": "C:\\Users\\joel\\.codex",
            "active thread overrides": "not inspected",
            "config.toml": "C:\\Users\\joel\\.codex\\config.toml",
            "config.toml parse": "ok",
            "configuration load ms": "41",
            "configuration scope": "invocation config, including cloud-managed policy",
            "cwd": "C:\\Users\\joel\\projects\\babelbiblenet-v2",
            "enabled feature flags": "<redacted>",
            "feature flag overrides": "none",
            "feature flags enabled": "51",
            "log dir": "C:\\Users\\joel\\.codex\\log",
            "mcp servers": "2",
            "model": "gpt-6-luna",
            "model provider": "openai",
            "sqlite home": "C:\\Users\\joel\\.codex",
            "startup warning": "Codex is ignoring 1 unrecognized configuration setting. Check for typos or deprecated settings.\n  user (C:\\Users\\joel\\.codex\\config.toml): `projects.\\\\wsl.localhost\\Ubuntu-24.04\\home\\joel\\projects\\babelbiblenet-v2.memories` is ignored.",
            "startup warning MCP": "0",
            "startup warning deprecated": "1",
            "startup warning hooks": "0",
            "startup warning plugins": "0",
            "startup warning skills": "0",
            "startup warnings": "1"
          },
          "remediation": null,
          "durationMs": 0
        },
        "desktop.app.version": {
          "id": "desktop.app.version",
          "category": "desktop",
          "status": "ok",
          "summary": "the desktop application is installed",
          "details": {
            "log directory": "$HOME\\AppData\\Local\\Codex/Logs",
            "running": "false",
            "version": "26.915.4065.0"
          },
          "remediation": null,
          "durationMs": 0
        },
        "desktop.app_server.handshake": {
          "id": "desktop.app_server.handshake",
          "category": "desktop",
          "status": "ok",
          "summary": "the desktop application is not running",
          "details": {},
          "remediation": null,
          "durationMs": 0
        },
        "desktop.security.enforcement": {
          "id": "desktop.security.enforcement",
          "category": "desktop",
          "status": "ok",
          "summary": "no locally visible recent Codex security enforcement was found",
          "details": {},
          "remediation": null,
          "durationMs": 0
        },
        "git.environment": {
          "id": "git.environment",
          "category": "git",
          "status": "ok",
          "summary": "git executable found; execution not verified",
          "details": {
            ".git entry": "directory",
            "PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
            "PATH git entries": "1",
            "git execution": "not inspected (PATH helpers are not executed)",
            "repo detected": "true",
            "repo root": "C:\\Users\\joel\\projects\\babelbiblenet-v2",
            "selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
          },
          "remediation": null,
          "durationMs": 18
        },
        "git.worktree.dev_drive": {
          "id": "git.worktree.dev_drive",
          "category": "git",
          "status": "warning",
          "summary": "this worktree is not on a Windows Dev Drive; moving it to a trusted Dev Drive can significantly improve repository and filesystem performance",
          "details": {},
          "remediation": "create a trusted Windows Dev Drive for source repositories: https://learn.microsoft.com/en-us/<redacted>",
          "durationMs": 2
        },
        "installation": {
          "id": "installation",
          "category": "install",
          "status": "ok",
          "summary": "installation looks consistent",
          "details": {
            "PATH codex #1": "C:\\nvm4w\\nodejs\\codex.cmd",
            "PATH codex #2": "C:\\Users\\joel\\AppData\\Roaming\\npm\\codex.cmd",
            "PATH codex entries": "2",
            "current executable": "C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
            "install context": "npm (package C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
            "managed by Vite+": "false",
            "managed by bun": "false",
            "managed by npm": "true",
            "managed by pnpm": "false",
            "managed package root": "C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex",
            "npm update target": "not inspected (PATH helpers are not executed)"
          },
          "remediation": null,
          "durationMs": 16
        },
        "mcp.config": {
          "id": "mcp.config",
          "category": "mcp",
          "status": "ok",
          "summary": "MCP configuration is locally consistent",
          "details": {
            "configured servers": "2",
            "disabled servers": "1",
            "stdio servers": "2"
          },
          "remediation": null,
          "durationMs": 0
        },
        "network.env": {
          "id": "network.env",
          "category": "network",
          "status": "ok",
          "summary": "network-related environment looks readable",
          "details": {
            "managed proxy": "not configured",
            "proxy env vars": "none",
            "respect system proxy": "disabled"
          },
          "remediation": null,
          "durationMs": 0
        },
        "network.provider_reachability": {
          "id": "network.provider_reachability",
          "category": "reachability",
          "status": "ok",
          "summary": "active provider endpoints are reachable over HTTP",
          "details": {
            "ChatGPT inference URL": "https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)",
            "desktop assets CDN": "https://persistent.oaistatic.com/codex-app-prod/<redacted> reachable (HTTP 200)",
            "reachability mode": "ChatGPT auth"
          },
          "remediation": null,
          "durationMs": 260
        },
        "network.websocket_reachability": {
          "id": "network.websocket_reachability",
          "category": "websocket",
          "status": "ok",
          "summary": "Responses WebSocket handshake succeeded",
          "details": {
            "DNS": "2 IPv4, 2 IPv6, first IPv6",
            "auth mode": "chatgpt",
            "connect timeout": "15000 ms",
            "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
            "handshake result": "HTTP 101 Switching Protocols",
            "model provider": "openai",
            "provider name": "OpenAI",
            "proxy env vars": "none",
            "reasoning header": "false",
            "server model present": "false",
            "supports websockets": "true",
            "wire API": "responses"
          },
          "remediation": null,
          "durationMs": 821
        },
        "runtime.provenance": {
          "id": "runtime.provenance",
          "category": "runtime",
          "status": "ok",
          "summary": "running npm on windows-x86_64",
          "details": {
            "commit": "unknown",
            "current executable": "C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
            "install method": "npm (package C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
            "platform": "windows-x86_64",
            "version": "0.156.1"
          },
          "remediation": null,
          "durationMs": 0
        },
        "runtime.search": {
          "id": "runtime.search",
          "category": "search",
          "status": "ok",
          "summary": "search command found (bundled); execution not verified",
          "details": {
            "search command": "C:\\Users\\joel\\AppData\\Local\\nvm\\v22.23.1\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path\\rg.exe",
            "search command readiness": "file exists",
            "search provider": "bundled"
          },
          "remediation": null,
          "durationMs": 0
        },
        "sandbox.filesystem_paths": {
          "id": "sandbox.filesystem_paths",
          "category": "sandbox",
          "status": "ok",
          "summary": "configured filesystem paths listed; probes disabled on Windows",
          "details": {
            "operation": "resolve paths only; read/write access is not tested",
            "path 1": "C:\\Users\\joel\\.agents\\skills\\agmsg (write); not probed on Windows (network authentication risk)",
            "path 1 source": "effective filesystem policy (entry provenance unavailable)",
            "path 2": "C:\\Users\\joel\\.agents\\skills\\agmsg\\.agents (read); not probed on Windows (network authentication risk)",
            "path 2 source": "effective filesystem policy (entry provenance unavailable)",
            "path 3": "C:\\Users\\joel\\.agents\\skills\\agmsg\\.codex (read); not probed on Windows (network authentication risk)",
            "path 3 source": "effective filesystem policy (entry provenance unavailable)",
            "path 4": "C:\\Users\\joel\\.agents\\skills\\agmsg\\.git (read); not probed on Windows (network authentication risk)",
            "path 4 source": "effective filesystem policy (entry provenance unavailable)",
            "path 5": "C:\\Users\\joel\\projects\\agmsg (write); not probed on Windows (network authentication risk)",
            "path 5 source": "effective filesystem policy (entry provenance unavailable)",
            "path 6": "C:\\Users\\joel\\projects\\agmsg\\.agents (read); not probed on Windows (network authentication risk)",
            "path 6 source": "effective filesystem policy (entry provenance unavailable)",
            "path 7": "C:\\Users\\joel\\projects\\agmsg\\.codex (read); not probed on Windows (network authentication risk)",
            "path 7 source": "effective filesystem policy (entry provenance unavailable)",
            "path 8": "C:\\Users\\joel\\projects\\agmsg\\.git (read); not probed on Windows (network authentication risk)",
            "path 8 source": "effective filesystem policy (entry provenance unavailable)",
            "paths checked": "8 of 8",
            "probe budgets": "2 seconds per path, 8 seconds total, at most 32 paths"
          },
          "remediation": null,
          "durationMs": 3
        },
        "sandbox.helpers": {
          "id": "sandbox.helpers",
          "category": "sandbox",
          "status": "fail",
          "summary": "elevated Windows sandbox provisioning recorded a structured failure",
          "details": {
            "approval policy": "OnRequest",
            "codex-linux-sandbox helper": "none",
            "denied-read glob rules": "0",
            "denied-read restrictions": "false",
            "denied-read rules": "0",
            "error code": "helper_unknown_error",
            "execve wrapper helper": "none",
            "filesystem sandbox": "restricted",
            "glob scan max depth": "unbounded",
            "managed filesystem source": "none",
            "network sandbox": "restricted",
            "sandbox backend": "elevated",
            "sandbox provisioning": "failed"
          },
          "issues": [
            {
              "severity": "fail",
              "cause": "elevated Windows sandbox provisioning recorded a structured failure",
              "measured": "helper_unknown_error",
              "expected": null,
              "remedy": "repair or reinstall the Codex CLI from an approved distribution",
              "fields": [
                "error code"
              ]
            }
          ],
          "remediation": "repair or reinstall the Codex CLI from an approved distribution",
          "durationMs": 2
        },
        "security.endpoint": {
          "id": "security.endpoint",
          "category": "security",
          "status": "warning",
          "summary": "endpoint protection detected; Codex exclusions are unverified",
          "details": {
            "Codex exclusions": "not verified",
            "endpoint products": "Microsoft Defender",
            "exclusion targets": "signed Codex app; codex.exe; codex-windows-sandbox-setup.exe; codex-command-runner.exe; codex-code-mode-host.exe"
          },
          "issues": [
            {
              "severity": "warning",
              "cause": "Microsoft Defender can interfere with Codex. Verify Codex exclusions.",
              "measured": "not verified",
              "expected": "Codex application and helper exclusions",
              "remedy": "Microsoft Defender: Add a certificate or executable-path exclusion for Codex and its helpers. If Attack Surface Reduction blocks Codex, add a rule exclusion. If Controlled Folder Access blocks Codex, allow the app.",
              "fields": [
                "Codex exclusions"
              ]
            }
          ],
          "remediation": "ask your security administrator to verify Codex exclusions and required helper allowances",
          "durationMs": 60
        },
        "state.paths": {
          "id": "state.paths",
          "category": "state",
          "status": "ok",
          "summary": "state paths and databases are inspectable",
          "details": {
            "CODEX_HOME": "C:\\Users\\joel\\.codex (dir)",
            "active rollout files": "82 files, 111350298 total bytes, 1357930 average bytes",
            "archived rollout files": "6 files, 24941513 total bytes, 4156918 average bytes",
            "goals DB": "C:\\Users\\joel\\.codex\\goals_1.sqlite (file)",
            "goals DB integrity": "ok",
            "log DB": "C:\\Users\\joel\\.codex\\logs_2.sqlite (file)",
            "log DB integrity": "ok",
            "log dir": "C:\\Users\\joel\\.codex\\log (missing)",
            "memories DB": "C:\\Users\\joel\\.codex\\memories_1.sqlite (file)",
            "memories DB integrity": "ok",
            "memories v2 DB": "C:\\Users\\joel\\.codex\\memories_v2_1.sqlite (missing)",
            "memories v2 DB integrity": "skipped (missing)",
            "queue DB": "C:\\Users\\joel\\.codex\\queue_1.sqlite (file)",
            "queue DB integrity": "ok",
            "sqlite home": "C:\\Users\\joel\\.codex (dir)",
            "state DB": "C:\\Users\\joel\\.codex\\state_5.sqlite (file)",
            "state DB integrity": "ok",
            "thread history DB": "C:\\Users\\joel\\.codex\\thread_history_1.sqlite (file)",
            "thread history DB integrity": "ok"
          },
          "remediation": null,
          "durationMs": 1961
        },
        "state.rollout_db_parity": {
          "id": "state.rollout_db_parity",
          "category": "threads",
          "status": "ok",
          "summary": "rollout files and state DB thread inventory agree",
          "details": {
            "default model provider": "openai",
            "rollout DB active files": "82",
            "rollout DB active rows": "82",
            "rollout DB archive mismatches": "0",
            "rollout DB archived files": "6",
            "rollout DB archived rows": "6",
            "rollout DB duplicate DB paths": "0",
            "rollout DB duplicate rollout thread ids": "0",
            "rollout DB malformed file names": "0",
            "rollout DB missing active rows": "0",
            "rollout DB missing archived rows": "0",
            "rollout DB model providers": "openai=88",
            "rollout DB rows": "88",
            "rollout DB scan cap reached": "false",
            "rollout DB scan errors": "0",
            "rollout DB sources": "subagent:other=39, cli=26, vscode=20, subagent:thread_spawn=3",
            "rollout DB stale rows": "0"
          },
          "remediation": null,
          "durationMs": 353
        },
        "system.disk": {
          "id": "system.disk",
          "category": "disk",
          "status": "ok",
          "summary": "sufficient free disk space (1552.3 GiB)",
          "details": {
            "CODEX_HOME available": "1552.3 GiB",
            "failure threshold": "1.0 GiB",
            "warning threshold": "5.0 GiB",
            "worktree available": "1552.3 GiB"
          },
          "remediation": null,
          "durationMs": 0
        },
        "system.environment": {
          "id": "system.environment",
          "category": "system",
          "status": "ok",
          "summary": "OS language ja-JP",
          "details": {
            "EDITOR": "not set",
            "VISUAL": "not set",
            "os": "Windows 10.0.26200 (Windows 11 Professional) [64-bit]",
            "os language": "ja-JP",
            "os type": "Windows",
            "os version": "10.0.26200"
          },
          "remediation": null,
          "durationMs": 1
        },
        "terminal.env": {
          "id": "terminal.env",
          "category": "terminal",
          "status": "ok",
          "summary": "terminal metadata was detected",
          "details": {
            "COLORTERM": "truecolor",
            "TERM": "xterm-256color",
            "color output": "enabled",
            "console input code page": "932",
            "console output code page": "932",
            "stderr console mode": "0x00000007 (VT processing: true)",
            "stderr is terminal": "true",
            "stdin is terminal": "true",
            "stdout console mode": "0x00000007 (VT processing: true)",
            "stdout is terminal": "true",
            "terminal": "unknown",
            "terminal size": "93x39"
          },
          "remediation": null,
          "durationMs": 7
        },
        "terminal.title": {
          "id": "terminal.title",
          "category": "title",
          "status": "ok",
          "summary": "terminal title default",
          "details": {
            "terminal title activity": "true",
            "terminal title items": "activity, project-name",
            "terminal title project source": "git repo root",
            "terminal title project value": "babelbiblenet-v2",
            "terminal title source": "default"
          },
          "remediation": null,
          "durationMs": 0
        },
        "updates.status": {
          "id": "updates.status",
          "category": "updates",
          "status": "ok",
          "summary": "update configuration is locally consistent",
          "details": {
            "cached latest version": "0.156.1",
            "check for update on startup": "true",
            "desktop application": "OpenAI.Codex",
            "desktop latest build": "26.917.9434.0",
            "desktop update status": "available",
            "last checked at": "2026-09-24T13:55:07.785260300Z",
            "latest version": "0.156.1",
            "latest version status": "current version is not older",
            "npm update target": "not inspected (PATH helpers are not executed)",
            "update action": "npm install -g @openai/codex",
            "version cache": "C:\\Users\\joel\\.codex\\version.json"
          },
          "remediation": null,
          "durationMs": 329
        }
      }
    }

    What issue are you seeing?

    In the Windows native sandbox, sandbox setup refresh repeatedly fails before normal commands can run.
    Each time I retry outside the sandbox, the same command succeeds.

    Error in the logs:
    runtime read/execute validation failed: CreateFileW failed
    The affected path is a 282-character path under
    @rollup/plugin-typescript/12.1.2 in the pnpm-store of Codex's bundled cua_node runtime.

    The affected directory exists, and CodexSandboxUsers has a ReadAndExecute ACL. In a read-only Win32 check, the normal form of the path returned ERROR_PATH_NOT_FOUND (3), while the same path could be opened with the \?\ prefix.

    Codex's setup helper may not be handling long paths correctly, preventing sandboxed commands from launching.
    I would like the helper to also log its own Win32 error number and support extended-length paths in runtime path validation.

    What steps can reproduce the bug?

    Uploaded thread: 01a0d42a-3b99-7cf1-be2c-972dc9afdd20

    What is the expected behavior?

    Being able to read and write files in the repo without having to ask it to "retry outside the sandbox" every time.

    Additional information

    No response

  5. fulfon commented on Sep 25, 2026

    @fulfon

    Same failure here, with two additions that may help narrow it down.

    Environment: Windows 11 Pro 10.0.26200, Codex CLI installed with npm install -g @openai/codex, Codex desktop app
    (Microsoft Store) on the same machine, [windows] sandbox = "elevated", sandbox_mode = "workspace-write". Works on
    0.153.4 (pinned there now), fails after updating to 0.156: every codex exec and codex sandbox run fails in
    codex-windows-sandbox-setup.exe with runtime read/execute validation failed: CreateFileW failed on a 283-character
    path under %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<hash>\bin\node_modules\@oai\sky\dist\js-dependency-cache\. ..\pnpm-store\v11\links\@rollup\plugin-typescript\12.1.2\....

    1. The validation is independent of configuration. Bisected with copies of the config in scratch CODEX_HOME
      directories: notify = [], disabling node_repl, and features.computer_use = false all still fail; the only
      variable that matters is the CLI version. The desktop app's cua_node runtime is validated even when nothing in the
      CLI session uses it.
    2. It is not limited to interactive use: headless codex exec in an automation loop fails the same way, so "retry
      outside sandbox" is not available there. Pinning the CLI to 0.153.4 is the only workaround we found that keeps the
      elevated sandbox.

    Expected: skip the desktop app's runtime cache during setup, or open paths with the \\?\ prefix (as #46255 also
    found), and log the Win32 error code with the offending path.

  6. Jadabo3 commented on Sep 26, 2026

    @Jadabo3

    I am seeing the same setup-refresh failure in the Codex desktop app on Windows.

    • Codex desktop version: 26.924.20706, released September 25, 2026

    • Error returned:
      Failed to create unified exec process: helper_unknown_error: setup refresh had errors

    • The requested PowerShell process never starts.

    • The setup helper completes its read-ACL phase successfully, then runtime read/execute validation fails when CreateFileW encounters this 299-character path:

      C:\Users\<USER>\AppData\Local\OpenAI\Codex\runtimes\cua_node\.staging-799aa322aa55dbc2-FNN994\bin\node_modules\@oai\sky\dist\js-dependency-cache\shared-v1\applied-bk-agent-openai-js\pnpm-store\v11\links\@rollup\plugin-typescript\12.1.2\bf978194e78e4126a616bfdc5a9fea913609f48ddc1a68ce028d4322c58982dd

    Troubleshooting results:

    1. Restarting Codex did not fix the failure.
    2. Moving the original staging directory caused Codex to create another staging directory and fail on the same deep dependency-cache suffix.
    3. Quarantining only the generated js-dependency-cache also did not fix it. Codex selected or generated .staging-799aa322aa55dbc2-FNN994 and failed on the same suffix.
    4. No deny ACE failed or write ACE failed entry appears in the log. The recorded failure is specifically:
      runtime read/execute validation failed
      followed by:
      CreateFileW failed
    5. The setup-refresh failure occurs before the requested child process launches.

    This appears consistent with the long-path/helper-manifest problem reported here. I can provide a redacted sandbox log if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions