jdx/mise · error

edits: cannot apply these entries, fix them manually: {}

Error message

edits: cannot apply these entries, fix them manually:
{}

What it means

During `mise edits apply`, some entries have problems (conflicting state, unreadable markers, divergence that cannot be auto-resolved) collected in the problems list. apply aborts the whole operation with this aggregated message listing each problem, telling the user to fix those entries manually rather than partially applying and risking file corruption.

Source

Thrown at src/system/edits.rs:689

            // markers exist: compare content to see if anything would change
            None => match block_state(req, desired.as_deref()) {
                Ok(FileState::Applied) => continue,
                Ok(_) => todo.push((req, desired)),
                Err(err) => {
                    problems.push(format!(
                        "  \"{}\" ({}): {err}",
                        req.path_raw,
                        req.describe_op()
                    ));
                    continue;
                }
            },
            // missing — needs applying
            Some(_) => todo.push((req, desired)),
        }
    }
    if !problems.is_empty() {
        bail!(
            "edits: cannot apply these entries, fix them manually:\n{}",
            problems.join("\n")
        );
    }
    if todo.is_empty() {
        info!("edits: all edits are applied");
        return Ok(true);
    }
    if opts.dry_run {
        for (req, desired) in &todo {
            // template state wasn't computed (no rendering on dry runs), so
            // the entry may already be converged
            let conditional =
                desired.is_none() && matches!(&req.op, EditOp::Block { template: true, .. });
            let suffix = if conditional { " (if changed)" } else { "" };
            miseprintln!(
                "edit {} ({}){suffix}",
                req.path.display_user(),

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Read the per-entry problems listed after the message and fix each target file by hand as instructed.
  2. Remove or fix stale marker lines (>>> mise:<id> >>> / <<< mise:<id> <<<) in the affected files.
  3. Run `mise edits check` (or diff) after manual fixes to confirm the entries are clean, then re-run apply.
  4. If the entry is obsolete, delete its [dotfiles] declaration from the config.

Example fix

# diagnose then fix manually
mise edits check            # see which entries have problems
$EDITOR ~/.zshrc            # repair/remove the mise marker block
mise edits check            # confirm clean
mise edits apply            # now succeeds
Defensive patterns

Strategy: try-catch

Validate before calling

# pre-flight: surface problems before attempting apply
mise edits check || { echo 'fix listed entries manually before applying'; exit 1; }

Try / catch

// pseudo: treat apply failure as requiring manual intervention, not retry
match apply_result {
    Err(msg) if msg.contains("cannot apply these entries, fix them manually") => {
        run("mise edits check"); // inspect per-entry problems, fix files by hand
    }
    Err(e) => return Err(e),
    Ok(_) => {}
}

Prevention

When it happens

Trigger: Running `mise edits apply` when one or more edit entries are in a broken state — e.g. the target file's existing content conflicts with the managed markers, or a desired-content check failed earlier in the same pass.

Common situations: The target file was edited by hand in or around the managed block; marker lines were deleted or reformatted (comment style changed); an old id's markers remain after an id rename; template rendering changed between runs.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/1eece8be77c26c2d. Report an issue: GitHub.