[VS Code][Linux] Diff view stalls while git-repo-watcher hits ENOENT under refs/codex/turn-diffs
[VS Code][Linux] Diff view stalls while git-repo-watcher hits ENOENT under refs/codex/turn-diffs
What issue are you seeing?
Codex chat works in VS Code, but opening or rendering Codex-generated diffs can remain stuck.
The extension log repeatedly reports that the Git repository watcher failed while scanning transient Codex turn-diff checkpoint refs:
[warning] [git-repo-watcher] Git repo watcher failed
errorCode=ENOENT
errorMessage="ENOENT: no such file or directory, scandir '<workspace>/.git/refs/codex/turn-diffs/checkpoints/<hash>/<hash>/<timestamp>'"
path=<workspace>/.git
This occurred multiple times in one VS Code session. The missing paths are timestamped checkpoint directories created below .git/refs/codex/turn-diffs/checkpoints.
The watcher appears to restart after failure, so I am not claiming that one ENOENT permanently terminates it. However, repeated watcher restarts may create missed-update windows or leave the diff UI waiting on stale state.
Steps to reproduce
- On Linux, open a Git workspace in VS Code. In this case the workspace root also contained nested Git repositories/worktrees and several
node_modulesdirectories. - Open the Codex extension and run a task that modifies files.
- Open the generated diff from the Codex thread.
- Observe that the diff view remains stuck.
- Inspect Output > Codex and the VS Code extension logs.
Expected behavior
The generated diff should open normally. Transient creation/deletion of Codex checkpoint refs should not interrupt repository state updates.
Actual behavior
The diff view can remain stuck while the Git watcher reports ENOENT for a checkpoint directory that disappeared during recursive traversal.
Environment
- OS: Fedora Linux, x86_64
- VS Code:
1.128.0 - Extension:
openai.chatgpt@26.707.41301 - Bundled Codex CLI:
0.144.0-alpha.4 - No
chatgpt.cliExecutableoverride - The extension's bundled
codex-code-mode-hostis present
Investigation notes
Inspection of the distributed extension bundle suggests that remote-ref monitoring starts a recursive watch at .git/refs and filters changed paths to .git/refs/remotes afterward. Consequently, the underlying recursive watcher can still traverse .git/refs/codex/turn-diffs, where checkpoint directories are short-lived.
Related issues
- #16850 concerns diff rendering and event/log storms, but reports a different dominant error.
- #23191 concerns watcher overload in a very large workspace; the workspace-shape aspect may overlap.
- #17991 includes Git watcher ENOENT errors in a Windows/WSL setup, but the paths and user-visible failure differ.