{"record":{"id":"e6bbc8bd41a3d4b2","repo":"jdx/mise","slug":"no-pending-operation-uuid","errorCode":null,"errorMessage":"no pending operation {uuid}","messagePattern":"no pending operation (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/scope.rs","lineNumber":746,"sourceCode":"/// with one reserved id.\npub(crate) fn recover_stale(store: &Store, tracked: &TrackedSet) -> Result<()> {\n    recover_records(store, tracked, store::list_pending_in(store.state_dir())?)\n}\n\n/// Retry a single operation under the caller's recovery lock. Accepting live\n/// files is deliberately separate from ordinary automatic recovery.\npub(crate) fn recover_operation(\n    store: &Store,\n    tracked: &TrackedSet,\n    uuid: &str,\n    keep_current: bool,\n) -> Result<()> {\n    let mut pending = store::list_pending_in(store.state_dir())?\n        .into_iter()\n        .filter(|(_, record)| record.checkpoint.uuid == uuid)\n        .collect::<Vec<_>>();\n    if pending.is_empty() {\n        bail!(\"no pending operation {uuid}\");\n    }\n    if keep_current {\n        for (_, record) in &mut pending {\n            record.recovery = store::RecoveryState::Finished;\n            if let Some(operation) = &mut record.checkpoint.operation {\n                operation.status = OperationStatus::Failed;\n                operation.finished_at = Some(store::now_rfc3339());\n                operation.error =\n                    Some(\"current live files explicitly accepted during recovery\".into());\n            }\n            store::write_pending_in(store.state_dir(), record)?;\n        }\n    }\n    recover_records(store, tracked, pending)\n}\n\nfn recover_records(\n    store: &Store,","sourceCodeStart":728,"sourceCodeEnd":764,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/history/scope.rs#L728-L764","documentation":"recover_operation looks up pending operation records by checkpoint UUID and refuses when none match. The requested pending operation does not exist (or is no longer pending), so there is nothing to recover.","triggerScenarios":"Calling recover_operation with a uuid that has no entry in store::list_pending_in — the operation already finished, was cleaned up, the state dir changed, or the uuid is wrong.","commonSituations":"Recovering an old operation after it was already resolved; pointing MISE_STATE_DIR at a different store; typos in a uuid copied from a prompt or log.","solutions":["Run the command again and pick a pending operation from the current list instead of typing the uuid by hand","Verify MISE_STATE_DIR points at the store that actually has the pending operation","List pending operations in the state dir to confirm the uuid exists","If the operation already completed, no recovery is needed"],"exampleFix":"// before\nmise history recover 6f2a...   # uuid from an old session\n// after\nmise history recover           # choose from currently pending operations","handlingStrategy":"validation","validationCode":"let pending = list_pending_operations(state_dir)?;\nif !pending.iter().any(|op| op.uuid == target_uuid) {\n    eprintln!(\"{target_uuid} is not pending; pick from the current list\");\n}","typeGuard":null,"tryCatchPattern":"match recover_operation(uuid) {\n    Err(e) if e.to_string().starts_with(\"no pending operation\") => prompt_pick_from_pending_list(),\n    other => other,\n}","preventionTips":["Select pending operations from the live list, not from memory/old logs","Confirm MISE_STATE_DIR matches the store you recovered from","Recover operations promptly before cleanup removes them"],"tags":["history","recovery","not-found","uuid"],"backgroundTag":"record-not-found","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}