openai / openai/codex

# Windows: repeated GitNexus MCP startup attempts leave pnpm installation caches and cause rapid disk growth

Open
#43,736 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug mcp windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

  1. Summary

The user reported a rapid loss of approximately 5–10 GB of free space on the system drive while running two foreground tasks. Investigation identified the direct bulk writer as pnpm temporary installation launched through the GitNexus MCP command, rather than conversation history itself.

The global MCP configuration used npx -y pnpm@latest dlx gitnexus@latest mcp. GitNexus initialization repeatedly hit an observed 30-second timeout. Inspected attempts lacked the reusable entry associated with a completed installation and left incomplete installation files behind; subsequent startup attempts created further directories.

A separate burst involved GitNexus startup events for 38 distinct loaded tasks. It occurred in the same time window as bundled-plugin reconciliation after the window gained focus. A newly loaded task followed the temporary disabled setting on disk, while older tasks still executed the old launch command. These were 38 loaded tasks, not 38 simultaneous foreground tasks deliberately started by the user.

After targeted removal of 230 residual directories, system-drive free space increased by a net 86.3916 GiB during the cleanup window. With a fixed installation and direct entry point, two independent MCP checks completed in 568 ms and 583 ms; the target cache directory remained at 0 → 0 entries.

2. Environment and configuration

See Appendix A for versions and Appendix D for redacted configuration. Codex state was already located on a non-system volume, but pnpm temporary installations still used %LOCALAPPDATA%\pnpm-cache\dlx\<CACHE_KEY> on the system drive. Relocating conversation history had not redirected this dependency-installation path.

The incident command used floating @latest specifications. pnpm 12.3.4 native was observed during investigation, and GitNexus 1.6.11 was used for fixed-entry validation. Not every historical residual directory is proven to contain the same version combination.

3. Observed sequence and suggested reproduction conditions

These conditions reconstruct the field observations for controlled laboratory verification; this is not an independently reproduced minimal test case on a second clean host. Please do not repeatedly test on a production machine with little free space.

  1. Configure the old global STDIO MCP command shown in Appendix D without a completed reusable GitNexus dlx installation.
  2. Under conditions where dependency downloads do not complete within the MCP startup deadline, create a task or trigger MCP initialization. Observe the 30-second timeout and newly created dlx installation directory.
  3. Keep multiple tasks loaded and observe whether subsequent task initialization or MCP refresh invokes the same installer command and creates independent attempts. Diagnostic subtasks also triggered this launch path, so cumulative counts are not attributable only to the user's original two foreground tasks.
  4. Examine older loaded tasks after changing the on-disk configuration but before an explicit reload or restart. A burst was observed during a plugin-reconciliation window; no controlled experiment established that window focus alone, or the particular reconciliation error, reliably triggers it.

Evidence comprises process ancestry, MCP startup logs, npm invocation logs, directory creation times, file allocation measurements, and before/after free-space samples. Preparing this report did not re-enable the problematic command, invoke a package manager, or reproduce disk growth.

4. Actual behavior and requested safeguards

Actual behavior:

  • Codex repeatedly started an MCP command that included dependency download/installation. No reusable installation result was produced in the observed failure window.
  • Incomplete installation directories accumulated, with bursts across loaded tasks amplifying disk pressure.
  • Editing configuration on disk did not immediately replace launch settings already held by older tasks.

Safeguards for the team to consider:

  • Concurrency control, backoff after repeated failures, or explicit resource-risk warnings for repeated initialization of the same installer command.
  • Review of lifecycle differences between plugin reconciliation, MCP runtime invalidation, and explicit configuration reload that could produce bursts using older settings.
  • Clear indication of which loaded tasks still require a restart to apply configuration changes.
  • Coordination with third-party installers on timeout, exit, and incomplete-cache handling. This is not a request to silently delete arbitrary third-party caches.
5. Attribution limits and confounders
  • The observed bulk-writer process chain was ChatGPT.exe → codex.exe app-server → cmd.exe → node.exe npx-cli.js → cmd.exe → pnpm.exe. Process IDs have been removed.
  • Configuration changes requiring a restart are not, by themselves, evidence of a bug. Official documentation instructs users to restart after saving MCP configuration and documents a dedicated reload interface. MCP configuration; App Server configuration reload.
  • Plugin reconciliation failure and the startup burst are temporally correlated. The error message itself is not proven to be the trigger, and exit reasons for every historical installer process were not captured.
  • Files left by exited installers do not establish that those old processes kept downloading after timeout.
  • Independent Visual Studio/SSMS background downloads of approximately 3.79 GiB occurred during investigation. Their process ancestry was separate from Codex, and they are not attributed to GitNexus-exclusive writes.
  • Appendix B distinguishes logical size, allocated file size, and net drive free-space changes. They cover different measurements and must not be added together or treated as interchangeable.
  • There is no independent cross-machine/version reproduction, OpenAI-confirmed issue number, or defect commit conclusively matched to the installed build.
6. Mitigation and validation scope

A one-time fixed dependency installation was completed on a non-system volume. The MCP now directly runs the GitNexus entry with Node.js; its launch command no longer calls npx/pnpm or resolves latest. Only verified residual directories were removed, using explicit manifests and after checking for old installer processes. Conversation history, task databases, and other MCP configurations were not migrated, deleted, or changed by this mitigation.

Post-cleanup initialization, tools/list, and resources/list checks passed: 17 tools, 2 resources, and cache entries 0 → 0. ONNX/Transformers loading, backend enumeration, and tensor checks passed, as did JavaScript/Python parsing. Actual model inference, user-project reindexing, and all-language coverage were not tested.

The desktop app-server also launched the fixed entry and reported ready. Previously loaded tasks still require an explicit reload or restart. This report does not include long-term observations after a user-completed app restart and does not claim a Codex source-code fix.

The one-time installation separately left approximately 47.4 MiB of incomplete Linux dependencies on the non-system drive and versionless lockfile entries, causing an npm maintenance dry-run to report Invalid Version. The user deferred that cleanup. This is separate from the C-drive cache incident and does not invalidate the successful startup checks above, but the mitigation installation has not passed every maintenance check.

7. Questions for the OpenAI team
  1. Is concurrent reinitialization of the same MCP across 38 loaded tasks expected in this version? Can concurrency or retry amplification of installer commands be limited?
  2. Can plugin reconciliation restart MCP instances that retain old configuration? Can bursts using a command changed or disabled on disk be avoided, or this pending-reload state be made explicit?
  3. How should Codex and third-party installers divide responsibility for incomplete installation files and warnings after startup timeouts?
  4. Is there an existing issue, recommended configuration, or fixed build suitable for follow-up validation?

附录 A / Appendix A — 环境 / Environment

项目 / Item 记录 / Observation
OS Windows 11 Enterprise, 64-bit; version 10.0.26200, build 26200
Windows desktop package OpenAI.Codex 26.901.6511.0, X64
Bundled backend binary codex-cli 0.153.4
Node.js / npm 24.15.0 / 11.12.1
pnpm 12.3.4 native, observed during investigation
GitNexus fixed entry 1.6.11
Local runtime used by mitigation @huggingface/transformers 4.2.0; onnxruntime-node 1.24.3
Transport Local STDIO MCP
Storage separation Codex state and fixed installation on a non-system volume; affected pnpm cache on C:

环境元数据于报告整理时只读采集;桌面包版本与事故日志中的包路径一致,CLI 版本从事故所用二进制路径读取。未取得确切源码提交号。诊断当时的 Node/npm 版本同时有安装日志佐证。

Environment metadata was collected read-only while preparing this report. The desktop package version matches the package path in the incident log, and the CLI version was read from the binary path used during the incident. An exact source commit was not established. Incident-time installation logs also recorded the Node/npm versions.

附录 B / Appendix B — 定量证据 / Quantitative evidence

所有时间为 2026-09-08 UTC;1 GiB = 1,073,741,824 字节。 / All timestamps below are UTC on 2026-09-08; 1 GiB = 1,073,741,824 bytes.

指标 / Measurement 结果 / Result 口径 / Scope
早期目录扫描 / Early directory scan 217 attempts; 2,504,504 files 05:21:38–05:23:12; reparse points skipped
早期文件逻辑体量 / Early logical file size 127,282,487,635 B = 118.5411 GiB Not unique allocated space or guaranteed reclaimable bytes
04:00–05:00 创建时间组 / Creation-time cohort 9 attempts Existing files were inspected later; not a continuous write trace
上述组的单硬链接文件分配量 / Single-link allocation in that cohort 6,643,989,192 B = 6.1877 GiB File-handle allocation/link-count checks; zero query errors
截至 05:22:34 的日志计数 / Log snapshot through 05:22:34 53 starting; 48 failed; 1 cancelled; 0 ready One desktop log; all 48 failures reported a 30-second timeout
06:22:13 集中启动 / Startup burst at 06:22:13 38 events; 38 distinct loaded tasks Event count and unique task count were both checked
定向删除 / Targeted removal 230 directories = 221 + 8 + 1 Initial manifest plus two verified supplemental manifests
清理前 C 盘可用 / C: free before cleanup 13,521,776,640 B = 12.5931 GiB 06:04:37.626
全部清理后 C 盘可用 / C: free after all cleanup 106,284,072,960 B = 98.9848 GiB 06:55:17.029
清理窗口可用空间净增 / Net free-space increase 92,762,296,320 B = 86.3916 GiB Drive-level net change; concurrent activity can affect it
收尾缓存条目 / Final cache entries 0 All 230 manifest targets absent; cache root retained empty
清理后独立 MCP 验证 / Independent post-cleanup MCP checks 568 ms; 583 ms 17 tools and 2 resources each; cache 0 → 0

217、221、230 是不同时间点的统计,不是彼此冲突的总数。早期逻辑体量未对所有多硬链接去重,不可替代清理时实测的可用空间净增量。9 个目录的 6.1877 GiB 分配量是事后存量测量,不应写成该小时的精确写入速率。用户提供的本地时间未确认时区,因此本报告只使用日志和文件元数据中的 UTC。

The counts 217, 221, and 230 describe different points in time. The early logical-size total was not fully deduplicated for hard links and must not replace the measured cleanup-window free-space delta. The 6.1877 GiB allocation of the nine-directory cohort was measured afterward and is not an exact hourly write rate. The user's local-time timezone was not confirmed; this report therefore uses UTC from logs and file metadata.

附录 C / Appendix C — 脱敏日志摘录 / Redacted log excerpts

以下为已有日志的规范化摘录:移除了任务/主机标识、无关字段及堆栈路径;保留所列时间、状态与错误内容。不是完整原始日志,也不能用被移除的标识推断跨行任务对应关系。38 个任务的全量身份列表不公开。

These are normalized excerpts from existing logs: task/host identifiers, unrelated fields, and stack paths were removed. Shown timestamps, statuses, and error content are retained. These are not full raw logs and do not establish cross-line task identity. The list of 38 task identities is not included.

2026-09-08T05:22:04.938Z info [AppServerConnection] mcp_server_startup_status_updated server=gitnexus status=starting
2026-09-08T05:22:34.907Z warning [AppServerConnection] mcp_server_startup_status_updated error="MCP client for `gitnexus` timed out after 30 seconds. Add or adjust `startup_timeout_sec` in your config.toml:\n[mcp_servers.gitnexus]\nstartup_timeout_sec = XX" server=gitnexus status=failed

2026-09-08T06:04:45.819Z info [AppServerConnection] mcp_server_startup_status_updated server=gitnexus status=starting
2026-09-08T06:04:48.318Z info [AppServerConnection] mcp_server_startup_status_updated server=gitnexus status=ready

2026-09-08T06:22:07.857Z info [bundled-plugins] bundled_plugins_reconcile_started hasExternalPluginStateSync=true queued=false reason=focus
2026-09-08T06:22:11.438Z warning [bundled-plugins] bundled_plugins_reconcile_failed errorMessage="marketplace 'openai-bundled' is already added from a different source; remove it before adding this source" errorName=Error hasExternalPluginStateSync=true reason=focus
2026-09-08T06:22:13.762Z info [AppServerConnection] mcp_server_startup_status_updated server=gitnexus status=starting
2026-09-08T06:22:44.376Z warning [AppServerConnection] mcp_server_startup_status_updated error="MCP client for `gitnexus` timed out after 30 seconds. Add or adjust `startup_timeout_sec` in your config.toml:\n[mcp_servers.gitnexus]\nstartup_timeout_sec = XX" server=gitnexus status=failed

日志内的建议文本仅作为错误证据保留,不是本报告建议执行的修复命令。 / Advice embedded in the error text is retained as evidence, not endorsed as a remediation command.

附录 D / Appendix D — 脱敏启动配置 / Redacted launch configuration

位置 / Location: <CODEX_HOME>/config.toml, section [mcp_servers.gitnexus].

原配置 / Before:

[mcp_servers.gitnexus]
command = "npx"
args = ["-y", "pnpm@latest", "dlx", "gitnexus@latest", "mcp"]

固定入口配置 / Fixed entry:

[mcp_servers.gitnexus]
command = '<ABSOLUTE_NODE_EXE>'
args = ['<FIXED_INSTALL_ROOT>/node_modules/gitnexus/dist/cli/index.js', 'mcp']

尖括号字段为脱敏占位符,不是可直接执行的路径;未附带完整配置、环境变量、代理地址或认证信息。固定入口段在验收时启用,未通过放宽超时时间替代修复。

Angle-bracket fields are redaction placeholders, not runnable paths. The complete configuration, environment variables, proxy addresses, and authentication data are omitted. The fixed-entry section was enabled at validation; increasing the startup timeout was not used as a substitute for the mitigation.

安装残留中的根文件 / Root manifest observed in incomplete attempts: <CACHE_ROOT>/<ATTEMPT>/package.json.

{"name":"dlx","version":"0.0.0"}

检查到的残留缺少可复用的 <CACHE_ROOT>/pkg 入口。该状态与未完成的临时安装一致,但不能单凭它确定每个历史进程的退出原因。

Inspected residuals lacked the reusable <CACHE_ROOT>/pkg entry. This is consistent with incomplete temporary installation, but does not establish the exit cause of every historical process.

提交与隐私说明 / Submission and privacy notes

  • 本稿保留技术版本、时间、容量与必要命令;移除了用户名、设备名、私人项目路径、任务/进程 ID、原始缓存键及文件校验指纹。不包含完整会话、数据库、凭据、代理信息或完整配置。原始证据保留在本地,本稿没有到私人文件的链接。
  • The draft retains technical versions, times, byte counts, and necessary commands. It omits usernames, device names, private project paths, task/process IDs, original cache keys, and file fingerprints. It contains no full conversation, database, credentials, proxy information, or complete configuration. Raw evidence remains local; no private-file links are included.
  • 这是脱敏技术报告,不承诺不可关联的完全匿名。提交前请由用户再次审核;不要直接附上原始本地诊断目录或自动共享整段会话。
  • This is a redacted technical report, not a guarantee of unlinkable anonymity. The user should review it before submission; do not attach the original local diagnostic directory or automatically share the full conversation.
  • 官方支持应用内反馈及 GitHub 问题报告,并要求共享日志前检查敏感信息;提交入口以官方页面为准。本稿尚未发送。官方反馈指引 / Official feedback guidance
  • Official guidance describes in-app feedback and GitHub issue reporting and asks users to review logs for sensitive information. Follow the linked official guidance for submission. This draft has not been sent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the global STDIO MCP command in Appendix D, the app-server configuration reload path, and the MCP startup logs described in Appendix C. Reproduce the timeout and loaded-task initialization behavior in a controlled environment, then define completion around preventing retry amplification, making pending reload state explicit, and validating cleanup without affecting unrelated caches.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, rust
Domain
backend, desktop-dev, devtools
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.