agentHost: Restore deleted worktrees for legacy sessions (#331730)