Show /resume command alongside claude --resume on session exit
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
/resumeformat must NOT use quotes around the session name, since/resumedoes 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:
- Find where
claude --resume "session-name"is printed on exit - Add the
/resume session-nameline below it (same session ID, just without quotes and with the/resumeprefix) - Add a label line above each command for context
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗