openai/codex · error · anyhow::Error
pid-managed app-server startup is unsupported on this…
Error message
pid-managed app-server startup is unsupported on this platform
What it means
Platform-support guard in the daemon's pid-based start path: pid-file-managed app-server startup is only implemented on supported platforms, and the current OS is not one of them. The call to start fails unconditionally rather than attempting behavior that could corrupt pid bookkeeping; it is a sentinel error, not a runtime fault.
Solutions
- Use a supported platform for pid-managed daemon startup
- Fall back to a non-pid-managed launch strategy on unsupported platforms
- Gate daemon start behind a platform capability check before invoking it
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/app-server-daemon/src/backend/pid.rs:237 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/9a7544ac8b3ad79f.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/app-server-daemon/src/backend/pid.rs:237
return Err(err).with_context(|| {
format!("failed to write pid temp file {}", temp_pid_file.display())
});
}
if let Err(err) = fs::rename(&temp_pid_file, &self.pid_file).await {
let _ = self.terminate_process(pid);
let _ = fs::remove_file(&temp_pid_file).await;
let _ = fs::remove_file(&self.pid_file).await;
return Err(err).with_context(|| {
format!("failed to publish pid file {}", self.pid_file.display())
});
}
drop(reservation_lock);
Ok(Some(pid))
}
#[cfg(not(unix))]
pub(crate) async fn start(&self) -> Result<Option<u32>> {
bail!("pid-managed app-server startup is unsupported on this platform")
}
pub(crate) async fn stop(&self) -> Result<()> {
loop {
let Some(record) = self.wait_for_pid_start().await? else {
return Ok(());
};
if !self.record_is_active(&record).await? {
match self.refresh_after_stale_record(&record).await? {
PidFileState::Missing => return Ok(()),
PidFileState::Starting | PidFileState::Running(_) => continue,
}
}
let pid = record.pid;
self.terminate_process(pid)?;
let started_at = tokio::time::Instant::now();
let deadline = tokio::time::Instant::now() + STOP_TIMEOUT;View on GitHub (pinned to 339751715c)