Session ID not displayed on start — hard to resume after terminal restore
Resolved 💬 4 comments Opened Feb 12, 2026 by rusliksu Closed Feb 16, 2026
Problem
When a computer shuts down and terminal windows are restored (e.g., Windows Terminal restores tabs), Claude Code sessions are terminated. There's no convenient way to resume the exact session that was running in a specific terminal window.
Currently:
claude --continueresumes the last session, which may not be the one from that terminalclaude --resumeshows a list, but you have to guess which session was in which terminal- Session ID is never printed to the terminal, so there's no way to know which session was active
Proposed Solution
- Print session ID on start — display the session ID somewhere visible (e.g., in the header or status bar) so users can note it or find it in scrollback
- Auto-resume in restored terminals — store a mapping of terminal/PTY/PID to session ID, so
claude --resumein a restored terminal could auto-suggest the last session that ran there claude --resume --last-in-cwd— resume the most recent session that was active in the current working directory (similar to--continuebut more explicit)
Use Case
- User has multiple Claude Code sessions in different terminal tabs
- Computer restarts, terminal app restores the tabs
- User wants to resume each session in its respective tab
- Currently impossible without manually matching sessions by content/date
Environment
- Windows 11 + Windows Terminal (tab restore feature)
- Same issue applies to any terminal with session restore (tmux, iTerm2, etc.)
🤖 Generated with Claude Code
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗