github / github/app

Archived child sessions cannot be restored with their conversation history

未关闭
#2,990 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

## Summary

A coordinated child session repeatedly emitted identical idle notifications after completing its work. To stop the notifications, the parent agent archived the session. When asked to restore it, no restore tool was available. Opening the associated PR created a new session with the same branch but without the original conversation history.

## Steps to reproduce

1. Create a coordinated child session with `notify_on_idle: "always"`.
2. Let the child finish and become idle.
3. Observe repeated idle notifications across subsequent turns.
4. Archive the child session.
5. Attempt to restore it.
6. Call `open_pr_session` for its PR.

## Actual behavior

- Repeated notifications continue after the child is already idle.
- An `archive_session` tool exists, but there is no corresponding restore tool.
- `open_pr_session` creates a new session instead of restoring the archived one.
- The new session retains the branch and PR but not the original transcript.
- Context must be manually reconstructed and sent to the replacement session.

## Expected behavior

- Idle notifications should be deduplicated or stop after acknowledgment.
- Archiving should require explicit user confirmation when restoration is unavailable.
- A `restore_session` operation should restore the original workspace and transcript.
- Opening a PR with an existing archived session should offer to restore that session instead of silently creating a new one.

## Impact

The commits and pull request were preserved, but the active session history and working context were lost from the restored workspace. This created confusion and required a manual context handoff.

## Suggested safeguards

- Treat archiving as a user-directed lifecycle action rather than a notification-management mechanism.
- Warn that an archived session cannot currently be restored through agent tools.
- Deduplicate repeated idle notifications.
- Add an agent-accessible `restore_session` operation.
- Detect archived sessions associated with a pull request before creating a replacement session.

---
| Field | Value |
| --- | --- |
| App version | 1.1.10 |
| OS | macOS 26.6.1 |
| Theme | GitHub |
| Path | /chat |
| Tenure | Week 9 |

贡献指南

打开贡献指南

调研方向

从 /chat 流程开始,跟踪复现步骤中描述的 archive_session 和 open_pr_session 操作。将它们对已归档会话、分支、pull request 和会话历史的处理方式与预期的恢复行为进行比较。Done 应涵盖通知去重、明确的归档警告、恢复原始转录内容,以及重新打开 PR,同时不得静默创建替代会话。

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

评估

领域
desktop
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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