codex - 💡(How to fix) Fix Windows workspace dependency runtime reinstall creates Node-unusable pnpm directory links [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#22038Fetched 2026-05-11 03:20:23
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Root Cause

After reinstalling the bundled runtime, Node fails to resolve packages inside the bundled node_modules tree because at least some pnpm directory links exist on disk but cannot be stat'ed/followed by Node.

Fix Action

Fix / Workaround

Workaround that fixed it locally

Code Example

Cannot find module 'setimmediate'
require stack: pptxgenjs -> jszip -> setimmediate

---

...\dependencies\node\node_modules\.pnpm\jszip@3.10.1\node_modules\setimmediate
LinkType: SymbolicLink
Target: ..\..\setimmediate@1.0.5\node_modules\setimmediate
PowerShell Test-Path ...\setimmediate\package.json => True

---

EPERM: operation not permitted, stat '...\.pnpm\[email protected]\node_modules\setimmediate'

---

Failed to extract primary runtime archive
Can't create '\\?\C:\Users\...\.cache\codex-runtimes\codex-runtime-install-...\payload\codex-primary-runtime\dependencies\node\node_modules\...' : Invalid argument

---

node.exe --version => v24.14.0
python.exe --version => Python 3.12.13
require('docx') => OK
require('pptxgenjs') => OK
require('sharp') => OK
import docx, openpyxl, artifact_tool_v2 => OK
RAW_BUFFERClick to expand / collapse

What happened?

On Windows, Codex Desktop's Reset and install Workspace / workspace dependency reinstall can report success and make load_workspace_dependencies see the bundled runtime, but the installed Node workspace dependencies are not actually usable.

After reinstalling the bundled runtime, Node fails to resolve packages inside the bundled node_modules tree because at least some pnpm directory links exist on disk but cannot be stat'ed/followed by Node.

The concrete failure I observed was:

Cannot find module 'setimmediate'
require stack: pptxgenjs -> jszip -> setimmediate

Inspecting the installed runtime showed the package link exists:

...\dependencies\node\node_modules\.pnpm\[email protected]\node_modules\setimmediate
LinkType: SymbolicLink
Target: ..\..\[email protected]\node_modules\setimmediate
PowerShell Test-Path ...\setimmediate\package.json => True

But Node cannot stat/follow it:

EPERM: operation not permitted, stat '...\.pnpm\[email protected]\node_modules\setimmediate'

Environment

  • OS: Windows
  • Codex Desktop workspace dependency bundle: 26.506.11943
  • Runtime path: %USERPROFILE%\.cache\codex-runtimes\codex-primary-runtime
  • Node in bundle: v24.14.0
  • Python in bundle: Python 3.12.13
  • Windows Developer Mode was enabled before the reinstall

Reproduction / diagnosis notes

  1. Use Codex Desktop on Windows.
  2. Enable workspace dependencies.
  3. Click Reset and install Workspace.
  4. The UI can report the reinstall succeeded.
  5. load_workspace_dependencies reports the bundle paths correctly.
  6. Running bundled Node with the bundled node_modules path and importing packages such as pptxgenjs fails because Node cannot follow a pnpm-linked dependency directory.

Before enabling Developer Mode, the same reinstall path also failed during extraction with many archive extraction errors like:

Failed to extract primary runtime archive
Can't create '\\?\C:\Users\...\.cache\codex-runtimes\codex-runtime-install-...\payload\codex-primary-runtime\dependencies\node\node_modules\...' : Invalid argument

After enabling Developer Mode, extraction appears to complete, but the runtime still contains directory symlinks that are unusable by Node in this environment.

Workaround that fixed it locally

Manually reinstalling the runtime while materializing pnpm directory links as Windows junctions fixed the issue. After that, these checks passed:

node.exe --version => v24.14.0
python.exe --version => Python 3.12.13
require('docx') => OK
require('pptxgenjs') => OK
require('sharp') => OK
import docx, openpyxl, artifact_tool_v2 => OK

Clicking Reset and install Workspace again deletes that repaired bundle and reintroduces the broken official install state.

Expected behavior

The Windows workspace dependency installer should produce a runtime where bundled Node packages can be resolved and imported by Node after reinstall.

Possible fixes might include creating Windows directory junctions for pnpm directory links, creating directory symlinks in a way Node can follow, or materializing the linked directories during extraction on Windows.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The Windows workspace dependency installer should produce a runtime where bundled Node packages can be resolved and imported by Node after reinstall.

Possible fixes might include creating Windows directory junctions for pnpm directory links, creating directory symlinks in a way Node can follow, or materializing the linked directories during extraction on Windows.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING