github / github/copilot-cli

Add ability to unarchive / restore an archived project session

未关闭
#3,518 2 条评论 8 个 reaction 已指派 0 人 在 GitHub 查看
area:sessions
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

## Scenario

I accidentally archived a long-running project session that I'd been using as an orchestrator (it had spawned many child sessions via cross-session messages, accumulated significant context across many turns, and had a checkpoint summarizing its state).

When I realized the mistake and tried to resume it, I couldn't find a way to bring the session back. As far as I can tell:

- Archived sessions aren't visible in the normal project session list
- There's no "unarchive" or "restore" action exposed in the UI or via tooling
- The session's state still exists (history, checkpoints, branch, worktree all intact) — it just isn't reachable

The only workaround I found was to create a **new** session and seed its kickoff prompt with a hand-assembled context dump from the previous session's last checkpoint. That works, but:

- It's a clone, not a resume — the new session has a different ID, so any cross-session references from child sessions still point at the dead parent
- It requires me (or an agent) to manually reconstruct context, which is error-prone and loses fidelity
- Any in-flight automations tied to the original session ID are orphaned

## Request

Add a first-class way to **unarchive / restore an archived project session**, ideally:

1. An "Archived" view or filter in the project session list
2. A restore action that brings the session back with the same ID, branch, worktree, and history intact
3. (Optional) Equivalent tooling exposure so agents can recover from accidental archives without the kickoff-prompt workaround

## Why this matters

Archive is a one-click action and easy to hit by mistake. For short-lived sessions the loss is minor, but for long-running orchestrator/parent sessions — the exact ones most valuable to preserve — an accidental archive is currently destructive in practice even though the data is still there.

贡献指南

打开贡献指南

调研方向

首先跟踪归档会话如何从项目会话列表中排除,以及归档操作如何持久化会话状态。围绕现有历史记录、检查点、分支、worktree 和会话 ID 定义恢复路径,然后考虑通过工具提供等效的使用方式。完成标准是:无需克隆归档会话即可找到并恢复它,同时保持其身份和状态不变。

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

评估

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

把新 issue 发到你的邮箱

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