fix(maestro): clear worktree from the session clone on natural exit
mark_session_dead cleared blocked_work on the local session clone written to the sidecar, but not worktree — so a pristine tree the daemon just removed stayed named in the sidecar, and recovery from that sidecar advertised a branch and path that no longer exist. Refs #172. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
aa5e0551b9
commit
b05b014e84
@@ -1540,6 +1540,7 @@ async fn mark_session_dead(inner: &Arc<Inner>, id: Uuid) {
|
||||
// The tree is settled (removed); a stale "in the way" would
|
||||
// describe something the session no longer holds.
|
||||
session.blocked_work = None;
|
||||
session.worktree = None;
|
||||
let mut sessions = inner.sessions.lock().await;
|
||||
if let Some(record) = sessions.get_mut(&id) {
|
||||
record.session.worktree = None;
|
||||
|
||||
Reference in New Issue
Block a user