Review live query keeps polling deleted managed worktrees until app restart
What version of the Codex App are you using?
26.803.5235.0
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What issue are you seeing?
I was investigating a period when my desktop had become severely sluggish and found Codex App repeatedly checking two managed-worktree paths that no longer existed.
For example, I expected a worktree’s review activity to stop after the directory was removed. Instead, the logs continued recording failed Git status operations for that path until I restarted the app:
source=review_model
requestKind=subscribe-live-query
failureReason=wait_failed
cwd=C:/Users/<user>/.codex/worktrees/<id>/<repo>
From 2026-08-10 16:26:46Z through 17:35:13Z, the logs contained 5,591 such failures:
- Worktree
f0f3: 4,044 - Worktree
fb4a: 1,547
Both directories were absent when checked. Restarting Codex App stopped the activity, and it did not recur during the subsequent observation period.
The failed operations coincided with severe Windows UI and cursor lag. I have not established that this loop caused every responsiveness problem during that period, but thousands of operations against deleted paths are unexpected background work.
What steps can reproduce the bug?
I do not yet have a deterministic clean reproduction. The observed sequence was:
- Use Codex tasks backed by managed worktrees.
- Allow review-related live queries to run.
- The managed-worktree directories are subsequently removed. I did not capture the precise removal transition during this incident.
- Leave Codex App running.
- Inspect the Desktop logs and observe continuing
source=review_model,requestKind=subscribe-live-queryGit operations against the missing paths. - Restart Codex App and observe that the operations stop.
This was observed for two separate managed-worktree paths during one app session.
What is the expected behavior?
Removing a managed worktree should also remove any review live-query subscription associated with its path. If one query races with deletion, the missing-path result should terminate or suspend that subscription instead of continuing indefinitely.
Additional information
Related reports cover neighboring failure modes but not this exact lifecycle:
- #30820 covers
review_modelwork against restored existing repositories. - #32113 covers scans of saved but inactive valid repositories.
- #34473 covers retries while resolving malformed Git roots.
- #33401 covers processes retaining a removed managed-worktree directory.
This report is specifically about a subscribe-live-query subscription retaining paths after the managed worktrees themselves no longer exist.
Maintainer question: Is managed-worktree removal expected to unregister every review live-query subscription associated with that path?
No /feedback ID was captured during the incident. I can provide additional sanitized log excerpts if useful.
1 Comment
Codex Desktop runaway live query against a deleted managed worktree
Canonical issue: https://github.com/openai/codex/issues/38109
Environment
26.803.10989.010.0.28120.0x64D:\.codex\worktreesImpact
Codex Desktop entered a focus-sensitive runaway state after a managed worktree was deleted:
codex.exe app-serverreading approximately 165-190 MB/s and using approximately 1.5 CPU cores. The main ChatGPT/Codex UI process was separately using about two CPU cores.logs_2.sqlitedatabase. This storage is contextual evidence, not all attributed to this one loop.Direct evidence
The affected deleted managed worktree was:
The directory no longer exists. The primary task/session associated with it is:
The task completed its teardown and reported
ReadyForWorktreeDeletion. Three completed child review sessions also retained the same worktree path:Across Desktop logs from 13-16 August, the deleted worktree appeared in 134,436 log events. The dominant event was a failed Git status command retried approximately once per second:
The logs also show Windows path normalization failures immediately before/around this lifecycle:
The doubled/malformed path and the Git path argument beginning with
'?/D:suggest a Windows\\?\long-path prefix is being normalized incorrectly somewhere in the Desktop watcher/live-query path.Reproduction sequence
D:\.codex\worktrees.git statusfailures against the deleted path.Expected behavior
local_conversation_threadand review subscriptions for that path.'?/D:or duplicated/D:/.../D:...paths.Suggested regression coverage
local_conversation_threadandreview_modelto a managed Windows worktree.\\?\D:\...worktree path and completed child review sessions.Local evidence retained
codex-runaway-process-io.png- process CPU, memory and cumulative I/O counterscodex-profile-storage.png- local.codexprofile sizeNo credentials, API keys, prompt contents, financial data, or repository source code are included.