AddThisFeature

AI Conversation Branching

Explore an alternate path from an earlier message without losing the original.

involved AI Assistants

What it adds

A message graph that lets a conversation fork at any point, with each branch keeping its own history and active state.

What your agent is told to do

5
  1. 1

    Change the conversation's storage from an ordered list to a graph where every message names its parent, and migrate existing conversations into that shape as single-path graphs.

  2. 2

    Define the active branch as a stored pointer to a leaf message, and derive everything rendered from the path between the root and that pointer.

  3. 3

    Give each branch its own summary, memory, and derived context. Carrying one summary across siblings leaks the abandoned path back into the new one.

  4. 4

    Show the user, at the fork point, that alternatives exist, which one is active, and how to move between them, without turning the transcript into a diagram.

  5. 5

    AI Message Editing owns editing an ancestor message and invalidating what follows. This entry owns the graph and navigation. Editing should create a branch through this model rather than mutating history in place.

Edge cases it handles

8
  • Every message must carry an unambiguous parent, including the first. A graph where the parent is inferred from timestamps will scramble under concurrent writes.
  • Summaries, retrieved context, and remembered facts are branch-scoped. Reusing the parent conversation's memory in a new branch reintroduces exactly the content the user branched away from.
  • Branching from a point after a tool call must reuse the recorded result rather than re-running the tool, because re-running it repeats side effects such as sending, charging, or writing.
  • Without a visible indicator of which branch is active and a way back, users lose work they believe they can find again. Show the alternatives count at the fork and keep navigation reversible.
  • Editing a message that has descendants must not corrupt them. Fork at the edited message rather than rewriting it, so the original subtree stays intact and reachable.
  • Deleting a message must have a defined effect on its descendants, and deleting a fork point must not orphan the branches hanging from it.
  • Sharing or exporting a branched conversation needs a defined scope: the active path by default, with any other choice made explicit to the person receiving it.
  • Usage and cost accounting must attribute each run to its branch, or a heavily explored conversation becomes impossible to explain on a bill.

Definition of done

9
  • Conversations are stored as a parent-child message graph and existing linear conversations are migrated into it.
  • The active branch is an explicit stored pointer, and the rendered transcript is derived from the root-to-pointer path.
  • Summaries, memory, and retrieved context are scoped per branch and do not leak across siblings.
  • Branching past a tool call reuses the recorded result and never re-executes the action.
  • The interface shows where forks exist, which branch is active, and how to return to the others.
  • Editing an ancestor forks the graph and leaves the original subtree intact and reachable.
  • Runs are attributed to the branch they belong to for usage and cost reporting.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.