Hmbown/CodeWhale · error
Selected Fleet is missing or unreadable; inspect /fleet and…
Error message
Selected Fleet is missing or unreadable; inspect /fleet and repair or clear the selection.
What it means
Thrown when resolving the user's selected Fleet fails because the Fleet store cannot be read (`resolve_selected_fleet` returns Err). This typically means the selection file exists but is corrupt, unreadable, or points at something broken. The message directs the user to the /fleet command to repair or clear the selection.
Solutions
- Run /fleet in the TUI and clear the stale selection, then re-select a valid Fleet.
- Inspect the fleet store file for corruption or schema drift and fix or delete it.
- Check file permissions on the store location so the current user can read it.
- As a workaround, pass an explicit route override for the session, which bypasses Fleet resolution.
Defensive patterns
Strategy: try-catch
Try / catch
match start_turn(...).await {
Err(e) if e.to_string().contains("Selected Fleet is missing or unreadable") => {
clear_fleet_selection();
retry_without_fleet();
}
other => other,
} Prevention
- Do not hand-edit the fleet selection store; use /fleet.
- After upgrades, verify the selection still resolves before starting work.
- Keep write-safe disk conditions so store writes are not truncated.
When it happens
Trigger: Starting a turn with a persisted Fleet selection whose store file cannot be loaded: corrupted JSON, bad permissions, or an IO error reading the selection. Skipped entirely when an explicit route override is active.
Common situations: Manually editing the fleet selection file and breaking its format; upgrading versions changed the store schema; file permissions changed after switching users; disk full during a previous write.
Understand the failure class
Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 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/d157eb229cd5cf81.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/lib.rs:8302
/// Apply the selected v2 Fleet's operator to a fresh root session.
///
/// Provider/model are one atomic route: any explicit launch override for
/// either half keeps the caller's full route and bypasses the saved operator.
/// Reasoning is independent, so an explicit reasoning flag keeps its value
/// while the Fleet may still select the provider/model pair. Resumes call
/// this helper only for fresh sessions and therefore retain their saved route.
fn apply_selected_fleet_operator_for_launch(
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();View on GitHub (pinned to 73e0f67d83)