{"record":{"id":"26b8111f7f51494a","repo":"Hmbown/CodeWhale","slug":"no-saved-sessions-found","errorCode":null,"errorMessage":"No saved sessions found.","messagePattern":"No saved sessions found\\.","errorType":"error_code","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/lib.rs","lineNumber":8558,"sourceCode":"    let source_label = if source_title.is_empty() {\n        \"session\".to_string()\n    } else {\n        format!(\"\\\"{source_title}\\\"\")\n    };\n    println!(\n        \"Forked {source_label} ({source_id}) → new session {new_id}\",\n        source_id = truncate_id(&saved.metadata.id),\n        new_id = truncate_id(&forked.metadata.id),\n    );\n\n    Ok(forked.metadata.id)\n}\n\nfn pick_session_id() -> Result<String> {\n    let manager = SessionManager::default_location()?;\n    let sessions = manager.list_sessions()?;\n    if sessions.is_empty() {\n        bail!(\"No saved sessions found.\");\n    }\n\n    println!(\"Select a session to resume:\");\n    for (idx, session) in sessions.iter().enumerate() {\n        println!(\"  {:>2}. {} ({})\", idx + 1, session.title, session.id);\n    }\n    print!(\"Enter a number (or press Enter to cancel): \");\n    io::stdout().flush()?;\n\n    let mut input = String::new();\n    io::stdin().read_line(&mut input)?;\n    let input = input.trim();\n    if input.is_empty() {\n        bail!(\"No session selected.\");\n    }\n    let idx: usize = input\n        .parse()\n        .map_err(|_| anyhow::anyhow!(\"Invalid input\"))?;","sourceCodeStart":8540,"sourceCodeEnd":8576,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/lib.rs#L8540-L8576","documentation":"The interactive resume picker (pick_session_id) lists saved sessions; if SessionManager.list_sessions returns an empty set, there is nothing to present and it bails with this message before printing the menu.","triggerScenarios":"Running resume in picker mode when no sessions have been saved anywhere (empty session store).","commonSituations":"Fresh install or new machine with no prior conversations; sessions directory deleted or pointed elsewhere via config; starting resume before ever ending a session.","solutions":["Start a session first — resume requires at least one saved session","Check the session storage location in config points at an existing store","Use resume <session-id> once you know an id exists"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if manager.list_sessions()?.is_empty() { eprintln!(\"no saved sessions yet\"); }","typeGuard":null,"tryCatchPattern":"match pick_session() { Err(e) if e.to_string() == \"No saved sessions found.\" => { /* fall back to starting a new session */ }, other => other? }","preventionTips":["Only invoke resume when a prior session exists","Verify the session storage location in config"],"tags":["sessions","resume","empty"],"backgroundTag":"empty-result-set","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}