{"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/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/routes.rs#L105-L141","documentation":"export_session_file returns this sentinel error from the BridgeDataService-trait-based handler when session file export has no backing implementation (the default/placeholder service). It indicates the operation is not wired up in this build rather than a per-session failure.","triggerScenarios":"Calling export_session_file on a backend that relies on the trait default instead of providing an override.","commonSituations":"Minimal or in-memory backend in tests; bridge routing to a store variant lacking export support.","solutions":["Switch to a backend implementing export_session_file","Catch and surface 'export unsupported' in the caller","Gate the export UI action on backend capability"],"exampleFix":"// before\nlet exported = store.export_session_file(session).await?;\n// after\nlet exported = store.export_session_file(session).await.map_err(|e| if e.to_string().contains(\"unavailable\") { ExportUnsupported } else { e.into() })?;","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match store.export_session_file(session).await {\n    Ok(v) => write_export(v),\n    Err(e) if e.to_string().contains(\"unavailable\") => show_unsupported_message(),\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Gate the export action on backend capability","Implement export_session_file in any backend shipped to users","Provide an alternate raw-file copy path for backends without export"],"tags":["not-implemented","session-export","trait-default"],"backgroundTag":"method-not-implemented","analyzedSha":"b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6","analyzedAt":"2026-09-19T23:35:21.129Z","contentChangedAt":"2026-09-19T23:35:21.129Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}