VCode home

The box updates itself

Agents: claude, codex, opencode, cursor · On: desktop · beta

A box installed with curl -fsSL https://v-code.dev/install | sh checks for a new signed release every hour. It installs it only while no thread is working. The shell panel keeps running through the update. It goes back to the old version if the new one does not come up and stay up.

Why you would use it

You want new versions on the box without logging in to it, and without an update cutting off a turn the agent is in the middle of, or a command you left running in the shell panel.

How to use it

There is nothing to turn on. The installer enables v-code-update.timer.

  1. To see when the next check runs: systemctl --user list-timers v-code-update.timer.
  2. To check now: ~/.local/share/v-code/current/install.sh update. It runs the same updater the timer does, with the same rules.
  3. To read what it did: journalctl --user -u v-code-update.

A box installed from a git clone has no timer. Update it with update-the-install.

On a Mac (install-on-macos) the timer is the launch agent dev.v-code.update, which runs the same updater every hour, starting an hour after it is loaded. To check now: the same install.sh update. What it did is in ~/Library/Logs/v-code/update.log. Where these pages say systemd, the Mac asks launchd: launchctl print gui/<uid>/dev.v-code.server for whether VCode runs, its runs count in place of NRestarts, and launchctl kickstart -k to restart onto the new version.

What you see

Nothing in the app. The updater writes to the journal, each line starting with v-code::

Line Meaning
up to date: <installed> (the newest release is <v>) Nothing newer.
a thread is busy; <v> waits for the next run A thread has work. It tries again in an hour.
a command runs in the shell panel (<command>); <v> waits for the next run A pane in the shell panel runs something other than a shell. It tries again in an hour.
a command has run in the shell panel (<command>) for 86400 s or more; updating anyway The shell panel has been busy for a day. The update goes ahead and the restart ends that command.
VCode on 127.0.0.1:<port> did not answer; <v> waits for the next run The unit is active but did not answer.
VCode did not answer and systemctl --user did not either, so this run cannot tell whether VCode is running; <v> waits for the next run Neither VCode nor the user manager answered. The run counts the box as busy.
VCode is not running, so no turn can be cut off systemd says the unit is not running. It goes ahead.
updating <old> to <new> Downloading, then switching.
updated to <new> The new version answered and stayed up.
<old> is still the version running: <new> was never started; switched back to <old>; <new> is tried again next run The restart never reached the new version. It is not rejected.
<new> did not come up within 30 s, and VCode was down before the switch; switched back to <old>; <new> is tried again next run The box was already down, so the release is not blamed. It is not rejected.
<v> was rolled back before; waiting for a newer release That version failed here once and is never tried again.
another install or update is running; trying again next run Another run holds the lock.

A rollback exits 1, so systemctl --user status v-code-update shows it failed: <new> did not report itself running within 30 s; rolled back to <old>, and <new> will not be tried again, or <new> came up but did not stay up; … when it answered once and then did not answer 5 s later, reported another version, or systemd restarted it in between. A switch back that does not reject the release exits 1 too.

Options and settings

Option Default What it changes
OnBootSec 2min First check after boot. A timer started later than that fires at once, so a fresh install checks right away
OnUnitActiveSec 1h Time between checks
RandomizedDelaySec 5min Spreads boxes out so they do not all fetch in the same minute
TimeoutStartSec 30min A hung download is stopped, so later runs are not held back

Limits and known gaps