uberblick/ub-agents v0.5.4
Best practices · Run launchers on a server

Best practices

Run launchers on a server

A launcher on an always-on machine keeps the loop going overnight. Its agents run pull-request code as the launcher's user, with its environment, so this page is about what that user can reach and how you notice a stopped loop. Each practice says what to achieve; your service manager, cloud and monitoring decide how.

Isolate the box

Only the runtimes' credentials

Agents inherit the launcher's environment, so it holds what the CLIs need and nothing else. See Give launchers their own account.

Run it as a service

Run ub-agents launch --no-ui in the launcher's checkout under your service manager. Your agent can write the service file. Discuss with:ClaudeCodex It should:

Restart on every exitStop with SIGINTGrowing delay
systemdRestart=always, StartLimitIntervalSec=0KillSignal=SIGINT, KillMode=mixedRestartSteps=6, RestartMaxDelaySec=30min
launchdKeepAlivenot configurablefixed ThrottleInterval
Docker Composerestart: unless-stoppedstop_signal: SIGINTbuilt in

The launcher writes its own log, .ub-agents/launch.log. For the live view, have the service start it in tmux, with one tmux server per launcher. q in the view drains it, and the service starts it again.

Keep it current

With ub-agents installed from the Homebrew tap, turn on launcher updates. The launcher upgrades between runs and restarts in place, so the service sees no exit. Releases that need every launcher upgraded together wait for you; see Upgrading. Don't add an updater of your own: it can't tell those releases apart.

runtime-updates:
  ub-agents: auto
  claude: auto
  gh: auto

Install the agent CLIs the way runtime updates recognise, or give it your own command.

Size for the peak run

A box with 8 shared vCPUs and 16 GB ran three launchers for two weeks: 454 runs, at most two at once, memory peaking at 11 GB. A run with a database, a cache and a search engine in containers peaks at 4–5 GB; one TypeScript repository's builds reached 8.5 GB plus 7.5 GB of swap. Cap memory per launcher and for its containers, add swap, and cap test workers per run.

Watch what the service doesn't show

Collect these as root or from outside the box, so a run can't make a broken loop look healthy.