jdx/mise · error
select one operation by its identifier before accepting curr
Error message
select one operation by its identifier before accepting current files
What it means
Thrown by the recover routine when the selection resolved to more than one pending operation but the user also asked to keep current files (--keep-current) or named an operation filter — ambiguous multi-operation recovery. The keep-current acceptance path only makes sense for a single operation.
Source
Thrown at src/cli/dotfiles/recover.rs:79
}
for (_, record) in &selected {
miseprintln!("Interrupted operation {}", record.checkpoint.uuid);
if let Some(operation) = &record.checkpoint.operation {
let paths = operation
.journal
.iter()
.filter_map(|entry| match entry {
JournalEntry::PathChanged { path, .. } => Some(path),
_ => None,
})
.collect::<BTreeSet<_>>();
for path in paths {
miseprintln!(" {}", crate::file::display_path(path));
}
}
}
if selected.len() > 1 && (self.keep_current || self.operation.is_some()) {
bail!("select one operation by its identifier before accepting current files");
}
if self.keep_current
&& !self.yes
&& !crate::ui::prompt::confirm(
"Keep these live files and discard this operation's temporary recovery copies?",
)?
.is_yes()
{
info!("dotfiles: recovery copies preserved");
return Ok(());
}
for (_, record) in selected {
scope::recover_operation(&store, tracked, &record.checkpoint.uuid, self.keep_current)?;
if store::list_pending_in(store.state_dir())?
.iter()
.any(|(_, pending)| pending.checkpoint.uuid == record.checkpoint.uuid)
{
bail!(View on GitHub (pinned to afd2eddd3a)
Solutions
- Recover operations one at a time, passing the exact operation identifier each time
- Drop --keep-current to let the interactive prompt handle each operation, or use --yes to accept defaults
- Run `--pending` first to see how many operations are outstanding
Example fix
// before mise bootstrap dotfiles history --recover --keep-current # matches 2 ops // after mise bootstrap dotfiles history --recover <op-id-1> --keep-current mise bootstrap dotfiles history --recover <op-id-2> --keep-current
Defensive patterns
Strategy: validation
Validate before calling
# recover --keep-current only for a single, explicitly named operation COUNT=$(mise bootstrap dotfiles history --pending | wc -l) if [ "$COUNT" -gt 1 ]; then echo "recover operations individually" >&2; exit 1 fi mise bootstrap dotfiles history --recover "$OP_ID" --keep-current
Prevention
- Pair --keep-current with an explicit operation identifier
- Handle multi-operation pending states one at a time
- Use --yes only in non-interactive scripts with a single operation
When it happens
Trigger: Running `mise bootstrap dotfiles history --recover --keep-current` (or with an --operation selector that matches multiple records) when `selected.len() > 1`.
Common situations: Several interrupted operations pending at once and the user passes a broad selector or none; scripts that add --keep-current while multiple recoveries are outstanding.
Related errors
- no matching interrupted operation; `mise bootstrap dotfiles
- operation {} still needs attention; its pending record was p
- --changed does not accept target arguments
- at least one target or --changed is required
- --source can only be used with one target
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/3195d67a86055709.
Report an issue: GitHub.