Skip to content

Instantly share code, notes, and snippets.

@mattcodez
Last active April 9, 2026 15:55
Show Gist options
  • Select an option

  • Save mattcodez/4abe765f849f5e0b3631f735cfeb46e1 to your computer and use it in GitHub Desktop.

Select an option

Save mattcodez/4abe765f849f5e0b3631f735cfeb46e1 to your computer and use it in GitHub Desktop.
Engineering Dev Blog

Claude Worktrees Resumption

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment