nikivdev/code · error
Review todo '{}' not found among open items
Error message
Review todo '{}' not found among open items What it means
fix_review_todos filters OPEN review todos by id (exact or prefix). When the provided id matches no open item, it bails with 'not found among open items' (src/reviews_todo.rs:187). Unlike done_review_todo, matching is restricted to items whose status is not completed.
Source
Thrown at src/reviews_todo.rs:187
let open_items: Vec<_> = items
.iter()
.filter(|item| item.status != "completed")
.collect();
if open_items.is_empty() {
println!("No open review todos to fix.");
return Ok(());
}
let to_fix: Vec<_> = if let Some(id) = id {
let mut matched = Vec::new();
for item in &open_items {
if item.id == id || item.id.starts_with(id) {
matched.push(*item);
}
}
if matched.is_empty() {
bail!("Review todo '{}' not found among open items", id);
}
if matched.len() > 1 {
bail!("Review todo id '{}' is ambiguous", id);
}
matched
} else if all {
open_items
} else {
bail!("Specify a todo id or use --all to fix all open review todos");
};
for item in &to_fix {
fix_single_todo(&root, item)?;
}
Ok(())
}
View on GitHub (pinned to a747e741ae)
Solutions
- List open (non-completed) review todos to find valid ids
- Verify the todo is still open rather than already completed
- Use --all to fix every open todo instead of a specific id
- Re-run the review if ids have changed
Example fix
// before
fix_review_todos(root, Some("deadbeef"), false) // id not among open items
// after
fix_review_todos(root, None, true) // fix all open todos Defensive patterns
Strategy: validation
Validate before calling
let open = open_review_todos(root)?;
if !open.iter().any(|t| t.id == id || t.id.starts_with(id)) {
eprintln!("{id} is not an open todo"); return;
} Try / catch
match fix_review_todos(root, Some(id), false) {
Err(e) if e.to_string().contains("not found among open items") => eprintln!("check the todo is still open or use --all"),
other => other?,
} Prevention
- Filter your todo listing to OPEN items before choosing an id
- Use --all for bulk fixes instead of stale ids
- Re-run reviews to refresh ids after changes
When it happens
Trigger: Calling the fix-todos command with an id that only exists as a completed todo, or matches nothing at all, and no --all flag.
Common situations: Trying to fix a todo that was already completed; the todo list was regenerated so ids changed; typo in id; targeting todos from a different repo root.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Review todo '{}' not found
- Failure '{}' not found. Run `f failure list` to inspect rece
- Session '{}' not found in saved sessions
- Route not found: {}
- Project not found. Create it with `f env push` first.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/ecc1b9a2f886ddff.
Report an issue: GitHub.