plan: add archive tag before delete

This commit is contained in:
2026-03-19 18:25:12 +05:30
parent b39b7c95a8
commit aa5832e69d
@@ -336,6 +336,10 @@ export async function closeMultiModel(options: CloseSessionOptions): Promise<Clo
await runCommand(["git", "worktree", "remove", "-f", worktree.path]);
worktreesRemoved.push(worktree.path);
// Create an archive tag before deleting the branch for safe recovery
const archiveTag = `archive/${worktree.branch}`;
await runCommand(["git", "tag", archiveTag, worktree.branch]);
await runCommand(["git", "branch", "-D", worktree.branch]);
branchesDeleted.push(worktree.branch);
} catch (err) {