claude exits with a resume message on a deleted worktree

Resolved 💬 3 comments Opened Mar 23, 2026 by eyayaw Closed Mar 26, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Exiting claude code session on worktrees displays the resume message while the worktree has been removed.

<img width="722" height="244" alt="Image" src="https://github.com/user-attachments/assets/c461c786-acad-46ab-9cc7-658c22030409" />

What Should Happen?

Since the worktree has been removed, the session resume message should be suppressed.

Error Messages/Logs

Steps to Reproduce

  1. claude --worktree test-test
  2. at least one conversation with claude
  3. exit session: ctrl+c x2
  4. accept to remove the worktree
  5. the resume message will be displayed with the session id
  6. claude --resume \<id\>
  7. No conversation found with session ID \<id\>.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.81 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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