/branch vs /fork
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.
/branch Command
It copies the chat so far and moves you into the copy.
/branch makes a copy of the conversation at this point and moves you into the copy. The original stays as it was, and /resume takes you back to it. Use it to try another idea without losing the chat you have. Give it a name, or it is named after the first prompt. It copies the conversation only. Both branches work on the same files.
/fork Command
It copies this chat into a new session in the back.
/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.
In one line
- /branch Command
- It copies the chat so far and moves you into the copy.
- /fork Command
- It copies this chat into a new session in the back.