Windows Desktop WSL mode: Git watcher retries EISDIR ~6 times/sec on WSL repositories

Open 💬 3 comments Opened Jul 17, 2026 by solankydev

Summary

When Codex Desktop for Windows runs its agent in WSL2 and opens a repository stored on the native WSL filesystem, the Windows-side Git repository watcher enters a persistent retry loop.

The watcher tries to watch the WSL repository through a \\wsl$\... UNC path, receives EISDIR, restarts, and retries several times per second. The loop continues even while the thread is idle and is associated with sustained Desktop/UI lag and unnecessary CPU, filesystem, and log activity.

Local Git commands executed inside WSL remain fast, so the repository's Linux filesystem performance is not the bottleneck.

Environment

  • Codex Desktop: 26.715.2305
  • Bundled WSL app-server: codex-cli 0.145.0-alpha.18
  • Windows 11
  • WSL2 with Ubuntu
  • Agent environment: WSL
  • Repository location: native WSL filesystem, e.g. /home/<wsl-user>/projects/example
  • Desktop Codex home exposed to WSL as /mnt/c/Users/<windows-user>/.codex
  • SQLite state separated to a WSL-native directory

Reproduction

  1. Configure Codex Desktop on Windows to run the agent in WSL.
  2. Open a Git repository stored under /home/<wsl-user>/... through the Windows project picker.
  3. Start a local task, or leave the loaded thread idle.
  4. Inspect the Codex Desktop logs.

Actual behavior

The Windows Electron worker repeatedly attempts to watch paths resembling:

\\wsl$\Ubuntu\home\<wsl-user>\projects\example\.git
\\wsl$\Ubuntu\home\<wsl-user>\projects\example\.git\refs
\\wsl$\Ubuntu\home\<wsl-user>\projects\example\.git\refs\heads
\\wsl$\Ubuntu\home\<wsl-user>\projects\example\.git\info
\\wsl$\Ubuntu\home\<wsl-user>\projects\example

Each attempt fails with an error resembling:

[git-repo-watcher] Failed to watch git path
errorCode=EISDIR
errorMessage="EISDIR: illegal operation on a directory, watch '\\wsl$\Ubuntu\home\<wsl-user>\projects\example\.git'"

Measurements from one approximately 31-minute run:

  • 10,678 watcher failures
  • 294–354 failures per minute
  • Approximately 5.8 failures per second
  • 30 logged watcher restarts
  • A roughly 10 MB Desktop log with 10,908 lines, almost entirely watcher failures
  • The retry loop continued between active agent turns

During the same session, ordinary Git inspection commands inside WSL completed in approximately 0.5–3.7 seconds.

Expected behavior

Codex Desktop should either:

  • use a WSL-side filesystem watcher for repositories stored in WSL;
  • use a Windows watcher implementation that correctly supports WSL UNC directories; or
  • disable watching after a non-recoverable path-type error instead of retrying continuously.

Opening a native WSL repository should not create a persistent high-frequency watcher/error loop.

Related issues

  • #21693 — Windows worker attempts to watch Linux/WSL Git paths
  • #13764 — severe lag and resource usage in Windows Desktop WSL mode
  • #22085 — repeated Git activity causing sustained CPU usage
  • #18506 — WSL UNC path, config, terminal, and worktree boundary problems

The paths and measurements above are sanitized; no private repository, organization, username, thread identifier, or raw log is included.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗