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

  1. Start a Claude Code CLI session in a git worktree directory (e.g. /Users/me/apps/issue-330-ops-foundation-adr-0)
  2. Run multiple commands in that worktree throughout the conversation
  3. The worktree directory gets deleted (either manually or via git worktree remove)
  4. The CLI session's shell CWD gets stuck on the deleted path — all subsequent Bash commands fail with "Path does not exist"
  5. Attempt to use /desktop to move/archive the conversation
  6. Result: "transcript has no cwd — cannot import" error dialog
  7. 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

View original on GitHub ↗

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