github / github/copilot-cli

copilot --continue` resumes the wrong session when multiple repos share the same branch name

オープン
#1,167 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:sessions
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

`copilot --continue` is selecting sessions from the wrong repository.
It appears to key session selection *only* on the branch name.

Repro:

1. I have multiple repositories, each with an active Copilot CLI session.

2. All of them happen to use a branch named `main`.

3. I cd into **repo X** and run:

github copilot --continue

4. Instead of resuming the session associated with repo X, it resumes a session belonging to **repo Y**—apparently because both sessions were created while on a branch named `main`.

Expected behavior:

* Session lookup should prefer repo identity (e.g., full path, git remote, repo ID) over branch name.
* Branch names alone are not unique enough to disambiguate sessions.

Actual behavior:

* Session resolution appears to match on branch name only.
* This causes cross‑repo confusion whenever users have multiple repos with the same branch name—very common, especially for `main`.

Requested fix:

* Incorporate repository identity into session selection, not just branch name.
* Alternatively, prompt the user when multiple sessions match to let them pick the intended one.

If helpful, I can provide logs or session metadata from affected runs.

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

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

評価

この issue はまだ評価されていません。

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

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