Work carries on after VCode restarts
When the VCode process goes down mid-turn, the tab does not sit frozen. On the next boot the thread resumes its vendor session and tells the agent to continue from where it left off.
Why you would use it
An agent updating this repo restarts the very service it is running inside. Deploys, crashes and reboots all land the same way. Without this, a tab would show "working" forever and every message you sent afterwards would pile up behind a turn that nothing can ever close.
How to use it
Nothing to do. It happens at boot, before anything can look at the thread. You only notice it in the transcript.
To check it on a live server:
AUTH_TOKEN=… node scripts/resume-queue-check.js claude- It queues two messages, kills the agent, restarts the server, and checks the thread resumes the session with the earlier context intact.
What you see
A resumed turn shows one System card where it carries on: it reads
Restart, or Update v0.0.613 → v0.0.615 when the box came back on another
version than the one it ran before. It is one line until you tap it; open, it
shows the text the agent was sent.

When the turn cannot be resumed, a system line says so instead:
VCode restarted while this turn was running, so it was cut short, orVCode updated from v0.0.613 to v0.0.615 while this turn was running, so it was cut shortafter an updateVCode restarted 3 times in a row while resuming this turn, so it was left stopped. Send a message to continue(10 times on the dev channel)
The continuation the agent receives is a message VCode writes, not one you typed:
VCode restarted and your process was stopped with it. This session has been resumed. The turn you were running was cut short. Continue from where you left off. Check the state of the work before repeating a step: a command may have finished, or stopped halfway. If a command you ran caused the restart, it has already happened, so do not run it again.
Any subagents that were running are named
in it and marked failed on the strip,
with the detail lost when VCode restarted, followed by
Start again the ones whose work is still needed. Their partial output is gone.
Background commands the agent left running, such as a test run or a wait loop
it ended its turn to wait on, are named the same way, after These background commands were running and were stopped with the process:, followed by Check whether each finished before running it again. Their output after the restart is gone, and you will get no notification for them. A tab with no turn running
gets this message too when it had background commands or subagents going, so it
does not sit idle waiting for a notification that never comes.
No push notification fires for a turn closed this way.
Limits and known gaps
- Only within one hour. A machine that was off overnight comes back to threads nobody is waiting on, so work older than an hour is left stopped.
- At most three resumes in a row for the same work, ten on the dev channel, which installs each new build within a minute. A turn that restarts VCode would otherwise resume itself forever.
- A tab with no vendor session yet is not resumed: a continuation would land in an agent that has never seen the thread.
- A closed tab is cleaned up, not resumed.
- A turn the agent started on its own, such as when a background agent it launched finishes, is resumed like one you sent.
- A compaction turn is closed without a continuation: telling the agent to carry on would send it back into the summary. Its lost subagents still get a note.
- A thread already waiting out a usage limit keeps its own continuation; see usage-limit-pause-and-retry.
- VCode still needs restarting after a merge that adds a script tag, and the service worker version bumped for the shell to reach installed phones.
Related
- resume-a-session-from-disk: adopting a session started outside VCode
- stop-a-running-turn: closing a turn on purpose
- usage-limit-pause-and-retry: the other automatic continuation
- update-from-a-tab:
/updaterestarts VCode and relies on this