jdx/mise · error

the refreshed plan has conflicts; nothing was changed

Error message

the refreshed plan has conflicts; nothing was changed

What it means

If the working tree changed between when the plan was displayed and when it is applied, apply_steps re-computes the plan. If the refreshed plan still contains conflicts, it aborts with this error guaranteeing nothing was modified — the user must resolve conflicts before any apply can proceed.

Solutions

  1. Inspect the refreshed plan output, resolve the new conflicts manually, then re-run rollback/undo
  2. Retry with `--force` if the type-changed paths are safe to replace
  3. Close other processes touching the dotfiles (sync daemons, editors) before re-running
Defensive patterns

Strategy: retry

Validate before calling

// re-run planning immediately before apply and bail on conflicts
const fresh = computePlan();
if (fresh.steps.some(s => s.action === 'conflict')) throw new Error('conflicts present');

Try / catch

try {
  await mise.dot.rollback(req);
} catch (e) {
  if (/refreshed plan has conflicts/.test(e.message)) {
    // resolve, then retry once
  }
}

Prevention

When it happens

Trigger: During `execute`/`apply_steps`: working tree changed after plan display, refreshed plan's steps include `Action::Conflict(_)` — e.g. another process edited/created a conflicting file while the confirmation prompt was open.

Common situations: Editor, dotfile sync daemon, or another mise process modifies tracked files while the user stares at the confirmation prompt; long delays between planning and confirming allow background tools to alter paths.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


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

Appendix: source

Thrown at src/system/history/replay.rs:502

) -> Result<Vec<PathBuf>> {
    let _ = (store, entries);
    let mut round = 0;
    let mut live;
    loop {
        round += 1;
        // editors may have written while the prompt was open: re-plan
        live = live_tree(repo, tracked)?;
        let fresh = plan(repo, exec, &live)?;
        let changed = actionable(&fresh) != actionable(steps);
        if changed {
            *steps = fresh.clone();
            miseprintln!("history: the working tree changed since the plan was shown:");
            print_plan(steps, exec, tracked)?;
            if steps
                .iter()
                .any(|step| matches!(step.action, Action::Conflict(_)))
            {
                bail!("the refreshed plan has conflicts; nothing was changed");
            }
            if !exec.yes && !prompt::confirm("history: apply the refreshed plan?")?.is_yes() {
                bail!("declined; nothing was changed");
            }
        }
        // completeness: every path about to be written or deleted that exists
        // now must be captured, as it is now, in the protective checkpoint
        let Some((before_id, _)) = scope.before() else {
            bail!("no protective checkpoint could be taken; nothing was changed");
        };
        let before = store::entry(store, before_id)?;
        let before_tree = before
            .checkpoint
            .tree
            .snapshot
            .clone()
            .ok_or_else(|| eyre::eyre!("the protective checkpoint has no content"))?;
        let mut missing = vec![];

View on GitHub (pinned to 533346cc37)