Skip to content

[FEATURE] Session tree: branch history, rollback-and-continue from any message, branch navigation (like Pi) #41363

Description

Feature request

Pi (earendil-works) has tree-shaped session history: you can go back to any earlier point in the conversation, fork a new branch there, and navigate the branches like a git history. OpenCode only has a single-level fork/compact — no way to revisit earlier states of the same session.

What I'd like

In the Desktop app (and TUI):

  1. Session timeline / tree view: every fork creates a branch; you can see the whole tree of a session (like a git graph).
  2. Rollback to any node: select any earlier message → "continue from here" creates a child branch without losing the current branch (i.e., an explicit fork at any point, not just at continue).
  3. Branch navigation: switch between branches of the same session, diff summaries between branches.
  4. Visualization: sidebar tab "History/Timeline" in desktop app.

Why

  • Current behavior: --fork / fork in desktop clones the whole session; you cannot see where in the conversation the fork happened, and multiple alternative explorations quickly become unmanageable (100+ sessions).
  • For debugging AI workflows (try idea A, try idea B from the same point, compare) it's the single most effective pattern.
  • Pi has shown the UX; OpenCode has the storage (messages are already stored) — mainly a UI + routing change.

Related

Proposal

  • Treat every session as a DAG/branch tree in storage (parent_id on messages).
  • Add /tree slash command or sidebar tab: shows branch nodes, lets you jump/continue.
  • --fork becomes "create branch at latest message", new --fork <msg-id> to fork at any message.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions