Worktree badge persists in app UI for a non-worktree project across new sessions
Resolved 💬 2 comments Opened Jun 17, 2026 by sandrina-gruber Closed Jun 21, 2026
What happened
The app UI shows a "worktree" badge for a project that is not in a git worktree. The badge persists even when starting a brand-new session in that project.
Repro
- At some point, use a worktree for a project (e.g. via EnterWorktree).
- Return the project to its primary checkout (no linked worktrees remain).
- Start a brand-new session in that project directory.
- Observe: the worktree badge is still shown in the app UI.
Expected
No worktree badge, since git reports no worktree.
Git state (confirms it is NOT a worktree)
git rev-parse --git-common-dir→.git.gitis a real directory, not agitdir:pointer filegit worktree listshows only the single primary checkout onmain
Environment
- Claude Code: 2.1.177
- Platform: macOS (Darwin 25.5.0)
Notes
The git side is clean; this appears to be stale app-side per-project session state retaining a prior worktree association. A full app restart is the current workaround.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗