Skip to content
BENIBIX Learn

/branch Command

Also known as /branch, --fork-session, Branch a conversation

It copies the chat so far and moves you into the copy.

Think of it like

It is like a path that splits in two. You walk down the new one, and the old one is still there.

Example

Jack and Claude have a plan for a cache. He wants to see a second plan too, so he types /branch. If the new plan is worse, he resumes the first chat.

Why it matters

You can explore a risky idea and still keep the good chat you had before it.

Definition

/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.

Example code

console
/branch try-streaming
Try a new idea in a copy of the chat.
The top row: /branch splits the chat and you go into the new copy.

Common mistake

Thinking the branch also has its own copy of the code. It copies the talk only. Edits in one branch change the files the other one sees.

Key takeaways

  1. 1
    A copy of the chat. Up to this point.
  2. 2
    You move into it. The original waits.
  3. 3
    Same files. Only the talk is copied.

Compare

Learn it properly