jdx/mise · error · eyre::Report
cache agent returned an unexpected action lookup response
Error message
cache agent returned an unexpected action lookup response
What it means
The first response to FindActionResult must be an AgentResponse::ActionResult (Some = hit, None = miss) or AgentResponse::Error. Any other variant means the agent answered a different request type — a protocol violation the wrapper refuses to guess about (src/cache/rustc.rs:283).
Source
Thrown at src/cache/rustc.rs:283
fn restore_result(
action: &RustcAction,
outputs: &RustcOutputs,
discovered: &DiscoveredInputs,
restore_outputs: bool,
) -> Result<Option<CachedCompilation>> {
let responses = session::request_agent(&[AgentRequest::FindActionResult {
action: action.digest.clone(),
}])?;
let Some(response) = responses.into_iter().next() else {
bail!("cache agent did not return an action lookup response");
};
let result = match response {
AgentResponse::ActionResult { result } => match result {
Some(result) => result,
None => return Ok(None),
},
AgentResponse::Error { message } => bail!(message),
_ => bail!("cache agent returned an unexpected action lookup response"),
};
if result.version != 1 || result.action != action.digest {
bail!("cached rustc action result has an invalid identity");
}
let metadata_digest = result
.metadata
.ok_or_else(|| eyre::eyre!("cached rustc action result has no metadata"))?;
let output_root_digest = result
.output_root
.ok_or_else(|| eyre::eyre!("cached rustc action result has no output root"))?;
let roots = find_blobs(&[
action.digest.clone(),
metadata_digest.clone(),
output_root_digest.clone(),
])?;
let cached_action = read_verified_blob(&roots[0], &action.digest, "action descriptor")?;
if cached_action != action.bytes {
bail!("cached rustc action descriptor does not match the invocation");View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Restart agent and shells so one mise version serves all requests
- Re-run the failing cargo command in the fresh session
- If reproducible, disable the rustc cache and file the mismatch upstream
Defensive patterns
Strategy: retry
Try / catch
# Variant mismatch => session poison: kill agent, retry build once
grep -q 'unexpected action lookup response' build.log && {
pkill -f mise-cache-agent || true; cargo build;
} Prevention
- One mise version for agent and wrappers
- Restart everything after upgrades
- Disable rustc cache wrapper for builds that must not fail (release pipelines)
When it happens
Trigger: Version-skewed or buggy agent mis-returning a prediction/blob response for an action-result request; concurrent protocol changes between mise versions sharing one socket.
Common situations: Mixed mise installs (e.g. shim from one version, agent spawned by another); upgrading mid-build.
Related errors
- cache agent returned an unexpected action prediction respons
- cache agent did not return an action prediction response
- cache agent returned an incompatible rustc action prediction
- cache agent returned a non-canonical rustc action prediction
- cache agent returned an unexpected prediction response
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/c8c170c01add6a26.
Report an issue: GitHub.