{"record":{"id":"342fc2f4dfd84cbd","repo":"Hmbown/CodeWhale","slug":"no-saved-sessions-found-for-workspace-use-cod","errorCode":null,"errorMessage":"No saved sessions found for workspace {}. Use `codewhale sessions` to list sessions, or pass `codewhale exec --resume <SESSION_ID> ...`.","messagePattern":"No saved sessions found for workspace (.+?)\\. Use `codewhale sessions` to list sessions, or pass `codewhale exec --resume <SESSION_ID> \\.\\.\\.`\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/lib.rs","lineNumber":966,"sourceCode":"    {\n        read()\n    }\n}\n\nfn top_level_prompt_initial_input(parts: &[String]) -> Option<tui::InitialInput> {\n    (!parts.is_empty()).then(|| tui::InitialInput::Submit(join_prompt_parts(parts)))\n}\n\nfn resolve_exec_resume_session_id(args: &ExecArgs, workspace: &Path) -> Result<Option<String>> {\n    if let Some(id) = args.resume.as_ref().or(args.session_id.as_ref()) {\n        return Ok(Some(id.clone()));\n    }\n    if !args.continue_session {\n        return Ok(None);\n    }\n    latest_session_id_for_workspace(workspace)?.map_or_else(\n        || {\n            bail!(\n                \"No saved sessions found for workspace {}. Use `codewhale sessions` to list sessions, or pass `codewhale exec --resume <SESSION_ID> ...`.\",\n                workspace.display()\n            )\n        },\n        |id| Ok(Some(id)),\n    )\n}\n\nfn load_exec_resume_session(session_id: &str) -> Result<session_manager::SavedSession> {\n    let session_ref = exec_stream_session_ref(session_id);\n    SessionManager::default_location()\n        .context(\"could not open session manager for resume\")?\n        .resume_session_by_prefix(session_id)\n        .map(|recovery| recovery.session)\n        .with_context(|| format!(\"could not load session {session_ref}\"))\n}\n\n/// Select the route for `exec --resume` before any engine/client is built.","sourceCodeStart":948,"sourceCodeEnd":984,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/lib.rs#L948-L984","documentation":"With `--continue` (continue_session), codewhale resolves the most recent saved session id for the current workspace. If no saved sessions exist for that workspace, it bails with guidance to list sessions or use an explicit `--resume <SESSION_ID>`.","triggerScenarios":"Running `codewhale exec --continue ...` in a workspace where latest_session_id_for_workspace returns None — no session files were ever persisted for that directory.","commonSituations":"First run in a new/relocated project directory; sessions directory cleaned or on a different machine/container; path changed (workspace identity is the resolved directory) so old sessions don't match.","solutions":["List saved sessions with `codewhale sessions` to see what exists","Resume an explicit session with `codewhale exec --resume <SESSION_ID> ...`","Start a fresh session without --continue if history isn't needed","Verify you're in the same workspace directory where the original session ran"],"exampleFix":"// before\ncodewhale exec --continue 'do the thing'\n// after\ncodewhale sessions\ncodewhale exec --resume <SESSION_ID> 'do the thing'","handlingStrategy":"fallback","validationCode":"// check for sessions before using --continue\n// run: codewhale sessions (non-empty output for this workspace) OR pass --resume <id>","typeGuard":null,"tryCatchPattern":"match result { Err(e) if e.to_string().contains(\"No saved sessions found\") => start_fresh_session(), other => other }","preventionTips":["Run from the same workspace directory where prior sessions were saved","List sessions before continuing; don't assume history exists","In automation, always pass an explicit --resume id captured earlier"],"tags":["cli","sessions","workspace"],"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"}