BigPizzaV3/CodexPlusPlus · error

Remote Control candidate check failed

Error message

Remote Control candidate check failed: {error}

What it means

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.

Solutions

  1. Unwrap the JoinError's panic payload to find the bug in remote_control_session_recovery_candidate_exists
  2. Make the candidate check panic-free (propagate errors via its Result)
  3. Avoid dropping the recovery future mid-check
  4. At shutdown, drain blocking tasks before terminating
Defensive patterns

Strategy: try-catch

Type guard

fn join_error_is_panic(err: &tokio::task::JoinError) -> bool { err.is_panic() }

Try / catch

Handle the double `?` separately: match the JoinError first, distinguish panic vs cancellation, then surface inner check errors with their own message

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19). Data as JSON: /api/errors/93bb34baed602e37. Report an issue: GitHub.

Appendix: source

Thrown at apps/codex-plus-launcher/src/main.rs:734

        }
        let home = codex_plus_core::codex_sqlite::default_codex_home_dir();
        let target_provider =
            codex_plus_core::model_catalog::codex_model_provider_for_relay_profile(&home, &profile);
        if target_provider.trim().is_empty() || target_provider == "openai" {
            return Ok(json!({
                "status": "skipped",
                "message": "Remote Control session recovery requires a non-openai target provider"
            }));
        }
        let candidate_thread_id = thread_id.clone();
        let candidate = tokio::task::spawn_blocking(move || {
            codex_plus_data::remote_control_session_recovery_candidate_exists(
                None,
                &candidate_thread_id,
            )
        })
        .await
        .map_err(|error| anyhow::anyhow!("Remote Control candidate check failed: {error}"))??;
        if !candidate {
            return Ok(json!({
                "status": "skipped",
                "message": "Remote Control session recovery is waiting for a recent openai thread"
            }));
        }
        let request = codex_plus_core::remote_control_recovery::PendingRemoteControlRecovery {
            thread_id: thread_id.clone(),
            profile_id: profile.id.clone(),
            target_provider: target_provider.clone(),
            config_generation: codex_plus_core::remote_control_recovery::config_generation(
                &profile,
                &target_provider,
            ),
            created_at: std::time::SystemTime::now()
                .duration_since(std::time::UNIX_EPOCH)
                .unwrap_or_default()
                .as_secs() as i64,

View on GitHub (pinned to b1ed92e5e4)