Desktop: 'transcript has no cwd — cannot import' after worktree deletion
Resolved 💬 4 comments Opened Mar 31, 2026 by kokokenada Closed Apr 1, 2026
Description
Claude Code Desktop fails to open/import sessions with the error:
Couldn't open session — CLI session f20e0a6e-8790-4bcb-89e2-225c933b7d20 transcript has no cwd — cannot import
This affects all sessions in the Desktop app, not just the one where the issue originated.
Steps to Reproduce
- Start a Claude Code CLI session in a git worktree directory (e.g.
/Users/me/apps/issue-330-ops-foundation-adr-0) - Run multiple commands in that worktree throughout the conversation
- The worktree directory gets deleted (either manually or via
git worktree remove) - The CLI session's shell CWD gets stuck on the deleted path — all subsequent Bash commands fail with "Path does not exist"
- Attempt to use
/desktopto move/archive the conversation - Result: "transcript has no cwd — cannot import" error dialog
- This error then appears for other sessions too, even ones with valid CWDs
Expected Behavior
- Sessions with deleted CWDs should either fall back to the home directory or show a more specific error ("original directory was deleted")
- The error should not prevent importing/opening other unrelated sessions
Environment
- Claude Code CLI
- macOS (Darwin 24.6.0)
- The deleted directory was a git worktree created via
git worktree add
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗