Overview
How might we design thread branching so people can trust and act on AI output?
When this pattern fits
- Ideal for AI coding assistants, creative writing tools, and research applications where users need to explore multiple solution paths without losing conversation history.
When to skip or lighten it
- Single-turn tools where there is no conversation history to fork.
- Compliance-heavy audit chats that must stay linear and immutable.
- Tiny mobile composers where branch UI would bury send and regenerate.
States
State model coming soon
Key UX elements
Key UX elements coming soon
Anti-patterns to avoid
Editing a past message silently rewrites the whole transcript with no branch marker.
Forking without a way to return to the original path.
Losing tool calls, attachments, or artifacts when a branch is created.
Showing branches only as raw IDs with no preview of the differing turn.
How products use it
| Product | Implementation |
|---|---|
| ChatGPT | Edit a prior user message to regenerate from that point as a new branch. |
| Claude | Edit-and-retry flows that preserve earlier context for comparison. |
| Cursor | Chat forks and composer retries that keep alternate agent paths. |
| GitHub Copilot Chat | Regenerate from an earlier prompt without wiping the session. |
Real-world examples
How shipped products implement thread branching, from our teardown guides.
Implementation
Copy this prompt to generate a production-ready implementation in Cursor, Claude Code, Lovable, or any AI coding agent.
Generate a production-ready implementation of the "Thread Branching" AI interface design pattern.
Pattern Definition:Frequently asked questions
What is thread branching in AI chat UX?
Thread branching lets you change an earlier message and continue from that point as a new path, while the original conversation remains available. It is how users explore alternate prompts without losing work.
When should I use branching instead of regenerate?
Use regenerate when you want another answer to the same prompt. Use branching when you need to change the prompt or context mid-thread and keep both outcomes.
How should branches be labeled?
Show a short preview of the differing user turn, a clear current-branch indicator, and one-tap switch back to the original path. Avoid burying branches in a generic history list.
What must survive a fork?
Attachments, tool results, and artifacts tied to shared ancestors should remain reachable. Only the divergent turns should change.


