jdx/mise · error
command wrapper for cannot delegate to itself
Error message
command wrapper for {shim_name} cannot delegate to itself What it means
which_shim matched a command wrapper for the shim being resolved and found the wrapper's own command name equals the shim name. Executing it would recurse forever (shim → wrapper → shim), so mise refuses to delegate.
Solutions
- Rename the wrapper or the tool so the wrapper's `command` points to a different name
- Point the wrapper at an absolute path to the real binary
- Disable the conflicting command wrapper in config
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/shims.rs:236 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/8b627bfa9207b716.
Report an issue: GitHub.
Appendix: source
Thrown at src/shims.rs:236
.with_resolve_options(resolve_options)
.build(config)
.await?;
let wrappers = load_command_wrappers(
&config.config_files,
ts.versions.values().flat_map(|versions| &versions.requests),
)?;
validate_wrapper_names(wrappers.keys())?;
let wrapper = if cfg!(macos) {
wrappers
.iter()
.find(|(name, _)| command_names_eq(name, shim_name))
.map(|(_, wrapper)| wrapper)
} else {
wrappers.get(shim_name)
};
if let Some(wrapper) = wrapper {
if command_names_eq(wrapper.command(), shim_name) {
bail!("command wrapper for {shim_name} cannot delegate to itself");
}
trace!("shim[{bin_name}] WRAPPER command: {}", wrapper.command());
return Ok((PathBuf::from(wrapper.command()), ts, Some(wrapper.clone())));
}
// A configured tool may intentionally override an executable bundled by another installed
// tool (for example, a pinned npm overrides Node's npm). Install a missing provider declared
// by the registry before resolving an incidental installed provider.
if !completion_offline
&& Settings::get().not_found_auto_install
&& ts
.should_install_missing_registry_bin_provider(config, shim_name)
.await?
{
for tv in ts
.install_missing_bin(config, shim_name)
.await?
.unwrap_or_default()
{View on GitHub (pinned to 533346cc37)