{"record":{"id":"acc06cfa2c113d2b","repo":"Hmbown/CodeWhale","slug":"fleet-worker-has-no-persisted-launch-manifest","errorCode":null,"errorMessage":"Fleet worker {} 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":2304,"sourceCode":"    // The outer machine-readable cap is workspace-relative and cannot yet be\n    // intersected into a grandchild's narrower launch context. Fleet workers\n    // are therefore truthful leaves in v0.9.1: the nested-agent surface is\n    // disabled for the authority-bound subprocess.\n    spec.max_spawn_depth = 0;\n    spec.runtime_profile.max_spawn_depth = 0;\n    if let Some(manifest) = spec.launch_manifest.as_mut() {\n        manifest.generation = attempt.max(1);\n        manifest.profile.max_spawn_depth = 0;\n    }\n    spec\n}\n\nfn validate_registered_launch_spec(\n    registered: &AgentWorkerSpec,\n    expected: &AgentWorkerSpec,\n) -> Result<()> {\n    let Some(registered_manifest) = registered.launch_manifest.as_ref() else {\n        bail!(\n            \"Fleet worker {} has no persisted launch manifest\",\n            registered.worker_id\n        );\n    };\n    if registered_manifest.prompt != registered.objective\n        || !registered_prompt_matches_expected(&registered.objective, &expected.objective)\n    {\n        bail!(\n            \"Fleet worker {} has an inconsistent persisted prompt\",\n            registered.worker_id\n        );\n    }\n\n    // Coordination may append a bounded decision projection to the prompt.\n    // Every identity, route, permission, workspace, scope, and attempt field\n    // must otherwise match a fresh derivation from this exact leased task.\n    let mut registered_identity = registered.clone();\n    let mut expected_identity = expected.clone();","sourceCodeStart":2286,"sourceCodeEnd":2322,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/fleet/manager.rs#L2286-L2322","documentation":"validate_registered_launch_spec requires a coordination-registered AgentWorkerSpec to carry a launch_manifest (the durable record of prompt, generation, and profile used at launch). The registered spec had none, so its identity cannot be validated and the launch/restart is refused rather than silently re-derived.","triggerScenarios":"Validating a registered launch spec whose launch_manifest field is None: record written by an older Codewhale before manifests were mandatory, or a partially written coordination record.","commonSituations":"Upgrading Codewhale and resuming a fleet run created before the upgrade; resuming runs whose coordination store was partially restored.","solutions":["Cancel the stale task/worker so coordination forgets the manifest-less record, then restart to produce a fully specified launch","Pin one Codewhale version for the lifetime of a run; upgrade between runs, not mid-run","If reproducible on a fresh run, report it as a bug with the coordination record contents"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":"fn registered_spec_is_complete(record: &AgentWorkerSpec) -> bool {\n    record.launch_manifest.is_some()\n}","tryCatchPattern":"match restart_with_registered_spec(&record) {\n    Ok(x) => Ok(x),\n    Err(err) if err.to_string().contains(\"no persisted launch manifest\") => {\n        // cancel the worker so a fresh record with manifest is written on retry\n        Err(err)\n    }\n    Err(err) => Err(err),\n}","preventionTips":["Upgrade Codewhale between runs, not during one","Treat missing-manifest records as stale and retire them via cancel instead of reusing"],"tags":["fleet","launch-manifest","state-validation","rust","codewhale"],"backgroundTag":"persisted-state-divergence","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}