Hmbown/CodeWhale · error
Fleet executor outcome must contain a terminal worker event
Error message
Fleet executor outcome must contain a terminal worker event
What it means
Task receipt reconciliation guard: a worker reported a terminal event, but after task_receipt_outcome reconciliation no terminal worker event remains, so the executor outcome is internally inconsistent and is rejected rather than recorded as success or failure.
Solutions
- Check the worker process/journal for the missing terminal event (crash, kill, lost pipe) and reconcile the run status from what is found.
- Restart or fail the worker explicitly so a terminal event is produced and recorded.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/fleet/manager.rs:1699 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/25bad5ef7f92577c.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/fleet/manager.rs:1699
return Ok(false);
}
let FleetWorkerTerminalEvent {
payload,
exit_code,
tail_payloads,
reported_route,
final_answer,
saved_session_id,
requires_reported_route,
} = terminal;
let (receipt_result, failure_kind, exit_code) = task_receipt_outcome(&payload, exit_code);
let terminal_completed = matches!(&payload, FleetWorkerEventPayload::Completed { .. });
let expected_terminal_status = match &payload {
FleetWorkerEventPayload::Completed { .. } => FleetTaskLedgerStatus::Completed,
FleetWorkerEventPayload::Failed { .. } => FleetTaskLedgerStatus::Failed,
FleetWorkerEventPayload::Cancelled { .. } => FleetTaskLedgerStatus::Cancelled,
_ => bail!("Fleet executor outcome must contain a terminal worker event"),
};
for tail_payload in tail_payloads {
if is_terminal_payload(&tail_payload) {
continue;
}
if self
.ledger
.append_event_if_leased(
&task.entry.run_id,
&task.worker_id,
&task.entry.task_id,
task.entry.attempts,
×tamp(),
tail_payload,
)?
.is_none()
{
return Ok(false);View on GitHub (pinned to 73e0f67d83)