Skip to content

Windows: unbounded per-untracked-file Git fan-out; 24 GiB status working set after bulk intent-to-add workaround #53847

Open

Description

@maguirio

Summary

Codex on native Windows can fan out one git diff --binary --no-index process per visible untracked path during gitDiffToRemote. Large local research/output trees turn this into a severe process and memory risk.

An independent local diagnostic established the per-file fan-out on a four-file disposable fixture. A custom mitigation subsequently added untracked files as intent-to-add entries. That avoided the per-file fan-out, but incorrectly included a large generated archive tree. This made full status checks extremely expensive. This report explicitly distinguishes the product behavior from that local mitigation mistake.

Environment

  • Windows 11 Business, x64, version 10.0.26200.
  • Dell Precision 5690, approximately 32 GB installed RAM / 31.46 GiB usable.
  • Desktop app checker: installedVersion 26.1007.21434, build 13901, prod.
  • Current MSIX package: OpenAI.Codex 26.1007.2314.0. Package and app version identifiers are different.
  • Bundled CLI checked on October 13: codex-cli 0.162.0-alpha.17.2.
  • Git for Windows 2.54.0.1.
  • Native local workspace, not WSL. Mobile Remote is regularly used.
  • Multiple concurrent tasks. No crash-inducing stress test was run.

Directly verified observations

1. Per-file subprocess fan-out

A bounded, isolated four-untracked-file fixture was queried through the local app-server's gitDiffToRemote:

Fixture Per-file --no-index Git commands Returned diff bytes
Four ordinary untracked text files 4 608
Same files registered as intent-to-add 0 608

Before the local workaround, the affected real workspaces had 24,217 and 2,614 untracked paths respectively. Those counts are potential workload size; they are not claimed to be a simultaneous process census.

2. Very large resident memory in full Git status

On October 13 a live read-only command with this shape was recorded at 24.12 GiB working set:

git status --renames --porcelain=v1 -z --untracked-files=normal

An earlier private-memory measurement for that process was approximately 0.207 GiB. Resident memory and private commit are not interchangeable. Stopping that read-only status was followed by physical RAM utilization returning to approximately 45.3%.

3. Local workaround aggravated the status workload — corrected

Our custom normalizer had automatically registered roughly 70,700 files in a generated research/archive tree as intent-to-add. The tree had approximately 94.75 GiB logical file contents, including compressed/hardlinked historical copies. This is not 94.75 GiB newly created by Git, and is not its exclusive physical storage.

On October 13 at approximately 22:56 America/Toronto, we:

  • added local exclusion rules for only these generated archive families;
  • removed 70,708 intent-to-add entries through a private-index transaction;
  • verified every unrelated index entry and the prepared/staged raw diff were unchanged;
  • left all working files untouched;
  • prevented the normalizer from enrolling those archive families again.

The primary index went from 74,554 to 3,846 entries. The same status command then completed successfully in 0.104 seconds, with 19,417 output bytes and no stderr. The timing supports the generated-index workload as a major contributor on this machine. It does not prove that every historical failure had this cause.

4. Latest application closure was a custom safety action

October 13, America/Toronto (UTC-4):

  • 22:17:13: Windows Application Error 1000 for git.exe, exception 0xc0000005.
  • 22:18:16: a task started a broad shell Git status in the large primary workspace.
  • 22:18:57: our independent guard recorded physical RAM at 95.98%.
  • 22:18:59: that guard intentionally closed the desktop/backends.
  • 22:20:00: the guard reopened the desktop.
  • The laptop's last boot remained 19:26:17; no laptop reboot occurred during this incident.

The latest desktop closure is therefore not being reported as an unexplained native desktop crash. The access violation, later shell status and missing historical resident-memory samples do not establish a complete causal chain. The guard originally covered GUI status but missed shell status; that gap has now also been corrected.

Expected behavior / requested engineering changes

  • Bound concurrent Git subprocesses globally and per repository in gitDiffToRemote, including the untracked-file path.
  • Stream or cap path enumeration and diff output instead of eagerly scheduling a process for every untracked file.
  • Coalesce repeated automatic scans and apply a circuit breaker/backoff after resource errors, cancellation or timeout.
  • Correctly terminate and reap complete Git process trees on Windows.
  • Allow supported disabling of expensive automatic Git review/status activity, including Remote-triggered work, without disabling agent execution or ordinary messages.
  • Add diagnostics that distinguish resident mapped pages from private commit and identify the actual scan caller.
  • Large generated research trees should cause a bounded unavailable/partial review result, never jeopardize the user's running tasks or OS.

Related reports

This report adds a bounded per-untracked-file reproduction, a directly observed 24.12 GiB status working set, and the measured effect of removing a mistakenly created bulk intent-to-add workload. It does not assert that all related reports share one proven root cause.

Privacy

Text-only technical report. No raw logs, conversation exports, account identifiers, credentials, repository URLs, private project names, user-specific paths, or project contents are included.

Activity

  1. added
    bug
    app
    windows-os
    app-server
    on Oct 14, 2026
  2. github-actions commented on Oct 14, 2026

    @github-actions
    Contributor
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

    appapp-serverbugperformancewindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions