You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document Python Install Manager App Execution Alias behavior in Windows AppContainer (WinError 1920) #448
On Windows, the python.org MSIX build of Python Install Manager registers python.exe and py.exe App Execution Aliases. In a Codex Desktop workspace-write AppContainer, both aliases fail with Win32 error 1920 (ERROR_CANT_ACCESS_FILE) before Python starts. The same aliases work for the same account outside the sandbox, and the CPython runtime installed by the manager works by full path inside it.
Could the Windows troubleshooting guide explain whether invoking these aliases from an AppContainer is supported, and document the supported way for a sandboxed tool to discover and launch an already-installed runtime? This may be an expected Windows package-activation limitation.
Environment
Windows 11 26H2, x64, build 26300.9974, PowerShell 7.6.9.
Python Install Manager 26.4.240.0, python.org MSIX, package family PythonSoftwareFoundation.PythonManager_3847v3x7pw1km. The default managed runtime is CPython 3.15.2 x64.
Codex Desktop MSIX 26.1120.5083.0 in workspace-write mode. A child launched in the diagnostic environment reported TokenIsAppContainer=1.
Reproduction and results
From the sandboxed task PowerShell, run these read-only commands:
Both aliases returned 1920 in the AppContainer. The package-family-specific py.exe and pymanager.exe aliases returned 1920 as well.
Direct launch of the MSIX payload executable under %ProgramFiles%\WindowsApps returned Win32 error 5 inside the sandbox. A read-only CreateFileW access probe could read that file, but opening it with FILE_EXECUTE returned error 5.
The installed interpreter under Python\pythoncore-3.15-64 returned Python 3.15.2 in the sandbox. Temporarily prioritizing the existing Python\bin directory also made python --version work there.
In an execution outside the sandbox under the same account, the original python.exe alias and py.exe -V:3.15 --version worked, and py list --only-managed listed the runtime.
Related packaged Python launch report on the Codex side: openai/codex#56361.
Are you sure this isn't better reported either to the OS (for having their aliases that they create and manage not work properly) or to Codex (to handle Windows's unusual alias design properly)?
We tend to prefer to not document unusual behaviours of operating systems as part of Python, since we don't control that behaviour at all.
Activity
zooba commentedon Nov 25, 2026
Are you sure this isn't better reported either to the OS (for having their aliases that they create and manage not work properly) or to Codex (to handle Windows's unusual alias design properly)?
We tend to prefer to not document unusual behaviours of operating systems as part of Python, since we don't control that behaviour at all.