jdx/mise · error

no pending operation

Error message

no pending operation {uuid}

What it means

recover_operation looks up pending operation records in the store whose checkpoint UUID matches the requested uuid. If none are found, there is nothing to recover and it bails naming the missing uuid.

Solutions

  1. List pending operations to get a valid uuid and re-run recovery with that value
  2. If the operation already recovered, no action is needed — the error is informational in that case
  3. Verify you are operating on the same MISE_STATE_DIR that recorded the pending operation

Example fix

// before: wrong/finished uuid
mise history recover 3f2a...
// after
mise history pending        # list valid uuids
mise history recover <uuid-from-pending>
Defensive patterns

Strategy: validation

Validate before calling

if !history.pending_operations().iter().any(|op| op.uuid == target_uuid) {
    eprintln!("uuid {} is not pending; nothing to recover", target_uuid);
    return Ok(());
}

Try / catch

match history.recover_operation(uuid, keep_current) {
    Err(e) if e.to_string().starts_with("no pending operation") => {
        eprintln!("already recovered or unknown uuid; nothing to do");
    }
    other => other?,
}

Prevention

When it happens

Trigger: Calling recover_operation with a uuid not present in store::list_pending_in(state_dir) — the operation already finished/recovered, was pruned, the uuid is mistyped, or the state dir differs from the one holding the record.

Common situations: Re-running a recovery after it already completed; copying a uuid from another machine's or another MISE_STATE_DIR's history; typo in the uuid passed to the recovery command.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at src/system/history/scope.rs:767

/// with one reserved id.
pub(crate) fn recover_stale(store: &Store, tracked: &TrackedSet) -> Result<()> {
    recover_records(store, tracked, store::list_pending_in(store.state_dir())?)
}

/// Retry a single operation under the caller's recovery lock. Accepting live
/// files is deliberately separate from ordinary automatic recovery.
pub(crate) fn recover_operation(
    store: &Store,
    tracked: &TrackedSet,
    uuid: &str,
    keep_current: bool,
) -> Result<()> {
    let mut pending = store::list_pending_in(store.state_dir())?
        .into_iter()
        .filter(|(_, record)| record.checkpoint.uuid == uuid)
        .collect::<Vec<_>>();
    if pending.is_empty() {
        bail!("no pending operation {uuid}");
    }
    if keep_current {
        for (_, record) in &mut pending {
            record.recovery = store::RecoveryState::Finished;
            if let Some(operation) = &mut record.checkpoint.operation {
                operation.status = OperationStatus::Failed;
                operation.finished_at = Some(store::now_rfc3339());
                operation.error =
                    Some("current live files explicitly accepted during recovery".into());
            }
            store::write_pending_in(store.state_dir(), record)?;
        }
    }
    recover_records(store, tracked, pending)
}

fn recover_records(
    store: &Store,

View on GitHub (pinned to 533346cc37)