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 prove it end to end 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
One system line in the transcript, then the agent carries on:
VCode restarted while this turn was running; resuming itVCode restarted while this turn was running, so it was cut short— when it cannot be resumedVCode restarted 3 times in a row while resuming this turn, so it was left stopped — send a message to continue

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.
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. 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 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