{"record":{"id":"e000b1bfa4f3c599","repo":"BigPizzaV3/CodexPlusPlus","slug":"archived-lookup-task-failed-error","errorCode":null,"errorMessage":"archived lookup task failed: {error}","messagePattern":"archived lookup task failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/codex-plus-launcher/src/main.rs","lineNumber":700,"sourceCode":"        .await\n        .map_err(|error| anyhow::anyhow!(\"export markdown task failed: {error}\"))\n    }\n\n    async fn thread_usage_history(&self, session: SessionRef) -> anyhow::Result<Value> {\n        let adapter = self.storage_adapter();\n        tokio::task::spawn_blocking(move || adapter.codex_thread_usage_history(&session))\n            .await\n            .map_err(|error| anyhow::anyhow!(\"thread usage history task failed: {error}\"))\n    }\n\n    async fn find_archived_thread_by_title(\n        &self,\n        title: String,\n    ) -> anyhow::Result<Option<SessionRef>> {\n        let adapter = self.storage_adapter();\n        tokio::task::spawn_blocking(move || adapter.find_archived_thread_by_title(&title))\n            .await\n            .map_err(|error| anyhow::anyhow!(\"archived lookup task failed: {error}\"))\n    }\n\n    async fn recover_remote_control_session(&self, thread_id: String) -> anyhow::Result<Value> {\n        let settings = codex_plus_core::settings::SettingsStore::default()\n            .load()\n            .unwrap_or_default();\n        let profile = settings.active_relay_profile();\n        if !settings.relay_profiles_enabled\n            || profile.relay_mode != codex_plus_core::settings::RelayMode::Official\n            || !profile.official_mix_api_key\n        {\n            return Ok(json!({\n                \"status\": \"skipped\",\n                \"message\": \"Remote Control session recovery is disabled for the active profile\"\n            }));\n        }\n        let home = codex_plus_core::codex_sqlite::default_codex_home_dir();\n        let target_provider =","sourceCodeStart":682,"sourceCodeEnd":718,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/apps/codex-plus-launcher/src/main.rs#L682-L718","documentation":"This error wraps a JoinError from tokio::task::spawn_blocking in `find_archived_thread_by_title` (apps/codex-plus-launcher/src/main.rs:700). The blocking lookup against archived sessions never returned — the closure panicked or the task was cancelled. Note the inner Result already handles 'not found' via Ok(None); this error means the lookup itself failed to run to completion.","triggerScenarios":"Calling `find_archived_thread_by_title(title)` when adapter.find_archived_thread_by_title panics (bad title encoding, db access panic), when the awaiting future is dropped, or at runtime shutdown.","commonSituations":"Searching archived threads with a title containing characters that trip a panicking decode path; app exit during the search; runtime teardown.","solutions":["Log JoinError::into_panic payload to locate the panic inside the adapter lookup","Fix the panic source so lookup returns Result<_, Error> instead of unwrapping","Await the future to completion; don't cancel mid-lookup","If recurring at shutdown, join pending blocking tasks before exit"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if title.trim().is_empty() { return Ok(None); }","typeGuard":"fn join_error_is_panic(err: &tokio::task::JoinError) -> bool { err.is_panic() }","tryCatchPattern":"match spawn_blocking(move || adapter.find_archived_thread_by_title(&title)).await {\n    Ok(Ok(found)) => found,\n    Ok(Err(e)) => { eprintln!(\"lookup error: {e}\"); None },\n    Err(je) => { eprintln!(\"lookup task panicked: {je}\"); None },\n}","preventionTips":["Sanitize/validate title before passing to the adapter","Avoid unwraps on decode paths in the lookup","Keep the lookup future alive to completion"],"tags":["rust","tokio","join-error","async","lookup"],"backgroundTag":"thread-interrupted","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"}