jdx/mise · error · eyre::Report

executable identity exceeds {MAX_EXECUTABLE_IDENTITY_SIZE} b

Error message

executable identity exceeds {MAX_EXECUTABLE_IDENTITY_SIZE} bytes

What it means

store_executable_identity rejects identity stdout blobs larger than MAX_EXECUTABLE_IDENTITY_SIZE (65,536 bytes). Identity output is expected to be a tiny version string; 64KiB+ output almost always means the wrong executable was probed.

Source

Thrown at crates/mise-cache-core/src/agent.rs:1706

    ) -> Result<AgentResponse> {
        let key = self.executable_identity_key(executable, environment)?;
        let stdout = self
            .executable_identities
            .lock()
            .unwrap()
            .get(&key)
            .cloned();
        Ok(AgentResponse::ExecutableIdentity { stdout })
    }

    fn store_executable_identity(
        &self,
        executable: PathBuf,
        environment: BTreeMap<String, Option<String>>,
        stdout: Vec<u8>,
    ) -> Result<AgentResponse> {
        if stdout.len() > MAX_EXECUTABLE_IDENTITY_SIZE {
            bail!("executable identity exceeds {MAX_EXECUTABLE_IDENTITY_SIZE} bytes");
        }
        let key = self.executable_identity_key(executable, environment)?;
        let mut identities = self.executable_identities.lock().unwrap();
        let is_new = !identities.contains_key(&key);
        let previous_size = identities.get(&key).map_or(0, Vec::len);
        if is_new && identities.len() >= MAX_EXECUTABLE_IDENTITIES {
            bail!("executable identity cache contains too many entries");
        }
        let retained_bytes = identities.values().map(Vec::len).sum::<usize>();
        if retained_bytes - previous_size + stdout.len() > MAX_EXECUTABLE_IDENTITY_BYTES {
            bail!("executable identity cache contains too many bytes");
        }
        identities.insert(key, stdout.clone());
        Ok(AgentResponse::ExecutableIdentity {
            stdout: Some(stdout),
        })
    }

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Check which executable is being probed and run its version command by hand — >64KiB output means the wrong binary or flags
  2. Capture only the needed identity line(s) (e.g. first line of `rustc -vV`) before storing
  3. Note there is no runtime knob: the 64KiB limit is the compiled constant MAX_EXECUTABLE_IDENTITY_SIZE

Example fix

// before
let stdout = run_capture(rustc, ["--version", "--verbose", "--help"]).stdout;
// after
let stdout = run_capture(rustc, ["-vV"]).stdout;
assert!(stdout.len() <= 64 * 1024);
Defensive patterns

Strategy: validation

Validate before calling

const MAX_IDENTITY_SIZE: usize = 64 * 1024;
let stdout = capture_identity_stdout(&executable).await?;
if stdout.len() > MAX_IDENTITY_SIZE {
    bail!("identity probe produced {} bytes; wrong executable or flags?", stdout.len());
}

Prevention

When it happens

Trigger: Probing an executable that prints a long usage dump, debug log, or binary garbage instead of a one-line version (e.g. pointing at a script without a -V handler, or capturing stderr chatter into stdout).

Common situations: Misconfigured executable path (wrapper script, shell function shim, wrong arch binary); verbose toolchain wrappers that echo environment dumps.

Understand the failure class

Background: payload too large / request exceeds maximum size: why libraries cap bytes and how to fix oversize payloads — this error's family across 50 libraries.

Related errors


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