{"record":{"id":"4248550b624719ba","repo":"BigPizzaV3/CodexPlusPlus","slug":"session-file-export-is-unavailable","errorCode":null,"errorMessage":"Session file export is unavailable","messagePattern":"Session file export is unavailable","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/routes.rs","lineNumber":123,"sourceCode":"    async fn upstream_worktree_prepare(&self, payload: Value) -> anyhow::Result<Value>;\n    async fn upstream_worktree_create(&self, payload: Value) -> anyhow::Result<Value>;\n}\n\n#[async_trait]\npub trait BridgeDataService: Send + Sync {\n    async fn delete(&self, session: SessionRef) -> anyhow::Result<DeleteResult>;\n    async fn undo(&self, undo_token: String) -> anyhow::Result<DeleteResult>;\n    async fn export_markdown(&self, session: SessionRef) -> anyhow::Result<ExportResult>;\n    async fn thread_usage_history(&self, session: SessionRef) -> anyhow::Result<Value>;\n    async fn find_archived_thread_by_title(\n        &self,\n        title: String,\n    ) -> anyhow::Result<Option<SessionRef>>;\n    async fn recover_remote_control_session(&self, _thread_id: String) -> anyhow::Result<Value> {\n        anyhow::bail!(\"Remote Control session recovery is unavailable\")\n    }\n    async fn export_session_file(&self, _session: SessionRef) -> anyhow::Result<Value> {\n        anyhow::bail!(\"Session file export is unavailable\")\n    }\n    async fn import_session_file(&self, _payload: Value) -> anyhow::Result<Value> {\n        anyhow::bail!(\"Session file import is unavailable\")\n    }\n}\n\npub async fn handle_bridge_request(\n    ctx: BridgeContext,\n    path: &str,\n    payload: Value,\n) -> serde_json::Value {\n    let started = Instant::now();\n    let _ = crate::diagnostic_log::append_diagnostic_log(\n        \"bridge.request\",\n        json!({\n            \"path\": path,\n            \"payload_keys\": payload\n                .as_object()","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/routes.rs#L105-L141","documentation":"Sentinel thrown by the default BridgeDataService implementation of export_markdown — wait, of the session-file export route (the trait's fallback body in routes.rs). When the bridge wiring has no real data service behind it, exporting a session file is reported as unavailable instead of returning an empty result; the trigger is invoking session export through a bridge context without a data layer.","triggerScenarios":"Thrown at crates/codex-plus-core/src/routes.rs:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["使用支持导出的数据服务实现","改用其他导出路径"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}