Windows Codex Desktop uses bundled pnpm before user pnpm, causing packageManager mismatch and non-TTY abort

Resolved 💬 2 comments Opened Jun 29, 2026 by cubicj Closed Jun 29, 2026

What version of the Codex App are you using?

26.623.8305.0

What subscription do you have?

Pro x5

What platform is your computer?

Windows 11 Education x64
OS version: 10.0.26200, build 26200
PowerShell: 7.6.3 Core
Node: v24.16.0

What issue are you seeing?

In Codex Desktop on Windows, the bundled Codex runtime path is placed before my normal user npm path:

C:\Users\<user>\.cache\codex-runtimes\codex-primary-runtime\dependencies\bin

Because of that, pnpm resolves to Codex's bundled pnpm instead of the user-global pnpm used by the project.

The project declares:

"packageManager": "pnpm@10.34.1"

My user-global pnpm is also 10.34.1, but inside Codex:

Get-Command pnpm -All
pnpm --version

returns the bundled runtime first:

C:\Users\<user>\.cache\codex-runtimes\codex-primary-runtime\dependencies\bin\pnpm.cmd
C:\Users\<user>\AppData\Roaming\npm\pnpm.ps1
C:\Users\<user>\AppData\Roaming\npm\pnpm.cmd

11.7.0

Then normal workspace commands fail before the project script runs:

pnpm check
ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY
Aborted removal of modules directory due to no TTY

The same command works when I explicitly call the user-global pnpm:

& "$env:APPDATA\npm\pnpm.cmd" check
10.34.1
svelte-check found 0 errors and 0 warnings

pnpm test and pnpm build also pass with the user-global pnpm.

What steps can reproduce the bug?

  1. Open Codex Desktop on Windows.
  2. Open a pnpm project that declares packageManager, for example pnpm@10.34.1.
  3. Ensure user-global pnpm is installed under %APPDATA%\npm.
  4. Run:
Get-Command pnpm -All
pnpm --version
pnpm check
  1. Observe that Codex's bundled pnpm is used before the user-global pnpm.

What is the expected behavior?

Codex should not let its bundled pnpm shadow the package manager normally resolved by the user's shell or requested by the project.

A normal workspace command like pnpm check should use the same pnpm version as a normal Windows terminal, or otherwise respect the project's packageManager version.

Additional information

This may be related to #19549 and #3915, but the failure mode here is different: the bundled Codex pnpm changes the effective pnpm version from 10.34.1 to 11.7.0, which then triggers pnpm's non-TTY modules purge abort before the project script runs.

View original on GitHub ↗

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