github / github/copilot-cli

Allow /fork to open a new terminal and add copilot --fork

Abierto
#4,580 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

triage
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

Describe the feature or problem you'd like to solve

The interactive /fork command moves the current terminal into the fork, and Copilot CLI has no startup option for creating a fork from an existing session. This makes parallel terminal workflows unnecessarily manual.

Proposed solution

Support both of these entry points:

  1. 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.
  2. 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 when automatic terminal launching is unavailable. Users can combine it with their preferred terminal application.

If /fork --new-terminal 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 changing behavior.

Example prompts or workflows
  1. Run /fork --new-terminal investigate-auth during a task. The fork opens separately, and the original session remains visible and interactive.
  2. Run wt new-tab copilot --fork=<session-id> --name=investigate-auth to create and name a fork in a new Windows Terminal tab.
  3. Run copilot --fork=<session-id> --name=alternative-design from another shell to create, name, and enter a fork of a specific session.
  4. Run !wt new-tab copilot --fork=<session-id> --name=side-investigation inside Copilot CLI to launch the fork without abandoning the current session.
Additional context

This replaces #4578, which was submitted without the Feature Request form.

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 terminal selection and process startup interfaces are still missing.

Related issue #1697 also describes working with forked sessions in separate terminals.

Confirmed with GitHub Copilot CLI 1.0.81-8: both copilot --fork=<session-id> and copilot --branch=<session-id> are rejected as unknown options.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el comando interactivo existente /fork y las rutas de análisis de opciones de CLI e inicio de procesos. Rastrea cómo se crean y reanudan las sesiones y, después, verifica los flujos de trabajo solicitados de la línea de comandos y de /fork --new-terminal, incluido el comando de reanudación alternativo y el nombre de sesión de origen sin cambios.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
shell
Área
cli
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.