jdx/mise · error
exited with {status}
Error message
exited with {status} What it means
Thrown by `run_with_limits` when the description command's shell exits with a non-success status. The library surfaces the raw exit status in the message so the caller knows the underlying command failed rather than the harness.
Source
Thrown at src/system/history/describe_command.rs:181
// with the last writer of the pipe, so it is not waited for
active.0.kill();
let _ = child.kill();
let _ = child.wait();
bail!("took longer than {}s", timeout.as_secs());
}
std::thread::sleep(Duration::from_millis(100));
};
// a descendant that outlived the shell and kept the pipe is not the
// shell's answer: the output is waited for a moment, not forever
let Ok(output) = receiver.recv_timeout(output_grace) else {
active.0.kill();
bail!("a process it started kept its output open");
};
if output.len() > DIFF_LIMIT {
bail!("description output exceeded {} bytes", DIFF_LIMIT);
}
if !status.success() {
bail!("exited with {status}");
}
let Some(line) = first_line(&output) else {
return Ok(None);
};
annotate(
store,
entry,
Annotation {
description: Some(line.clone()),
description_source: Some(DescriptionSource::Command),
labels: None,
updated_at: store::now_rfc3339(),
},
)?;
Ok(Some(line))
}
/// The first non-empty line, trimmed, cut at the limit.View on GitHub (pinned to afd2eddd3a)
Solutions
- Run the description command manually in a shell and inspect its exit code and output.
- Fix the failing command/script so it exits 0 on the expected path.
- Guard optional steps so they don't fail the script (`cmd || true`) when failure is acceptable.
- Check the message's status value: 127 = command not found, 126 = not executable, 1 = script error.
Example fix
// before fetch-remote-state --strict // after fetch-remote-state --strict || echo "fetch unavailable"
Defensive patterns
Strategy: try-catch
Validate before calling
// my-description-command && echo ok || echo "exit=$?"
Try / catch
// match run_with_limits(...) {
// Err(e) if e.message().starts_with("exited with") => {
// // surface the status to the user; the command itself failed
// }
// other => other?,
// } Prevention
- Test every hook/description command manually before enrolling it.
- Add `set -e`-safe guards (`|| true`) around optional steps.
- Reference tools by absolute path to avoid exit 127.
When it happens
Trigger: Any description/annotation command whose shell returns a nonzero exit code — syntax error in the script, failing subcommand, `set -e` aborting mid-script — detected by `if !status.success()` after output collection completes.
Common situations: Typos in hook scripts, missing tools referenced by the command (exit 127), permission errors on files the command touches, or scripts that deliberately fail on some hosts.
Related errors
- hook command failed: {status}
- no version specified for tool {tool}\nuse `mise shell {tool}
- {} {err}
- no version specified for tool {tool} use `mise shell {tool}@
- timed out after {duration:?}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/196379bf9b267b9c.
Report an issue: GitHub.