Hmbown/CodeWhale · error
the cache route endpoint changed since the last turn; send a
Error message
the cache route endpoint changed since the last turn; send a new turn before warming
What it means
Raised in resolve_cache_replay_route when the endpoint resolved for the saved cache route differs from the endpoint used in the last turn. Cache warming replays the conversation prefix, which is only valid against the same endpoint; an endpoint change (base URL or routing change) invalidates replay until a new turn re-establishes the route.
Source
Thrown at crates/tui/src/tui/ui/provider_routes.rs:264
.map_err(anyhow::Error::msg)?;
if identity.provider != target.provider || identity.key != target.provider_identity {
anyhow::bail!(
"saved cache route identity `{}` now resolves as {}/{} instead of {}/{}; send a new turn before warming",
target.provider_identity,
identity.provider.as_str(),
identity.key,
target.provider.as_str(),
target.provider_identity
);
}
let route = resolve_runtime_route_for_identity(config, &identity, Some(&target.model))
.map_err(anyhow::Error::msg)?;
if let Some(previous_base_url) = target.base_url.as_deref() {
let previous_endpoint = crate::route_receipt::endpoint_identity(previous_base_url);
let current_endpoint =
crate::route_receipt::endpoint_identity(&route.candidate.endpoint().base_url);
if previous_endpoint != current_endpoint {
anyhow::bail!(
"the cache route endpoint changed since the last turn; send a new turn before warming"
);
}
}
Ok(route)
}
pub(crate) fn error_health_route(
app: &App,
fallback_provider: ApiProvider,
) -> (ApiProvider, String) {
app.active_turn
.as_ref()
.and_then(|turn| turn.route.as_ref())
.map(|route| (route.provider, route.model.clone()))
.or_else(|| {
app.pending_turn_route
.as_ref()View on GitHub (pinned to 0c42157ee5)
Solutions
- Send a new turn to re-resolve the route at its current endpoint
- Review provider/base-URL configuration changes that altered the endpoint
- Revert the endpoint change if cache continuity against the original endpoint is required
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/tui/ui/provider_routes.rs:264 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/1faa958948f2ac2a.
Report an issue: GitHub.