github / github/copilot-cli

copilot --resume creates an extra empty session-state directory with a new session ID

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

説明

### Describe the bug

When resuming a session with:

copilot --resume=

the original session is resumed correctly, but Copilot also creates a new session-state directory under ~/.copilot/session-state/ with a different session ID.

Example

- resumed/original session: f3db8a64-0d62-47a6-9253-dd005738ba5c
- extra new directory created: f35d8fc1-f713-4ecd-bad6-ca09a07cb1f6

Actual behavior

- the original session continues correctly
- agent/tool activity is still associated with the original session
- but a second session-state directory is created for the new ID
- important files inside that new directory are empty

Expected behavior

1. resume should reuse only the original session-state directory, with no extra new directory created

Why this seems wrong

I only noticed this because I built a macOS app to inspect Copilot sessions. From that view, it looks like resume creates a duplicate/empty session artifact even though the real resumed work belongs to the original session.

Repro steps

1. Start a Copilot CLI session and note its session ID
2. Exit the session
3. Run:
copilot --resume=
4. Observe: - original session is resumed
- a second new directory appears under ~/.copilot/session-state/
- files in the new directory are empty

Environment

- Copilot CLI version: 1.0.64
- OS: macOS

### Affected version

GitHub Copilot CLI 1.0.64

### Steps to reproduce the behavior

1. Start a Copilot CLI session and note its session ID
2. Exit the session
3. Run:
copilot --resume=
4. Observe: - original session is resumed
- a second new directory appears under ~/.copilot/session-state/
- files in the new directory are empty

### Expected behavior

Expected behavior

1. resume should reuse only the original session-state directory, with no extra new directory created

### Additional context

Environment

- Copilot CLI version: 1.0.64
- OS: macOS

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

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

調査の方向性

macOS で copilot --resume= を使って動作を再現し、再開の前後で ~/.copilot/session-state/ を調べます。元のセッション ID と新しいセッション ID がどのように選択され、永続化されるかを追跡します。完了条件は、resume が元のディレクトリのみを再利用し、空の 2 つ目のディレクトリを作成しないことです。

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

評価

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

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

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