Codex lacks throttling/fallback when large Git-tracked artifact directories are present

Open 💬 1 comment Opened Feb 15, 2026 by Lelin07

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

Version 26.212.1823 (661)

What subscription do you have?

Plus

What platform is your computer?

Darwin 25.1.0 arm64 arm

What issue are you seeing?

When opening a repository where large generated build directories (e.g., SwiftPM .build) are tracked by Git, Codex immediately begins scanning/indexing all tracked files and drives CPU usage to near 100% with no visible warning, throttling, or fallback behavior.

In my case:

  • Multiple Swift Package Manager .build directories were present (~150–200MB each).
  • These were unintentionally tracked due to a missing .gitignore rule.
  • Opening the project in Codex resulted in sustained max CPU usage.
  • System temperature reached 107°C.
  • No UI warning or mitigation occurred.

After adding proper .gitignore rules and removing those directories from Git tracking, the issue disappeared completely.

This suggests Codex is aggressively scanning all tracked files without safeguards against extremely large change sets or generated artifact directories.

What steps can reproduce the bug?

  1. Create a Swift monorepo with multiple packages.
  2. Run swift build in several package directories, generating multiple .build folders.
  3. Initialize Git and track everything (without ignoring .build).
  4. Open the repository in Codex.
  5. Observe:
  • Immediate CPU spike to near 100%
  • Sustained high CPU usage even when idle
  • Significant temperature increase (107°C observed)
  • No visible warnings in the UI
  1. Add .build/ to .gitignore, remove it from Git tracking, and reopen the project → CPU usage returns to normal.

What is the expected behavior?

Even if large generated directories are tracked by Git, Codex should:

  • Detect excessive file counts or unusually large directory trees
  • Throttle indexing/scanning to prevent sustained CPU saturation
  • Provide a visible warning to the user
  • Fall back to limited Git features when thresholds are exceeded
  • Or automatically ignore common artifact directories (.build, node_modules, build, .gradle, etc.)

Other editors (e.g., VS Code) degrade gracefully when encountering massive tracked change sets. Codex currently does not appear to implement a similar safeguard.

Opening a repository should not result in sustained full CPU utilization without protective throttling, fallback mechanisms, or user feedback.

Additional information

  • The repository had no commits yet.
  • The issue was entirely resolved after correcting .gitignore.
  • The behavior appears to be triggered by large numbers of Git-tracked generated files

View original on GitHub ↗

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