Skip to content

docs(#674): correct resume cwd-mismatch comment (recoverable error, not exit-1 crash) - #675

Merged
admarble merged 1 commit into
mainfrom
fix/674-resume-comment
May 30, 2026
Merged

admarble merged 1 commit into
mainfrom
fix/674-resume-comment

Conversation

@admarble

Copy link
Copy Markdown
Contributor

What

Corrects the inline comment at phase-executor.ts:650 describing what happens when a Claude Code session is resumed from a different cwd. The old comment claimed it "crashes the SDK (exit code 1)."

Why

Empirically verified against @anthropic-ai/[email protected] (probe details in #674): a cwd-mismatched resume does not crash. Claude Code namespaces session storage by encoded cwd —
~/.claude/projects/<encoded-cwd>/<session-id>.jsonl — so resuming from a different directory can't locate the session and the SDK returns a recoverable error_during_execution ("No conversation found with session ID"). The phase still fails, so the guard's behavior is unchanged; only the explanation was wrong.

Scope

Comment-only — no behavior change. tsc --noEmit clean.

The deeper refactor (driver-owned, cwd-keyed canResume that falls back to a fresh session instead of failing) is tracked in #674. This PR just stops the comment from misleading the next reader.

Refs #674, #497.

…not exit-1 crash

Empirically verified ([email protected]): resuming a session from a
different cwd does not crash the SDK. Sessions are namespaced by encoded cwd
under ~/.claude/projects/, so a mismatched cwd yields a recoverable
error_during_execution ("No conversation found with session ID") rather than an
exit-1 process crash. Corrects the inline comment accordingly and points to #674
for the driver-owned, cwd-keyed resume normalization.

Entire-Checkpoint: 6715d8cb02d1
@admarble
admarble merged commit f6b8e40 into main May 30, 2026
5 checks passed
@admarble
admarble deleted the fix/674-resume-comment branch May 30, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant