slopus/happy · error
Saved session path does not exist: ${launch.cwd}
Error message
Saved session path does not exist: ${launch.cwd} What it means
handleResumeCommand throws this on the reconnect path: after building a ResumeLaunch for a reconnectable session, it checks existsSync(launch.cwd). The saved session's working directory (metadata.path) no longer exists on disk, so spawning the resume child there would fail.
Source
Thrown at packages/happy-cli/src/resume/handleResumeCommand.ts:167
return;
}
let localError: unknown;
let reconnectableSession: ReconnectableHappySession | null = null;
try {
reconnectableSession = await resolveLocalReconnectableSession(parsed.sessionId);
} catch (error) {
localError = error;
if (error instanceof LocalResumeSessionError && error.code === 'ambiguous') {
throw error;
}
}
if (reconnectableSession) {
const launch = buildResumeLaunch(reconnectableSession);
if (!existsSync(launch.cwd)) {
throw new Error(`Saved session path does not exist: ${launch.cwd}`);
}
const exitCode = await spawnResumeChild(launch, buildReconnectEnv(reconnectableSession));
if (typeof exitCode === 'number' && exitCode !== 0) {
process.exit(exitCode);
}
return;
}
const session = await resolveLegacySessionIfAvailable(parsed.sessionId);
if (!session) {
throw localError;
}
const launch = buildResumeLaunch(session);
if (!existsSync(launch.cwd)) {
throw new Error(`Saved session path does not exist: ${launch.cwd}`);
}View on GitHub (pinned to b824cd0a46)
Solutions
- Restore or recreate the directory at the saved path (git clone the project again, mount the volume)
- Update the session's saved path in the sessions file to the directory's new location
- Start a new Happy session from the project's current path
- List sessions to confirm which path is stored and correct it if it was moved
Example fix
// saved metadata.path = /home/me/old-project (deleted) mkdir -p /home/me/old-project && git -C /home/me/old-project clone git@github.com:me/old-project.git . // or edit sessionsFile path -> /home/me/new-project // then happy resume <session-id>
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs';
if (!existsSync(session.metadata.path)) {
console.error(`Session directory ${session.metadata.path} is missing; restore it or start a new session.`);
process.exit(1);
} Try / catch
try {
await handleResumeCommand([sessionId]);
} catch (e) {
if (e instanceof Error && e.message.startsWith('Saved session path does not exist')) {
const dir = e.message.split(': ')[1];
console.error(`Recreate or remount ${dir}, or update the session's saved path.`);
process.exit(1);
}
throw e;
} Prevention
- existsSync() the saved path before calling handleResumeCommand
- Keep project directories at stable paths or update sessionsFile after moving them
- Mount external volumes before resuming sessions that live there
- Use identical directory layouts when moving sessions across machines
When it happens
Trigger: Running `happy resume <id>` where the session matches as reconnectable, but the directory stored in metadata.path was deleted, renamed, is on an unmounted volume, or the session was created on another machine and synced.
Common situations: Project folder deleted or moved after the session ended; working on a checkout on a removable/external drive that is not mounted; container/VM where the original path never existed; home directory layout changed.
Related errors
- Claude local launcher not found. Please ensure HAPPY_PROJECT
- Failed to resume Codex thread ${opts.threadId}: ${reason}
- Failed to logout: ${error instanceof Error ? error.message :
- Failed to acquire settings lock after ${MAX_LOCK_ATTEMPTS *
- Happy session ID is required: happy resume <session-id>
AI-assisted analysis of slopus/happy@b824cd0a46 (2026-08-31).
Data as JSON: /api/errors/c5640513c00317fc.
Report an issue: GitHub.