{"record":{"id":"45e94b1b8633dd43","repo":"Hmbown/CodeWhale","slug":"fleet-worker-worker-id-coordination-state-is-bus","errorCode":null,"errorMessage":"Fleet worker {worker_id} coordination state is busy; retry restart","messagePattern":"Fleet worker (.+?) coordination state is busy; retry restart","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/manager.rs","lineNumber":1081,"sourceCode":"    pub fn restart_worker(&self, worker_id: &str) -> Result<FleetRestartReport> {\n        let state = self.ledger.rebuild_state()?;\n        let Some(task) = active_task_for_worker(&state, worker_id)\n            .or_else(|| latest_task_for_worker(&state, worker_id))\n        else {\n            bail!(\"worker {worker_id} has no Fleet task to restart\");\n        };\n        let run = state\n            .runs\n            .get(&task.entry.run_id.0)\n            .ok_or_else(|| anyhow!(\"Fleet run {} does not exist\", task.entry.run_id.0))?;\n        let max_workers = run\n            .max_workers\n            .unwrap_or_else(|| run.worker_specs.len().max(1))\n            .clamp(1, 128);\n        let mut coordination_guard = match &self.sub_agent_manager {\n            Some(manager) => {\n                let Ok(guard) = manager.try_write() else {\n                    bail!(\"Fleet worker {worker_id} coordination state is busy; retry restart\");\n                };\n                Some(guard)\n            }\n            None => None,\n        };\n        let now = timestamp();\n        let latest_seq = state\n            .latest_seq\n            .get(&event_key(\n                worker_id,\n                &task.entry.run_id.0,\n                &task.entry.task_id,\n            ))\n            .copied()\n            .unwrap_or(0);\n        let heartbeat_at = state\n            .heartbeats\n            .get(worker_id)","sourceCodeStart":1063,"sourceCodeEnd":1099,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/manager.rs#L1063-L1099","documentation":"restart_worker could not acquire the worker's coordination guard within its contention window — another operator or process is mutating the worker's coordination state — so the restart is refused and the message asks for a retry.","triggerScenarios":"Thrown at crates/tui/src/fleet/manager.rs:1081 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry restart_worker after the coordination state transitions off busy.","Inspect the coordination record to find what holds the busy state and let that operation finish or time out."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}