Hmbown/CodeWhale · error
scheduling Fleet run {} after draining owned workers
Error message
scheduling Fleet run {} after draining owned workers What it means
This is an informational log (not a panic) in the Fleet manager loop: after observing that owned workers are draining, the manager schedules the run while explicitly excluding those worker ids (schedule_run_excluding) so no new work is leased onto a logical worker whose executor handle has not yet been observed and forgotten. It records the deliberate drain-then-schedule decision when a terminal ledger update races the foreground host process.
Source
Thrown at crates/tui/src/fleet/manager.rs:784
manager_lock_path.display()
)
});
}
}
};
loop {
// A terminal ledger update can race the foreground host process.
// Do not lease new work onto a logical worker until its executor
// handle has been observed and forgotten below.
let unavailable_workers = executor.worker_ids().into_iter().collect();
let scheduling_error = self
.schedule_run_excluding(run_id, max_workers, &unavailable_workers)
.err();
self.drive_executor_tick(run_id, executor, codewhale_binary, model)?;
self.refresh_run_status(run_id)?;
if let Some(error) = scheduling_error {
if executor.worker_ids().is_empty() {
return Err(error).with_context(|| {
format!(
"scheduling Fleet run {} after draining owned workers",
run_id.0
)
});
}
tracing::warn!(
run_id = %run_id.0,
error = %error,
"Fleet scheduling paused while already-leased workers continue"
);
}
// A separate `fleet interrupt` process can make the ledger
// terminal while this manager still owns a live host child. Keep
// driving until the executor has observed that cancellation and
// stopped every tracked process.
if !self.run_has_open_work(run_id)? && executor.worker_ids().is_empty() {
return self.run_status(run_id);View on GitHub (pinned to 0c42157ee5)
Solutions
- No action needed on the log itself; it confirms scheduling continued on the remaining workers
- If scheduling repeatedly happens after draining, investigate why workers keep terminating
- Ensure executor.worker_ids() reflects forgotten handles so the exclusion list stays accurate
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/tui/src/fleet/manager.rs:784 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/ad7de4a921eacf6c.
Report an issue: GitHub.