Skip to content

[Windows][Desktop 26.901.5280.0] unbounded per-file git diff --no-index fan-out exhausts commit and crashes Windows #43019

Open

Description

@swhm222

Summary

Codex Desktop on Windows can catastrophically exhaust system commit when a Git workspace contains thousands of untracked files.

On a clean NVMe test copy with ~4,771 untracked files, the Codex app-server (codex.exe) directly spawned one git diff --no-index operation per untracked file with no effective fan-out cap. The observed git.exe count went from 0 to 168 in 4 seconds, with a measured peak creation rate of 99 git processes/second. The storm continued after the sampler stopped, eventually reaching 4,969 total processes and 91.39 / 91.39 GB committed memory (100%), causing unrelated Windows processes to crash and the machine to restart.

This reproduces on NVMe with core.fsmonitor=false, so it is not dependent on a slow USB disk or fsmonitor.

This appears closely related to #30345 (closed as completed), #34005, #26812, and #20933, but this report adds a current Windows build, direct PPID evidence, a no-task/idle trigger, and a full system commit-exhaustion failure mode.

Environment

  • OS: Windows 11 Home, build 26200, x64
  • Codex Desktop MSIX: OpenAI.Codex_26.901.5280.0_x64__2p2nqsd0c76g0
  • RAM: 32 GB
  • Test workspace: local NVMe SSD
  • Git for Windows installed under C:\Program Files\Git
  • core.fsmonitor=false
  • Workspace contained approximately 4,771 untracked files

Trigger

No substantive task or Git command was required.

Timeline from the reproduced session:

19:58:46  ChatGPT.exe launched
19:58:54  codex.exe app-server launched
19:59:45  user message was only "."
20:01:15  git process storm began

The session contained no relevant model/sandbox Git command before the storm. The Git processes were spawned directly by codex.exe, not through PowerShell or a shell tool invocation.

Direct process-tree evidence

First observed pair:

ChatGPT.exe
  -> codex.exe (PID 5348)
      -> C:\Program Files\Git\cmd\git.exe (PID 11788)
          -> C:\Program Files\Git\mingw64\bin\git.exe (PID 28044)

At the abort snapshot:

85  git.exe children directly parented by codex.exe
83  inner git.exe children parented by those Git-for-Windows shim processes
168 git.exe total

The command pattern was per-file untracked diff generation using git diff --no-index.

Process growth

Independent 1 Hz sampling captured:

20:01:14  total processes=311   git.exe=0
20:01:15  total processes=318   git.exe=2
20:01:16  total processes=333   git.exe=17
20:01:17  total processes=343   git.exe=32
20:01:18  total processes=479   git.exe=168

New git.exe creations by second:

20:01:15   2
20:01:16  19
20:01:17  80
20:01:18  99

The sampler intentionally aborted at git.exe > 100, but it did not terminate Codex or its children, so the storm continued.

System-level impact

Windows Resource Exhaustion Detector / system events later recorded:

20:01:52  Processes=4,635   Commit=91.36/91.39 GB
20:07:02  Processes=4,969   Commit=91.39/91.39 GB (100%)

After commit exhaustion, unrelated processes failed, including Chrome, audio services, ChatGPT, Google Drive, and Windows error-reporting components. One visible failure was:

remoting_host.exe: 0xc000012d (STATUS_COMMITMENT_LIMIT)

Windows ultimately restarted.

Why this looks like app-server behavior rather than model/tool execution

  • The user message was only ..
  • No meaningful task had been issued.
  • No corresponding sandbox shell commands existed in the relevant time window.
  • The parent process was directly codex.exe.
  • codex-command-runner count was 0 during the captured storm.
  • The issue reproduced on NVMe and with fsmonitor disabled.

This strongly suggests background workspace diff calculation in the app-server rather than a prompt, skill, or shell command.

Expected behavior

Codex Desktop should never launch an unbounded number of per-file Git subprocesses for untracked files.

Suggested guardrails:

  1. Put a strict concurrency cap on per-file untracked diffs (for example 8–32 concurrent operations).
  2. Prefer batching instead of one process per file where possible.
  3. Add a hard untracked-file count / byte budget before materializing diffs.
  4. For very large untracked sets, return a summary/omitted-files marker rather than diffing every file.
  5. Cancel pending work immediately when the workspace changes, the request is obsolete, or resource thresholds are exceeded.
  6. Avoid doing the expensive untracked diff path merely from opening/restoring a workspace or idle background metadata refresh.

Workaround

Reducing the number of visible untracked files via appropriate ignore rules appears likely to reduce exposure, but this is only a workaround. A normal dirty repository should not be able to trigger thousands of subprocesses and system-wide commit exhaustion.

Related issues

I have sanitized process snapshots, 1 Hz system/process samples, and Windows Resource Exhaustion event evidence available if maintainers need them. Local usernames, repository names, and private conversation contents are intentionally omitted.

Activity

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

    @github-actions
    Contributor

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

    Powered by Codex Action

  3. swhm222 commented on Sep 5, 2026

    @swhm222
    Author

    I reviewed #41982. It is clearly related, but I do not believe this report is an exact duplicate at this point.

    Key differences in this reproduction:

    So the two issues may share a broader background Git/workspace-diff concurrency problem, but this report appears to identify a distinct local workspace-diff trigger/path with direct PPID and per-file fan-out evidence.

    I am leaving this issue open for maintainer triage. If maintainers determine it should be consolidated into #41982, I am happy to follow that direction.

  4. swhm222 commented on Sep 5, 2026

    @swhm222
    Author

    Thanks — this matches the runtime evidence very closely. I also independently checked current main, and the same split is present there: codex-rs/git-utils/src/info.rs::diff_against_sha() builds one async git diff --no-index future per untracked path and awaits them with join_all(...), while codex-rs/app-server/src/request_processors/git_processor.rs calls git_diff_to_remote(&cwd) directly. By contrast, the TUI /diff path iterates untracked files serially.

    A few measured Windows values that may be useful for a regression/concurrency guard:

    • Direct git.exe children concurrently parented by codex.exe app-server: 85
    • Total concurrent git.exe including the Git-for-Windows shim child: 168
    • Observed peak Git process creation rate: 99 processes/second
    • Average private commit per git.exe: ~17.18 MB
    • Maximum observed private commit per git.exe: ~34.14 MB
    • Untracked-file count: measured floor 4,139; derived estimate ~4,771
    • Final Windows process count: 4,969
    • System commit at failure: 91.39 / 91.39 GB (100%)

    One Windows-specific detail that may matter for the regression: each Git invocation commonly appears as two processes:

    C:\Program Files\Git\cmd\git.exe
    → C:\Program Files\Git\mingw64\bin\git.exe

    So a concurrency limit of N direct Git invocations can correspond to roughly 2N live git.exe processes on Windows.

    The session evidence also narrows the trigger surface:

    • the only user message before the storm was .
    • there were zero CommandExecution records before the fan-out
    • the Codex sandbox log had no corresponding shell commands
    • the first abnormal Git process was directly parented by codex.exe

    That still does not prove which Desktop refresh/request invoked gitDiffToRemote; it only shows the fan-out can occur as background app-server workspace work without a substantive prompt.

    There was also earlier Desktop-owned Git activity (fetch --depth 1 origin main, fsmonitor config probe, and top-level resolution) before the fan-out. Because the timing and parent processes differ, I am only mentioning that as a trace-correlation clue, not as a proven call chain.

  5. yingming85-debug commented on Sep 26, 2026

    @yingming85-debug

    Adding independent, sanitized evidence from another affected Windows workstation on 2026-09-26. Please prioritize maintainer triage: this can destabilize the whole host, rather than just slow down a diff.

    Observed environment

    • Desktop package: OpenAI.Codex_26.924.1866.0_x64
    • Bundled backend reports codex-cli 0.158.0-alpha.2
    • Native Windows, approximately 32 GiB RAM, Git for Windows.
    • A subsequent read-only inventory found 71,798 visible untracked files, largely runtime artifacts and dependencies. This was measured during investigation, not simultaneously with the burst.

    Recorded burst (elapsed time from the first row)

    Elapsed Live git.exe count Total Git private memory (MiB) System commit (GiB)
    0 s 0 0 16.49
    10 s 60 959.6 17.68
    36 s 180 3081.4 20.30
    51 s 368 6328.2 24.26
    57 s 735 12844.7 30.95

    These are sampled counts, not a claim to have captured the peak. The commit limit at the last sample was 41.86 GiB, so this sample alone does not establish which resource failed first afterward.

    PID/creation-time-checked ancestry for sampled processes was:

    ChatGPT.exe -> codex.exe -> git.exe
    

    Other samples also contained Git for Windows' wrapper-to-inner-git pair. Detailed ancestry was capped at 32 Git processes per sample; we are not claiming individually verified parentage for all 735.

    Actual commands recovered from seven local Windows Git minidumps

    All seven contained this command shape, targeting individual untracked runtime/dependency files:

    git -c safe.bareRepository=explicit -c core.hooksPath=NUL -c core.fsmonitor=false diff --no-textconv --no-ext-diff --binary --no-index -- NUL <one-untracked-file>
    

    Three dumps were from September 25 and four from September 26. On September 26, three of the dumped Git processes were created several minutes after the separate research worker tree had been stopped by its memory guard. Stopping that worker did not stop the Desktop-owned Git producer. Raw dumps, private paths, repository contents, credentials and conversation identifiers are intentionally not attached.

    Source match

    The installed-version public tag contains the same per-file loop and unbounded join_all:
    https://github.com/openai/codex/blob/rust-v0.158.0-alpha.2/codex-rs/git-utils/src/info.rs#L704

    Current public main was also inspected on September 26 and still contains the unbounded path:
    https://github.com/openai/codex/blob/main/codex-rs/git-utils/src/info.rs#L656

    The matching tag is not a byte-for-byte attestation of the shipped binary, and the precise Desktop UI/request trigger on this workstation is still unknown. The command shape, sampled ancestry and source path nevertheless align closely.

    Requested fix / regression coverage

    1. Put a hard concurrency limit on the shared/app-server untracked-diff path. A timeout on each command is not a fan-out limit.
    2. Bound both work admission and aggregate captured diff output; make any omissions explicit rather than silently returning an apparently complete patch.
    3. Test request cancellation and child cleanup, including Git for Windows' wrapper children.
    4. Add a deterministic regression with a fake Git executable/invocation counter and many synthetic paths, asserting peak in-flight calls remain bounded. Please cover the shared/app-server path, not only the TUI diff implementation; avoid a real workstation-scale process storm.

    Narrow ignore-rule corrections reduced this workspace's visible untracked list by about 94%, but thousands remain. We treat that as exposure reduction, not an upstream fix or proof of stability. No deliberate memory-pressure reproduction was performed.

    Could a maintainer confirm the owning component, whether a fix is planned or already exists elsewhere, and a supported mitigation pending release? A normal repository with many untracked files should not be able to cause uncontrolled host-wide process and memory growth.

  6. Ernest-NA commented on Sep 28, 2026

    @Ernest-NA

    Adding a recurrence from another Windows workstation on the newer Desktop build 26.924.2738.0 (2026-09-27/28). This comment contains only sanitized measurements; no repository paths, file names, conversation content, or raw logs are attached.

    Environment: Windows 11 Home build 26200, native Windows agent, Git for Windows, approximately 128 GiB installed RAM (127 GiB visible).

    Observed process lineage: An incident-onset snapshot at 2026-09-28 12:08:19 CEST captured a git.exe created at 12:08:16 with codex.exe as its direct parent; the app-server was a child of the Desktop ChatGPT.exe. A separate inventory during the earlier recurrence found 1,465 of 2,929 live Git processes directly parented by the app-server, with many remaining Git-for-Windows wrapper-to-inner-Git children. The inspected chat/tool commands did not explicitly invoke Git.

    Measured recurrences (15-second circular sampler):

    Local time (CEST) Live git.exe Other system evidence
    Sep 28 00:24:46 4 Before rapid growth
    Sep 28 00:25:01 559 1,030 total processes
    Sep 28 00:31:47 34,824 35,297 total processes; ~121 GiB kernel paged pool
    Sep 28 12:08:19 214 Incident-onset parentage captured
    Sep 28 12:17:57 38,131 38,578 total processes; 3,572,424 system handles; ~131.5 GiB kernel paged pool

    Windows recorded unclean restarts at approximately 00:32:47 and 12:18:28 on Sep 28. A Sep 27 recurrence also exceeded 51,000 live Git processes before an unclean restart.

    This is a strong match to the app-server-owned Git process fan-out reported here on a newer Desktop package, but the exact Git command line was not captured in these incidents, so I cannot independently prove it is the same diff --no-index path. Please consider this evidence of a continuing host-wide resource exhaustion risk and advise whether a fix or supported mitigation is available for this build.

  7. addkn commented on Sep 30, 2026

    @addkn

    Recurrence on the newest Desktop build 26.928.21956 (Windows 11 Pro 26200), 2026-09-30. ~31.5k untracked files (an npm cache folder). Four gitDiffToRemote calls in the app-server log (06:37, 15:13, 17:44, 18:24); each was followed by commit exhaustion within minutes: git.exe peaked at ~4,700 + ~2,000 conhost, commit 94% of 127 GB, services crashed (Network List, Tailscale), and remote sessions dropped. Zero exhaustion episodes without a preceding call. Workaround: ignoring the folder (untracked 31.5k → 11). Still join_all with no concurrency cap in current main.

  8. sharkbee commented on Oct 1, 2026

    @sharkbee

    Additional recurrence on Codex Desktop 26.928.2636.0 / bundled codex-cli 0.159.2, recorded on 2026-10-01 (UTC+08:00). Two independent local recorders corroborate the app-server-owned per-file Git fan-out and host-wide memory pressure. This is a sanitized report; no private repository contents, absolute paths, credentials or conversation IDs are included.

    Environment

    • Native Windows 11 Home x64, build 26200; approximately 64 GiB installed RAM.
    • Git for Windows; local Git worktree containing generated review/animation frames.
    • A read-only inventory during the investigation found 12,761 untracked review files, including 11,662 PNGs. This inventory was taken after the incident, not at the exact onset.

    Evidence from the supplied memory/process log

    The memory recorder normally sampled every ~2 seconds; later rows are farther apart as the host became overloaded. Counts below are simultaneous live Git processes, not cumulative creations.

    Local time Live git.exe Total processes System commit / limit (GiB)
    09:35:02 0 430 28.0 / 99.4
    09:36:21 65 549 29.1 / 99.4
    09:36:25 599 1,346 37.7 / 99.4
    09:36:31 1,403 2,549 50.4 / 99.4
    09:36:44 2,965 4,891 73.6 / 99.4
    09:37:19 5,958 9,385 123.1 / 123.7

    Those abnormal rows attributed the Git producer to codex.exe PID 13580. Actual sampled command lines targeted individual PNG files, with this shape (filename anonymized):

    git.exe -c safe.bareRepository=explicit -c core.hooksPath=NUL -c core.fsmonitor=false diff --no-textconv --no-ext-diff --binary --no-index -- NUL <generated-preview-frame>.png
    

    Both Git-for-Windows wrapper and inner-Git processes appeared. They should not be mistaken for proof that Git itself is recursively malfunctioning.

    Independent process-start and memory capture

    A temporary Windows Win32_ProcessStartTrace subscription separately captured PID, parent PID and process creation time. For Git starts after 09:36:20, tracing through Git wrapper processes to the first non-Git ancestor attributed 4,485 captured starts to codex.exe:13580, versus 42 to other software and 4 unresolved. The recorder stopped at its explicit 5,000-total-event safety limit at 09:36:56, so this is a bounded early sample, not the complete storm.

    A separate full memory snapshot at 09:37:28 recorded:

    • 7,281 simultaneous git processes, with approximately 124.564 GiB aggregate private memory.
    • 3,679 conhost processes, approximately 3.701 GiB aggregate private memory.
    • 11,362 total processes, and 164.670 GiB system commit.

    The desktop runtime log subsequently reported a GPU child crash at 09:37:35 and ERR_INSUFFICIENT_RESOURCES at 09:37:37. Windows boot time after recovery was 09:38:23.5. The GPU error was downstream of the Git/commit surge, not evidence that GPU rendering was the primary allocation source.

    Trigger uncertainty

    An external Unreal rendering task had finished around 09:35:00, before the abnormal Git burst. That timing does not establish that rendering caused the issue. The directly observed producer was Codex's app-server, and the sampled commands were generated-frame diffs. The precise Desktop request/UI action invoking this path remains unknown; no source-code claim is made about the shipped binary.

    Narrow mitigation, not an upstream fix

    A repository-local info/exclude rule for generated review PNGs reduced visible untracked PNGs from 11,662 to 0, while retaining all files and keeping scripts, inventories and models visible. The Git index and tracked team ignore file were unchanged. This verifies the ignore workaround only; the full failure reproduction has not been rerun after mitigation.

    Please triage this as a host-stability/resource-exhaustion defect, not merely a large-diff performance issue. A timeout per command is not a concurrency limit. The shared/app-server path needs bounded in-flight subprocesses, untracked-file/output budgets, and cancellation that reaps Windows Git wrapper descendants. Regression tests should use synthetic inputs/fake Git invocation counters rather than recreate a workstation-scale memory-exhaustion storm.

    Raw local evidence is retained privately and can be supplied through an approved private support channel if required.

  9. Vaddix123 commented on Oct 3, 2026

    @Vaddix123

    Another Windows recurrence, plus three points I don't see in this thread yet: a last-known-good version, the public source history around the onset, and a stop action that works. Measured findings are kept separate from inferences.

    Recurrence (measured). Windows 11 Home 26200, 16 GB RAM, Desktop 26.928.3736.0 / 26.930.2377.0, bundled codex-cli 0.158.0-alpha.2.1 through 0.159.2. One repo with ~28,750 untracked files. Between 2026-09-28 and 10-02 a recorder wrote 53 threshold dumps, and every one had git.exe <- codex.exe app-server as the top parent/child pair, with the same diff --no-index -- NUL <path> command shape reported above. Largest snapshot: 13,117 host processes, of which 9,620 were git.exe with codex.exe as direct parent (live in one snapshot, not a count of distinct diff jobs), at 98% commit and 14.8 GB paged pool. The diffed paths included untracked files last modified 2–3 weeks earlier.

    1. Stopping it (measured). During an idle-thread recurrence on 10-02, killing git.exe didn't help: 641 were killed in 20 s while app-server re-spawned them (121 live at peak). Terminating the codex.exe app-server process stopped the storm immediately. git.exe dropped to 0 and the process count returned to baseline. The Desktop app then relaunched app-server, which stayed quiet for the rest of the observation window. Until a fix ships, this may be a useful emergency stop for others.

    2. Onset / last-known-good (partly inferred). On this machine the same repo, at a similar untracked count (~5k), had no storms under codex-cli 0.149.0-alpha.4.1 (2026-08-22 → 08-27). The first Windows Resource-Exhaustion event with thousands of processes was 2026-08-31 under 0.151.0-alpha.7.2, one day after updating through 0.150.0-alpha.12.2. #41982 also reports 0.151.0-alpha.7.2. Caveats: my incidents from 08-31 to 09-26 have no ancestry captures, so attributing them to this path is unconfirmed. Another heavy workload was also running on 08-31, and I can't recover which Desktop build was installed then.

    3. Source history (inference). In the public repo, neither codex-rs/git-utils/src/info.rs nor codex-rs/app-server/src/request_processors/git_processor.rs has a commit touching this path between 2026-08-15 and 2026-09-05, and the per-file fan-out was already described in #30345 in June. If the onset above is right, that points to a change in when or how often the Desktop client issues gitDiffToRemote, not in the fan-out code. That's consistent with the timing but not proven. A bounded fan-out in the shared function would protect against either cause.

  10. onlinegroeicoach commented on Oct 3, 2026

    @onlinegroeicoach

    Similar issue, it crashed the PC so bad it gets a black screen that is only fixable by unplugging power. Only happens when using Codex Remote (on Android with Google Pixel 7a phone).

  11. chubz1436 commented on Oct 6, 2026

    @chubz1436

    Still reproduces on Desktop 26.930.7945.0 / app-server 0.160.1 (latest stable), with a controlled before/after on the same thread

    Environment: Windows 10 Pro 22H2 (19045), 32 GB RAM (27.9 GB usable), Git for Windows 2.54.0. Affected builds: Desktop 26.930.6422.0 (app-server 0.160.0) and 26.930.7945.0 (app-server 0.160.1).

    The workspace was a local app project with 80,911 untracked files, mostly generated JPG frames (about 24 GB). Two storms on 2026-10-06 (UTC+8):

    Storm 1 Storm 2
    gitDiffToRemote in app-server log 13:23:41.170 18:02:28.196
    First storm git.exe (child of the same codex.exe PID) +0.96 s +0.08 s
    Direct git.exe launches by codex.exe 1,815 in ~47 s 1,867 in ~52 s
    Live git.exe / conhost.exe at last sample 3,513 / 1,833 3,464 / 1,821
    Commit / limit 110.5 / 111.2 GiB 107.9 / 110.0 GiB
    Available RAM 0.001 GiB 0.006 GiB

    The desktop app crashed both times. dwm.exe failed once with 0xC00001AD, and many git.exe and conhost.exe processes crashed with 0xC00000FD.

    After-test. I added the generated folders to .git/info/exclude, which took the untracked count from 80,911 to 63. Then I reopened the same thread with a 100 ms process sampler:

    • gitDiffToRemote was logged at 23:59:13.341.
    • The sampler captured remote, rev-parse, rev-list, diff <base-sha>, and then 57 of these, one per untracked path (the rest finished between samples):
      "git" -c safe.bareRepository=explicit -c core.hooksPath=NUL -c core.fsmonitor=false diff --no-textconv --no-ext-diff --binary --no-index -- NUL <path>
    • The whole burst took about 0.5 s, with a peak of 35 concurrent git.exe. Available RAM dropped by 0.16 GiB.

    So the process count tracks the untracked file count one to one, and nothing in the request bounds it.

    Source. On rust-v0.160.1 and current main, codex-rs/git-utils/src/info.rs has diff_against_sha (L707). It lists untracked files with ls-files --others --exclude-standard (L727), then awaits one --binary --no-index diff per path with join_all (L759). There is no concurrency limit and no cap on file count or size. On Git for Windows each diff costs three processes: the cmd\git.exe shim, mingw64\bin\git.exe, and conhost.exe.

    Suggested fix: use bounded concurrency (for example buffer_unordered(8)), cap the number and total size of untracked files that get diffed and return a truncation marker, and skip binary content for large binaries.

    Workaround for others: add generated or output folders to .git/info/exclude. It stays local and is never committed.

  12. andersonwu2000 commented on Oct 8, 2026

    @andersonwu2000

    Additional incident on desktop package 26.1002.7124.0, observed on 2026-10-08. The command pattern, directly observed app-server ancestry, and whole-machine commit exhaustion closely match this issue. The exact internal initiating request has not been identified.

    Summary

    During unattended research in the Codex desktop app on Windows, the bundled app-server spawned hundreds and then thousands of Git processes for untracked-file diffs. The machine exhausted its system commit limit and froze, requiring a reboot.

    The process ancestry identifies the Codex app-server as the producer. The exact initiating RPC, background task, or UI path has NOT been identified. This is evidence of uncontrolled subprocess fan-out/resource exhaustion, not proof of a conventional heap memory leak.

    Environment

    • Desktop package: OpenAI.Codex_26.1002.7124.0_x64__2p2nqsd0c76g0
    • Desktop process name: ChatGPT.exe
    • Bundled app-server executable build directory: 9691020b546a15b2
    • Windows x64, version 25H2, build 26200.9457
    • Git for Windows: cmd/git.exe wrapper and mingw64/bin/git.exe implementation
    • Large existing Git workspace with many untracked research files and generated artifacts.
    • Earlier that day, the Changes panel displayed a notice that it had skipped 47,331 untracked files to maintain responsiveness. This is an earlier UI observation, not a measured file count at the start of the incident.
    • Incident: 2026-10-08, beginning around 13:26 UTC. Times below are UTC.

    Observed workload and process ancestry

    At the 13:27:55 snapshot:

    ChatGPT.exe PID 17308
      -> codex.exe PID 21676 (... app-server ...)
         -> C:\Program Files\Git\cmd\git.exe
            -> C:\Program Files\Git\mingw64\bin\git.exe
    

    The saved snapshots include parent PIDs and creation times. The desktop was created at 07:53:23.792 UTC; its app-server at 07:53:33.337 UTC.

    PID 21676 had 768 direct Git children. Of these, 739 had readable no-index diff commands targeting 739 DISTINCT paths, all under the workspace's scratch/ directory. This is concurrent work for many files, not repeated sampling of a single job.

    Representative command (only the target filename has been anonymized):

    git -c safe.bareRepository=explicit -c core.hooksPath=NUL -c core.fsmonitor=false diff --no-textconv --no-ext-diff --binary --no-index -- NUL scratch/<research-directory>/<generated-file>.olean
    

    Other observed target types included .lean, .json, .md, .py, .log, and rasterized PDF page .png files. These included old workspace files, not just files changed in the current turn.

    Git's Windows wrapper and implementation both contribute to process counts. The counts below are processes, NOT an asserted count of independent diff jobs.

    Recorded timeline

    UTC Observation
    13:26:06 Git count 0; system commit 27.66 GiB; free physical memory 16.01 GiB.
    13:26:12 Monitor detected 31 Git processes with Codex ancestry, using 298.88 MiB private memory. All three research agents were interrupted.
    13:27:55 1,363 ancestry-scoped Git processes, using 20,041.23 MiB private memory (about 19.57 GiB).
    13:32:19 System-wide Git count 3,451; system commit 100.74 GiB; free physical memory 0.76 GiB.
    13:32:23 The containment monitor's full Win32_Process CIM query timed out; that monitor exited. An independent recorder continued.
    13:33:36 Lowest sampled free physical memory: 0.0287 GiB (about 29 MiB).
    13:36:38 Independent recorder: 4,611 Git processes using 82,651 MiB private memory (about 80.71 GiB); 2,369 conhost processes using 2,716 MiB; the app-server itself about 622 MiB. These aggregate readings were collected within one record, not at one atomic instant.
    13:36:56 System commit 127.9063 / 127.9129 GiB.
    13:36:58 Highest sampled system-wide Git count: 4,696.
    13:37-13:42 Insufficient-resource/memory errors in application and recorder logs.
    14:06:21 Windows reboot.

    Later read-only checks found zero Git processes after reboot. This is recovery, not evidence that the defect is fixed.

    Conditions / reproduction status

    1. A large Git workspace was open in the desktop app, with numerous untracked files under scratch/.
    2. Three research agents were running. At the onset, the user reports leaving research running unattended, without manually refreshing Changes.
    3. The monitor interrupted all three agents when the Git burst began, but background Git creation continued.
    4. Resource exhaustion escalated until the entire PC became unresponsive.

    A deterministic minimal reproducer has NOT been established. Please do not interpret these as tested, sufficient reproduction steps. The Changes panel is a possible consumer, but its initiating involvement is not proved.

    Several full-PC freezes occurred on this system during the day; the detailed ancestry and timeline above establish this specific incident only.

    Mitigation attempted and its limits

    An external monitor detected the burst and recorded 1,523 individual Git process terminations. This did not contain it: the app-server producer was left running, a serial stop/log loop slowed under pressure, and its full process query eventually timed out. The active intervention changes the observed process population; the timeline is not an unmodified reproduction.

    No fix is claimed from stopping research, rebooting, ignoring generated files, or committing untracked sources. Repository exclusions and smaller workspaces are candidate workarounds, not yet validated for this incident.

    Expected behavior

    Background review/diff work should have a bounded number of subprocesses and an enforceable file-count/size budget. A workspace with many untracked files should degrade gracefully, rather than exhaust system memory. A UI notice saying untracked files were skipped should not coexist with a background caller diffing hundreds of distinct untracked paths without effective bounds.

    Suggested investigation areas, not established source-code diagnoses: bounded concurrency across all diff callers, cancellation of queued and running child processes, deduplication of overlapping refreshes, and enforcing untracked-file limits before spawning Git.

    Evidence and privacy

    Preserved locally: timestamped process snapshots with parent IDs and creation times, full Git command lines, system commit samples, process-name private-memory aggregates, monitor events, and desktop resource-error logs.

    This public report intentionally excludes usernames, absolute private workspace paths, research contents, session transcripts, account identifiers, and unrelated process command lines. No session transcript or raw log bundle has been uploaded. A narrowly scoped, sanitized evidence extract can be prepared if needed.

  13. ryanmbestt-byte commented on Oct 9, 2026

    @ryanmbestt-byte

    Supplemental evidence for Codex issue 43019

    Adding independently measured Windows evidence and a build-to-source match to this existing report. Related reports are #41982 and #43256; their exact initiating paths may differ.

    Environment and new evidence

    Windows 10 Pro 22H2, 32 GiB RAM; desktop MSIX 26.1002.7124.0, embedded desktop version 26.1002.52244; native codex-cli 0.162.0-alpha.2; Git for Windows 2.54.0.windows.1.

    On 9 October, a passive census recorded 2,465 Git processes and 1,346 console hosts. All Git processes were in the Codex family, including 1,282 directly parented by the verified native backend. Git and console-host growth explained 98.034% of a 48.080 GiB increase in summed process-private commitment. ChatGPT.exe itself remained around 1.8 GiB.

    At 01:00:00 UTC, Windows recorded Desktop Window Manager terminating for lack of memory; it then failed to start with STATUS_COMMITMENT_LIMIT. A Git dump at 01:00:05 UTC records 75.045 GiB committed against a 75.052 GiB limit. The final collector cycle was non-atomic over 37.972 seconds; we do not subtract its early system reading from its later process census.

    A retained Git command is the per-file no-index binary diff signature described here. Separately, later native gitDiffToRemote records precede similar failures. The exact noon initiating request/client gesture remains unproven.

    Build and source verification

    The installed executable's pre-certificate content matches the public 0.162.0-alpha.2 release after normalizing only PE checksum/security-directory fields. This maps it to public tag commit 74e804d, despite different signing metadata.

    diff_against_sha at that commit constructs one comparison future per untracked path and uses join_all. The app-server processor invokes this shared path. The command runner has timeout/tree-cleanup logic, but no shared command admission limit.

    The same info.rs, runner and request-processor contents remain in stable 0.162.0, prerelease 0.163.0-alpha.2, and checked main a06545b. We have not identified a fixing release.

    Requested permanent correction

    Please enforce shared admission before each Git child is created, across requests and repositories. Limiting incoming request concurrency is insufficient: a single admitted request still reaches the entire unbounded per-file collection.

    Also bound pending work, enumeration and retained output; propagate cancellation/deadlines; coalesce duplicate work; and release admission slots only after owned descendants are terminated/reaped or legitimately transferred to separately accounted ownership.

    Please test the shared native function/endpoint, not only TUI /diff or the desktop worker. Existing timeout cleanup is useful but does not prevent the initial launch burst.

    The inspected Windows spawn helper can fall back to an uncontained child when job setup/assignment fails. A validation environment must independently verify containment rather than treating a successful spawn as proof of protection.

    Regression and release request

    A zero-process test seam should inject an in-memory launcher into the production shared diff path. It must fail on the current code for one request with many fake paths, then pass with the fix; additional cases should cover overlapping requests/repositories, bounded pending work, slow first output, cancellation, spawn failure and delayed descendant reaping.

    After those tests, please identify the fixing commit and a compatible Windows desktop/native build for a tiny isolated fixture test. No production-scale reproduction is proposed.

    Please triage this as additional evidence on #43019, cross-linked to #41982/#43256, rather than another duplicate issue. Local evidence is preserved. This comment includes no private paths, repository content, conversations or dump contents; any further attachment requires owner review.

  14. XZherron commented on Oct 10, 2026

    @XZherron

    Additional sanitized evidence from Windows Desktop 26.1007.2314.0, recorded on 2026-10-10. This closely matches the app-server-owned Git process storm reported here, but our retained snapshots do not include Git command lines, so the exact per-file diff mechanism is not independently established for this incident.

    Environment: Windows 11 x64 build 26300.9457, 32 GiB installed RAM, Git for Windows. The workspace was an existing Git repository.

    Retained app-server logs narrow the sequence (UTC):

    • 11:47:08.063: Android Remote thread/resume request.
    • 11:47:09.558: one retained gitDiffToRemote request.
    • 11:47:13.574: first abnormal Git creation retained in the process snapshots.
    • 11:47:28.410: user task begins.
    • 11:48:00.218: automatic context compaction begins.

    The recorded Git burst therefore began before the task and compaction. This chronology does not establish the workspace passed to that Git request, exclude earlier unlogged activity, or prove the request's internal implementation in the installed binary.

    The final process snapshot contained 6,199 live git.exe processes: 3,103 Git-for-Windows wrappers directly parented by the old Codex app-server and 3,096 inner Git children. Parentage was checked using process creation times, accounting for PID reuse. Their aggregate private commitment was approximately 106.47 GiB; this is virtual-memory commitment, not physical RAM usage. There were also approximately 3,100 Git-related console hosts.

    A separate earlier Windows counter sample recorded 121.069 / 124.310 GiB system commit and 89 MiB available physical memory. These counter and process readings were not atomic or simultaneous. The app-server's handles rose from 890 to 58,943.

    Windows recorded Git/console-host crashes and a codex.exe crash at 11:51:19.719. The user dismissed error dialogs and reopened Codex. Windows boot time was unchanged during this recurrence.

    No deliberate reproduction has been performed. The original recorder stopped itself under pressure but did not stop the producer. A proposed automatic-stop collector remains disabled because its independent-host preflight failed; it is not established protection.

    Could maintainers identify a fixing commit and compatible Windows Desktop release, or a supported mitigation? Please cover shared/app-server Git admission and cleanup, including the Windows wrapper children. Any validation should use small synthetic fixtures or an injected launcher, rather than another workstation-scale resource-exhaustion test.

    Raw evidence is retained privately. This comment includes no private paths, repository contents, conversation identifiers, transcripts, credentials or dump attachments.

  15. ryanmbestt-byte commented on Oct 15, 2026

    @ryanmbestt-byte

    Following up on my earlier Windows evidence: thank you for merging #54032 to bound concurrent untracked-file diffs.

    Could maintainers clarify two points?

    1. Windows release availability: Which Windows Desktop build, and bundled native Codex version, includes or is planned to first include Bound concurrent Git diffs for untracked files #54032 (8cbce633876eb71be1e897c1599c713cec7a262c)? If it has not shipped yet, is there a release or tracking link affected users should follow?
    2. Expected resolution scope: Do you consider the eight-concurrent-diffs-per-collection limit sufficient to resolve [Windows][Desktop 26.901.5280.0] unbounded per-file git diff --no-index fan-out exhausts commit and crashes Windows #43019, or is it an initial mitigation with further corrections planned? The PR states that concurrent collections retain independent limits; clarification on overlapping collections and Windows descendant cleanup would help us understand the intended protection.

    I have not yet validated a Windows build containing this correction and am not reporting a failure of the patch. An exact Desktop/native version mapping and confirmation of the intended scope would help affected users validate the correct build using small isolated fixtures.

  16. jbeneitezh commented on Oct 17, 2026

    @jbeneitezh

    Additional sanitized evidence from 17 October 2026, including a small isolated runtime comparison of the installed backend and an official release containing #54032.

    Affected installation: native Windows x64, 64 GB RAM; Desktop Appx package 26.1013.3656.0, bundled backend reporting codex-cli 0.163.0-alpha.10.2. The Desktop updater separately reported installed version 26.1013.31256, production channel, up_to_date. These are distinct package/updater identifiers.

    Retained incident evidence: process ancestry was Desktop ChatGPT.exe -> codex.exe app-server -> Git-for-Windows wrapper -> inner Git, with console hosts. Of newly recorded Git process identities in the incident window, 99.77% belonged to this app-server tree. Retained commands have the per-file signature:

    git -c safe.bareRepository=explicit -c core.hooksPath=NUL -c core.fsmonitor=false diff --no-textconv --no-ext-diff --binary --no-index -- NUL <untracked-file>
    

    One collection cycle contained 12,952 Git and 6,227 console-host records; system commit later reached approximately 187.11 GB. Those process counts are not an atomic simultaneous census: collection degraded to several minutes per cycle under pressure. Existing WSL/SQL load reduced headroom, but did not own the Windows Git producer. The exact Desktop gesture/request initiating the historical burst remains unknown. A subsequent inventory found a large generated tree inside the workspace; local ignore corrections reduce exposure but are not a product fix.

    Safe bounded comparison: we invoked initialize, initialized, and gitDiffToRemote on separate app-servers with isolated homes and a tiny repository containing twelve untracked files, each nine bytes. An instrumented Git shim delayed each per-file diff by 1.6 seconds to expose concurrency. No model/thread execution or production workload was used.

    Official executable tested Peak overlapping per-file diff calls Completed files
    Actual installed backend, 0.163.0-alpha.10.2 12 12
    Standalone app-server, 0.164.0-alpha.3 8 12
    Full CLI app-server, 0.164.0-alpha.3 8 12

    Each test used its own Windows Job with hard limits of 31 processes / 500 MB committed memory, a sampled available-memory floor and timeout. Timestamped shim events established overlap; PID creation times were checked independently. All owned processes exited. The full CLI returned twelve expected synthetic patches and retained over 37 GiB available RAM. Download digests were verified; no custom Codex build was produced.

    The old public tag contains join_all; #54032, merged as 8cbce633876eb71be1e897c1599c713cec7a262c, changes this to eight concurrent diffs per collection, not a global limit. These results support that specific correction, not complete protection against overlapping requests, unlimited output, or every possible exhaustion cause.

    We have not replaced the Desktop backend or tested Desktop compatibility with the newer CLI. Could maintainers identify the supported Windows Desktop build that includes this fix, or its planned rollout? The current installation still exhibits the unbounded behavior in this isolated test while its configured updater offers no update.

    No private paths, repository contents, conversation identifiers, raw logs or credentials are included.

  17. jonathabean commented on Oct 18, 2026

    @jonathabean

    Adding a Windows Desktop follow-up with observed mitigations and their limits.

    Environment: Windows 11 x64, 32 GB RAM; Desktop 26.1013.4894.0; the installed bundled backend reports codex-cli 0.163.0-alpha.10.2.

    Local process observations captured status and diff subprocesses parented directly by the Codex backend, beneath the Desktop app. Restarting Desktop did not prevent new bursts. Earlier incidents included near-exhausted system commit, application failures and unexpected Windows restarts; these are distinct from the later recovered bursts below. I have not established that every historical crash has the same cause, or identified the exact remaining per-file trigger.

    Attempts and safeguards:

    • Added a 64 GiB pagefile while retaining the system-managed system-drive pagefile. The measured commit limit is now about 98.3 GiB. This provides headroom but does not stop the Git buildup.
    • A local warning-only watchdog detects sustained Git-count/memory thresholds. It never kills processes, limits concurrency, restarts apps or reboots Windows. An alert is detection, not prevention.
    • Applied one narrowly scoped local exclusion for generated test output. Existing exclusion bytes, the Git index and tracked ignore/source files were preserved. Sample output files became ignored, while sampled source and active work remained unignored. Five minutes initially looked quiet, but subsequent natural diff activity and bursts recurred, so this was not a sufficient fix.

    After that exclusion, on October 18, 2026 (NZDT, UTC+13):

    Time Recorded state Observed Git processes Commit headroom
    16:58:09 Warning 152 76.2 GiB
    17:01:23 Critical 305 75.4 GiB
    17:05:07 Warning 209 75.3 GiB

    Each episode recovered. By 17:06:11 the count was zero, with 78.7 GiB headroom and about 20% of commit capacity used. These later alerts were concurrency warnings, not evidence of current commit exhaustion or new Windows crashes.

    The post-change sample included 57 diff process records in the affected workspace, 41 directly parented by the Codex backend. Sampling and attribution are capped and can miss short-lived processes. Counts include Git-for-Windows shim/child processes, not necessarily unique Git operations; the table is not a measurement of true peaks. No controlled before/after workload comparison was performed, so I cannot quantify the exclusion's benefit or claim crash safety.

    Daily use needs a working Desktop app; shutting it down or switching to CLI is not a satisfactory ongoing workaround for me.

    Which supported stable Windows Desktop build includes #54032, and how can users verify that its bundled backend contains the fix? Since that change caps untracked-file diffs at eight per collection rather than globally, is there a supported global concurrency control or another Desktop-preserving mitigation for overlapping background collections?

    This comment intentionally contains no private paths, project/user names, raw logs or attachments.

  18. Lyl6160 commented on Oct 24, 2026

    @Lyl6160

    Subject: Codex Desktop Windows — 1,236 accumulating Git processes, fix confirmation requested

    We captured a severe Codex Desktop process-overload incident on Windows 11 on 17 October 2026.

    • Incident version: 26.1007.9446.0
    • Current installed version: 26.1016.8622.0
    • Captured Git processes: 1,169 increasing to 1,236 in approximately 15 seconds
    • 1,108 Git PIDs persisted across both samples
    • System CPU reached 100%
    • Process ancestry: ChatGPT.exe → codex.exe app-server → git.exe
    • Repeated command: git diff --binary --no-index -- NUL artifacts/[target]

    Existing process snapshots, application logs and Windows ETL traces have been preserved.

    The project contains 5,389 untracked files, although ordinary Git status completes in approximately 0.107 seconds.

    Could a maintainer confirm whether version 26.1016.8622.0 contains a fix for unbounded per-file Git diff spawning, including process concurrency limits and cancellation/child-process cleanup?

    If not, is there a supported mitigation that disables the offending background diff/review operations without altering or deleting repository files?

    Related issues: #43019 and #55051.

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