BigPizzaV3/CodexPlusPlus · error
macOS app did not exit before debug relaunch: {}
Error message
macOS app did not exit before debug relaunch: {} What it means
Thrown by quit_macos_app_and_wait when the deadline (MACOS_DEBUG_TAKEOVER_WAIT_MS) expires without the targeted macOS app exiting after a quit request — a precondition for the debug relaunch. The offending input is the app at the given path that failed to terminate in time; the relaunch is aborted rather than risking two instances fighting over the debug port.
Source
Thrown at crates/codex-plus-core/src/launcher.rs:2747
return Ok(());
};
let _ = Command::new(executable)
.args(&command[1..])
.stdout(Stdio::null())
.stderr(Stdio::null())
.status()
.await
.with_context(|| format!("failed to request macOS app quit for {}", app_dir.display()))?;
Ok(())
}
async fn quit_macos_app_and_wait(app_dir: &Path) -> anyhow::Result<()> {
run_macos_cleanup_command(app_dir, MacosCleanupPolicy::QuitIfNotPreviouslyRunning).await?;
let deadline = tokio::time::Instant::now()
+ std::time::Duration::from_millis(MACOS_DEBUG_TAKEOVER_WAIT_MS);
while is_macos_app_running(app_dir).await {
if tokio::time::Instant::now() >= deadline {
anyhow::bail!(
"macOS app did not exit before debug relaunch: {}",
app_dir.display()
);
}
tokio::time::sleep(std::time::Duration::from_millis(
MACOS_DEBUG_TAKEOVER_INTERVAL_MS,
))
.await;
}
let _ = crate::diagnostic_log::append_diagnostic_log(
"launcher.macos_existing_app_without_cdp_stopped",
serde_json::json!({
"app_dir": app_dir
}),
);
Ok(())
}
View on GitHub (pinned to f2074595a2)
Solutions
- 手动退出 Codex App 后重试
- 检查是否有对话框阻塞退出
- 稍后重试启动接管流程
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/launcher.rs:2747 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/ffc8760c4bf90461.
Report an issue: GitHub.