Hmbown/CodeWhale · error

Fleet worker persisted launch spec does not match the exact…

Error message

Fleet worker {} persisted launch spec does not match the exact task lease and attempt

What it means

Final identity comparison in validate_registered_launch_spec: after clearing the free-form objective/prompt projection, any mismatch in identity, route, permission, workspace, scope, or attempt fields means the persisted spec does not match the exact task lease and attempt, so the launch is refused.

Solutions

  1. Retry the restart so the spec is re-derived from the exact current lease and attempt.
  2. Avoid concurrent generation advances while a restart is being prepared.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/fleet/manager.rs:2457 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/a7cb56997cae5df6. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/fleet/manager.rs:2457

            registered.worker_id
        );
    }

    // Coordination may append a bounded decision projection to the prompt.
    // Every identity, route, permission, workspace, scope, and attempt field
    // must otherwise match a fresh derivation from this exact leased task.
    let mut registered_identity = registered.clone();
    let mut expected_identity = expected.clone();
    registered_identity.objective.clear();
    expected_identity.objective.clear();
    if let Some(manifest) = registered_identity.launch_manifest.as_mut() {
        manifest.prompt.clear();
    }
    if let Some(manifest) = expected_identity.launch_manifest.as_mut() {
        manifest.prompt.clear();
    }
    if registered_identity != expected_identity {
        bail!(
            "Fleet worker {} persisted launch spec does not match the exact task lease and attempt",
            registered.worker_id
        );
    }
    Ok(())
}

fn registered_prompt_matches_expected(registered: &str, expected: &str) -> bool {
    const HEADER: &str = "Accepted coordination decisions relevant to this child (bounded):\n";
    if registered == expected {
        return true;
    }
    let Some(projection) = registered
        .strip_prefix(expected)
        .and_then(|suffix| suffix.strip_prefix("\n\n"))
    else {
        return false;
    };

View on GitHub (pinned to 73e0f67d83)