Codex.app repeatedly runs git add -A without user request, filling .git/objects/pack
What version of the Codex App are you using (From “About Codex” dialog)?
26.611.62324
What subscription do you have?
API key
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
Codex.app appears to be repeatedly launching Git staging commands without an explicit user request to stage or commit changes. In a repo with many large untracked local artifact directories, this caused .git/objects/pack to fill with abandoned tmp_pack_* files, consuming over 130 GB of disk space.
Environment
Product: Codex desktop app
Platform: macOS
Repo path: /Users/mike/src/chatbot
Observed Behavior
Codex.app launched Git staging commands even though I did not request staging, committing, or any Git operation.
Observed process examples:
git -c core.hooksPath=/dev/null -c core.fsmonitor= add -A
and:
git -c core.hooksPath=/dev/null -c core.fsmonitor= add -- misc/macrophage/210 misc/macrophage/211 ...
The parent process was Codex.app:
/Applications/Codex.app/Contents/MacOS/Codex
The command repeatedly restarted after being killed.
This created large temporary pack files:
.git/objects/pack/tmp_pack_*
At one point .git/objects/pack grew to over 130 GB, filling the disk. After replacing .git with a fresh clone’s .git, the issue reproduced quickly, creating multiple new tmp_pack_* files totaling several GB.
Impact
This is dangerous in large dirty worktrees because git add writes Git objects for untracked files. In this repo, local scratch/test/generated directories include large datasets and generated artifacts. Codex attempting to stage them caused rapid disk exhaustion and system instability.
Although git add does not modify working-tree file contents, it does mutate the Git index and object database. In this case it was effectively destructive because it filled the disk and corrupted normal Git usability until cleanup.
Relevant Diagnostic Output
Process tree showed Codex as parent:
PID PPID COMMAND
7306 1 /Applications/Codex.app/Contents/MacOS/Codex
46970 7306 git -c core.hooksPath=/dev/null -c core.fsmonitor= add -- misc/macrophage/...
50504 7306 git -c core.hooksPath=/dev/null -c core.fsmonitor= add -A
Git object state during the problem:
warning: garbage found: .git/objects/pack/tmp_pack_2VxiHJ
warning: garbage found: .git/objects/pack/tmp_pack_Xcm6Kh
warning: garbage found: .git/objects/pack/tmp_pack_5sso1A
size-garbage: several GiB
At the worst point, .git/objects/pack exceeded 130 GB.
What steps can reproduce the bug?
No action required: I don't know why it's happening.
What is the expected behavior?
Codex.app should not run git add, git add -A, git commit, or other Git-mutating commands unless the user explicitly requests a staging/commit operation.
At minimum, Codex should ask for confirmation before running Git commands that mutate .git, especially git add -A.
There should also be a setting to make Git interaction read-only, allowing Codex to inspect git status, git diff, etc., but forbidding git add, git commit, git reset, git checkout, and similar write operations.
Additional information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗