← All posts
Claude Code

Claude Code /fork: What "Fork From Here" Does

Updated August 2026 · 5 min read

Quick answer

In Claude Code, /fork creates an independent session with the prior conversation history included. The original session stays untouched. The matching terminal method is claude --resume <session-id> --fork-session.

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.

/fork Is the Current Slash Command

Anthropic shipped an official /fork slash command in Claude Code on June 13, 2026. Use /fork inside a session when you want to create an independent branch from the current work.

The equivalent CLI method is claude --resume <session-id> --fork-session. Both methods produce the same result: a new session with the full prior history, independent going forward, while the original session stays untouched.

What Claude Code Forking Does

Claude Code keeps conversation state in sessions. When you fork a session, Claude Code creates a new session with its own session ID, but the new session starts with the full message history of the original session already included.

The original session is left completely untouched and continues to exist independently after the fork. Going forward, the original and the fork can move in different directions.

The closest Git analogy is git checkout -b. You branch from the current state, get a new branch to work in, and the original branch still exists exactly where it was.

How to Trigger It

Inside the Claude Code session you want to branch, use:

/fork

To fork a specific saved session from the terminal, use:

claude --resume <session-id> --fork-session

What Happens to Message History

A fork is not a blank session. The full message history from the original session is already included in the new session, so Claude Code can continue with the same project context, decisions, constraints, and previous conversation.

That is the main reason to fork instead of starting fresh: you keep the context that matters, but you do not risk changing the original session path.

Fork vs. Continue vs. Starting Fresh

ActionWhat happens
/fork or claude --resume <session-id> --fork-sessionCreates a new independent session with the original message history included.
Fresh sessionStarts without the original session's message history.

Finding the Right Session to Fork

Claude Code also supports listing and searching recent sessions so you can resume or fork from the session you actually want. Sessions can be renamed and color-coded, which makes it easier to find the right thread before continuing or forking it.

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

If you're looking for Claude.ai chat forking instead of Claude Code, see this guide: how to fork a Claude.ai conversation 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 Claude Code creates an independent continuation from an existing session. The fork gets its own session ID, starts with the original session message history already included, and leaves the original session untouched.

What is fork conversation in Claude Code?

A forked conversation is a new Claude Code session created from an existing one. Use /fork inside the session, or claude --resume <session-id> --fork-session in the terminal, to create an independent branch while preserving the original session.

What is the Claude Code fork conversation meaning?

It means branching the conversation history into a separate session. Functionally, it is like git checkout -b: the old branch remains, and the new branch can continue independently.

How do I fork conversation Claude Code?

Use /fork inside the Claude Code session you want to branch. To fork a specific saved session from the terminal, use claude --resume <session-id> --fork-session.

What is Claude Code fork chat?

Claude Code fork chat refers to creating a new independent Claude Code session from an existing chat/session, with the full original message history carried into the new session.

Can Claude Code fork from previous message?

Use /fork inside the current Claude Code session. The equivalent terminal method is claude --resume <session-id> --fork-session for a specific session.