{"record":{"id":"069d72c4b2edf81f","repo":"Hmbown/CodeWhale","slug":"session-id-trimmed-collides-with-a-reserved-se","errorCode":null,"errorMessage":"Session id '{trimmed}' collides with a reserved sessions file","messagePattern":"Session id '(.+?)' collides with a reserved sessions file","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/session_manager.rs","lineNumber":927,"sourceCode":"    fn validated_session_id<'a>(&self, id: &'a str) -> std::io::Result<&'a str> {\n        let trimmed = id.trim();\n        if trimmed.is_empty() {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                \"Session id cannot be empty\",\n            ));\n        }\n        if !trimmed\n            .chars()\n            .all(|c| c.is_ascii_alphanumeric() || c == '-' || c == '_')\n        {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                format!(\"Invalid session id '{id}'\"),\n            ));\n        }\n        if trimmed == SESSION_BOOT_OWNERS_STEM {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                format!(\"Session id '{trimmed}' collides with a reserved sessions file\"),\n            ));\n        }\n        Ok(trimmed)\n    }\n\n    fn validated_session_path(&self, id: &str) -> std::io::Result<PathBuf> {\n        let trimmed = self.validated_session_id(id)?;\n        Ok(self.sessions_dir.join(format!(\"{trimmed}.json\")))\n    }\n\n    fn checkpoints_dir(&self) -> PathBuf {\n        self.sessions_dir.join(\"checkpoints\")\n    }\n\n    fn session_goals_dir(&self) -> PathBuf {\n        self.sessions_dir.join(SESSION_GOALS_DIR)","sourceCodeStart":909,"sourceCodeEnd":945,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/session_manager.rs#L909-L945","documentation":"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.","triggerScenarios":"Thrown at crates/tui/src/session_manager.rs:927 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a different session id that does not match reserved names.","Update the id generator to exclude reserved stems."],"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-14T00:17:10.932Z"}