Worktree cwd is not restored on session resume
Resolved 💬 4 comments Opened Mar 5, 2026 by 7tsuno Closed Mar 8, 2026
Description
When Claude creates and works in a git worktree via EnterWorktree, resuming the session (via --resume or --continue) resets the working directory back to the main repository root.
Steps to reproduce
- Start a Claude Code session in a git repository
- Ask Claude to create a worktree and work in it (Claude uses
EnterWorktree) - Exit the session
- Resume the session with
claude --resumeorclaude --continue
Expected behavior
The working directory should be restored to the worktree path where the session was last active.
Actual behavior
The working directory is reset to the main repository root.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗