BigPizzaV3/CodexPlusPlus · error · anyhow::Error

Session file import is unavailable

Error message

Session file import is unavailable

What it means

Sentinel thrown by the default BridgeDataService implementation of the session-file import route (trait fallback in routes.rs). A bridge wiring without a real data service cannot write imported sessions, so the route reports itself unavailable instead of pretending to import; the trigger is calling session import through such a bridge context.

Source

Thrown at crates/codex-plus-core/src/routes.rs:126

#[async_trait]
pub trait BridgeDataService: Send + Sync {
    async fn delete(&self, session: SessionRef) -> anyhow::Result<DeleteResult>;
    async fn undo(&self, undo_token: String) -> anyhow::Result<DeleteResult>;
    async fn export_markdown(&self, session: SessionRef) -> anyhow::Result<ExportResult>;
    async fn thread_usage_history(&self, session: SessionRef) -> anyhow::Result<Value>;
    async fn find_archived_thread_by_title(
        &self,
        title: String,
    ) -> anyhow::Result<Option<SessionRef>>;
    async fn recover_remote_control_session(&self, _thread_id: String) -> anyhow::Result<Value> {
        anyhow::bail!("Remote Control session recovery is unavailable")
    }
    async fn export_session_file(&self, _session: SessionRef) -> anyhow::Result<Value> {
        anyhow::bail!("Session file export is unavailable")
    }
    async fn import_session_file(&self, _payload: Value) -> anyhow::Result<Value> {
        anyhow::bail!("Session file import is unavailable")
    }
}

pub async fn handle_bridge_request(
    ctx: BridgeContext,
    path: &str,
    payload: Value,
) -> serde_json::Value {
    let started = Instant::now();
    let _ = crate::diagnostic_log::append_diagnostic_log(
        "bridge.request",
        json!({
            "path": path,
            "payload_keys": payload
                .as_object()
                .map(|object| object.keys().cloned().collect::<Vec<_>>())
                .unwrap_or_default()
        }),

View on GitHub (pinned to f2074595a2)

Solutions

  1. 使用支持导入的数据服务实现
  2. 改用其他导入路径
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/codex-plus-core/src/routes.rs:126 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23). Data as JSON: /api/errors/ce7037d4e67f4d8d. Report an issue: GitHub.