github / github/copilot-cli

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

未关闭
#3,908 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:sessions
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
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 只重用原始目录,并且不创建第二个空目录。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
56/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。