Hmbown/CodeWhale · error

saved cache route identity `{}` now resolves as {}/{} instea

Error message

saved cache route identity `{}` now resolves as {}/{} instead of {}/{}; send a new turn before warming

What it means

Raised in resolve_cache_replay_route when the persisted cache route identity (provider/key) re-resolves differently than the identity recorded for the last turn's target. The saved route would warm a cache for a different provider or account than the one the conversation prefix was built on, which would corrupt cache semantics, so the user is told to establish the new route with a fresh turn.

Source

Thrown at crates/tui/src/tui/ui/provider_routes.rs:248

    ids.dedup();
    Ok(ids)
}

pub(crate) fn resolve_cache_replay_route(
    app: &App,
    config: &Config,
) -> Result<crate::route_runtime::ResolvedRuntimeRoute> {
    let target = app.cache_replay_target().ok_or_else(|| {
        anyhow::anyhow!("Auto has no concrete route yet; send a turn before warming its cache")
    })?;
    let identity = config
        .resolve_persisted_provider_identity(
            Some(target.provider.as_str()),
            target.provider_id.as_deref(),
        )
        .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"
            );

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Send a new turn so the cache replay target re-binds to the currently resolved identity
  2. Check whether provider config, credentials, or a profile changed the resolved provider/key
  3. Restore the previous provider configuration if the old identity was intended
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/tui/ui/provider_routes.rs:248 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/6393016466d1cae9. Report an issue: GitHub.