{"record":{"id":"7ea05fe0be3b14a1","repo":"BigPizzaV3/CodexPlusPlus","slug":"remote-control-recovery-state-lock-poisoned","errorCode":null,"errorMessage":"Remote Control recovery state lock poisoned","messagePattern":"Remote Control recovery state lock poisoned","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/remote_control_recovery.rs","lineNumber":53,"sourceCode":"}\n\npub fn config_generation(profile: &RelayProfile, target_provider: &str) -> String {\n    let mut digest = Sha256::new();\n    digest.update(profile.id.trim().as_bytes());\n    digest.update([0]);\n    digest.update(profile.config_contents.as_bytes());\n    digest.update([0]);\n    digest.update(target_provider.trim().as_bytes());\n    format!(\"{:x}\", digest.finalize())\n}\n\npub fn load_pending_remote_control_recoveries(\n    path: Option<&Path>,\n) -> anyhow::Result<Vec<PendingRemoteControlRecovery>> {\n    let path = pending_path(path);\n    let _guard = state_lock()\n        .lock()\n        .map_err(|_| anyhow::anyhow!(\"Remote Control recovery state lock poisoned\"))?;\n    Ok(load_state(&path)?.requests)\n}\n\npub fn enqueue_pending_remote_control_recovery(\n    path: Option<&Path>,\n    request: PendingRemoteControlRecovery,\n) -> anyhow::Result<()> {\n    validate_request(&request)?;\n    let path = pending_path(path);\n    let _guard = state_lock()\n        .lock()\n        .map_err(|_| anyhow::anyhow!(\"Remote Control recovery state lock poisoned\"))?;\n    let mut state = load_state(&path)?;\n    // The first observed profile/provider snapshot is authoritative. Retries for the same\n    // thread must not overwrite it after the user switches relay profiles.\n    if state\n        .requests\n        .iter()","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/fb3ebd9a82383aedd8d098aa9ae3aef9426d13a4/crates/codex-plus-core/src/remote_control_recovery.rs#L35-L71","documentation":"Raised in load_pending_remote_control_recoveries when the process-global Mutex guarding the Remote Control recovery state file is poisoned — another thread panicked while holding the lock — so pending recovery records cannot be read safely.","triggerScenarios":"Thrown at crates/codex-plus-core/src/remote_control_recovery.rs:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restart the Codex++ process to reset the poisoned lock","Investigate the earlier panic that poisoned the state lock","Retry the load after other remote-control operations settle"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb3ebd9a82383aedd8d098aa9ae3aef9426d13a4","analyzedAt":"2026-08-17T11:35:12.031Z","contentChangedAt":"2026-08-17T11:35:12.031Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}