brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: name your Claude Code sessions and resume them by name

Claude
~/tips/tip-claude-name-and-resume-sessions

claude -n auth-refactor

Starts Claude Code sessions with a name so you can resume the right one later.

A list of sessions that all start with “fix the thing” is no help on Monday morning. Give them names.

Start a session with -n (or --name) and it shows up with that name in /resume and in the terminal title. Later you can pick it up again by name.

claude -n auth-refactor
# later, in the same project:
claude -r "auth-refactor" "Finish this PR"

Forgot to name it? /rename sets a name mid-session, and without an argument it generates one from the conversation. claude -c continues the most recent conversation in the current directory, which helps when you were only gone for a minute.

This is the kind of habit that costs two seconds and pays back on a busy week. Name the session after the task or the ticket. A picker full of dates tells you nothing, a picker full of task names tells you where you were.

The caveat is on the -c side. It skips sessions that were created with claude -p or the SDK, so a scripted run will not be the one it picks up. For those, resume by ID or name with -r.

Further reading: CLI reference – Claude Code docs, Commands – Claude Code docs, On this site: press Ctrl+G in plan mode and edit Claude's plan yourself, On this site: claude –agent runs your whole session as one of your subagents

More Claude tips /recap /focus /skill-doctor /autocompact 500k claude purge ~/work/my-repo --dry-run All Claude tips (83) All topics

Link