Codex desktop app Git worker can crash with Node/V8 OOM on large dirty repos

Resolved 💬 1 comment Opened Jun 4, 2026 by rabbit-97 Closed Jun 5, 2026

What version of the Codex App are you using (From “About Codex” dialog)?

Unknown, could not find version yet

What subscription do you have?

ChatGPT Plus

What platform is your computer?

25.3.0 arm64 arm

What issue are you seeing?

Summary:
Codex desktop app appears to crash when Git-related workers perform broad repository scans or collect large Git outputs. This seems more likely when multiple repositories are dirty, or after build/generated artifacts make the working tree large. The crash appears related to Node/V8 out-of-memory rather than a normal command failure.

Environment:

  • OS: macOS
  • Codex app version: [fill in if known]
  • Workspace/repo size: [fill in if known]
  • Approximate dirty files/generated artifacts: [fill in if known]

Observed behavior:

  • Codex app or an internal worker crashes.
  • The crash appears associated with Git-related operations such as broad status/diff/show/log collection.
  • In large or dirty repositories, the Git worker may produce or process too much output and hit Node/V8 OOM.

Expected behavior:

  • Codex should avoid unbounded Git scans in the desktop app.
  • Git status/diff/log/show collection should be scoped, paginated, capped, or streamed safely.
  • Large output should not be allowed to crash the app or worker.
  • If Git state is too large, Codex should show a recoverable error and ask the user to narrow the scope.

Likely risk cases:

  • Running repo-wide git diff/status/show/log without output limits.
  • Multiple dirty repositories open in the app.
  • Build artifacts generated before Git state collection.
  • Large untracked or modified files, such as dist/build/coverage/.next/.vite/node_modules outputs, lock files, large JSON/CSV files, or binary assets.

Suggested mitigation:

  • Default Git inspection should use narrow commands such as:
  • git status --short --untracked-files=no
  • git diff --name-only
  • git diff --stat -- <path>
  • git diff -- <single-file>
  • git log --max-count=10
  • Avoid collecting full repository diffs or unbounded porcelain output.
  • Exclude common generated directories and large artifacts from automatic diff/show processing.
  • Put strict output and memory caps around Git worker results.

Additional context:
I added local AGENTS.md guidance to reduce the chance of triggering the crash by limiting Git commands, but the app should ideally guard this internally because a broad Git worker operation can crash the desktop app.

What steps can reproduce the bug?

I do not have a minimal deterministic repro yet, but the crash seems to happen under this pattern:

  1. Open a large Git repository, or multiple repositories, in the Codex desktop app.
  2. Let the working tree become dirty, especially after build/generated artifacts are created.
  3. Trigger Codex app Git-related UI/worker behavior, such as review/diff/status collection, or ask Codex to inspect Git state.
  4. The app or a Git-related worker may crash with Node/V8 out-of-memory.

Examples of risky Git operations that I am now avoiding locally:

  • repo-wide git diff/status/show/log without output limits
  • collecting full diffs across generated folders
  • inspecting untracked files broadly after builds

I added local AGENTS.md guidance to avoid broad Git commands and to use scoped commands like:

  • git status --short --untracked-files=no
  • git diff --name-only
  • git diff --stat -- <path>
  • git diff -- <single-file>
  • git log --max-count=10

I do not have session ID/token/context usage from the crashed run available.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗