{"record":{"id":"93bb34baed602e37","repo":"BigPizzaV3/CodexPlusPlus","slug":"remote-control-candidate-check-failed-error","errorCode":null,"errorMessage":"Remote Control candidate check failed: {error}","messagePattern":"Remote Control candidate check failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/codex-plus-launcher/src/main.rs","lineNumber":734,"sourceCode":"        }\n        let home = codex_plus_core::codex_sqlite::default_codex_home_dir();\n        let target_provider =\n            codex_plus_core::model_catalog::codex_model_provider_for_relay_profile(&home, &profile);\n        if target_provider.trim().is_empty() || target_provider == \"openai\" {\n            return Ok(json!({\n                \"status\": \"skipped\",\n                \"message\": \"Remote Control session recovery requires a non-openai target provider\"\n            }));\n        }\n        let candidate_thread_id = thread_id.clone();\n        let candidate = tokio::task::spawn_blocking(move || {\n            codex_plus_data::remote_control_session_recovery_candidate_exists(\n                None,\n                &candidate_thread_id,\n            )\n        })\n        .await\n        .map_err(|error| anyhow::anyhow!(\"Remote Control candidate check failed: {error}\"))??;\n        if !candidate {\n            return Ok(json!({\n                \"status\": \"skipped\",\n                \"message\": \"Remote Control session recovery is waiting for a recent openai thread\"\n            }));\n        }\n        let request = codex_plus_core::remote_control_recovery::PendingRemoteControlRecovery {\n            thread_id: thread_id.clone(),\n            profile_id: profile.id.clone(),\n            target_provider: target_provider.clone(),\n            config_generation: codex_plus_core::remote_control_recovery::config_generation(\n                &profile,\n                &target_provider,\n            ),\n            created_at: std::time::SystemTime::now()\n                .duration_since(std::time::UNIX_EPOCH)\n                .unwrap_or_default()\n                .as_secs() as i64,","sourceCodeStart":716,"sourceCodeEnd":752,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/apps/codex-plus-launcher/src/main.rs#L716-L752","documentation":"This error wraps a JoinError from the first spawn_blocking in `recover_remote_control_session` (apps/codex-plus-launcher/src/main.rs:734), the one calling remote_control_session_recovery_candidate_exists. The blocking candidate check panicked or was cancelled. The `??` means two layers can fail: this join error, and the inner check error — this message specifically indicates the join layer.","triggerScenarios":"Calling recover_remote_control_session when the candidate-existence check closure panics (db path issues, unwrap on thread id), when the future is dropped before completion, or when the runtime is shutting down.","commonSituations":"Recovering a Remote Control session right as the app quits; corrupted sqlite state causing a panic in the existence check; caller aborts the recovery flow.","solutions":["Unwrap the JoinError's panic payload to find the bug in remote_control_session_recovery_candidate_exists","Make the candidate check panic-free (propagate errors via its Result)","Avoid dropping the recovery future mid-check","At shutdown, drain blocking tasks before terminating"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn join_error_is_panic(err: &tokio::task::JoinError) -> bool { err.is_panic() }","tryCatchPattern":"Handle the double `?` separately: match the JoinError first, distinguish panic vs cancellation, then surface inner check errors with their own message","preventionTips":["Make remote_control_session_recovery_candidate_exists panic-free","Avoid aborting recovery during the candidate check phase","Drain blocking tasks before shutdown"],"tags":["rust","tokio","join-error","async","remote-control"],"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"}