CLI hangs when --resume is given a nonexistent session name

Resolved 💬 2 comments Opened Apr 2, 2026 by therealevanhenry Closed Apr 7, 2026

Summary

When resuming a session with --resume and the provided name doesn't match an existing session, the CLI hangs indefinitely instead of returning an error or prompting the user.

Steps to reproduce

  1. Start a session: claude --session "self-hosted-260402"
  2. Later, try to resume with a typo (space instead of hyphen): claude --resume "self-hosted 260402"
  3. The CLI hangs — no output, no error, no input accepted.

Expected behavior

The CLI should either:

  • Return an error like No session found matching "self-hosted 260402"
  • List similar session names and prompt the user to pick one

Environment

  • macOS (Apple Silicon)
  • Claude Code CLI installed via claude install

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗