{"record":{"id":"f7bf4107fec4290a","repo":"xai-org/grok-build","slug":"failed-to-list-local-sessions-while-resolving-re","errorCode":null,"errorMessage":"failed to list local sessions while resolving --resume {arg:?}: {e}","messagePattern":"failed to list local sessions while resolving --resume (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-pager/src/app/session_title_resolve.rs","lineNumber":131,"sourceCode":"    cwd: Option<&str>,\n    selection: RecentSessionSelection,\n) -> anyhow::Result<PinnedResumeTarget> {\n    if is_uuid_shaped(arg) {\n        return Ok(PinnedResumeTarget::Unresolved);\n    }\n    let Some(cwd) = cwd else {\n        return Ok(PinnedResumeTarget::Unresolved);\n    };\n    if let Some(local_id) = xai_grok_shell::session::resolve_local_session(arg, cwd) {\n        return Ok(PinnedResumeTarget::Id(local_id));\n    }\n    if xai_grok_shell::session::resolve_local_session_any_cwd(arg).is_some() {\n        return Ok(PinnedResumeTarget::Id(arg.to_string()));\n    }\n    let summaries =\n        xai_grok_shell::session::persistence::local_summaries_for_cwd_sync(cwd, selection)\n            .map_err(|e| {\n                anyhow::anyhow!(\n                    \"failed to list local sessions while resolving --resume {arg:?}: {e}\"\n                )\n            })?;\n    Ok(select_by_title(arg, &summaries)?\n        .map(|s| PinnedResumeTarget::Title {\n            id: s.info.id.to_string(),\n            sandbox_profile: s.sandbox_profile.clone(),\n        })\n        .unwrap_or(PinnedResumeTarget::Unresolved))\n}\n\n/// Failure message for a worktree resume.\n/// `local_miss_target` is `Some(arg)` only when materialization deferred exactly this target after missing local id/title resolution.\n/// Provenance is threaded, never inferred from id shape, so a resolved legacy non-UUID id gets no false no-match hint.\n/// `detail` must already be user-sanitized: sanitizing the composed message would collapse disk-full chains whole and erase the appended hint.\npub(crate) fn worktree_resume_failure_message(\n    local_miss_target: Option<&str>,\n    detail: &str,","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-pager/src/app/session_title_resolve.rs#L113-L149","documentation":"Error \"failed to list local sessions while resolving --resume {arg:?}: {e}\" thrown in xai-org/grok-build.","triggerScenarios":"Thrown at crates/codegen/xai-grok-pager/src/app/session_title_resolve.rs:131 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}