fix(cli): resolve --continue/--session-id flag conflict in Claude 2.0.64 #93
+382
−58
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Users can't use
happy --continuesince Claude Code 2.0.64 - it crashes with:This blocks anyone trying to continue their last session, which is a core workflow.
Related: Issue #87 (--resume --continue not working since 0.12.0)
Root Cause
Claude Code 2.0.64 introduced mutual exclusivity between
--session-idand--continue/--resumeflags. Happy was adding--session-idfor session tracking while users passed--continue, triggering the conflict.Solution
Intercept
--continueand convert it to--resume <last-session-id>:claudeFindLastSession()- Scans~/.claude/projects/for the most recent valid sessionclaudeLocal.ts- Detects--continue, finds last session, replaces with--resume <id>--resume, no conflict)Changes
src/claude/utils/claudeFindLastSession.tssrc/claude/claudeLocal.ts--continue, convert to--resume; handle--resumewithout IDsrc/claude/claudeLocal.test.tsBug Fix: Preserve Claude's Native --resume Picker
Commit:
e56fb57Happy was breaking Claude's native
--resumepicker by always adding--session-id. Now properly delegates to Claude's existing interactive session picker when--resumeis used without an ID.Changes:
extractFlag()- Returns{found: false}when value required but missing--resumein claudeArgs before adding--session-idTesting
Why Merge This
--continueto work