jdx/mise · error · eyre::Report

cache agent returned an unexpected prediction response

Error message

cache agent returned an unexpected prediction response

What it means

Error "cache agent returned an unexpected prediction response" thrown in jdx/mise.

Solutions

  1. Restart the cache agent; it answered with the wrong response type.
  2. Check agent logs and protocol version compatibility.

When it happens

Trigger: Thrown at src/cache/rustc.rs:248 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/04b8f9cda960cedf. Report an issue: GitHub.

Appendix: source

Thrown at src/cache/rustc.rs:248

}

fn record_prediction_value(invocation: CacheDigest, action: CacheDigest, payload: String) {
    let result = (|| {
        let task = std::env::var(session::TASK_ENV)
            .wrap_err_with(|| format!("{} is not set", session::TASK_ENV))?;
        let responses = session::request_agent(&[AgentRequest::RecordActionPrediction {
            task,
            prediction: ActionPrediction {
                invocation,
                action,
                adapter: "rustc".into(),
                payload,
            },
        }])?;
        match responses.into_iter().next() {
            Some(AgentResponse::ActionPredictionRecorded) => Ok(()),
            Some(AgentResponse::Error { message }) => bail!(message),
            _ => bail!("cache agent returned an unexpected prediction response"),
        }
    })();
    if let Err(error) = result {
        eprintln!("mise rustc cache warning: action prediction was not recorded: {error:#}");
    }
}

fn verify_environment(environment: &BTreeMap<String, Option<String>>) -> Result<()> {
    for (name, expected) in environment {
        let actual = std::env::var_os(name)
            .map(|value| {
                value.into_string().map_err(|_| {
                    eyre::eyre!("compiler environment input is not valid UTF-8: {name}")
                })
            })
            .transpose()?;
        if &actual != expected {
            bail!("compiler environment input changed: {name}");

View on GitHub (pinned to 6f52dcdf99)