github / github/copilot-cli

Blocker: Compact can be triggered accidentally with no confirmation or Undo

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

还没有人认领这个 Issue。

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

描述

Describe the bug

The Compact action in the VS Code Copilot CLI experience can be activated accidentally and immediately rewrites the active conversation context without:

  • a confirmation dialog,
  • a clear warning that the operation cannot be reversed,
  • an Undo action, or
  • a supported way to restore the original conversation into the active UI/context.

This is a blocker-level data-loss UX issue. Although an underlying session record/checkpoint may remain on disk, that is not equivalent to preserving the user's active conversation. After accidental activation, the user cannot restore the session to its prior state or see the original conversation as it appeared before compaction.

Affected version
  • VS Code: 1.131.0 (Windows x64)
  • Copilot CLI runtime integrated into VS Code; standalone copilot executable is not available in PATH
  • Observed August 3, 2026
Steps to reproduce
  1. Open a long-running Copilot CLI session in VS Code.
  2. Accidentally activate Compact.
  3. Observe that compaction begins immediately without confirmation.
  4. After it completes, attempt to undo or restore the original active conversation.
  5. Observe that no Undo or restoration path exists.
Actual behavior

A single accidental activation permanently replaces a large active conversation with a generated summary. In the observed session, compaction removed approximately 133,000 tokens from active context. The session checkpoint/log remained, but the original visible/active conversation could not be restored.

Expected behavior

Before Compact runs, show a blocking confirmation that clearly states what will change and whether it can be undone. At minimum:

  1. Require explicit confirmation for manual compaction.
  2. Clearly state that the current active context will be replaced by a summary.
  3. Provide an immediate Undo/Restore action backed by the retained session record.
  4. Preserve access to the original visible transcript.
  5. Consider moving Compact away from controls that are easy to trigger accidentally.

Please treat this as a release-blocking UX/data-preservation defect rather than a normal enhancement request. Irreversible context replacement must not occur from one accidental click.

Additional context

No private session content or source code is included in this report.

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先,在 VS Code Copilot CLI 体验中复现 Compact 操作,并跟踪手动压缩的入口点。检查会话 checkpoint/log 如何保留,以及活动对话如何被替换。完成标准是:手动压缩需要确认,并提供受支持的 Undo 或恢复路径,同时保留原始记录。

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

评估

技术栈
shell, vscode
领域
cli, developer-experience
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

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