github / github/copilot-cli

Recent session disappears after Ctrl+Z/restart and local/cloud IDs diverge

未关闭
#4,539 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

area:sessions
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

Copilot CLI version

1.0.81-4

Environment

Linux, interactive Copilot CLI.

Problem

After accidentally pressing Ctrl+Z, Copilot CLI exited/suspended. After reopening Copilot, the session I had just been working in was missing from the recent-session list and could not initially be recovered by name. I have also seen the same behavior after Copilot crashes and is restarted.

Recovery took more than 10 minutes of searching session history. The same conversation appeared under different local and cloud session IDs, and the cloud ID was not accepted by /resume (No session, task, or name matched ...). Only after querying the local session database separately could the locally resumable ID be identified.

Reproduction
  1. Work in a long-running Copilot CLI session with many turns.
  2. Press Ctrl+Z accidentally (or let the CLI crash).
  3. Reopen Copilot CLI.
  4. Open /resume or search recent sessions.
  5. Observe that the session that was active immediately before termination is absent.
  6. A synced/cloud history lookup may return the conversation under a different ID, but /resume <cloud-id> reports no match.
Expected behavior

Ctrl+Z/restart/crash should preserve the current session and make it immediately visible and resumable. Local and synced history should resolve to one stable resumable session identity, or /resume should map a synced ID to its local record.

Actual behavior

The newest working session disappears from normal session discovery. Search/recovery can instead surface a later “find my missing session” conversation, and cloud results may use a non-resumable ID different from the local record. This makes the original session look lost even though its turns still exist locally.

Additional notes

This happened more than once on the same day. The CLI help documents Ctrl+Z as “suspend,” so reopening after suspension should not orphan or hide the active session. A useful diagnostic would be to log session checkpoint persistence, local/cloud ID reconciliation, and indexing completion during shutdown/startup.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

通过暂停或重启一个长时间运行的交互式 Copilot CLI 会话来复现该问题,然后检查会话检查点持久化、最近会话发现,以及关机和启动期间本地/云端 ID 的协调。完成的标准是:在 Ctrl+Z 或崩溃之后,最新会话仍然可见且可以恢复,并且具有一个稳定的身份,或存在从同步 ID 到本地记录的有效映射。

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

评估

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

把新 issue 发到你的邮箱

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