nikivdev/code · error
No queued commit matches {}
Error message
No queued commit matches {} What it means
resolve_commit_queue_entry() filters the persisted commit-queue entries with commit_queue_entry_matches(entry, hash) and throws this error when zero entries match the supplied (short) commit hash. It means no queued commit corresponds to the hash the user passed.
Source
Thrown at src/commit.rs:7123
parsed.record_path = Some(path);
entries.push(parsed);
}
Err(err) => debug!(path = %path.display(), error = %err, "invalid commit queue entry"),
}
}
entries.sort_by(|a, b| a.created_at.cmp(&b.created_at));
Ok(entries)
}
fn resolve_commit_queue_entry(repo_root: &Path, hash: &str) -> Result<CommitQueueEntry> {
let entries = load_commit_queue_entries(repo_root)?;
let matches: Vec<_> = entries
.into_iter()
.filter(|entry| commit_queue_entry_matches(entry, hash))
.collect();
match matches.len() {
0 => bail!("No queued commit matches {}", hash),
1 => Ok(matches.into_iter().next().unwrap()),
_ => bail!("Multiple queued commits match {}. Use a longer hash.", hash),
}
}
fn resolve_git_commit_sha(repo_root: &Path, hash: &str) -> Result<String> {
let rev = format!("{hash}^{{commit}}");
let sha = git_capture_in(repo_root, &["rev-parse", "--verify", &rev])
.with_context(|| format!("{hash} is not a valid git commit"))?;
let trimmed = sha.trim();
if trimmed.is_empty() {
bail!("{hash} is not a valid git commit");
}
Ok(trimmed.to_string())
}
fn queue_existing_commit_for_approval(
repo_root: &Path,View on GitHub (pinned to a747e741ae)
Solutions
- Run the queue listing command to see currently queued commits and copy the exact hash
- Re-run without a hash to operate on the latest queued entry
- Re-queue the commit if it was already approved/removed
- Check you are in the correct repository (queue state is per-repo)
Example fix
// before (shell) f commit review a1b2c3d # wrong/typo hash // after (shell) f commit queue list # inspect actual queued hashes f commit review a1b2c3e # correct hash, or omit hash for latest
Defensive patterns
Strategy: validation
Validate before calling
fn queue_contains(queue: &[CommitQueueEntry], hash: &str) -> bool {
queue.iter().any(|e| e.commit_sha.starts_with(hash))
}
// before calling:
if !queue_contains(&entries, short_hash) {
eprintln!("hash {} not queued; list queue first", short_hash);
} Try / catch
match tool.resolve_queue_entry(hash) {
Err(e) if e.starts_with("No queued commit matches") => {
eprintln!("{} not in queue; run queue list", hash);
}
other => other?,
} Prevention
- Copy hashes from the queue listing output, never from memory
- Use at least 7-character hash prefixes
- Remember approvals remove entries from the queue
- Confirm you are in the repo that owns the queue state
When it happens
Trigger: Running a queue command with an explicit hash argument (`f commit review <hash>` / approve path) when that commit was never queued, was already approved/removed, or the queue file was reset.
Common situations: Typo in the short hash, referencing a commit from another repo/branch, queue cleared by a previous approval, or the queue state file (.ai internal state) missing or deleted.
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
- Multiple queued commits match {}. Use a longer hash.
- no session-doc queue entry matches `{session_hint}`
- multiple session-doc queue entries match `{session_hint}`
- Commit queue is empty.
- No PR found for current branch and commit queue is empty.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/b6e5b837a2e6c53a.
Report an issue: GitHub.