Hmbown/CodeWhale · error
Persistent service disappeared during commit
Error message
Persistent service {id} disappeared during commit What it means
During the removal phase of the commit loop a shell vanished from the process map again — concurrent mutation between validation and removal — so the commit aborts rather than leaving ownership half-released.
Solutions
- Treat as a race in the commit loop; inspect whether the service was concurrently removed and retry the commit.
- Avoid mutating the shell pool while commit_persistent_services is in progress.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/tools/shell.rs:3133 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/943c8e7c945ea5af.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/tools/shell.rs:3133
}
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());
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)View on GitHub (pinned to 73e0f67d83)