Describe the feature or problem you'd like to solve
When Copilot CLI is pursuing a multi-step objective and the user asks a side question (e.g., "how does X work?" or "what's the right approach for Y?"), Copilot shifts its entire objective to answering that question, then stops with "Task Complete" -- losing all context of the original goal. Claude Code handles this well with its /fork command, which branches the session so side quests don't derail the main task. Copilot CLI has no equivalent, forcing users to either avoid side questions entirely or manually reconstruct session state by copying the session GUID folder.
Proposed solution
Add a /fork command that creates a branched copy of the current session state (conversation history, plan, todos, working context) in a new terminal window/tab. The original session continues uninterrupted on its main objective, while the forked session can be used for side questions, exploratory research, or alternative approaches. This is analogous to git worktree for conversation context.
Example prompts or workflows
- Side question during implementation: User is mid-task ("refactor the auth module"). They want to ask "what's the difference between JWT and session tokens?" -- instead of derailing, they run /fork, ask in the fork, get the answer, close the fork, and the original session never lost its place.
- Exploring alternative approaches: User is implementing Option A but wants to spike Option B. /fork lets them explore Option B in isolation. If it's better, they continue there; if not, they return to the original session.
- Debugging a sub-problem: Main task is "add caching to the API layer." User hits a weird NuGet restore error. /fork to debug the restore issue separately, fix it, then the main session is still focused on caching.
Additional context
This came up in internal discussion -- multiple engineers confirmed this is a pain point. The workaround today is manually copying ~/.copilot/session-state/ to a new folder and resuming in a new terminal, which works but is clunky. Claude Code's /fork is cited as prior art. Model behavior varies (Opus handles side quests better than GPT), but a proper fork mechanism would solve it architecturally regardless of model.
Describe the feature or problem you'd like to solve
When Copilot CLI is pursuing a multi-step objective and the user asks a side question (e.g., "how does X work?" or "what's the right approach for Y?"), Copilot shifts its entire objective to answering that question, then stops with "Task Complete" -- losing all context of the original goal. Claude Code handles this well with its /fork command, which branches the session so side quests don't derail the main task. Copilot CLI has no equivalent, forcing users to either avoid side questions entirely or manually reconstruct session state by copying the session GUID folder.
Proposed solution
Add a /fork command that creates a branched copy of the current session state (conversation history, plan, todos, working context) in a new terminal window/tab. The original session continues uninterrupted on its main objective, while the forked session can be used for side questions, exploratory research, or alternative approaches. This is analogous to git worktree for conversation context.
Example prompts or workflows
Additional context
This came up in internal discussion -- multiple engineers confirmed this is a pain point. The workaround today is manually copying ~/.copilot/session-state/ to a new folder and resuming in a new terminal, which works but is clunky. Claude Code's /fork is cited as prior art. Model behavior varies (Opus handles side quests better than GPT), but a proper fork mechanism would solve it architecturally regardless of model.