VCode home

Work carries on after VCode restarts

Agents: claude, codex, opencode, cursor, devin, copilot, muse · On: phone, desktop

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:

  1. AUTH_TOKEN=… node scripts/resume-queue-check.js claude
  2. 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.

A tab after an update: the user's message, a System card reading "Update v0.0.613 → v0.0.615", and the agent carrying on.

When the turn cannot be resumed, a system line says so instead:

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