Fork a Conversation in Claude Code: What "Fork From Here" Actually Does
July 2026 · 5 min read
Quick answer
In Claude Code, forking means branching from an existing session into a separate session ID so you can try another direction without overwriting the original conversation. It is closer to "resume this work as a copy" than "start from zero."
People search for "Claude Code fork conversation" because the wording sounds like Git, Claude.ai chat branching, and terminal session history all at once. In Claude Code, the useful mental model is simpler: a fork gives you a separate path from existing work.
What Claude Code Forking Does
Claude Code keeps conversation state for sessions. When you resume an existing session normally, you keep working in that same session. When you resume with --fork-session, Claude Code creates a new session ID instead of reusing the original one.
That means the fork can continue with the previous context, but future prompts, tool calls, and decisions happen in a separate session. Your original session remains available if you want to go back to the path you were on before the fork.
How to Trigger It
For the most recent conversation in the current directory, use:
claude --continue --fork-sessionFor a specific saved session, resume that session and add the fork flag:
claude --resume <session-id> --fork-sessionIf you are trying to branch from an earlier point inside the conversation, open the forked session first, then use Claude Code's checkpoint menu with /rewind or double Escwhile the prompt is empty. Rewind lets you restore conversation, code, or both to a previous prompt inside the session you are currently editing.
What Happens to Context
A fork is not a blank chat. It carries the resumed session context into the new session, which is why it is useful when Claude already understands your codebase, constraints, and plan.
It also does not magically erase token usage or make old context free. If the original session was long, the forked session still has substantial context. Use /rewind, summarization, or a fresh session when you want a smaller working set.
Fork vs. Rewind vs. Starting Fresh
| Action | What it is for |
|---|---|
| Fork | Create a separate session path from existing work. |
| Rewind | Restore or summarize code and conversation within the current session. |
| Fresh session | Start with minimal context when the old conversation is no longer useful. |
When to Use Fork Instead of a New Session
Fork when Claude Code already has valuable project context and you want to explore an alternate implementation, a different debugging theory, or a riskier refactor without losing the original path.
Start fresh when the task has changed, the prior context is noisy, or you want Claude Code to rediscover the project from a clean slate.
Related Claude Forking Guides
Claude Code forking is separate from forking a Claude.ai chat with ClaudeKit. ClaudeKit adds conversation forking inside the browser version of Claude. Claude Code's fork session flag belongs to the terminal workflow.
For terminology cleanup, see Fork vs. Branch in Claude.
FAQ
What does fork from here mean in Claude Code?
It means you want to branch work from an existing Claude Code session while preserving the original session. The documented CLI form is to resume a session with --fork-session, which creates a new session ID instead of reusing the original.
Is Claude Code fork the same as starting a new session?
No. A fresh session starts without the previous conversation. A forked resumed session carries forward the prior session context into a separate session so you can explore a different direction.
Does forking undo code changes?
Forking itself creates a separate session. If you need to restore code or conversation to an earlier point, use Claude Code checkpoints with /rewind or double Esc in the forked session.
Sources: Anthropic's Claude Code checkpointing, interactive mode, and CLI reference docs.