[FEATURE] Output session id to CLI on quitting/exiting TUI

Status Fixed / completed
Maintainer reply None cached
Activity 7 comments · opened Jan 2, 2026 · closed Feb 5, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When quitting the Claude Code REPL, you often want to immediately relaunch it to resume the session with updated skills/agents/etc in place.

Outputting the session ID to the terminal when you quit Claude Code would make this easier.

Proposed Solution

On quitting the TUI, you'd see something like this in the CLI:

To resume this session, run "claude --resume [sessionId]"

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

7 Comments

github-actions[bot] · 8 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/10951
  2. https://github.com/anthropics/claude-code/issues/12052

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

PaulRBerg · 7 months ago

Codex offers this feature and I find it very helpful. Please also implement it in Claude Code 🙏

````
Token usage: total=8,895 input=8,880 (+ 3,840 cached) output=15
To continue this session, run codex resume 019ba81f-93dc-7d62-a5b7-535d23a15e3d

````

danneu · 6 months ago

I also want this. I made a similar feature request just now but closed it once I saw yours: https://github.com/anthropics/claude-code/issues/22860 - I was thinking of showing it on claude session launch or letting us print it in statusline.

Claude Code processes often get closed either when I reboot or when I exit them to save resources, but there's no good way to resume them.

Printing To resume this session, run "claude --resume [sessionId]" on sigterm seems like a nice middle ground.

danneu · 6 months ago

Wow, this was implemented in latest claude code (v2.1.31 native, at least)

$ claude
╭─── Claude Code v2.1.31
(snip)
╰────────────
❯ test
  ⎿  Interrupted · What should Claude do instead?

Resume this session with:
claude --resume cf75e83c-30ca-4a00-97bd-f9a1ebcf7f31

This can be closed.

PaulRBerg · 6 months ago

Yeah, I can also see it:

````text
Resume this session with:
claude --resume ed4ff40c-64f9-4a38-979e-bff01dbcc2d4

````

j-greig · 6 months ago

i'll take this as a win : ) hat tip to the CC dev team as ever 🙇

github-actions[bot] · 6 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.