codex - 💡(How to fix) Fix Codex macOS app runs git add on entire home directory, 100% CPU [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19903Fetched 2026-04-28 06:35:18
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×2commented ×1cross-referenced ×1

Code Example

Parent: /Applications/Codex.app/Contents/MacOS/Codex (PID 64263)
Child:  git add -- .claude/skills/ .chrome_profile_instance_1/Default/Cache/ ...
CPU:    98.7%
RAW_BUFFERClick to expand / collapse

Codex.app (macOS) spawns git add processes that attempt to index the entire home directory, including .claude/, Chrome cache files, and other unrelated data. The git process consistently hits 98-100% CPU and respawns after being killed.

Process trace:

Parent: /Applications/Codex.app/Contents/MacOS/Codex (PID 64263)
Child:  git add -- .claude/skills/ .chrome_profile_instance_1/Default/Cache/ ...
CPU:    98.7%

Expected: Codex should only track files within the active project directory. Actual: Codex runs git add across ~/, indexing Chrome cache, Claude config, telemetry files, and other unrelated directories.

macOS, April 2026.

extent analysis

TL;DR

The issue can be mitigated by configuring Codex to only track files within the active project directory, potentially by setting a specific git root or ignoring unwanted directories.

Guidance

  • Verify the current git root directory used by Codex to ensure it's not set to the user's home directory (~/).
  • Check for any configuration options in Codex that allow specifying the project directory or ignoring certain files and directories.
  • Consider adding a .gitignore file to the project directory to exclude unwanted files and directories, such as .claude/ and Chrome cache files.
  • Investigate if Codex has an option to set environment variables or command-line arguments that can limit the scope of git add operations.

Example

No code snippet is provided as the issue does not imply a specific code change, but rather a configuration or settings adjustment.

Notes

The solution may depend on the specific version of Codex and its configuration options. The issue may be resolved by updating Codex to a version that includes a fix for this behavior, if available.

Recommendation

Apply workaround: Configure Codex to only track files within the active project directory by setting the correct git root or ignoring unwanted directories, as this is a more immediate solution to prevent unnecessary git add operations.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING