claude-code - 💡(How to fix) Fix [FEATURE] Add /fork (conversation branching) support to VS Code extension [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46451Fetched 2026-04-11 06:19:57
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
1
Author
Timeline (top)
labeled ×3commented ×2

The CLI supports conversation forking via --fork-session (and /fork slash command), allowing users to branch a conversation at any point and explore a different direction while preserving the original session. This capability is not available in the VS Code extension — there is no slash command, hover action, command palette entry, or any other mechanism to fork a conversation.

Root Cause

The CLI supports conversation forking via --fork-session (and /fork slash command), allowing users to branch a conversation at any point and explore a different direction while preserving the original session. This capability is not available in the VS Code extension — there is no slash command, hover action, command palette entry, or any other mechanism to fork a conversation.

Fix Action

Fix / Workaround

No fork/branch capability exists in the VS Code extension UI. The only workaround is opening a terminal and running claude --continue --fork-session.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Summary

The CLI supports conversation forking via --fork-session (and /fork slash command), allowing users to branch a conversation at any point and explore a different direction while preserving the original session. This capability is not available in the VS Code extension — there is no slash command, hover action, command palette entry, or any other mechanism to fork a conversation.

Use case

When working on a complex task in the VS Code extension, I often reach a point where I want to explore an alternative approach without losing the current conversation context. Today the only option is to open a new chat (which starts fresh with no context) or switch to the terminal CLI to use --fork-session.

Conversation forking is particularly valuable for:

  • Exploring alternative implementations — branch at a decision point, try both approaches
  • Preserving working context — keep a "known good" conversation while experimenting
  • A/B comparison — fork and compare Claude's output under different instructions

Expected behavior

  • /fork slash command available in the VS Code extension prompt box (alongside existing commands like /compact, /usage, etc.)
  • Forked session appears as a new tab, preserving full conversation history up to the fork point
  • Parent session ID visible in the forked session (per #45655)

Current behavior

No fork/branch capability exists in the VS Code extension UI. The only workaround is opening a terminal and running claude --continue --fork-session.

Environment

  • VS Code extension (macOS)
  • CLI fork works correctly via --fork-session

Related issues

  • #45655 — /fork should display parent session ID (CLI)
  • #44684 — --fork-session forks last-flushed JSONL, not live conversation (CLI)

Proposed Solution

Expected behavior

  • /fork slash command available in the VS Code extension prompt box (alongside existing commands like /compact, /usage, etc.)
  • Forked session appears as a new tab, preserving full conversation history up to the fork point
  • Parent session ID visible in the forked session (per #45655)

Alternative Solutions

No response

Priority

Medium - Would be very helpful

Feature Category

Other

Use Case Example

This is the same scenario as the existing fork feature, simply supported in the VS Code extension. The justifications are identical.

Additional Context

No response

extent analysis

TL;DR

To add conversation forking to the VS Code extension, implement the /fork slash command, which creates a new tab with the conversation history up to the fork point and displays the parent session ID.

Guidance

  • Implement the /fork slash command in the VS Code extension prompt box, similar to existing commands like /compact and /usage.
  • When the /fork command is invoked, create a new tab with the full conversation history up to the fork point, preserving the context.
  • Display the parent session ID in the forked session, as per the requirement in #45655.
  • Ensure the forked session is properly linked to the original session, allowing for easy comparison and switching between the two.

Example

No specific code example can be provided without more context about the implementation details of the VS Code extension and the conversation forking feature.

Notes

The implementation of the /fork command and the conversation forking feature in the VS Code extension will require careful consideration of the existing architecture and functionality of the extension, as well as the requirements and use cases outlined in the issue.

Recommendation

Apply workaround by implementing the proposed solution, which involves adding the /fork slash command and creating a new tab with the conversation history up to the fork point, as this will provide the desired functionality and improve the user experience in the VS Code extension.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  • /fork slash command available in the VS Code extension prompt box (alongside existing commands like /compact, /usage, etc.)
  • Forked session appears as a new tab, preserving full conversation history up to the fork point
  • Parent session ID visible in the forked session (per #45655)

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING