Hmbown/CodeWhale · error
Fleet worker exhausted launch generations
Error message
Fleet worker {worker_id} exhausted launch generations What it means
Launch generations are bounded by the integer attempt counter; computing the next generation uses checked_add and fails with this error when attempts is at the numeric maximum (u64::MAX/usize::MAX). Restarting would overflow the generation counter, so the manager refuses rather than wrap and break the one-generation-ahead prepare/consume invariant.
Solutions
- Cancel the task and enqueue a fresh one with attempts reset to 0
- Repair the ledger's attempt counter for this task entry
- Investigate what drove attempts to the maximum — an infinite retry loop must be bounded
- Treat this as data corruption: rebuild the ledger state from authoritative events
Defensive patterns
Strategy: validation
Validate before calling
fn attempts_sane(attempts: u64) -> bool { attempts < u64::MAX } Prevention
- Bound retry attempts well below the integer maximum in scheduler policy
- Treat a saturated attempt counter as ledger corruption and rebuild
- Never hand-edit ledger attempt fields
When it happens
Trigger: Only reachable when task.entry.attempts equals the maximum value of its integer type — practically only via corrupt/hand-edited ledger events or an unbounded retry loop that actually saturated attempts.
Common situations: Corrupted ledger attempt counters; a buggy retry driver incrementing attempts without bound in tests or synthetic ledgers.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- agent profile cannot be empty
- agent profile must be a simple token
- agent profile may not disable approval_required
- agent profile may not request allow_shell=true
- agent profile may not request trust=true
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/570b63c39757bba8.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/fleet/manager.rs:1188
task_spec,
&worker_spec,
self.run_model(),
&cwd,
&self.workspace,
roster.members(),
None,
)?,
&self.exec_config,
),
task.entry.attempts,
);
let record = coordination
.get_worker_record(worker_id)
.ok_or_else(|| anyhow!("Fleet worker {worker_id} has no registered launch spec"))?;
let current_generation = task.entry.attempts.max(1);
let next_generation = current_generation
.checked_add(1)
.ok_or_else(|| anyhow!("Fleet worker {worker_id} exhausted launch generations"))?;
let registered_generation = record
.spec
.launch_manifest
.as_ref()
.map(|manifest| manifest.generation)
.ok_or_else(|| anyhow!("Fleet worker {worker_id} has no persisted launch manifest"))?;
match registered_generation {
generation if generation == current_generation => {
validate_registered_launch_spec(&record.spec, &expected_current)?;
coordination
.advance_registered_worker_generation(bind_fleet_launch_attempt(
record.spec,
next_generation,
))
.map_err(anyhow::Error::msg)?;
}
generation if generation == next_generation => {View on GitHub (pinned to 73e0f67d83)