Hmbown/CodeWhale · error · std::io::Error
No session found with prefix: {prefix}
Error message
No session found with prefix: {prefix} What it means
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.
Source
Thrown at crates/tui/src/session_manager.rs:1505
/// This preserves the historical recovery behavior for existing callers.
/// Embedding hosts performing ordinary runtime reads should use
/// [`Self::load_session_snapshot`] instead.
pub fn load_session(&self, id: &str) -> std::io::Result<SavedSession> {
self.recover_session_for_resume(id)
.map(|recovery| recovery.session)
}
/// Load a session by partial ID prefix
pub fn load_session_by_prefix(&self, prefix: &str) -> std::io::Result<SavedSession> {
let sessions = self.list_sessions()?;
let matches: Vec<_> = sessions
.into_iter()
.filter(|s| s.id.starts_with(prefix))
.collect();
match matches.len() {
0 => Err(std::io::Error::new(
std::io::ErrorKind::NotFound,
format!("No session found with prefix: {prefix}"),
)),
1 => self.load_session(&matches[0].id),
_ => Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!(
"Ambiguous prefix '{}' matches {} sessions",
prefix,
matches.len()
),
)),
}
}
/// List all saved sessions, sorted by most recently updated
pub fn list_sessions(&self) -> std::io::Result<Vec<SessionMetadata>> {
let mut sessions = Vec::new();View on GitHub (pinned to 0c42157ee5)
Solutions
- Re-run the session list command to copy the exact id
- Lengthen or correct the prefix before retrying
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/session_manager.rs:1505 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/e3cc5b42e4de9bd6.
Report an issue: GitHub.