# /fork Command

> It copies this chat into a new session in the back.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** /fork, Fork a session

## Think of it like

It is like you copy your picture. A friend colors the copy, and you keep yours.

## Definition

/fork copies the chat into a new background session, and you keep working here. The copy starts with the whole chat so far. It also gets your model, permission mode and effort level. Pass a prompt and the copy starts on it at once. The copy is told to use its own worktree before it changes code, so the two do not edit the same files.

## Example

Jack and Claude agree on two ways to speed up a page. He forks the chat to try the second way while he and Claude keep going with the first.

## Example code

```console
/fork try the streaming version
```

Let a copy of this chat try another idea.

## Why it matters

Two ideas get tried at the same time, both with the full chat behind them.

## Common mistake

Waiting for the copy to report back. It is a separate session that never sends its result here. /subtask is the one that reports back.

## Three principles

- **A full copy.** Chat and settings.
- **Runs in the background.** You stay here.
- **Its own worktree.** Before it edits code.

## Related terms

- [/branch Command](https://learn.benibix.com/term/ai/branch-command)
- [/subtask Command](https://learn.benibix.com/term/ai/subtask-command)
- [Background Session](https://learn.benibix.com/term/ai/background-session)
- [Worktree Isolation](https://learn.benibix.com/term/ai/worktree-isolation)

## Told apart from

- [/branch vs /fork](https://learn.benibix.com/compare/branch-command-vs-fork-command): People often think /branch and /fork do the same thing. Both copy the chat, but they put you in different places. /branch moves you into the copy, and the original waits for you in /resume. /fork sends the copy off to run as a background session, and you stay where you were. /branch also shares your files, while a fork is told to work in its own worktree.
- [/fork vs /subtask](https://learn.benibix.com/compare/fork-command-vs-subtask-command): People think /fork and /subtask both send a helper off and wait for its answer, and they do not. /fork copies the chat into a new background session. You keep working, and the copy never reports back. /subtask hands one task to a helper that gets the whole chat. When it is done, its result comes back into the chat you are in.

## Taught in

- [Background Session Commands](https://learn.benibix.com/learn/ai-claude-code-commands/background-session-commands): Claude Code Commands, 7/17

![Four rows. /branch splits the chat and moves you into the copy. /fork sends a copy to the background and you stay. /subtask sends a helper that brings its answer back. /background moves the whole chat to the background.](https://learn.benibix.com/diagrams/cmd-session-moves.svg)

---

Source: https://learn.benibix.com/term/ai/fork-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
