Hmbown/CodeWhale · error

Fleet task selects member with pinned model on …

Error message

Fleet task {} selects member {:?} with pinned model {} on {}; worker.model {:?} conflicts with that member route

What it means

The task pins a worker model (worker.model) that conflicts with the model pinned on the selected member's agent profile for its provider. validate_selected_member_model compares the task-level model against the member profile's pinned model and provider via requested_model_matches_pin, and refuses a route where the two pins disagree — the same member would be asked for two different models.

Solutions

  1. Remove worker.model from the task spec so the member profile's pinned model governs.
  2. Update the task's worker.model to exactly match the member profile's pinned model (and provider).
  3. Update the member profile's pinned model to the value the task requests.
  4. Give the task a different agent profile whose pin matches, if the task genuinely needs the other model.

Example fix

// before
worker.model = "gpt-4o"
agent_profile = { id = "researcher", model = "claude-sonnet-4" }
// after
worker.model = "claude-sonnet-4"  # or omit worker.model entirely
Defensive patterns

Strategy: validation

Validate before calling

fn pins_agree(task_model: &str, profile: &AgentProfile) -> bool {
    profile.profile.model.as_deref().map_or(true, |m| m == task_model)
}

Try / catch

match freeze_fleet_task_members(&mut spec) {
    Err(e) if e.to_string().contains("conflicts with that member route") => {
        eprintln!("drop worker.model or align it with the member profile pin"); }
    other => other?,
}

Prevention

When it happens

Trigger: freeze_fleet_task_members or resolve_task_agent_profile encounter a task that selects an agent profile whose profile.model is set to X (on provider P or the session provider) while task_spec's worker.model is Y, and requested_model_matches_pin judges them non-matching.

Common situations: Setting worker.model globally for a fleet whose members each pin their own model; upgrading a member profile's pinned model without updating task worker.model; provider-specific pins where the task model names a provider different from the profile's provider.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


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

Appendix: source

Thrown at crates/tui/src/fleet/worker_runtime.rs:1054

        .as_ref()
        .and_then(|worker| worker.model.as_deref())
        .and_then(non_empty_trimmed)
    else {
        return Ok(());
    };
    let Some(profile_model) = profile.profile.model.as_deref().and_then(non_empty_trimmed) else {
        return Ok(());
    };
    if profile_model.eq_ignore_ascii_case("auto") {
        return Ok(());
    }
    let profile_provider = profile
        .profile
        .provider
        .as_deref()
        .and_then(non_empty_trimmed);
    if !requested_model_matches_pin(task_model, profile_model, profile_provider) {
        bail!(
            "Fleet task {} selects member {:?} with pinned model {} on {}; worker.model {:?} conflicts with that member route",
            task_spec.id,
            profile.id,
            profile_model,
            profile_provider.unwrap_or("the session provider"),
            task_model
        );
    }
    Ok(())
}

fn effective_fleet_role(
    worker_profile: Option<&FleetTaskWorkerProfile>,
    agent_profile: Option<&AgentProfile>,
) -> Option<String> {
    effective_fleet_role_with_source(worker_profile, agent_profile).0
}

View on GitHub (pinned to 73e0f67d83)