FitWhen to use it — and when not
Use it when
- Exploratory work: drafting, research, design
- Long conversations where one early message steers everything
- Comparing two approaches side by side
Skip it when
- Simple single-turn tools
- Agents that already executed real-world actions — branch the plan, not the past
AnatomyThe parts of the pattern
- Edit affordancePencil on past user messages.
- Branch pager‹ 1 / 2 › on the edited message.
- Downstream swapEverything below follows the selected branch.
- OverviewOptional tree or list of branches for long sessions.
GuidelinesDo & don’t
Do
- Keep every branch; make switching instant.
- Show which branch is active and how many exist.
- Allow naming or pinning a branch in long projects.
Don’t
- Overwrite the original prompt.
- Hide branches in a separate history screen.
- Let a branch silently share memory with its sibling.
In the wildReal-world examples
ChatGPTClaudeTypingMindLibreChat
Products named for reference only — no affiliation, and the demo above is an original illustration, not a copy of their UI.
For engineersImplementation notes
- Model messages as a tree (id, parent_id); the visible chat is the path from root to the selected leaf.
- Persist the selected child per node so reloads keep the user on their branch.
- Build prompts from the active path only — never from the whole tree.