{"record":{"id":"bad9773c00fd8c74","repo":"BigPizzaV3/CodexPlusPlus","slug":"remote-control-session-recovery-requires-launcher","errorCode":null,"errorMessage":"Remote Control session recovery requires launcher hooks with codex-plus-data integration","messagePattern":"Remote Control session recovery requires launcher hooks with codex-plus-data integration","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/launcher.rs","lineNumber":715,"sourceCode":"        crate::ports::select_platform_loopback_port(requested)\n    }\n\n    async fn load_settings(&self) -> anyhow::Result<BackendSettings> {\n        SettingsStore::default().load()\n    }\n\n    fn cleanup_unsupported_config(&self) -> anyhow::Result<()> {\n        let home = crate::relay_config::default_codex_home_dir();\n        crate::relay_config::cleanup_unsupported_approval_policies_in_home(&home)?;\n        Ok(())\n    }\n\n    async fn run_provider_sync(&self) -> anyhow::Result<()> {\n        anyhow::bail!(\"provider sync requires launcher hooks with codex-plus-data integration\")\n    }\n\n    async fn run_remote_control_session_recovery(&self) -> anyhow::Result<()> {\n        anyhow::bail!(\n            \"Remote Control session recovery requires launcher hooks with codex-plus-data integration\"\n        )\n    }\n\n    fn remote_control_session_recovery_is_safe_to_run(&self) -> bool {\n        crate::watcher::find_session_index_cleanup_blocking_processes().is_empty()\n    }\n\n    async fn apply_active_relay_profile(&self, settings: &BackendSettings) -> anyhow::Result<()> {\n        if !settings.relay_profiles_enabled {\n            return Ok(());\n        }\n        let profile = settings.active_relay_profile();\n        let home = crate::relay_config::default_codex_home_dir();\n        let common_config = crate::relay_config::normalize_config_text(\n            &[\n                settings.relay_common_config_contents.as_str(),\n                settings.relay_context_config_contents.as_str(),","sourceCodeStart":697,"sourceCodeEnd":733,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/launcher.rs#L697-L733","documentation":"This stub throws because Remote Control session recovery is not implemented in the launcher-holes-less build: `run_remote_control_session_recovery` is intentionally a `bail!` placeholder that documents the missing integration with the codex-plus-data persistence layer. Callers invoke it expecting session recovery, but the launcher binary was built without the data-layer hooks that store/restore session state. It is a guard against silently running recovery with no backend.","triggerScenarios":"Any call path that reaches `run_remote_control_session_recovery` (e.g. CLI subcommand or manager UI invoking Remote Control recovery) when the launcher is compiled/wired without codex-plus-data integration.","commonSituations":"Running a slim/headless build of codex-plus-manager; using a stale launcher binary built before the data integration was enabled; invoking the recovery routine from a harness that did not install launcher hooks.","solutions":["Build/wire the launcher with codex-plus-data integration enabled (enable the relevant feature/wiring so the stub is replaced by the real implementation)","Check the call site: only invoke Remote Control session recovery when hooks are installed, or feature-gate the command in the UI/CLI","Upgrade to a launcher build/version where the hook implementation is present"],"exampleFix":"// before\nasync fn run_remote_control_session_recovery(&self) -> anyhow::Result<()> {\n    anyhow::bail!(\"Remote Control session recovery requires launcher hooks with codex-plus-data integration\")\n}\n// after\nasync fn run_remote_control_session_recovery(&self) -> anyhow::Result<()> {\n    let data = self.codex_plus_data().ok_or_else(|| anyhow::anyhow!(\"launcher hooks not installed\"))?;\n    data.recover_remote_control_sessions().await\n}","handlingStrategy":"try-catch","validationCode":"// Rust: check hook availability before invoking\nif !launcher.has_codex_plus_data_hooks() {\n    return Err(anyhow::anyhow!(\"Remote Control recovery unavailable: data hooks not installed\"));\n}","typeGuard":"fn hooks_installed(l: &Launcher) -> bool { l.codex_plus_data_handle().is_some() }","tryCatchPattern":"match launcher.run_remote_control_session_recovery().await {\n    Ok(()) => {},\n    Err(e) if e.to_string().contains(\"launcher hooks\") => eprintln!(\"recovery unavailable in this build: {e}\"),\n    Err(e) => return Err(e),\n}","preventionTips":["Feature-gate recovery commands in UI/CLI by build features","Detect the stub message and surface an actionable install/upgrade hint to users","Add a capabilities() probe API so callers can query support before calling"],"tags":["rust","launcher","missing-dependency","session-recovery"],"backgroundTag":"missing-dependency","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"}