Conversations

Branching

How branching works

When you branch from an assistant message, LearnFork creates a new conversation with:

  • A parentId linking it to the source conversation
  • A branchMessageId pointing to the exact message you branched from
  • A depth value one level deeper than the parent

The new branch appears as a child node to the right of the parent on the canvas.

Context inheritance

This is what makes branching powerful. When you send a message in a branch, the AI receives the full conversation history from the root all the way down to the current branch. The context chain algorithm:

  • Walks up the parent chain collecting all ancestor conversations
  • For each ancestor, includes messages up to the branch point
  • For the current conversation, includes all messages
  • Returns a flat array of messages for the AI to process

This means the AI always has complete context — it knows everything that was discussed in parent conversations leading up to the branch.

Branch limits

Free users can create up to 5 branches per root conversation. Pro users have unlimited branches. The branch count includes all descendants in the tree, not just direct children.

Ways to branch

  • Branch button — hover over an assistant message and click "Branch"
  • Quick actions — "Go deeper", "Simplify", "Example", "Quiz me" each create a branch with an auto-sent prompt
  • Text selection — select text in a response, then use "Quote" or "Branch" from the selection menu