Skip to content

Conversation

@ahundt
Copy link

@ahundt ahundt commented Dec 11, 2025

Claude Code 2.0.64 rejects --session-id with --continue. Instead of complex flag filtering, simply convert --continue to --resume by finding the last session (which is what --continue does anyway).

This maintains happy-cli's session control while achieving the same behavior as --continue.

  • Added claudeFindLastSession() utility to find most recent session
  • claudeLocal.ts: Convert --continue to --resume before processing

fix(ClaudeLocal): resolve --continue/--session-id flag conflict in Claude 2.0.64

  • Remove buggy validation that checked opts.sessionId instead of startFrom
  • Enhance claudeFindLastSession to find most recent VALID session using claudeCheckSession
  • If no valid sessions exist, --continue creates a new session instead of failing

Resolves critical bug where "happy --continue" failed with: "Error: --session-id cannot be used with --continue or --resume"

Files modified:

  • src/claude/claudeLocal.ts: Remove incorrect validation
  • src/claude/utils/claudeFindLastSession.ts: Find most recent valid session

Claude Code 2.0.64 rejects --session-id with --continue. Instead of
complex flag filtering, simply convert --continue to --resume by
finding the last session (which is what --continue does anyway).

This maintains happy-cli's session control while achieving the same
behavior as --continue.

- Added claudeFindLastSession() utility to find most recent session
- claudeLocal.ts: Convert --continue to --resume before processing

fix(ClaudeLocal): resolve --continue/--session-id flag conflict in Claude 2.0.64

- Remove buggy validation that checked opts.sessionId instead of startFrom
- Enhance claudeFindLastSession to find most recent VALID session using claudeCheckSession
- If no valid sessions exist, --continue creates a new session instead of failing

Resolves critical bug where "acd --continue" failed with:
"Error: --session-id cannot be used with --continue or --resume"

Files modified:
- src/claude/claudeLocal.ts: Remove incorrect validation
- src/claude/utils/claudeFindLastSession.ts: Find most recent valid session
@ahundt
Copy link
Author

ahundt commented Dec 16, 2025

replaced by #93 which is a better fix

@ahundt ahundt closed this Dec 16, 2025
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