github / github/copilot-cli

bug: /restart fails in sessions created with -w

オープン
#4,493 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area:sessions
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

/restart の処理と、copilot -w で起動されたセッションのコマンド構築から始めてください。Issue の 3 つの手順で競合を再現し、-w--session-id がどのように組み合わされているかを調べてください。/restart がオプションの競合なしに現在のセッションを再開し、生成された worktree を保持できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。