Show /resume command alongside claude --resume on session exit

Resolved 💬 2 comments Opened Feb 19, 2026 by copyrightme Closed Mar 19, 2026

Current behavior

When exiting Claude Code, the terminal displays:

claude --resume "my analysis session"

This is useful for resuming in a new terminal window.

Problem

When another Claude Code session is already running, users need the /resume format to switch to the previous session from within it. Currently they must manually convert claude --resume "name" to /resume name, which adds friction.

Also, /resume "session name" (with quotes) does not work inside a session — it must be /resume session name (without quotes). This isn't obvious from the exit output.

Proposed behavior

On exit, show both formats on separate lines with labels above, not inline, so each command line can be triple-click copied cleanly:

To resume this session from a new terminal:
  claude --resume "my analysis session"

To resume from within another session:
  /resume my analysis session

Key details:

  • Labels go on their own line above the command, not inline — this enables triple-click select-and-copy of the full command
  • The /resume format must NOT use quotes around the session name, since /resume does not support quoted arguments
  • Showing both formats is harmless and useful, so no extra settings should be required

Implementation notes

The exit message is likely in the CLI's session teardown code. The change is:

  1. Find where claude --resume "session-name" is printed on exit
  2. Add the /resume session-name line below it (same session ID, just without quotes and with the /resume prefix)
  3. Add a label line above each command for context

View original on GitHub ↗

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