github / github/copilot-cli

bug: /restart fails in sessions created with -w

Aperta
#4,493 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

area:sessions
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

Describe the bug

A Copilot CLI session started with copilot -w cannot recover after running /restart inside the session. The restart attempts to use both the worktree option and the existing session ID, which results in an option conflict.

Affected version

1.0.80

Steps to reproduce the behavior
  1. From any Git repository, start Copilot CLI with an automatically created worktree:

    $ copilot -w
    Created worktree at /path/to/repo.worktrees/<generated-name> (branch <generated-name>)
    
  2. Inside the session, run /restart.

  3. Observe the error:

    error: option '-w, --worktree[=name]' cannot be used with option '--session-id <id>'
    
Expected behavior

/restart should restart or resume the current session successfully while retaining the existing worktree, without passing -w in conflict with --session-id.

Additional context
  • Operating system: macOS
  • Shell: zsh
  • The session was started with the bare -w option, allowing Copilot CLI to generate the worktree name.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla gestione di /restart e dalla costruzione del comando per le sessioni avviate con copilot -w. Riproduci il conflitto seguendo i tre passaggi dell’issue e verifica come vengono combinati -w e --session-id. Il lavoro è completato quando /restart riprende la sessione corrente mantenendo il worktree generato, senza il conflitto tra le opzioni.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
shell
Ambito
cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.