{"record":{"id":"b2313fff5a3045f8","repo":"openai/codex","slug":"failed-to-determine-the-working-directory-recorded","errorCode":null,"errorMessage":"failed to determine the working directory recorded for the selected session","messagePattern":"failed to determine the working directory recorded for the selected session","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/tui/src/session_resume.rs","lineNumber":130,"sourceCode":"    state_db_ctx: Option<&StateRuntime>,\n    target_session: &SessionTarget,\n    action: CwdPromptAction,\n    cwd_context: ResumeCwdContext<'_>,\n) -> color_eyre::Result<ResolveCwdOutcome> {\n    if matches!(cwd_context.mode, Some(ResumeCwdMode::Current)) {\n        return Ok(ResolveCwdOutcome::Continue(Some(\n            cwd_context.remembered_current_cwd.to_path_buf(),\n        )));\n    }\n    let Some(history_cwd) = read_session_cwd(\n        state_db_ctx,\n        target_session.thread_id,\n        target_session.path.as_deref(),\n    )\n    .await\n    else {\n        if matches!(cwd_context.mode, Some(ResumeCwdMode::Session)) {\n            color_eyre::eyre::bail!(\n                \"failed to determine the working directory recorded for the selected session\"\n            );\n        }\n        return Ok(ResolveCwdOutcome::Continue(None));\n    };\n    match cwd_context.mode {\n        Some(ResumeCwdMode::Session) => {\n            return Ok(ResolveCwdOutcome::Continue(Some(history_cwd)));\n        }\n        Some(ResumeCwdMode::Current) | None => {}\n    }\n    if cwds_differ(cwd_context.current_cwd, &history_cwd) {\n        let selection_outcome = cwd_prompt::run_cwd_selection_prompt(\n            tui,\n            config,\n            action,\n            cwd_context.current_cwd,\n            &history_cwd,","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/tui/src/session_resume.rs#L112-L148","documentation":"Error \"failed to determine the working directory recorded for the selected session\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/tui/src/session_resume.rs:130 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":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}