Skip to content

feat(cli): auto-launch sole previous session when resuming - #32

Merged
jongracecox merged 1 commit into
mainfrom
worktree/20260520-auto-select-on-resume-when-only-one
May 20, 2026
Merged

feat(cli): auto-launch sole previous session when resuming#32
jongracecox merged 1 commit into
mainfrom
worktree/20260520-auto-select-on-resume-when-only-one

Conversation

@jongracecox

Copy link
Copy Markdown
Owner

Summary

  • When the user picks "Resume previous session" and only one previous Claude session exists for the path, skip the picker and launch it directly.
  • Two or more candidates still show the picker as before.

Details

Extracted the launch logic from on_resume_picker_selected into a new _launch_resume(session, cs) helper. _show_resume_session_picker checks len(sessions) == 1 up front and calls the helper instead of mounting the picker UI.

Tests updated accordingly: the two single-session tests now assert auto-launch (no picker mount); the cancel-flow test was extended with a second session so the picker is still exercised.

Test plan

  • uv run pytest (350 passed)

When "Resume previous session" finds exactly one candidate, skip the picker and launch it directly. Two or more candidates still show the picker.
@jongracecox
jongracecox merged commit 24082c1 into main May 20, 2026
5 checks passed
@jongracecox
jongracecox deleted the worktree/20260520-auto-select-on-resume-when-only-one branch May 20, 2026 16:10
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