Hmbown/CodeWhale · error · std::io::Error
Session id '{trimmed}' collides with a reserved sessions fil
Error message
Session id '{trimmed}' collides with a reserved sessions file What it means
Reserved-name guard in validated_session_id: the session id, though otherwise valid, collides with a reserved sessions-directory filename (e.g. a special file like an index or queue), so it is rejected to prevent clobbering manager-owned files.
Source
Thrown at crates/tui/src/session_manager.rs:927
fn validated_session_id<'a>(&self, id: &'a str) -> std::io::Result<&'a str> {
let trimmed = id.trim();
if trimmed.is_empty() {
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
"Session id cannot be empty",
));
}
if !trimmed
.chars()
.all(|c| c.is_ascii_alphanumeric() || c == '-' || c == '_')
{
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!("Invalid session id '{id}'"),
));
}
if trimmed == SESSION_BOOT_OWNERS_STEM {
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!("Session id '{trimmed}' collides with a reserved sessions file"),
));
}
Ok(trimmed)
}
fn validated_session_path(&self, id: &str) -> std::io::Result<PathBuf> {
let trimmed = self.validated_session_id(id)?;
Ok(self.sessions_dir.join(format!("{trimmed}.json")))
}
fn checkpoints_dir(&self) -> PathBuf {
self.sessions_dir.join("checkpoints")
}
fn session_goals_dir(&self) -> PathBuf {
self.sessions_dir.join(SESSION_GOALS_DIR)View on GitHub (pinned to 0c42157ee5)
Solutions
- Choose a different session id that does not match reserved names.
- Update the id generator to exclude reserved stems.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/session_manager.rs:927 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/069d72c4b2edf81f.
Report an issue: GitHub.