{"record":{"id":"199c96826bd84925","repo":"earendil-works/pi","slug":"stored-session-working-directory-does-not-exist","errorCode":null,"errorMessage":"Stored session working directory does not exist: ${issue.sessionCwd}${sessionFile}\nCurrent working directory: ${issue.fallbackCwd}","messagePattern":"Stored session working directory does not exist: (.+?)(.+?)\nCurrent working directory: (.+?)","errorType":"exception","errorClass":"MissingSessionCwdError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/core/session-cwd.ts","lineNumber":57,"sourceCode":"\nexport function formatMissingSessionCwdPrompt(issue: SessionCwdIssue): string {\n\treturn `cwd from session file does not exist\\n${issue.sessionCwd}\\n\\ncontinue in current cwd\\n${issue.fallbackCwd}`;\n}\n\nexport class MissingSessionCwdError extends Error {\n\treadonly issue: SessionCwdIssue;\n\n\tconstructor(issue: SessionCwdIssue) {\n\t\tsuper(formatMissingSessionCwdError(issue));\n\t\tthis.name = \"MissingSessionCwdError\";\n\t\tthis.issue = issue;\n\t}\n}\n\nexport function assertSessionCwdExists(sessionManager: SessionCwdSource, fallbackCwd: string): void {\n\tconst issue = getMissingSessionCwdIssue(sessionManager, fallbackCwd);\n\tif (issue) {\n\t\tthrow new MissingSessionCwdError(issue);\n\t}\n}\n","sourceCodeStart":39,"sourceCodeEnd":60,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/core/session-cwd.ts#L39-L60","documentation":"Thrown by assertSessionCwdExists when the working directory recorded in a session file no longer exists on disk (e.g. the project was moved, renamed, or the drive is unmounted). The message names the stored cwd, the session file it came from, and the process's current cwd used as the fallback.","triggerScenarios":"Thrown at packages/coding-agent/src/core/session-cwd.ts:57 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Move or restore the directory referenced by the session's stored cwd, or rename the session file so it is no longer auto-resumed","Resume the session and accept the interactive prompt to continue in the current working directory","Edit the session file's cwd field to point at the directory's new location"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}