Skip to content

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

Closed as not planned

Description

@cubicj

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": "[email protected]"

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 [email protected].
  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.

Activity

  1. added
    bug
    app
    windows-os
    on Jun 29, 2026
  2. github-actions commented on Jun 29, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  3. cubicj commented on Jun 29, 2026

    @cubicj
    Author

    Closing as a duplicate of #30440. I moved the Windows reproduction details there: #30440 (comment)

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

    appbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions