Describe the feature or problem you'd like to solve
The interactive /fork [name] command creates a new independent session, but the current terminal moves into that fork. The original session remains available, but working with both sessions at the same time requires manually opening another terminal and locating the correct session.
There is also no process startup option for creating a fork from an existing session. Commands such as copilot --fork=<session-id> and copilot --branch=<session-id> are currently rejected as unknown options.
This makes /fork less flexible for users who keep several terminal windows or tabs open. It also prevents terminal-specific launch commands from creating and starting a fork directly.
Proposed solution
Support both of these entry points:
- Add
copilot --fork=<session-id> [--name=<new-session-name>]. It should create a new fork of the supplied session, apply the optional name to the new fork, and start the fork in the process that invoked the command. The source session name should remain unchanged.
- Add an option such as
/fork --new-terminal [name]. It should create the fork in a new terminal window or tab while the current terminal remains in the original session.
The command line option provides a portable building block even when automatic terminal launching is not available. Users can combine it with their preferred terminal application. For example, a Windows Terminal user could run:
wt new-tab copilot --fork=<session-id> --name=<new-session-name>
From Copilot CLI, the same command could be launched through the shell command prefix:
!wt new-tab copilot --fork=<session-id> --name=<new-session-name> --name=<new-session-name>
The convenience option on /fork could use supported terminal integration when available. If the CLI cannot identify or launch the current terminal application, it should return the new session ID and a ready-to-run copilot --resume=<new-session-id> command instead of silently switching behavior.
Example prompts or workflows
- Run
/fork --new-terminal investigate-auth during a task. The fork opens separately, and the original session remains visible and interactive.
- Run
wt new-tab copilot --fork=<session-id> --name=<new-session-name> to create a fork in a new Windows Terminal tab.
- Run
copilot --fork=<session-id> --name=alternative-design from another shell to create, name, and enter a fork of a specific session.
- Use the shell command prefix inside Copilot CLI to invoke a terminal-specific launcher without abandoning the current session.
Additional context
This is a focused follow-up to #2058. That issue requested the core /fork command and mentioned a new terminal window or tab in its proposed solution. The core command now exists, but the terminal selection and process startup interfaces are still missing.
Related issue #1697 also describes working with forked sessions in separate terminals.
Describe the feature or problem you'd like to solve
The interactive
/fork [name]command creates a new independent session, but the current terminal moves into that fork. The original session remains available, but working with both sessions at the same time requires manually opening another terminal and locating the correct session.There is also no process startup option for creating a fork from an existing session. Commands such as
copilot --fork=<session-id>andcopilot --branch=<session-id>are currently rejected as unknown options.This makes
/forkless flexible for users who keep several terminal windows or tabs open. It also prevents terminal-specific launch commands from creating and starting a fork directly.Proposed solution
Support both of these entry points:
copilot --fork=<session-id> [--name=<new-session-name>]. It should create a new fork of the supplied session, apply the optional name to the new fork, and start the fork in the process that invoked the command. The source session name should remain unchanged./fork --new-terminal [name]. It should create the fork in a new terminal window or tab while the current terminal remains in the original session.The command line option provides a portable building block even when automatic terminal launching is not available. Users can combine it with their preferred terminal application. For example, a Windows Terminal user could run:
From Copilot CLI, the same command could be launched through the shell command prefix:
The convenience option on
/forkcould use supported terminal integration when available. If the CLI cannot identify or launch the current terminal application, it should return the new session ID and a ready-to-runcopilot --resume=<new-session-id>command instead of silently switching behavior.Example prompts or workflows
/fork --new-terminal investigate-authduring a task. The fork opens separately, and the original session remains visible and interactive.wt new-tab copilot --fork=<session-id> --name=<new-session-name>to create a fork in a new Windows Terminal tab.copilot --fork=<session-id> --name=alternative-designfrom another shell to create, name, and enter a fork of a specific session.Additional context
This is a focused follow-up to #2058. That issue requested the core
/forkcommand and mentioned a new terminal window or tab in its proposed solution. The core command now exists, but the terminal selection and process startup interfaces are still missing.Related issue #1697 also describes working with forked sessions in separate terminals.