Branching

Added · Last updated

… the actor is working in a session, a conversation, or a version history, and needs several threads running from an earlier point rather than a single sequence. Undo only steps back along one line and discards what followed, while keeping everything in one thread mixes separate lines of work together.

Problem

When a multi-step exchange or history is held as a single sequence, the actor cannot run several threads from a shared point. Continuing at the end of the thread mixes separate lines of work into one context, starting a new session forces the actor to rebuild the shared history up to that point, and editing or rolling back to an earlier point replaces everything that followed it.

Representing the history as a tree rather than a single line lets several threads share an ancestor and diverge from it. Any committed turn, checkpoint, or state can serve as the parent of a new branch; each branch inherits the history up to that point and keeps its subsequent turns or changes separate from its siblings.

Branches are easy to create, especially in generative tools where a single prompt can start a new thread. Without clear names, active-path highlighting, and ways to archive, remove, or bring results back from finished branches, a tree past a few dozen nodes becomes harder to navigate than a linear thread.

Solution

Let the actor fork a new thread from any prior turn or state in the history, keeping existing threads intact alongside the new one. Scope the active view and the system’s working context to the selected root-to-node path, make the active lineage and branch points visible, and let the actor name, prune, or bring results back from a branch.

Keep single-turn retries at the leaf on a lightweight switcher through regeneration rather than adding a full tree node for every re-roll. When an interface shows the full tree, pair it with a linear view of the active path rather than replacing the readable transcript with a graph alone.

Continuation

The earlier state now has two or more sibling continuations, and the active path scopes both what the actor sees and what the system reads as context. Where the actor needs to weigh what diverged across branches, align the sibling outputs or paths through comparing. Where a tree overview sits beside the active transcript, link them as coordinated views so selecting a node scopes the view. Where a branch only retries a single turn at the leaf, regeneration or instructed revision handles the local change without adding long-lived branches. When a branch settles on a result that should replace or join the main line, bring it back through change review or reconciliation. When only a finished piece needs to carry forward, lift it out of the thread with extraction. Branching is not draft and publish, which separates one working copy from what others read so unfinished edits stay private until published, though a collaborative branch can serve both roles at once…

All connections
Precedes
Change review, reconciliation — When a branch settles on a result that should replace or join the main line, bring it back through change review or reconciliation.
Enables
Session, conversation, version history — The actor is working in a session, a conversation, or a version history, and needs several threads running from an earlier point rather than a single sequence.
Enacts
Agency — the actor can open and pursue several threads from any prior point in the history
Temporality — turns linear history into a tree of coexisting timelines the actor can step between
Complements
Prompt
Regeneration, instructed revision — Where a branch only retries a single turn at the leaf, regeneration or instructed revision handles the local change without adding long-lived branches.
Comparing — Where the actor needs to weigh what diverged across branches, align the sibling outputs or paths through comparing.
Extraction — When only a finished piece needs to carry forward, lift it out of the thread with extraction.
Alternatives
Undo — Undo only steps back along one line and discards what followed, while keeping everything in one thread mixes separate lines of work together.
Related to
Coordinated views — Where a tree overview sits beside the active transcript, link them as coordinated views so selecting a node scopes the view.
Draft and publish — Branching is not draft and publish, which separates one working copy from what others read so unfinished edits stay private until published, though a collaborative branch can serve both roles at once

In practice

Inline switchers and explicit tree views

Chat interfaces often hide the tree inside a linear column: editing an earlier prompt or regenerating a reply creates a sibling branch behind a < 2 / 2 > switcher on that turn, flipping the transcript below it between timelines. This keeps the reading surface simple for two or three forks, but hides where else in the thread branches exist and prevents reading two branches side by side. When multi-branch work is common, an explicit tree overview beside the transcript—with short auto-generated titles on each node and the active path highlighted—lets the actor jump directly between threads.

Artifact and version branches

In document, design, and code tools (such as Git or Figma branches), an entire working state forks from a checkpoint so a person or an agent can work on a separate thread in isolation before deciding whether to bring changes back into the main line via change review and reconciliation.

Research on this pattern

  • Tree-structured revisitation and active-context legibility: in a within-subjects study ($N = 12$) of long-horizon LLM conversations, Li, Qin & Lee (2026) (Branchat) found that pairing a tree overview of auto-titled turn nodes with a path-scoped chat panel reduced revisitation completion time ($12.24$ vs. $15.71$ min, $d = 0.66$), scroll distance ($43%$ reduction, $d = 1.00$), search queries ($56%$ reduction, $d = 1.01$), and workload ($d = 1.76$) compared to linear chat. Participants shifted from continuous scrolling to structure-driven node jumps ($21.67$ vs. $9.08$ per task) and reported gains in usability ($d = 1.92$), trust ($d = 2.17$), and self-efficacy ($d = 2.83$); participants noted that trees past roughly 50 nodes needed convergence operations such as merging and summarisation.
  • Version-control semantics for exploratory chats: Nanjundappa & Maaheshwari (2025) (ContextBranch) evaluated four version-control primitives for LLM conversations—checkpoint, branch, switch, and selective context injection—finding that isolating tangents on branches and injecting only their conclusions back into the trunk prevented logical context poisoning and reduced context size while improving response quality.
  • Multilevel and non-linear exploration canvases: Suh, Min, Palani & Xia (2023) (Sensecape) and Jiang et al. (2023) (Graphologue) showed that representing branching LLM explorations as navigable hierarchies and interactive diagrams helps actors pursue subtopics without losing their place in the overarching inquiry.

Resources & references