-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Description
Description
When opening lazygit inside a git worktree created by Claude Code (claude --worktree), lazygit fails with:
error: Could not access 'claude/worktrees/warm-drifting-stardust/null'
Worktree structure
Claude Code creates worktrees under .claude/worktrees/<name>/ within the repo, using standard git worktree add. The resulting structure looks like:
repo/ # main worktree
repo/.claude/worktrees/<name>/ # claude worktree (working directory)
repo/.git/worktrees/<name>/ # git worktree metadata
The worktree's .git file is a standard pointer:
gitdir: /absolute/path/to/repo/.git/worktrees/<name>
Likely cause
The null at the end of the path (claude/worktrees/warm-drifting-stardust/null) suggests lazygit is resolving a property that evaluates to null/undefined (likely in Go, a nil string or similar) and concatenating it into a file path. This may be a code path that doesn't fully account for worktrees nested inside subdirectories of the parent repo.
Steps to reproduce
- Install Claude Code
- In any git repo, run
claude --worktree - In the same terminal path (the worktree at
.claude/worktrees/<worktree-name>/), openlazygit - Observe the error:
error: Could not access 'claude/worktrees/<worktree-name>/null'
Environment
- Lazygit version: 0.59.0
- Git version: 2.43.0
- OS: Ubuntu (Linux 6.8.0)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels