[Windows][Desktop 26.818.8289.0] canceled review-summary git diff leaves stale .git/index.lock
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Summary
Codex Desktop on Windows repeatedly leaves a zero-byte .git/index.lock after its background Git review worker cancels a long-running git diff.
The correlated commands are emitted with:
requestKind=review-summary
source=review_model
aborted=true
failureReason=canceled
subcommand=diff
After the cancellation, no git.exe or git-lfs.exe process remains, the zero-byte lock can be opened exclusively, and subsequent user Git operations fail because .git/index.lock already exists. The user has had to remove the stale lock repeatedly.
This reproduced on two consecutive days, including once while collecting evidence for this report.
Environment
- Codex Desktop MSIX:
OpenAI.Codex_26.818.8289.0_x64__2p2nqsd0c76g0 - Windows 11 Enterprise, version
10.0.26200, build26200, x64 - Git for Windows:
2.55.0.windows.1 - Repository: large native-Windows source repository with a large local diff
GIT_OPTIONAL_LOCKS: unset (Git default behavior)
Correlated evidence
All local times below are UTC+08:00.
| Reproduction | Lock created | Lock last write | Canceled Git completion | Delta from creation | Git duration | stdout |
|---|---|---|---|---|---|---|
| 2026-08-27 | 17:38:03.229 |
17:38:03.229 |
17:38:03.926 |
+696 ms |
37,192 ms |
29,664,961 B |
| 2026-08-28 | 17:03:26.609 |
17:03:28.296 |
17:03:28.434 |
+1,824 ms (+138 ms from last write) |
30,555 ms |
29,664,961 B |
Normalized log record from the second reproduction:
warning [git] git.command.complete
aborted=true
command="git ... diff ... <base> --find-renames --raw --no-abbrev --numstat -z"
durationMs=30555
exitCode=null
failureReason=canceled
requestKind=review-summary
source=review_model
stderrBytes=173
stdoutBytes=29664961
subcommand=diff
success=false
Within the inspected 8-second window around the second lock creation, this was the only logged git.command.complete event.
The cancellation rate is also unusually high:
- 2026-08-27 log: 1,658
review-summaryGit completions; 1,655 canceled - 2026-08-28 log at capture time: 1,066 completions; 1,065 canceled (
99.91%)
For both stale locks:
- file size was
0bytes - no active
git.exeorgit-lfs.exeprocess existed when inspected - exclusive read/write open with no sharing succeeded
- moving the lock aside immediately restored the repository for normal Git use
Steps to reproduce
- Open a large native-Windows Git repository in Codex Desktop, with a sufficiently large working-tree or branch diff.
- Let the Desktop review pane/background review-summary path refresh repository state.
- Continue interacting with tasks so review-summary requests are replaced or canceled while a large
git diffis running. - Wait for a canceled
requestKind=review-summary,source=review_modelGit operation. - Inspect
<repo>/.git/index.lock. - Observe a zero-byte stale lock with no live Git writer; a later Git write fails with
Unable to create .../.git/index.lock: File exists.
Expected behavior
Background read-only review queries must not leave repository locks or interfere with user Git operations, including when requests are canceled.
Potential mitigations:
- run background read-only Git queries with
git --no-optional-locksorGIT_OPTIONAL_LOCKS=0 - make cancellation wait for the owned Git process tree to exit cleanly
- use single-flight/debounce/backoff for repeatedly invalidated
review-summarywork - if cleanup is needed, make it ownership-aware; do not unconditionally delete
.git/index.lock, because it may belong to a legitimate user Git writer
Related issues
I did not find an exact existing report that correlates canceled review-summary diffs with a reproducible stale .git/index.lock.
- #30820 — eager
review-summarysnapshots / CPU and I/O spikes - #38062 — Git review cancellation and hidden disable toggle
- #29408 — repeated/stuck Windows Git polling; stale
index.locknoted on one machine - #35776 — runaway background Git cancellation loop
Privacy
The log evidence above is normalized. No source paths, filenames, remotes, commit identifiers, diff contents, account identifiers, or full logs are included. Additional sanitized diagnostics can be provided through an official private feedback channel if needed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the Codex Desktop review-summary background Git path, focusing on canceled git diff operations and the requestKind=review-summary completion records described in the issue. Reproduce with the listed large-repository steps and verify that cancellation leaves no repository lock and does not interfere with later user Git operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- desktop-dev, operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100