Skip to main content

How to explore multiple solutions in parallel when using Github Copilot

If you've ever been mid-session with Copilot and thought "I want to try a completely different approach, but I don't want to lose everything I've built up here" — the new /fork command is exactly what you've been waiting for.

Shipped in the February 2026 release of VS Code, /fork lets you branch a chat session into a new, fully independent thread — complete with the full conversation history — so you can explore an alternative direction without touching the original.


The problem it solves

Until now, exploring multiple design options or implementation strategies with Copilot meant one of two things:

  1. Start a new session — losing all the context you've already established.
  2. Stay in the same session — making your conversation messy and hard to track.

Neither is great. Especially for larger tasks where the agent has already built up a useful mental model of your codebase, intent, and constraints.

How to use /fork

There are two ways to trigger a fork:

Option 1: Fork the entire session

Type /fork in the chat input. This creates a new session that inherits the complete conversation history up to that point. The two sessions then become fully independent — changes in the fork have no effect on the original, and vice versa.

When to use this: You're happy with where the conversation is, but you want to take the agent in a new direction without committing.

Option 2: Fork from a specific checkpoint

Use the fork button that appears inline at a specific message in the conversation history. This creates a new session with only the history up to that point — effectively rewinding to an earlier state and branching from there.


When to use this: You went down a path that didn't pan out, and you want to branch from an earlier moment where things were still on track.

A practical example

Say you're building a UI component and you've iterated a few times with Copilot to get the layout right. Now you want to explore two different styling directions — one bold and high-contrast, one minimal and neutral — without committing to either.

  1. At the point where the layout is settled, type /fork.
  2. In the original session, continue with the bold styling direction.
  3. In the forked session, instruct the agent to explore the minimal approach.

You now have two parallel threads, each with the full context of the layout decisions, heading in different directions. Compare the results, pick your favorite, or cherry-pick ideas from both.

The forked session inherits:

  • The full conversation history (or history up to the chosen checkpoint)
  • Any context the agent has built up about your codebase and intent

The forked session does not inherit:

  • File changes made in the original session after the fork point
  • Any subsequent conversation from the original session (it's a snapshot, not a live link)

Tips for getting the most out of /fork

  • Fork early, not late. The more context the agent has at fork time, the more useful both branches will be. Don't wait until the session is unwieldy.
  • Name your sessions. If you're running multiple forks, give each session a clear label in the title so you can navigate between them easily.
  • Combine with /compact. For very long sessions, run /compact before forking to trim noise and keep only the relevant context — so the fork starts clean and focused.
  • Use checkpoint forks to recover. If a session went sideways several messages ago, don't start fresh. Fork from the last good checkpoint and pick up from there.

More information

Making agents practical for real-world development

Popular posts from this blog

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

Podman– Command execution failed with exit code 125

After updating WSL on one of the developer machines, Podman failed to work. When we took a look through Podman Desktop, we noticed that Podman had stopped running and returned the following error message: Error: Command execution failed with exit code 125 Here are the steps we tried to fix the issue: We started by running podman info to get some extra details on what could be wrong: >podman info OS: windows/amd64 provider: wsl version: 5.3.1 Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:2655: connectex: No connection could be made because the target machine actively refused it. That makes sense as the podman VM was not running. Let’s check the VM: >podman machine list NAME         ...

Cleaner switch expressions with pattern matching in C#

Ever find yourself mapping multiple string values to the same result? Being a C# developer for a long time, I sometimes forget that the C# has evolved so I still dare to chain case labels or reach for a dictionary. Of course with pattern matching this is no longer necessary. With pattern matching, you can express things inline, declaratively, and with zero repetition. A small example I was working on a small script that should invoke different actions depending on the environment. As our developers were using different variations for the same environment e.g.  "tst" alongside "test" , "prd" alongside "prod" .  We asked to streamline this a long time ago, but as these things happen, we still see variations in the wild. This brought me to the following code that is a perfect example for pattern matching: The or keyword here is a logical pattern combinator , not a boolean operator. It matches if either of the specified pattern...