- 2026-04-08 - Claude Worktrees Resumption
-
-
Save mattcodez/4abe765f849f5e0b3631f735cfeb46e1 to your computer and use it in GitHub Desktop.
Claude will automatically create a claude worktree project and a git worktree with the same name when you start it with claude --worktree wt-name. If you make no changes, it will automatically delete the worktree in both claude and git when you exit claude. This can be a bit frustrating if you were in planning mode and created a plan file but didn't start executing a plan yet but had to quit for whatever reason. The plan file will however be retained as it's in a different universal claude folder. The session will also be retained, technically, but I couldn't find a way to resume it. No amount of switching branches, projects, worktrees in the resumption dialog would provide me with my session. What I had to do was restart claude with the same worktree parameter and name in the same directory again and then I was able to resume my session.
Specifically, if the session is named you can pass both at the same time: claude --worktree my-branchwt-name --resume session-name-or-uid.