fix(cli): gracefully handle --resume when no sessions exist (#21429)

This commit is contained in:
Sandy Tao
2026-03-06 11:02:33 -08:00
committed by GitHub
parent 6f579934db
commit 42d367d72f
4 changed files with 109 additions and 15 deletions
+1 -1
View File
@@ -463,7 +463,7 @@ export class SessionSelector {
const sessions = await this.listSessions();
if (sessions.length === 0) {
throw new Error('No previous sessions found for this project.');
throw SessionError.noSessionsFound();
}
// Sort by startTime (oldest first, so newest sessions get highest numbers)