[Windows][Spreadsheets] Cross-volume cleanup can dereference the node_modules junction and remove files from the shared primary runtime

Open 💬 1 comment Opened Jul 28, 2026 by LItterBoy-GB
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Environment

  • Codex Desktop
  • Windows
  • Workspace dependency bundle: 26.727.11326
  • @oai/artifact-tool: 2.8.33

Problem

The bundled Spreadsheets skill instructs agents to create a node_modules
Windows junction pointing to the loader-provided shared dependency directory.

If cleanup includes that junction in a cross-volume Move-Item, PowerShell can
dereference the junction and move packages out of the shared primary runtime
instead of moving only the link.

A command timeout can interrupt this operation midway, leaving the dependency
tree split across two directories. Other conversations then fail with:

Cannot find package '@oai/artifact-tool'

Restarting Codex does not necessarily restore the missing files, while runtime
metadata may still report that the dependency bundle is installed.

Reproduction

  1. Let load_workspace_dependencies return a shared node_modules directory

on C:.

  1. Create a spreadsheet working directory on another volume, such as

D:\spreadsheet-work.

  1. Create a junction from D:\spreadsheet-work\node_modules to the shared

runtime directory.

  1. Run a spreadsheet builder.
  2. Include the junction in a cleanup command:

``powershell
Move-Item -LiteralPath

'D:\spreadsheet-work\builder.mjs',
'D:\spreadsheet-work\node_modules'

-Destination 'C:\temp\spreadsheet-cleanup'
```

  1. Packages disappear from the loader-provided runtime and appear under the

cleanup destination.

  1. If the command times out, the dependency tree is only partially moved.

Expected behavior

Spreadsheet tasks and cleanup operations must not be able to mutate or split
the loader-managed dependency tree.

The Spreadsheets skill should require:

  • A conversation-specific working directory on the same volume as the runtime,

preferably under C:\temp.

  • No dependency junction inside a workbook or project directory on another

volume.

  • Never including the junction in Move-Item, Copy-Item, archive operations,

recursive cleanup, or multi-path operations.

  • Checking LinkType before cleanup and unlinking only the exact junction.

Suggested defense in depth

  • Provide module resolution that does not require a junction to the shared

dependency tree.

  • Protect loader-managed dependencies from task cleanup operations.
  • Verify critical package contents during runtime health checks.
  • Automatically repair the bundle when integrity checks fail.

No private project data, user paths, conversation identifiers, workbook names,
or business content are included.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 1 month ago

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

  • #34702

Powered by Codex Action