Agent sessions killed by an interruption should be resumable from their on-disk transcript (explicit revive opt-in)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- ai-infra-agents, cli
調査の方向性
Start by locating the session state-transition logic and the existing idle-session rehydration path used when continuing from an on-disk transcript. Identify the message/continue API where an explicit revive opt-in and machine-readable stop reason would fit, then add focused tests for failed, cancelled, running, and normal-completion sessions. Done means opt-in revival retains prior context, non-opt-in behavior remains unchanged, and callers can distinguish active sessions from dead sessions after a restart.
索引モデルが issue の本文から書いたものです。
説明
Summary
A background agent session that is interrupted — because the agent host restarts, the editor crashes, the model endpoint restarts mid-response, or the operator accidentally sends a destructive interrupt — lands in a terminal state (failed / cancelled) that cannot be revived, even though the conversation transcript for that session is still on disk and the session is still listed. A session in idle state can be sent a message and continues with its full context intact, which shows the rehydration machinery already exists; it just isn't reachable for the states that actually need it.
The result is that a single interruption converts in-flight work into a from-scratch re-dispatch, and anything the agent knew that wasn't written to disk is gone.
Observed behavior
Background sub-agent sessions tracked by the host survive a restart in the agent list with their titles and history visible. Attempting to continue one, however, is refused based on its status:
- A session in
idleaccepts a follow-up message and resumes with full prior context. Repeatedly verified, including after three interruptions in one incident. - A session reported as
failedrefuses:
Agent <id> is failed and cannot receive messages. - A session that was started in synchronous mode refuses, even when it is otherwise continuing normally:
Agent <id> is in sync mode. A new background task must be started with a self-contained prompt.
The two refusals are correct as statements of the current design, but they mean there is no path back for the case that matters: the agent was doing good work, the transport underneath it died through no fault of the agent or the operator, and the transcript needed to continue is sitting right there.
Why this matters
The cost is asymmetric. Re-dispatching means the new agent has to rediscover everything the dead agent had already read — for a research or code-modification task that is often the majority of the work — and if the dead agent had acquired any exclusive resource (a lock file, a scratch directory, a reservation on a file it was about to write), the successor has to reason about state the dead agent left behind without being able to ask it what it had done.
Meanwhile the recovery signal is unreliable at exactly the moment it is needed. During the incident that prompted this report, the session list returned an incomplete set, then zero sessions, then a partial set again, while the host itself stayed responsive. So an operator cannot reliably tell "this agent is still working" from "this agent died and I need to restart it," and a naive re-dispatch risks two agents doing the same write at once.
What I'd expect
- A session whose turn ended due to a transport/host/endpoint interruption should remain resumable, not terminal. If the distinction is hard to make reliably, an explicit
forcepath is perfectly acceptable. - An explicit opt-in parameter on the message/continue path — something like
revive: true— so that resuming afailedorcancelledsession is a deliberate act by the caller, not an accident, and not a change in behavior for callers who don't ask for it. I'd find a parameter that says "I understand I am reviving this session and it may need to recover" entirely satisfactory. - A machine-readable reason for why the session stopped, distinguishable at least between: operator cancellation, an interruption caused by a host or endpoint failure, a timeout, and a normal completion. That single field would let orchestration logic decide between "revive it" and "re-dispatch it" instead of guessing.
Acceptance criteria
- Given a background agent session in
failedorcancelledstate whose transcript exists on disk, a caller can resume it with an explicit opt-in and the agent retains its prior context. - Resuming without the opt-in keeps today's refusal, so nothing that currently fails silently starts working by accident.
- The session record exposes why it stopped, in a form a program can branch on rather than a display string.
- A caller can distinguish "still running" from "dead and awaiting revival" after a host restart, from a source other than timing out.
Environment
Editor-integrated Copilot on Windows, agent sessions driven from an interactive chat as background sub-agents. Reproduced across several sessions in one incident on 2026-11-28.
I have not included repository, project, or infrastructure details; they aren't needed to reproduce the status-transition behavior described above.
- 主要言語
- Python
- スター
- 11.5k
- フォーク
- 2k
- 平均マージ
- 6時間 34分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-cli のほかの issue
-
area:plugins
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
github/copilot-cli#5567 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncationオープンarea:tools
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/copilot-cli#5476 ·
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5340 ·
github/copilot-cli の issue をすべて見る
似ている issue
-
fidelity
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
backlog
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
sagemathinc/sagebrush#3434 ·
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
wuisabel-gif/MemWhale#576 ·
メンテナーはふだん 1 日以内に返信
-
Status: Triage Suggestion
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
メンテナーはふだん 1 日以内に返信