{"record":{"id":"f2d0b48f836d1719","repo":"Hmbown/CodeWhale","slug":"session-schema-v-is-newer-than-supported-v","errorCode":null,"errorMessage":"Session schema v{} is newer than supported v{}","messagePattern":"Session schema v(.+?) is newer than supported v(.+?)","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/session_manager.rs","lineNumber":1435,"sourceCode":"        if path.exists() {\n            fs::remove_file(path)?;\n        }\n        Ok(())\n    }\n\n    /// Read a session snapshot without repairing tool call/result pairs.\n    ///\n    /// This is the correct API for embedding hosts that inspect or update a\n    /// durable session while an engine may still be executing a tool call.\n    /// A dangling `tool_use` is not proof of a crashed process in that state.\n    pub fn load_session_snapshot(&self, id: &str) -> std::io::Result<SavedSession> {\n        let path = self.validated_session_path(id)?;\n\n        let content = fs::read_to_string(&path)?;\n        let mut session: SavedSession = serde_json::from_str(&content)\n            .map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e))?;\n        if session.schema_version > CURRENT_SESSION_SCHEMA_VERSION {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidData,\n                format!(\n                    \"Session schema v{} is newer than supported v{}\",\n                    session.schema_version, CURRENT_SESSION_SCHEMA_VERSION\n                ),\n            ));\n        }\n\n        session.system_prompt = strip_legacy_truncation_note(session.system_prompt);\n        session.ensure_journal();\n        self.hydrate_approval_receipts(&mut session)?;\n\n        Ok(session)\n    }\n\n    /// Load and repair a session after a known process or engine restart.\n    ///\n    /// The returned repair remains in memory until the caller persists","sourceCodeStart":1417,"sourceCodeEnd":1453,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/session_manager.rs#L1417-L1453","documentation":"A saved session snapshot's schema_version exceeds the highest version this binary supports. The loader refuses to parse unknown future formats rather than resuming a session with silently misread state; firing means the snapshot came from a newer Codewhale.","triggerScenarios":"Thrown at crates/tui/src/session_manager.rs:1435 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Upgrade Codewhale to a version that reads the newer session schema","Use an older snapshot/checkpoint compatible with this build"],"exampleFix":null,"handlingStrategy":"fallback","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"}