VCode home

Work carries on after VCode restarts

Agents: claude, codex, opencode · 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 prove it end to end 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

One system line in the transcript, then the agent carries on:

A system card in the transcript reading "VCode restarted while this turn was running; resuming it".

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