[BUG] Desktop: session cannot be resumed ("Git is installed but isn't working") because the worktree pool refuses the session's own recorded worktree
Environment
- Claude desktop app 2.2553.1 (auto-updated from 2.110.1 to 2.2553.0 on 2026-09-17 around 22:00, then to 2.2553.1)
- Bundled Claude Code engine 2.1.275
- macOS 26.6.2 (25G83)
- 8 Claude.app instances running at the same time (one per signed-in account). All of them share one
~/Library/Application Support/Claude/git-worktrees.json(schemaVersion: 2).
Summary
A non-archived Code-tab session cannot be resumed. The app shows:
Git is installed but isn't working: this session's branch is checked out somewhere else in this repository (run git worktree list in the repository folder to see where). Switch that checkout to a different branch, then try again.
The "somewhere else" is the session's own worktree. It is the exact path that the session's metadata records as worktreePath, and the app created it for this session. The folder still exists, it has the session's branch checked out, and it holds the session's uncommitted work (7 modified and 3 untracked files). The app refuses to use that folder and also refuses to create a new one, so every retry fails the same way. The session is stuck.
What the app's own state shows
- Session metadata (
claude-code-sessions/<account>/<org>/local_d643f547-….json):worktreePath=<repo>/.claude/worktrees/<slug>-ef84cf,branch=claude/<slug>-ef84cf,isArchived: false. The lasterrorisYou've hit your session limit · resets …from 2026-09-14. The session was then idle for 7 days. git worktree list:claude/<slug>-ef84cfis checked out at exactly that path. The worktree's admingitdirfile has not changed since creation, so the worktree was never moved.git-worktrees.json: none of its ~170 entries names that path or that branch.main.log: no line records that registry entry being removed. The only lines that name the worktree are its creation on 2026-09-14 15:26:13 (Created worktree … Using worktree … for session local_d643f547-…), tworefreshSourceReflines that evening, and the refusals below.
Log sequence on resume (2026-09-21 19:23:10, paths redacted)
[info] [WorktreePool] No reusable worktree for session local_d643f547-… in <repo> (15/15 candidates checked, 15 known unclean, 0 refused, 0 busy)
[info] Creating worktree for session local_d643f547-… from /Users/<user>/…/<repo>
[error] the session's branch is checked out in a folder that exists; not recreating its worktree { refused: 'refs/heads/claude/<slug>-ef84cf is checked out at a folder that exists, or at a path not safe to look at', detail: undefined }
[error] [CCD] Failed to warm session local_d643f547-…: Git is installed but isn't working: this session's branch is checked out somewhere else in this repository …
Each retry repeats this sequence. The CLI for the session is never started: main.log has no warmed successfully line for it.
Frequency and possible regression
- 140 refusal lines (
not recreating its worktree) across 23 different sessions/branches between 2026-09-18 09:42:15 and 2026-09-21 19:31:42. - Zero refusal lines in the logs from 2026-09-11 09:27 up to 2026-09-18 09:42.
- The app updated from 2.110.1 to 2.2553.0 at about 2026-09-17 22:00. The first refusal came about 12 hours later. It still happens on 2.2553.1.
This is a correlation, not a proven cause, but it suggests a regression in 2.2553.x.
Steps to reproduce
Not reproduced deterministically. The observed path was:
- Start a Code-tab session in worktree mode. The app creates
<repo>/.claude/worktrees/<name>onclaude/<name>. - Let the session make uncommitted changes, then stop on the usage limit.
- Leave the session idle for several days while several Claude.app instances run and the app auto-updates.
- Resume the session ("Retry"). The error above appears on every attempt.
Expected behavior
- When the session's recorded
worktreePathexists, is a registered worktree of the base repository, and has the session'sbranchchecked out, the app re-adopts it: it restores the registry lease and resumes the session in that folder. It does not try to create a new worktree. - If the app must refuse, the message names the folder (the app knows it from the session metadata and from
git worktree list). It does not say that Git isn't working, because Git works. - The message does not recommend switching that checkout to another branch without a warning. With uncommitted changes,
git checkout <other-branch>in the old folder takes the changes along to the other branch. The worktree that the app then creates on the session's branch starts without them, so the user sees the work as lost.
Actual behavior
The session cannot be resumed. The suggested remedy leads directly into the trap described in point 3.
Suspected cause (hypothesis, not verified)
The registry entry for the session's worktree disappeared while the session was idle, without a log line. With several Claude.app instances that rewrite the same git-worktrees.json as a whole file, one instance can drop entries that another instance wrote (last writer wins). The pool then treats the session's own worktree as unknown and refuses before it ever compares the conflicting folder with session.worktreePath.
Related issues in the same pool/registry area: #75911 (pool re-leases a directory that a session still uses) and #91246 (pooled worktrees are never reclaimed).
Workaround
Not verified. Presumably: commit the work on the session's branch inside the existing folder, then run git -C <folder> checkout --detach so that the branch is free, then press "Retry". Another option is to start a new session directly in the existing folder.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗