Windows Codex Desktop repeatedly leaks full-size Git LFS temp copies while refreshing a repo
What version of the Codex App are you using?
OpenAI.Codex 26.715.10079.0 (Windows x64)
Platform
- Windows
10.0.26200.0x64 - Git
2.55.0.windows.2 - Git LFS
3.7.1
Summary
While a local Git repository is open in Codex Desktop, repository-state/diff refreshes repeatedly invoke Git LFS processing for a large untracked file that matches an LFS attribute. Each refresh leaves another near-full-size file in .git/lfs/tmp, causing unbounded disk growth. In this incident, the directory grew past 42 GiB and resumed growing immediately after cleanup.
This is severe because merely keeping/using a Codex task open can fill the disk without the user requesting staging, committing, or any LFS operation.
Repository setup
.gitattributes contains:
*.db* filter=lfs diff=lfs merge=lfs -text
The working tree contains:
- one tracked LFS database, about 551.6 MiB
- one untracked backup database, also about 551.6 MiB, matching
*.db*
The database content/path is not relevant; any sufficiently large untracked file matching an LFS rule should reproduce it.
Observed behavior
- With the Codex task active,
git-lfsprocesses repeatedly appeared around repository refreshes/turns. .git/lfs/tmpaccumulated files approximately the size of the database.- Initial measurement: 90 temporary files, 42.046 GiB reclaimed after stopping
git-lfsand deleting.git/lfs/tmpcontents. - The growth immediately resumed: 11 additional files consumed 5.13 GiB.
- A later five-second observation showed the temp directory grow from one partial file (538.3 MiB) to two files (556.4 MiB total).
- Adding only the untracked backup file to
.git/info/exclude, stopping the activegit-lfsprocess, and cleaning.git/lfs/tmpstopped the growth. A five-second recheck stayed at zero files.
git lfs prune --dry-run did not account for the problem: it reported only 288 MiB prunable because the tens of GiB were in .git/lfs/tmp, not normal LFS objects.
The tracked database's SHA-256 matched its indexed LFS OID, so it was not modified.
Steps to reproduce
- On Windows, create/open a Git repository in Codex Desktop.
- Add an LFS rule such as:
``gitattributes``
*.db* filter=lfs diff=lfs merge=lfs -text
- Place a large untracked file such as
backup.dbin the working tree. - Keep the local Codex task active and perform turns/tool calls that cause repository state/diff refreshes.
- Monitor
.git/lfs/tmpandgit-lfsprocesses.
Expected behavior
- Background Git status/diff rendering must not run clean/LFS filters over large untracked files merely to display changes.
- Cancellation or refresh replacement must terminate child processes cleanly and remove partial LFS temp files.
- Repository polling should be debounced/bounded so it cannot consume disk without limit.
- At minimum, Codex should detect and skip or cap large untracked files during snapshot/diff construction.
Actual behavior
Full-size or partial copies accumulate in .git/lfs/tmp on repeated refreshes until the disk is exhausted.
Workaround
Adding the large untracked file to .git/info/exclude stops the loop:
/data/path/backup.db
This is only a workaround; opening a repository containing any large, unignored file matching an LFS rule remains dangerous.
Related issues
- #23681 — possible infinite disk writes involving Git LFS on Windows
- #26812 — Codex Desktop repeatedly spawns Git processes in Windows Git workspaces
- #28750 — Codex Desktop repeatedly runs Git staging operations and fills
.git/objects/pack
This report narrows the failure to repeatable full-size files under .git/lfs/tmp caused by a large untracked file matching an LFS attribute.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Confirmed on the current Windows desktop build with a tracked-file variant that is not covered by the original untracked-file reproduction.
Environment
26.727.6591.0(Windows x64)10.0.26200x642.52.0.windows.13.7.1Variant: tracked and protected LFS databases
The repository contained 24 tracked
*.dbLFS files. One is a live SQLite database (~123 MiB); the others are immutable snapshots/test databases. There was no user-requested staging or LFS operation.While a local task was active,
ChatGPT.exedirectly spawned commands shaped like:Those commands spawned
git-lfs.exe filter-process. The diff was repeatedly replaced/cancelled, and numeric partial files appeared in.git/lfs/tmpevery 1-2 seconds.Measured impact
.git/lfs/tmp: 206 files / 9,803,734,016 bytes.git/lfs/objectsalso accumulated 489 completed objects / 30,103,741,138 bytes. Of those, 452 objects / 28,237,992,658 bytes were neither reachable from any Git ref nor equal to any current database content.This was real on-disk growth, not just an Explorer size-reporting error.
skip-worktreealone is insufficientSetting
skip-worktreeon all 24 tracked database paths reduced some work, but the app's task-base-to-working-tree diff still launched the LFS clean filter for tracked database files. Temp files continued to appear.A robust local workaround was to keep the repository-level LFS rules for clone/restore, while adding a worktree-only override in
.git/info/attributes:Combined with
skip-worktree, this stopped the filter loop. Ten consecutive commands matching the Codex-generated diff shape completed with:.git/lfs/tmp: 0 bytes before and after.git/lfs/objects: byte-for-byte unchangedgit-lfs filter-processleft runningThe project now creates snapshot pointers explicitly in an isolated Git index so normal clone/restore can keep using Git LFS without exposing live database files to background diffs.
Suggested product-side safeguards
.git/lfs/tmpor.git/lfs/objects.No private database, repository path, credentials, or application data are attached to this report.
@tibo-openai how do I invoice you guys for bricking 2 of my SSDs by shipping vide coded garbage that writes TRACE level to WAL and does shit like this ^
I believe the bill is currently ~$1500