$ recombobulate _
home / tips / branch-a-conversation-with-fork-session
0

Branch a Conversation with --fork-session

bagwaa @bagwaa · Mar 26, 2026 · Configuration
branch-a-conversation-with-fork-session

Ever wanted to try a different approach mid-conversation without losing your current progress? The --fork-session flag creates a new session that starts from the same conversation history but gets its own independent ID.

claude --resume "auth-refactor" --fork-session

This loads the full transcript from "auth-refactor" into a brand new session. You can take the conversation in a completely different direction without touching the original. The original session stays exactly where you left it.

This is useful for exploring alternative approaches:

# Original session: you've been building auth with JWT
claude -n "auth-jwt" "Implement JWT-based authentication"

# Fork to try a session-based approach instead
claude --resume "auth-jwt" --fork-session -n "auth-sessions"

# Both sessions exist independently
claude --resume "auth-jwt"       # Still has the JWT approach
claude --resume "auth-sessions"  # Has the session-based approach

It also works with --continue for the most recent conversation:

# Fork your most recent session
claude --continue --fork-session

Think of it like git branch for conversations. The fork point preserves all the context Claude has built up (understanding of your codebase, decisions made, code already written), giving the new branch a head start.

Fork your conversations like you fork your branches. Explore freely, commit to the best approach.


via Claude Code CLI Reference

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Switch to the Stable Update Channel with autoUpdatesChannel

The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.

bagwaa @bagwaa · 1 hour ago
0
Set Claude's Response Language with the language Setting

The language setting makes Claude respond in your preferred language by default, across every session and project.

bagwaa @bagwaa · 1 hour ago
0
Customize or Remove Claude's Git Attribution with the attribution Setting

The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.

bagwaa @bagwaa · 1 hour ago