Hmbown/CodeWhale · error · anyhow::Error
runtime API bridge exited before becoming ready (status {sta
Error message
runtime API bridge exited before becoming ready (status {status}) What it means
The spawned runtime API bridge child process terminated with the given {status} before its HTTP listener became ready within the 15-second startup deadline in wait_until_ready. The bridge is the local sidecar the app server proxies turn requests through, so this means the runtime never came up — the status code identifies how the child exited.
Source
Thrown at crates/app-server/src/lib.rs:1072
.arg(port.to_string())
.env("CODEWHALE_RUNTIME_TOKEN", auth_token)
.env("DEEPSEEK_RUNTIME_TOKEN", auth_token)
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::null());
if let Some(config_path) = config_path {
command.arg("--config").arg(config_path);
}
Ok(command)
}
async fn wait_until_ready(&mut self) -> Result<()> {
let deadline = Instant::now() + Duration::from_secs(15);
loop {
if let Some(child) = self.child.as_mut()
&& let Some(status) = child.try_wait()?
{
return Err(anyhow!(
"runtime API bridge exited before becoming ready (status {status})"
));
}
match self
.client
.get(format!("{}/health", self.base_url))
.send()
.await
{
Ok(response) if response.status().is_success() => return Ok(()),
_ if Instant::now() >= deadline => {
bail!(
"timed out waiting for runtime API bridge at {}/health",
self.base_url
)
}
_ => tokio::time::sleep(Duration::from_millis(50)).await,View on GitHub (pinned to 0c42157ee5)
Solutions
- Check the runtime bridge logs/stderr for why it exited (port conflicts, missing binary, bad config)
- Verify the runtime token and --config path passed to the child are valid
- Free the reserved port or restart the app server so a fresh child is spawned
- Upgrade or reinstall the runtime binary in case it is corrupt or incompatible
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/app-server/src/lib.rs:1072 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/aca3d6d304738c95.
Report an issue: GitHub.