{"record":{"id":"0440b3658f0aaf9c","repo":"Hmbown/CodeWhale","slug":"fleet-worker-worker-id-has-no-persisted-launch-m","errorCode":null,"errorMessage":"Fleet worker {worker_id} has no persisted launch manifest","messagePattern":"Fleet worker (.+?) has no persisted launch manifest","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/manager.rs","lineNumber":1194,"sourceCode":"                    None,\n                )?,\n                &self.exec_config,\n            ),\n            task.entry.attempts,\n        );\n        let record = coordination\n            .get_worker_record(worker_id)\n            .ok_or_else(|| anyhow!(\"Fleet worker {worker_id} has no registered launch spec\"))?;\n        let current_generation = task.entry.attempts.max(1);\n        let next_generation = current_generation\n            .checked_add(1)\n            .ok_or_else(|| anyhow!(\"Fleet worker {worker_id} exhausted launch generations\"))?;\n        let registered_generation = record\n            .spec\n            .launch_manifest\n            .as_ref()\n            .map(|manifest| manifest.generation)\n            .ok_or_else(|| anyhow!(\"Fleet worker {worker_id} has no persisted launch manifest\"))?;\n\n        match registered_generation {\n            generation if generation == current_generation => {\n                validate_registered_launch_spec(&record.spec, &expected_current)?;\n                coordination\n                    .advance_registered_worker_generation(bind_fleet_launch_attempt(\n                        record.spec,\n                        next_generation,\n                    ))\n                    .map_err(anyhow::Error::msg)?;\n            }\n            generation if generation == next_generation => {\n                let mut normalized = record.spec;\n                normalized\n                    .launch_manifest\n                    .as_mut()\n                    .expect(\"prepared launch manifest checked above\")\n                    .generation = current_generation;","sourceCodeStart":1176,"sourceCodeEnd":1212,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/manager.rs#L1176-L1212","documentation":"Restart advances a worker's launch manifest generation durably, so the worker record must carry a persisted launch_manifest. When record.spec.launch_manifest is None the manager cannot verify the registered generation against the ledger attempt and refuses. This usually means the worker was registered without a durable launch manifest — e.g. registered by a code path or version that did not persist manifests.","triggerScenarios":"restart_worker/resume restart callback where get_worker_record exists but spec.launch_manifest is None: worker registered via a legacy path, manifest dropped on SubAgentManager reset, or partial registration after a crash.","commonSituations":"Version skew between processes writing coordination state; tests constructing worker records without manifests; manual edits to persisted coordination state.","solutions":["Re-register the worker through the current launch path so a manifest is persisted","Cancel and re-lease the task so a fresh worker registers with a manifest","Reconcile or clear stale coordination records lacking manifests before restart","Check for code paths calling register_worker_with_coordination without building a launch manifest"],"exampleFix":"// before\nlet record = coordination.get_worker_record(worker_id).unwrap();\nlet report = manager.restart_worker(worker_id)?;\n// after\nif !manager.worker_has_launch_manifest(worker_id) {\n    manager.cancel_task(&run_id, &task_id)?;\n    manager.start_run(&run_id)?; // fresh worker gets a persisted manifest\n} else {\n    let report = manager.restart_worker(worker_id)?;\n}","handlingStrategy":"validation","validationCode":"fn has_launch_manifest(manager: &FleetManager, worker_id: &str) -> bool {\n    manager.worker_registered(worker_id) && manager.worker_has_launch_manifest(worker_id)\n}","typeGuard":null,"tryCatchPattern":"match manager.restart_worker(worker_id) {\n    Err(e) if e.to_string().contains(\"no persisted launch manifest\") => {\n        manager.cancel_task(&run_id, &task_id)?; manager.start_run(&run_id)?\n    }\n    other => other.map(|_| ())?,\n}","preventionTips":["Ensure every registration path persists a launch manifest","Validate coordination state after upgrades or migrations","Prefer cancel + re-lease over restart when worker provenance is uncertain"],"tags":["fleet","launch-manifest","coordination"],"backgroundTag":"missing-required-argument","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}