{"record":{"id":"6bfa0c645714a2c7","repo":"Hmbown/CodeWhale","slug":"write-capable-fleet-worker-has-no-launch-mani","errorCode":null,"errorMessage":"write-capable Fleet worker '{}' has no launch manifest","messagePattern":"write-capable Fleet worker '(.+?)' has no launch manifest","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/executor.rs","lineNumber":149,"sourceCode":"    Ok(build_worker_exec_command_from_prompt(\n        codewhale_binary,\n        launch_spec.objective.clone(),\n        exec_config,\n        Some(worker_model.as_str()),\n        worker_provider.as_deref(),\n        worker_reasoning_effort.as_deref(),\n        Some(&authority),\n    ))\n}\n\npub(crate) fn authority_envelope_for_worker(\n    spec: &AgentWorkerSpec,\n    task_spec: &FleetTaskSpec,\n) -> Result<ToolAuthorityEnvelope> {\n    let (authority, writable_roots, writable_files, coordination_contracts) =\n        if spec.runtime_profile.permissions.write {\n            let manifest = spec.launch_manifest.as_ref().ok_or_else(|| {\n                anyhow::anyhow!(\n                    \"write-capable Fleet worker '{}' has no launch manifest\",\n                    spec.worker_id\n                )\n            })?;\n            (\n                ToolMutationAuthority::ScopedWrite,\n                super::worker_runtime::fleet_runtime_write_roots(task_spec)?,\n                manifest.writable_files.clone(),\n                manifest.coordination_contracts.clone(),\n            )\n        } else {\n            (\n                ToolMutationAuthority::ReadOnly,\n                Vec::new(),\n                Vec::new(),\n                Vec::new(),\n            )\n        };","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/fleet/executor.rs#L131-L167","documentation":"`authority_envelope_for_worker` builds the tool-authority envelope for a Fleet worker (fleet/executor.rs:148). When `spec.runtime_profile.permissions.write` is true, the spec must carry a `launch_manifest` supplying `writable_files` and `coordination_contracts`; None is an invariant violation. The standard builder in worker_runtime always attaches a manifest for write-capable specs (worker_runtime.rs:247-292), so this fires when a spec was constructed outside that path.","triggerScenarios":"A hand-constructed `AgentWorkerSpec` grants write permission with `launch_manifest: None`; a read-only spec's permissions are flipped to write without adding a manifest; a refactor bypasses the standard spec builder.","commonSituations":"Custom fleet schedulers/executors; tests assembling minimal specs by hand; partially migrated code paths.","solutions":["Attach a launch manifest (writable roots/files plus coordination contracts) whenever write permission is granted — reuse the worker_runtime builder that constructs it","Or run the worker read-only (`permissions.write = false`)","Centralize AgentWorkerSpec construction so manifests cannot be skipped"],"exampleFix":"// before\nlet spec = AgentWorkerSpec { /* ... */, launch_manifest: None };\n// with permissions.write == true this fails; after either\nlet spec = AgentWorkerSpec { /* ... */, launch_manifest: Some(manifest) };\n// or keep it read-only\nlet mut runtime_profile = runtime_profile.clone();\nruntime_profile.permissions.write = false;","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"fn write_spec_has_manifest(spec: &AgentWorkerSpec) -> bool {\n    !spec.runtime_profile.permissions.write || spec.launch_manifest.is_some()\n}\nassert!(write_spec_has_manifest(&spec));","tryCatchPattern":"match authority_envelope_for_worker(&spec, &task) {\n    Err(err) if err.to_string().contains(\"no launch manifest\") => {\n        // rebuild the spec via the standard worker_runtime builder,\n        // or downgrade the worker to read-only permissions\n    }\n    other => other?,\n}","preventionTips":["Never construct write-capable AgentWorkerSpecs by hand; use the worker_runtime builder that attaches the manifest","Assert the manifest invariant in tests for custom executors","Review any code path that mutates permissions.write after spec construction"],"tags":["fleet","invariant","permissions","worker","launch-manifest"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}