Hmbown/CodeWhale · error · anyhow::Error
exec turn ended with status {status}
Error message
exec turn ended with status {status} What it means
`codewhale exec` reports that the turn ended with an explicit terminal status (e.g. cancelled or errored) rather than completing. The status string is included so harnesses can distinguish a finished run from one that stopped mid-flight.
Source
Thrown at crates/tui/src/lib.rs:12302
// after all in-session retries are exhausted) from genuine task
// failures so supervisors and bench harnesses can tell them apart at
// the process level without parsing the stream. Genuine failures
// keep the historical `bail!` → exit 1 path.
let exit_code = exec_failure_exit_code(summary.error_category.as_deref());
if exit_code != 1 {
eprintln!("Error: exec turn failed: {error}");
let _ = io::stdout().flush();
std::process::exit(exit_code);
}
bail!("exec turn failed: {error}");
}
if matches!(
summary.status.as_deref(),
Some("failed" | "canceled" | "interrupted")
) {
let status = summary.status.as_deref().unwrap_or("unknown");
bail!("exec turn ended with status {status}");
}
Ok(())
}
#[cfg(test)]
mod serve_bind_host_tests {
use super::*;
#[test]
fn http_defaults_to_loopback() {
assert_eq!(
resolve_serve_bind_host(false, None),
ServeBindHost {
host: "127.0.0.1".to_string(),
mobile_rebound_to_lan: false,
}
);View on GitHub (pinned to 0c42157ee5)
Solutions
- Inspect {status} to see why the turn stopped
- Re-run the turn if the cause was transient
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/tui/src/lib.rs:12302 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/beb378a84eb1872d.
Report an issue: GitHub.