[DOCS] Common workflows docs missing worktree-aware directory switching on session resume

Resolved 💬 3 comments Opened Mar 20, 2026 by coygeek Closed Apr 29, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/common-workflows

Section/Topic

"Resume previous conversations" section and "Run parallel Claude Code sessions with Git worktrees" section

Current Documentation

The "Resume previous conversations" section states:

"Sessions are stored per project directory. The /resume picker shows sessions from the same git repository, including worktrees."

The worktree section documents how to create worktree sessions (--worktree, -w flag) and cleanup behavior, but says nothing about what happens to the working directory when resuming a worktree session.

The "how-claude-code-works" page states:

"Each Claude Code conversation is a session tied to your current directory. When you resume, you only see sessions from that directory."

What's Wrong or Missing?

Changelog v2.1.81: "Resuming a session that was in a worktree now switches back to that worktree."

Users resuming a worktree session from a different directory (e.g., the main repo root) would not know from the docs that Claude Code automatically switches the working directory back to the worktree path. This is a notable UX behavior — the CWD changes on resume — that is not documented anywhere.

Suggested Improvement

Add a note to the "Resume previous conversations" section in common-workflows.md:

Note: When you resume a session that was originally started in a git worktree, Claude Code automatically switches your working directory back to that worktree path.

Also consider adding this to the worktree section under a "Resuming worktree sessions" subsection to explain the directory-switching behavior.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/common-workflows | "Resume previous conversations" section (line ~559) and worktree section (line ~647) |
| https://code.claude.com/docs/en/how-claude-code-works | "Sessions" section describes directory-tied sessions without worktree switching |
| https://code.claude.com/docs/en/cli-reference | --worktree flag covers creation, not resume behavior |

Total scope: 3 pages affected

Source: Changelog v2.1.81 — "Resuming a session that was in a worktree now switches back to that worktree"

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗