Naming a session in Claude CLI
I moved to Claude CLI lately as oppose to using a plugin within my editor as I am serial tinkerer when it comes to IDE’s and trying to configure the plugins each time is painful. Using the CLI is a no brainer as it is IDE agnostic. I wish I had switched earlier, I have no good reason for why I did not use it in the first instance.
Anyway, I noticed that when I listed previous sessions with /resume a lot of them had the same title making it difficult to find the session I was looking for without searching sessions with a particular string, for example.
/rename command
It turns out there is a built-in /rename command, that gives your current session a name. And it also turns out you can rename your sessions retrospectively, which is nice.
Workflow
Thus, a simple workflow to start a new session and give it a name.
/clear
/rename my-session-name