Skip to content

Feature request: way to fork a conversation #216

@mtaufen

Description

@mtaufen

I've had a few times where the shelly UI was waiting for an agent to complete work, and I wanted to ask a question or fork off another direction in parallel. I couldn't find an obvious way to do this, and Claude (running in Shelley of course) after cloning and reading the source, says it doesn't exist yet. So filing a feature request. If there is in fact a way to do this, please let me know :).

Claude's response:

Now I have a thorough picture. Here's the summary:


Shelley's Session Forking / Conversation Branching

There is no explicit "fork session" or "branch conversation" feature in Shelley. You can't take an active conversation, snapshot it, and spin off a parallel copy that keeps the history but diverges from that point.

However, there are several related mechanisms that get close to what you're describing:

1. Subagents (claudetool/subagent.go, server/subagent.go)

This is the closest thing. A parent conversation can spawn subagent conversations via the subagent tool. Key properties:

  • Each subagent gets its own independent conversation (separate message history, stored in the DB with a parent_conversation_id).
  • Subagents do not inherit the parent's conversation history — they start fresh. The parent must pass all relevant context in the prompt.
  • They can run asynchronously (wait: false) — the parent keeps working, and when the subagent finishes, a synthetic tool_use/tool_result pair is spliced into the parent's conversation.
  • You can re-send messages to the same subagent by reusing its slug.

2. SubConvoWithHistory (llm/conversation/convo.go)

There's a method SubConvoWithHistory() on the internal Convo struct that clones the full message history into a new sub-conversation. This is the closest to a true "fork" at the LLM conversation level — it creates a child that shares the parent's history but diverges from there. However, this is an internal API only — it's not exposed through any HTTP endpoint or tool, so users and agents can't trigger it directly.

3. SubConvo (llm/conversation/convo.go)

Creates a child conversation that shares the LLM service and context but not the messages. Used internally for subagent mechanics.

4. Previous Conversations skill (skills/builtin/previous-conversations/SKILL.md)

An agent can query SQLite to read history from any past conversation. This is read-only — you can't branch from it, but an agent could read a conversation's history and use it as context.


What you're asking for — querying an active agent about its conversation — doesn't quite exist

The gap is: if Agent A is actively working, there's no built-in way to say "fork Agent A's current conversation state into Agent B so I can ask B questions about what A has done so far, without interrupting A."

The closest workaround today would be:

  1. Use the previous-conversations skill to read the active conversation's messages from SQLite.
  2. Paste that context into a subagent or new conversation prompt.

But that's manual plumbing, not a first-class feature. A true "fork" would need SubConvoWithHistory to be exposed as an API endpoint or tool — the internal machinery exists, it's just not wired up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions