TipsLesser-known
--fork-session
Resumes a session but branches it off under a new session ID.
Usage
claude -r abc --fork-session
When to use it
When you want to experiment while keeping the original intact.
Source: https://code.claude.com/docs/en/cli-reference
Related
More Claude Code tips
Custom slash commands (.claude/commands)A single markdown file becomes a /name command.TipsHooks (settings.json)Automatically runs commands on events such as before or after a tool runs.TipsHeadless mode (-p)Runs once without a UI and prints only the result.Tips--continue / -cContinues the most recent conversation in the current folder.Tips--resume / -rResumes a session by ID or name.Tips--worktree / -wRuns Claude in an isolated git worktree.Tips
All Claude Code