jdx/mise · error · AmbiguousRequestBinding

lockfile contains multiple optionless resolutions for

Error message

lockfile contains multiple optionless resolutions for {short}@{specifier}

What it means

This is the legacy-fallback form of the ambiguity check: when no request-bound entry matched, mise looks for optionless (legacy-format) entries for the same short@specifier that may keep a version pin. If more than one such optionless entry exists, the pin itself is ambiguous, so mise raises AmbiguousRequestBinding rather than guessing which pinned version to keep.

Solutions

  1. Deduplicate the optionless entries for that tool@specifier, keeping one pin, then rerun.
  2. Run `mise lock --upgrade` at the monorepo root to fully rebind legacy entries into the current format.
  3. Regenerate the lockfile (`mise lock`) so the mixed legacy entries are consolidated.
Defensive patterns

Strategy: validation

Validate before calling

# detect duplicate optionless entries for a tool before running mise
yq '[.tools.node[] | select(has("options") | not)] | length' mise.lock  # expect <= 1

Prevention

When it happens

Trigger: A lockfile that mixes version-0 legacy entries into a version-1 file (e.g. after a partial monorepo migration) contains two or more optionless rows for the same tool and specifier; hand-edited or conflict-resolved lockfiles duplicating legacy entries.

Common situations: Mixed-format monorepo state mid-migration where multiple branches contributed unbound legacy entries; manually consolidated lockfiles after a bad merge; older lockfiles imported repeatedly.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/96732af045bcc3f2. Report an issue: GitHub.

Appendix: source

Thrown at src/lockfile.rs:4285

            let (legacy, legacy_error) =
                matching_request_bindings(lockfile.as_ref(), short, specifier, |tool| {
                    Ok(
                        binding_options(tool)?.is_some_and(|(options, allow_fallback)| {
                            allow_fallback && !options.is_empty() && tool.options.is_empty()
                        }),
                    )
                });
            match legacy.as_slice() {
                [] => {}
                [found] => {
                    trace!(
                        "[{short}@{specifier}] found {} in lockfile without options, keeping the version pin and dropping its artifact data",
                        found.version
                    );
                    return Ok(binding_options(found)?
                        .map(|(options, _)| lockfile_tool_with_request_options(found, &options)));
                }
                _ => bail!(AmbiguousRequestBinding(format!(
                    "lockfile contains multiple optionless resolutions for {short}@{specifier}"
                ))),
            }

            // Mixed-format monorepo migration can temporarily place legacy
            // entries without bindings in a version-1 file. Keep those pins
            // reachable until a successful full format upgrade binds them.
            let version_matches = |v: &LockfileTool| {
                v.specifiers.is_empty()
                    && lockfile_version_matches(prefix, &v.version)
                    && (!require_prefix_boundary
                        || lockfile_version_matches_prefix_boundary(prefix, &v.version))
            };
            let matching = tools
                .iter()
                .filter(|v| version_matches(v) && &v.options == request_options)
                .collect_vec();
            if let Some(found) = select_unbound_lockfile_tool(matching, backend, selection_options)?

View on GitHub (pinned to 533346cc37)