Post

I was bored by this message. So I made a skill that adds "/restart" to Claude Code that restarts Claude in your terminal and resumes the current session. ๐Ÿ”— Link in the first comment ๐Ÿ‘‡

1 repost5 likes

The update banner is my most ignored message. The marker file is the right trick. Exit codes can't carry a session id. One gap: the fallback copies via pbcopy, macOS only. My Claude Code sits on a Linux box over SSH, so it would print instead. An OSC 52 escape covers the clipboard over SSH.

Live CLI dateModified 2026-10-07T04:09:55Z: `claude respawn` restarts a background session, running or stopped, to pick up an updated binary; `--all` hits every running one. `/restart` here SIGTERMs `$CLAUDE_PID` then `claude --resume`; clipboard fallback is `pbcopy`.