{"record":{"id":"d4a7ab462912f4ab","repo":"xai-org/grok-build","slug":"local-workspace-resolve-returned-no-config-after-a","errorCode":null,"errorMessage":"local-workspace resolve returned no config after ack","messagePattern":"local-workspace resolve returned no config after ack","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-pager/src/views/welcome/workspace_mode.rs","lineNumber":452,"sourceCode":"                session_override: Some(Some(cfg)),\n                warning: None,\n            })\n        }\n    }\n}\n\n/// Confirm Local ACK. If `agents_alive`, return oneshot only (keep process stamp).\n#[cfg(feature = \"local-workspace\")]\npub fn confirm_welcome_local_workspace_ack(\n    cwd: &std::path::Path,\n    agents_alive: bool,\n) -> anyhow::Result<crate::app::session_startup::LocalWorkspaceConfig> {\n    use crate::app::session_startup::{\n        resolve_local_workspace_config, set_active_local_workspace, write_local_workspace_ack,\n    };\n\n    let cfg = resolve_local_workspace_config(true, Some(None), None, Some(cwd))?\n        .ok_or_else(|| anyhow::anyhow!(\"local-workspace resolve returned no config after ack\"))?;\n    if !agents_alive {\n        set_active_local_workspace(Some(cfg.clone()))?;\n    }\n    write_local_workspace_ack();\n    log_welcome_ack(\"confirmed\");\n    Ok(cfg)\n}\n\n/// Sync UI selection from a startup-locked stamp (Own/Attach select Local).\n#[cfg(feature = \"local-workspace\")]\npub fn mode_from_active_stamp(\n    stamp: Option<&crate::app::session_startup::LocalWorkspaceConfig>,\n) -> WelcomeWorkspaceMode {\n    match stamp {\n        Some(_) => WelcomeWorkspaceMode::LocalWorkspace,\n        None => WelcomeWorkspaceMode::Sandbox,\n    }\n}","sourceCodeStart":434,"sourceCodeEnd":470,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-pager/src/views/welcome/workspace_mode.rs#L434-L470","documentation":"`confirm_welcome_local_workspace_ack` finalizes the welcome Local ACK flow: it force-resolves the local workspace config for the given cwd, then stamps and persists the ack. If the forced resolve returns None after the user confirmed the ACK dialog, this error is raised because the confirmation cannot be completed.","triggerScenarios":"User clicks/acks the \"welcome Local requires ACK confirm\" prompt while `resolve_local_workspace_config(true, Some(None), None, Some(cwd))` returns None — same resolver edge cases as error 408 (invalid cwd, resolver state refusing own-mode).","commonSituations":"Project directory removed or unmounted while the welcome dialog was open; resolver prerequisites not met at confirm time; version regression in session_startup resolver behavior.","solutions":["Verify the project directory still exists and is accessible, then re-attempt the Local confirmation","Restart grok from a valid working directory and redo the ACK flow","Clear stale local-workspace stamp/ack state if the resolver keeps refusing","If reproducible, inspect `resolve_local_workspace_config` own-mode branch for why it yields None"],"exampleFix":"// before\nlet cfg = resolve_local_workspace_config(true, Some(None), None, Some(cwd))?.ok_or_else(|| anyhow!(\"local-workspace resolve returned no config after ack\"))?;\n// after (fail with actionable context)\nlet cfg = resolve_local_workspace_config(true, Some(None), None, Some(cwd))?.ok_or_else(|| {\n    anyhow::anyhow!(\"local-workspace resolve returned no config after ack for cwd={}; check the directory exists\", cwd.display())\n})?;","handlingStrategy":"try-catch","validationCode":"// guard before rendering the ACK confirm action\nif !std::path::Path::new(&cwd).is_dir() {\n    // disable/defer ACK confirm; resolver will return None\n    eprintln!(\"project dir missing; Local ACK cannot be confirmed now\");\n}","typeGuard":null,"tryCatchPattern":"match confirm_welcome_local_workspace_ack(&ctx, cwd).await {\n    Err(e) if e.to_string().contains(\"no config after ack\") => {\n        log::warn!(\"ack confirm failed: {e}; keep dialog open and ask user to re-confirm\");\n    }\n    other => other?,\n}","preventionTips":["Verify the directory exists before offering the Local ACK confirm action","Add tests asserting resolve_local_workspace_config(force=true) yields Some for valid cwds","Handle directory-removal-during-dialog gracefully instead of letting the invariant error propagate"],"tags":["workspace","ack","welcome-view"],"backgroundTag":"workspace-resolve-returned-none","analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}