Agent sessions killed by an interruption should be resumable from their on-disk transcript (explicit revive opt-in)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- ai-infra-agents, cli
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 11.5k
- Forks
- 2k
- Merge medio
- 6 h 34 min
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/copilot-cli
-
area:plugins
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
github/copilot-cli#5567 ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncationAbiertoarea:tools
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
github/copilot-cli#5476 ·
-
triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
github/copilot-cli#5340 ·
Todos los issues de github/copilot-cli
Issues similares
-
fidelity
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
backlog
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
sagemathinc/sagebrush#3434 ·
Los mantenedores suelen responder en 1 día
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
documentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
wuisabel-gif/MemWhale#576 ·
Los mantenedores suelen responder en 1 día
-
Status: Triage Suggestion
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
Los mantenedores suelen responder en 1 día