Skip to content

Start at Boot

The whole idea is that your computer is always reachable — so the agent should come up with the machine, not wait for you to start it.

macOS

The menu bar app manages this itself: click the agent's menu bar icon and enable Start at Login. It also restarts itself automatically if it ever crashes.

Linux

code-setup (the sign-in step) already enabled the right systemd service for you:

  • run as root → the system service: starts at boot on its own.
  • run as a normal user → a user service with lingering enabled, so it too starts at boot, before you log in.

Verify / manage:

bash
systemctl status code-agent          # system install
systemctl --user status code-agent   # userland install

If the userland agent doesn't start until you SSH in, lingering may be off — run once: sudo loginctl enable-linger $USER.

Windows

Have the agent start at login via the Startup folder: press Win+R, run shell:startup, and drop a shortcut to code-agent.exe (in %LOCALAPPDATA%\16code) into that folder.

Sleep is the real enemy

Autostart won't help if the machine is asleep — a sleeping laptop is offline. On a Mac you plan to reach remotely, either keep it plugged in with "Prevent automatic sleeping when the display is off" enabled (System Settings → Battery/Energy), or run caffeinate while away. Desktops/servers: just disable suspend.