{"record":{"id":"e3cc5b42e4de9bd6","repo":"Hmbown/CodeWhale","slug":"no-session-found-with-prefix-prefix","errorCode":null,"errorMessage":"No session found with prefix: {prefix}","messagePattern":"No session found with prefix: (.+?)","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/session_manager.rs","lineNumber":1505,"sourceCode":"    /// This preserves the historical recovery behavior for existing callers.\n    /// Embedding hosts performing ordinary runtime reads should use\n    /// [`Self::load_session_snapshot`] instead.\n    pub fn load_session(&self, id: &str) -> std::io::Result<SavedSession> {\n        self.recover_session_for_resume(id)\n            .map(|recovery| recovery.session)\n    }\n\n    /// Load a session by partial ID prefix\n    pub fn load_session_by_prefix(&self, prefix: &str) -> std::io::Result<SavedSession> {\n        let sessions = self.list_sessions()?;\n\n        let matches: Vec<_> = sessions\n            .into_iter()\n            .filter(|s| s.id.starts_with(prefix))\n            .collect();\n\n        match matches.len() {\n            0 => Err(std::io::Error::new(\n                std::io::ErrorKind::NotFound,\n                format!(\"No session found with prefix: {prefix}\"),\n            )),\n            1 => self.load_session(&matches[0].id),\n            _ => Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                format!(\n                    \"Ambiguous prefix '{}' matches {} sessions\",\n                    prefix,\n                    matches.len()\n                ),\n            )),\n        }\n    }\n\n    /// List all saved sessions, sorted by most recently updated\n    pub fn list_sessions(&self) -> std::io::Result<Vec<SessionMetadata>> {\n        let mut sessions = Vec::new();","sourceCodeStart":1487,"sourceCodeEnd":1523,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/session_manager.rs#L1487-L1523","documentation":"load_session_by_prefix() enumerated all saved sessions and none had an id starting with the given prefix. The error reports the caller's (possibly truncated or mistyped) prefix; the requested session simply does not exist on disk.","triggerScenarios":"Thrown at crates/tui/src/session_manager.rs:1505 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run the session list command to copy the exact id","Lengthen or correct the prefix before retrying"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}