Hmbown/CodeWhale · error
Persistent service exited before ownership transfer (status…
Error message
Persistent service {id} exited before ownership transfer (status {:?}, exit code {:?}) What it means
Ownership transfer precondition: a PersistPending service is no longer Running at commit time; the error reports the observed status and exit code so the operator knows the service died before it could be handed over.
Solutions
- Accept that the service is gone; nothing is transferred for it.
- Restart the service by other means if it was expected to survive — check its logs for why it exited before the turn completed.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/tools/shell.rs:3110 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/92e7fe8c8105069a.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/tools/shell.rs:3110
/// enclosing turn has completed successfully.
#[cfg(unix)]
pub fn commit_persistent_services(&mut self) -> Result<Vec<PersistentServiceReceipt>> {
let mut ids = self
.processes
.iter()
.filter(|(_, shell)| shell.ownership == ShellOwnership::PersistPending)
.map(|(id, _)| id.clone())
.collect::<Vec<_>>();
ids.sort();
for id in &ids {
let shell = self
.processes
.get_mut(id)
.ok_or_else(|| anyhow!("Persistent service {id} disappeared before commit"))?;
shell.poll();
if shell.status != ShellStatus::Running {
return Err(anyhow!(
"Persistent service {id} exited before ownership transfer (status {:?}, exit code {:?})",
shell.status,
shell.exit_code
));
}
if shell
.child
.as_ref()
.and_then(ShellChild::process_id)
.is_none()
{
return Err(anyhow!(
"Persistent service {id} has no releasable process id"
));
}
}
let mut receipts = Vec::with_capacity(ids.len());View on GitHub (pinned to 73e0f67d83)