[Windows][Spreadsheets] Cross-volume cleanup can dereference the node_modules junction and remove files from the shared primary runtime
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
- Let
load_workspace_dependenciesreturn a sharednode_modulesdirectory
on C:.
- Create a spreadsheet working directory on another volume, such as
D:\spreadsheet-work.
- Create a junction from
D:\spreadsheet-work\node_modulesto the shared
runtime directory.
- Run a spreadsheet builder.
- 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'
```
- Packages disappear from the loader-provided runtime and appear under the
cleanup destination.
- 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
LinkTypebefore 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.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action