github / github/copilot-cli

Make `--name` create or resume a session

Abierto
#4,642 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

copilot --name <name> creates a new named session, but it does not resume an existing session with that name. After the first launch, users and automation must know whether the session exists before selecting --name <name> or --resume <name>.

The same distinction breaks CLI relaunches. A session started with copilot --name project-a can fail during /update when the replacement process receives both the original --name and an internal --session-id:

error: option '-n, --name <name>' cannot be used with option '--session-id <id>' when it resolves to an existing or remote session or task.
--name only names a brand-new session created by --session-id=<new-uuid>; the resolved session was not renamed.
Proposed solution

Give copilot --name <name> create-or-resume behavior. --name should use the same name lookup and matching rules as --resume <name>:

  1. If no session matches, create a session with that name.
  2. If exactly one session matches, resume that session.
  3. If multiple sessions match, follow the current --resume <name> ambiguity behavior. Do not create another session.
  4. Resume the selected session when /restart, /update, or another command relaunches the CLI. A retained --name should not fail because the session now exists or because the relaunch also carries an internal session ID.

--resume should remain available for three uses: session IDs, the session picker, and existing workflows. Users and automation could then use one repeatable command whenever a stable name identifies the session.

Example prompts or workflows
  1. The first copilot --name project-a invocation creates a named session.
  2. A later copilot --name project-a invocation resumes that session.
  3. /update or /restart resumes that session without a flag conflict.
  4. An alias or script can keep invoking copilot --name project-a without first querying session state.
Additional context

Issue https://github.com/github/copilot-cli/issues/3332 reports /restart failing in a session created with --name. The requested semantics address that failure and the broader need for one repeatable name-based command.

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

Empieza rastreando el manejo de la CLI para --name y --resume, y después inspecciona las rutas de relanzamiento utilizadas por /restart y /update. Compara el comportamiento con issue #3332 y verifica los cuatro casos propuestos: crear cuando no haya coincidencias, reanudar cuando haya una coincidencia, conservar el manejo actual de las ambigüedades y evitar conflictos durante el relanzamiento.

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
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
52/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.