Can't run WinGet executables in the sandbox when Windows Developer mode is enabled

Open 💬 3 comments Opened Jun 24, 2026 by EDM115

What version of Codex CLI is running?

codex-cli 0.142.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.5

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

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

Windows Terminal / PowerShell Core 7

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1782293875s since unix epoch",
  "overallStatus": "ok",
  "codexVersion": "0.142.0",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "C:\\Users\\EDM115\\.codex\\app-server-control\\app-server-control.sock",
        "daemon state dir": "C:\\Users\\EDM115\\.codex\\app-server-daemon",
        "mode": "ephemeral",
        "pid file": "C:\\Users\\EDM115\\.codex\\app-server-daemon\\app-server.pid (missing)",
        "settings": "C:\\Users\\EDM115\\.codex\\app-server-daemon\\settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "C:\\Users\\EDM115\\.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\\EDM115\\.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": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "C:\\Users\\EDM115\\.codex",
        "config.toml": "C:\\Users\\EDM115\\.codex\\config.toml",
        "config.toml parse": "ok",
        "cwd": "C:\\Users\\EDM115",
        "enabled feature flags": "<redacted>",
        "feature flag overrides": "memories=true, network_proxy=true, external_migration=true, prevent_idle_sleep=true",
        "feature flags enabled": "35",
        "log dir": "C:\\Users\\EDM115\\.codex\\log",
        "mcp servers": "1",
        "model": "gpt-5.5",
        "model provider": "openai",
        "sqlite home": "C:\\Users\\EDM115\\.codex"
      },
      "remediation": null,
      "durationMs": 1
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.54.0.windows.1",
      "details": {
        "PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
        "PATH git entries": "1",
        "core.fsmonitor": "true",
        "git build options": "git version 2.54.0.windows.1; cpu: x86_64; built from commit: 2b8a3ab140826ac423c2845ef81d4c6ac4f7bf3c; sizeof-long: 4; sizeof-size_t: 8; shell-path: D:/git-sdk-64-build-installers/usr/bin/sh; rust: disabled; feature: fsmonitor--daemon; gettext: enabled; libcurl: 8.19.0; OpenSSL: OpenSSL 3.5.6 7 Apr 2026; zlib: 1.3.2; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
        "git exec path": "C:/Program Files/Git/mingw64/libexec/git-core",
        "git version": "git version 2.54.0.windows.1",
        "repo detected": "false",
        "selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
      },
      "remediation": null,
      "durationMs": 242
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "C:\\Users\\EDM115\\AppData\\Local\\Microsoft\\WinGet\\Links\\codex.exe",
        "current executable": "C:\\Users\\EDM115\\AppData\\Local\\Microsoft\\WinGet\\Links\\codex.exe",
        "install context": "other",
        "managed by bun": "false",
        "managed by npm": "false",
        "managed package root": "not set"
      },
      "remediation": null,
      "durationMs": 129
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "1",
        "disabled servers": "0",
        "stdio servers": "1"
      },
      "remediation": null,
      "durationMs": 1
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "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 base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 225
    },
    "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",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 709
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running local build on windows-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "C:\\Users\\EDM115\\AppData\\Local\\Microsoft\\WinGet\\Links\\codex.exe",
        "install method": "other",
        "platform": "windows-x86_64",
        "version": "0.142.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (system)",
      "details": {
        "search command": "rg.exe",
        "search command readiness": "ripgrep 15.1.0 (rev af60c2de9d)",
        "search provider": "system"
      },
      "remediation": null,
      "durationMs": 28
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "OnRequest",
        "codex-linux-sandbox helper": "none",
        "execve wrapper helper": "none",
        "filesystem sandbox": "restricted",
        "network sandbox": "enabled"
      },
      "remediation": null,
      "durationMs": 2
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "C:\\Users\\EDM115\\.codex (dir)",
        "active rollout files": "21 files, 59144070 total bytes, 2816384 average bytes",
        "archived rollout files": "5 files, 1315644 total bytes, 263128 average bytes",
        "goals DB": "C:\\Users\\EDM115\\.codex\\goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "C:\\Users\\EDM115\\.codex\\logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "C:\\Users\\EDM115\\.codex\\log (dir)",
        "memories DB": "C:\\Users\\EDM115\\.codex\\memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "C:\\Users\\EDM115\\.codex (dir)",
        "state DB": "C:\\Users\\EDM115\\.codex\\state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 244
    },
    "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": "21",
        "rollout DB active rows": "21",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "5",
        "rollout DB archived rows": "5",
        "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=26",
        "rollout DB rows": "26",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "vscode=20, subagent:thread_spawn=3, cli=1, subagent:other=1, unknown=1",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 1211
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language fr-FR",
      "details": {
        "EDITOR": "not set",
        "VISUAL": "not set",
        "os": "Windows 10.0.26200 (Windows 11 Professional) [64-bit]",
        "os language": "fr-FR",
        "os type": "Windows",
        "os version": "10.0.26200"
      },
      "remediation": null,
      "durationMs": 8
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "WT_SESSION": "present",
        "color output": "enabled",
        "console input code page": "850",
        "console output code page": "850",
        "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": "Windows Terminal",
        "terminal size": "120x30"
      },
      "remediation": null,
      "durationMs": 2
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title configured",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "<redacted>",
        "terminal title project source": "cwd",
        "terminal title project value": "EDM115",
        "terminal title source": "configured"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.139.0",
        "check for update on startup": "true",
        "last checked at": "2026-06-10T11:53:26.964695400Z",
        "latest version": "0.142.0",
        "latest version status": "current version is not older",
        "update action": "manual or unknown",
        "version cache": "C:\\Users\\EDM115\\.codex\\version.json"
      },
      "remediation": null,
      "durationMs": 200
    }
  }
}

What issue are you seeing?

Codex can't run properly WinGet executables in its sandbox (elevated) when Windows Developer mode is enabled.
For example if I install astral-sh.uv through WinGet, well Codex won't be able to run it as it can't resolve the actual path of the uv symlink (see the Additional information section).
It doesn't do the same thing for, let's say, ripgrep (even if installed through WinGet as it's a dependency of OpenAI.Codex) as I guess that it uses the bundled one first.

What steps can reproduce the bug?

  • Enable Developer Mode in Windows Settings -> System -> Advanced -> Developer mode
  • Run winget install astral-sh.uv
  • Run where.exe uv and see something like this output :

``pwsh
C:\Users\EDM115\AppData\Local\Microsoft\WinGet\Links\uv.exe
``

  • Make sure to have [windows]sandbox="elevated" in your ~/.codex/config.toml and have the sandbox set up
  • Run codex exec --ephemeral --skip-git-repo-check --model gpt-5.4-mini -c model_reasoning_effort=medium "run uv -V in your sandbox, don't escalate if it fails, and report the output and see it fail :

``pwsh
OpenAI Codex v0.142.0
--------
workdir: C:\Users\EDM115
model: gpt-5.4-mini
provider: openai
approval: never
sandbox: workspace-write [workdir, /tmp, $TMPDIR] (network access enabled)
reasoning effort: medium
reasoning summaries: none
session id: 019ef8f4-6207-7b73-b5c7-87994224f934
--------
user
run uv -V in your sandbox, don't escalate if it fails, and report the output
codex
I’ll check
uv -V` directly in the sandbox and report the exact result, without escalating if it fails.
exec
"C:\\Program Files\\PowerShell\\7\\pwsh.exe" -Command 'uv -V' in C:\Users\EDM115
2026-06-24T09:27:36.827194Z ERROR codex_core::tools::router: error=Exit code: 1
Wall time: 18.7 seconds
Output:
ResourceUnavailable:
Line |
2 | uv -V
| ~~~~~
| Program 'uv.exe' failed to run: An error occurred trying to start process 'C:\Users\EDM115\AppData\Local\Microsoft\WinGet\Links\uv.exe' with working directory 'C:\Users\EDM115'. Aucune application n’est associée au fichier spécifié pour cette opération.At line:2 char:1

  • uv -V
  • ~~~~~.

exited 1 in 18674ms:
ResourceUnavailable:
Line |
2 | uv -V
| ~~~~~
| Program 'uv.exe' failed to run: An error occurred trying to start process 'C:\Users\EDM115\AppData\Local\Microsoft\WinGet\Links\uv.exe' with working directory 'C:\Users\EDM115'. Aucune application n’est associée au fichier spécifié pour cette opération.At line:2 char:1

  • uv -V
  • ~~~~~.

codex
uv -V failed in the sandbox.

Output:
\``text
ResourceUnavailable:
Program 'uv.exe' failed to run: An error occurred trying to start process 'C:\Users\EDM115\AppData\Local\Microsoft\WinGet\Links\uv.exe' with working directory 'C:\Users\EDM115'. Aucune application n’est associée au fichier spécifié pour cette opération.
\
``

If you want, I can also check whether uv is installed elsewhere on PATH or inspect the WinGet link.
tokens used
18 728
```

What is the expected behavior?

Codex should walk the symlink to resolve the actual binary location

Additional information

Windows Developer mode changes the way winget-installed packages that expose a CLI are added to the path (https://github.com/AlDanial/cloc/issues/890#issuecomment-3341464886, TL;DR is that it creates .symlink files the same way as https://github.com/AlDanial/cloc/issues/849#issuecomment-2302016302 for reproduction)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗