Hmbown/CodeWhale · error
selected Fleet ' ' ( ) is invalid or unreadable; inspect…
Error message
selected Fleet '{}' ({}) is invalid or unreadable; inspect /fleet and repair or clear the selection. What it means
Thrown when the selected Fleet record itself resolved, but `load_fleet_at(&selected.path)` fails to load the fleet definition at the recorded path. The selection points at a Fleet file that is missing, malformed, or unreadable. The error is sanitized through `SafeLabel` and names the fleet and its scope.
Solutions
- Open /fleet and re-select a valid Fleet (or clear the selection).
- Restore or fix the fleet definition file at the path shown in the error.
- Validate the fleet file's syntax (YAML/JSON) before re-selecting.
- If workspaces move, update the selection to the fleet's current location.
Defensive patterns
Strategy: validation
Validate before calling
if let Ok(Some(selected)) = fleet::store::resolve_selected_fleet(workspace) {
if fleet::store::load_fleet_at(&selected.path).is_err() {
println!("selected fleet file missing/invalid at {}", selected.path.display());
}
} Prevention
- Validate fleet files (parse them) before registering or selecting them.
- Avoid moving or deleting fleet files referenced by a saved selection.
- Use /fleet to manage selections rather than editing files by hand.
When it happens
Trigger: A turn starts with a selected Fleet whose definition file at `selected.path` fails `load_fleet_at`: file deleted or moved, invalid YAML/JSON, or unreadable permissions. Skipped when an explicit route override is set.
Common situations: Deleting or renaming a fleet file referenced by a saved selection; hand-editing fleet YAML with syntax errors; syncing workspaces across machines so the recorded path no longer exists.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- agent profile path is not a directory
- agent profile provider cannot be empty
- agent profile provider must be a simple provider id
- agent profile tools.posture= would widen permissions; use…
- cannot create Fleet run
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/40edbd00337f8d47.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/lib.rs:8311
config: &mut Config,
workspace: &Path,
explicit_route_override: bool,
explicit_reasoning_override: bool,
) -> Result<bool> {
if explicit_route_override {
return Ok(false);
}
let Some(selected) = crate::fleet::store::resolve_selected_fleet(workspace).map_err(|_| {
anyhow!(
"Selected Fleet is missing or unreadable; inspect /fleet and repair or clear the selection."
)
})?
else {
return Ok(false);
};
let fleet_name = crate::safe_label::SafeLabel::phrase(&selected.name);
let (fleet, _) = crate::fleet::store::load_fleet_at(&selected.path).map_err(|_| {
anyhow!(
"selected Fleet '{}' ({}) is invalid or unreadable; inspect /fleet and repair or clear the selection.",
fleet_name,
selected.scope.label()
)
})?;
let Some(operator) = fleet.operator.as_ref() else {
return Ok(false);
};
let provider_id = operator.provider.trim();
let model_id = operator.model.trim();
if provider_id.is_empty() || model_id.is_empty() {
bail!(
"selected Fleet '{}' has an incomplete operator route; provider and model must both be non-empty",
fleet_name
);
}
let safe_provider_id = crate::safe_label::SafeLabel::identifier(provider_id);
let safe_model_id = crate::safe_label::SafeLabel::catalog_model(model_id);View on GitHub (pinned to 73e0f67d83)