{"record":{"id":"e9d01602008b8dec","repo":"nikivdev/code","slug":"no-session-doc-queue-entry-matches-session-hint","errorCode":null,"errorMessage":"no session-doc queue entry matches `{session_hint}`","messagePattern":"no session-doc queue entry matches `(.+?)`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/codex_session_docs.rs","lineNumber":1439,"sourceCode":"    project_root: &Path,\n    session_hint: &str,\n) -> Result<usize> {\n    let project_root = project_root.display().to_string();\n    let matches = entries\n        .iter()\n        .enumerate()\n        .filter(|(_, entry)| {\n            entry.target_root == project_root\n                && (entry.session_id == session_hint\n                    || entry.session_key == session_hint\n                    || entry.session_id.starts_with(session_hint)\n                    || entry.session_key.starts_with(session_hint))\n        })\n        .map(|(index, _)| index)\n        .collect::<Vec<_>>();\n    match matches.as_slice() {\n        [index] => Ok(*index),\n        [] => bail!(\"no session-doc queue entry matches `{session_hint}`\"),\n        _ => bail!(\"multiple session-doc queue entries match `{session_hint}`\"),\n    }\n}\n\nfn git_changed_paths(project_root: &Path) -> Result<Vec<String>> {\n    let output = Command::new(\"git\")\n        .args([\"status\", \"--porcelain\", \"--untracked-files=all\"])\n        .current_dir(project_root)\n        .output()\n        .context(\"failed to run git status\")?;\n    if !output.status.success() {\n        bail!(\"git status failed with {}\", output.status);\n    }\n    let stdout = String::from_utf8_lossy(&output.stdout);\n    let mut paths = Vec::new();\n    for line in stdout.lines() {\n        if line.len() < 4 {\n            continue;","sourceCodeStart":1421,"sourceCodeEnd":1457,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/codex_session_docs.rs#L1421-L1457","documentation":"When resolving a user-supplied session hint to a queue entry, the library filters entries by exact session_key or by prefix match. If zero entries match, it bails with this message instead of guessing. It means the hint is wrong or the entry no longer exists in the review queue file.","triggerScenarios":"Calling the resolve-queue-entry API (e.g. during doc review/promotion) with a `session_hint` string that matches neither an exact `session_key` nor a prefix of any entry in the queue.","commonSituations":"Typo in the session id; entry was already promoted/removed from the queue; pointing at a session from a different project root whose queue file differs.","solutions":["List the current queue entries and copy the exact session_key","Shorten the hint to a valid prefix of the intended session_key","Re-run the flow that populates the queue if the entry is missing entirely"],"exampleFix":"// before\nlet idx = resolve_entry(\"sess_123\")?; // bail if no match\n// after\nlet idx = match try_resolve_entry(\"sess_123\") {\n    Ok(i) => i,\n    Err(_) => { list_queue_entries()?; return Err(anyhow!(\"hint sess_123 not found; see list above\")); }\n};","handlingStrategy":"validation","validationCode":"let entries = load_queue(&queue_path)?;\nlet hit = entries.iter().find(|e| e.session_key == hint || e.session_key.starts_with(hint));\nanyhow::ensure!(hit.is_some(), \"hint `{hint}` matches no queue entry; available: {:?}\",\n    entries.iter().map(|e| &e.session_key).collect::<Vec<_>>());","typeGuard":"fn resolves_unique(entries: &[DocReviewQueueEntry], hint: &str) -> Option<&DocReviewQueueEntry> {\n    let m: Vec<_> = entries.iter().filter(|e| e.session_key == hint || e.session_key.starts_with(hint)).collect();\n    (m.len() == 1).then(|| m[0])\n}","tryCatchPattern":"match resolve_entry(hint) {\n    Ok(i) => i,\n    Err(e) if e.to_string().contains(\"no session-doc queue entry\") => list_queue_and_prompt()?,\n    Err(e) => return Err(e),\n}","preventionTips":["Copy session keys from the queue listing instead of typing them from memory","Verify the entry still exists (not already promoted) before resolving","Run against the same project root that owns the queue file"],"tags":["session","queue","lookup","user-input"],"backgroundTag":"queue-entry-not-found","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}