Windows TUI render corruption in git repos triggered by core.fsmonitor=false git metadata call
What version of Codex CLI is running?
Regression appears between 0.131.0-alpha.16 and 0.131.0-alpha.17.
Verified matrix:
0.130.0: normal0.131.0-alpha.15: normal0.131.0-alpha.16: normala5040d0b3(tui: split composer attachment and popup state): normal8736e3265(tests: avoid ambient temp sandbox roots) + CLI compile fix: normal6ec8c4a6(Ignore fsmonitor config in Git metadata reads) + CLI compile fix: reproduces6ec8c4a6+ CLI compile fix with only.args(["-c", "core.fsmonitor=false"])removed: normal5a0296251: reproduces0.131.0-alpha.17,.19,.20,.21,.22: reproduce0.131.0,0.132.0: reproduce
What subscription do you have?
Not relevant.
Which model were you using?
Observed in normal Codex TUI sessions; model does not appear relevant.
What platform is your computer?
Windows 11, PowerShell, Windows Terminal.
What terminal emulator and version are you using (if applicable)?
Windows Terminal.
What issue are you seeing?
In valid git repositories, the Codex CLI TUI can enter a persistent corrupted render state. Symptoms include:
- prompt input text visually disappears while the text is still present internally
- the
workingindicator/status text becomes clipped to one or two characters - bottom status line disappears or remains stale after session exit
- cursor intermittently jumps to the next line/left edge during wraps
- resize/streaming output, Korean/CJK text, and IME use make the issue easier to notice, but IME is not required
/resumedoes not reliably repair the visible TUI state
A key reproducer is that in a valid git repo, with no prompt typed, holding Backspace on an empty prompt can start corrupting the bottom status/prompt area. Non-git or invalid-git directories do not reproduce in the same environment.
Bisection result
The first triggering commit is 6ec8c4a6ecb17bc3ab10d0c5edf75494b50cab7e:
[codex] Ignore fsmonitor config in Git metadata reads (#22652)
The actual trigger is the single argument added in codex-rs/git-utils/src/info.rs:
.args(["-c", "core.fsmonitor=false"])
Evidence:
- Previous commit
8736e3265+ same unrelated CLI compile fix: normal 6ec8c4a6+ same compile fix: reproduces6ec8c4a6+ same compile fix, but with thecore.fsmonitor=falseline removed: normal
The CLI compile fix mentioned above is only the later plugin CLI compile fix touching:
codex-rs/cli/src/marketplace_cmd.rscodex-rs/cli/src/plugin_cmd.rs
It was needed only to build intermediate commits and is not on the TUI/git path.
Interpretation
This does not look like core.fsmonitor=false directly corrupts the terminal. It appears to change internal git metadata subprocess invocation/timing enough to consistently exercise an existing inline TUI renderer weakness around bottom-pane/status redraw and terminal buffer synchronization.
A local renderer patch in custom_terminal.rs that avoids redundant ClearToEnd on already-empty tail rows and hides the cursor earlier during frame flush mitigated the major symptoms in the same repro cases. That suggests the fsmonitor change is the trigger, while the persistent visual corruption is in the inline renderer/status redraw path.
Related issues
This overlaps symptom-wise with, but is not the same as:
- #15380 Windows Terminal scrollback/render inconsistency
- #5576 output width remains truncated after resizing
- #4870 Korean IME preedit blanks
- #14372 git fsmonitor sandbox/IPC errors
- #23446
/reviewbranch picker regression where comments also mention6ec8c4a6 - #23367 wrong cwd regression, which #23446 was closed as duplicate of
The distinct part here is the minimized regression trigger: 6ec8c4a6 and specifically .args(["-c", "core.fsmonitor=false"]).
What steps can reproduce the bug?
One minimized local repro used:
- Windows Terminal + PowerShell.
- A minimal valid git repository/worktree.
- Codex TUI launched in that repo.
- No prompt input required; hold Backspace on an empty prompt, or resize/stream output in the same session.
- Observe prompt/status/footer rendering corruption.
A fake-git harness was also used to isolate the behavior from real repository content. Cases without a valid .git structure did not reproduce; valid git skeleton cases did.
What is the expected behavior?
Adding git -c core.fsmonitor=false ... to Codex's internal git metadata calls should not destabilize TUI rendering. Prompt input, status line, and streaming output should remain visible and correctly positioned across redraws, empty Backspace input, resize, and CJK/IME text.
Additional information
This was bisected locally because the bug was initially suspected to be a Windows Terminal/Korean/resize issue. The bisection showed that Korean/IME and resize are amplifiers, not required root conditions.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This is very, very useful. Thank you.
Would you be able to run the following PowerShell script below to determine what git.exe Codex is using.
Save this as a ps1 script (like
notepad $env:TEMP\git-diagnose.ps1or something similar) then run:If you could do that and send me the result, I can't seem to replicate the issue on the Windows install I'm using.
Running
git updatefixed it for meThis is the result of the script before I updated git
I updated git to 2.54.0 and Codex is working fine again
I had the same issue after updating Codex from
0.130.0to0.132.0while usinggit version 2.34.1.windows.1.Updating Git to
2.54.0.windows.1fixed it for me as well.I am so glad you helped me getting to the root cause. Installing the old git version got me to replicate the issue and I will be adding a mitigation on the next CLI version. I will be closing this issue for now, thanks again!