Skip to content

[ENHANCEMENT] Conversation Forking: Explore "What If?" Without Context Contamination #9790

@Michaelzag

Description

@Michaelzag

Problem

Building context takes significant time and effort. When you want to explore a "what if?" or troubleshoot an unexpected issue, that exploration contaminates your carefully-built context, and there's no way to return to a clean state except deleting messages.

Context

Users who have invested time building valuable context and then need to explore different angles:

Common scenarios:

  1. Exploring conceptual alternatives:

    • Spent time getting AI to understand your system
    • Want to ask "What if we approached this differently?"
    • Current: Alternative exploration is now mixed into main analysis
    • Problem: Can't cleanly separate exploration from main thread
  2. Troubleshooting unexpected issues:

    • Mid-conversation, bug appears requiring investigation
    • Current: Bug investigation pollutes strategic conversation
    • Problem: Main thread contains debugging context irrelevant to original goal

Why new tasks don't solve this:

New tasks return results to parent conversation. The exploration becomes part of parent context permanently. Can't remove it without deleting messages.

Current workaround:

  1. Ask AI to write current state to markdown
  2. Scroll back to fork point
  3. Delete all subsequent messages
  4. Lose the exploration thread completely

Desired behavior

From any message, branch the conversation. Main thread stays clean. Exploration happens in separate thread. Return to main thread when done.

Example:

  • Main thread: Analyzing database architecture
  • Hours spent building that understanding
  • Want to ask: "What if we used a graph database instead of relational?"
  • Fork to explore that question
  • Exploration complete
  • Return to main thread - original analysis uncontaminated

Constraints / preferences

  • Preserve full conversation context at fork point (UI messages + API history)
  • Original thread completely unaffected by fork
  • Clear labeling of fork relationships

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear context and impact
  • This issue has been denied as not planned multiple times before and I am knowingly submitting it again becuase I really want it

Addressing Design Questions from #7904

Issue #7904 raised design questions from @brunobergher that were never answered:

"What gets copied over?"

Complete conversation history up to fork point - both and .

"What happens to changed files?"

Files remain at current workspace state. This is a conversation fork, not a file fork.

"Relationship to checkpoints?"

Different tools. Checkpoints restore file state within one task. Forks create new task for conversation exploration.

"Is 'fork' the right metaphor?"

Yes. Git users understand "fork" as "create independent branch from this point."

"How to differentiate forked tasks?"

Branch icon next to task name. Subtitle showing "Fork of: [Parent Task Name]".

"How to connect tasks?"

Parent shows "Forks: [list]" in metadata. Fork shows "Parent: [link]" prominently.

"How much history gets copied?"

Full conversation from task start to fork point.


Prior Work

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Issue [Unassigned]

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions