Hmbown/CodeWhale · error
Persistent service lost its process id
Error message
Persistent service {id} lost its process id What it means
Final receipt step of the commit: the removed shell's process id became unavailable between validation and receipt generation, so the transfer cannot produce a truthful receipt and fails instead of recording an unowned pid.
Solutions
- Re-read output with a clean cursor; the invariant (pid present at check time, gone at removal) broke under a race.
- Retry the ownership transfer for the affected service.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/tools/shell.rs:3138 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/825d7b1f78f6f318.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/tools/shell.rs:3138
.is_none()
{
return Err(anyhow!(
"Persistent service {id} has no releasable process id"
));
}
}
let mut receipts = Vec::with_capacity(ids.len());
for id in ids {
let mut shell = self
.processes
.remove(&id)
.ok_or_else(|| anyhow!("Persistent service {id} disappeared during commit"))?;
let pid = shell
.child
.as_ref()
.and_then(ShellChild::process_id)
.ok_or_else(|| anyhow!("Persistent service {id} lost its process id"))?;
unregister_pending_persistent_process_group(pid);
shell.ownership = ShellOwnership::Released;
shell.stdin = None;
shell.heavy_permit.take();
shell.work_lifecycle = None;
receipts.push(PersistentServiceReceipt {
task_id: id,
pid,
process_group_id: pid,
ownership: "external".to_string(),
});
}
Ok(receipts)
}
/// Kill only services waiting for a successful exec ownership transfer.
/// Ordinary background jobs retain their existing manager lifetime.
pub fn abort_persistent_services(&mut self) {View on GitHub (pinned to 73e0f67d83)