Name your Claude Code sessions before you run more than one A developer documented how to keep multiple Claude Code sessions distinguishable using the --name (-n) and --worktree (-w) flags, the /rename and /color commands, and a custom status line script that surfaces session_name, worktree, and context_window data. The writeup notes that worktrees default to branching from the remote default branch rather than current HEAD, and that gitignored files like .env must be listed in a .worktreeinclude file to be copied into fresh worktrees. you are looking at // Detect dark theme var iframe = document.getElementById 'tweet-2095277618807316566-141' ; if document.body.className.includes 'dark-theme' { iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=2095277618807316566&theme=dark" } The shorthand in that post is missing its arguments. Both flags take a value, so the real command is closer to this: claude --name auth-refactor --worktree auth-refactor Once you run two or three sessions side by side, the thing that breaks first is not context or tokens. It is you, looking at four terminal panes and not knowing which one is editing which branch. --name short form -n sets a display name for the session. It shows up in the session picker, in the /resume list, in the prompt bar, and in the session name field the status line receives. You can set it mid-session with /rename . If two sessions end up with the same name, Claude Code renames one with a two word suffix, so you get something like auth-refactor-graceful-unicorn instead of two identical entries. --worktree short form -w takes a worktree name and runs the session inside a git worktree instead of your main checkout. It creates the worktree if it does not exist. It also accepts a PR reference, which is the form worth remembering: claude -n review-1234 -w ' 1234' claude -n hotfix -w https://github.com/org/repo/pull/1234 Inside a worktree session, Claude Code enforces isolation. Edits to files in the main checkout, git commands that would redirect it, and shell commands that reach outside are blocked. That is the actual reason to use -w rather than just opening a second terminal in the same directory. New worktrees go to .claude/worktrees/