uberblick/ub-agents v0.5.4
Commands · ub-agents launch

Commands

ub-agents launch

ub-agents launch runs the loop on your machine: it watches the queue and runs the agent for the next item. Start it in a clean checkout of your default branch and leave it running. Teammates can run their own launchers on the same queue.

ub-agents launch

Press q to stop after the current run, or Ctrl-C to stop right away.

Only one launcher can run on a control checkout at a time, in any launch mode. A second launch exits before startup, naming the running launcher's pid, host and start time. Stop that launcher first, or use retry to hand it an item. Different paths resolving to the same checkout share this limit; separate control checkouts can each run a launcher.

status and doctor show the launcher running on this checkout. The lock is released when its process exits, including after SIGKILL, even while its agents or helpers finish.

One agent or one item

ub-agents launch --agent issue-preparer   # serve only this agent
ub-agents launch 143                      # handle only #143, then exit
ub-agents launch --once                   # run at most one assignment, then exit

--agent lets you prepare all issues first, for example. A numbered launch skips the queue order, but labels, blockers, approvals and claims still apply. If nothing starts, launch tells you why.

The terminal view

In a terminal, launch opens a live view of what is running, what needs a person, what is next and what just finished. Select an item and press Enter for its log, the issue, earlier runs and how to unblock it. Press ? for all keys. A few you'll use often:

The terminal view guide explains layouts, tabs, formatted logs, usage pauses and keys. Outside a terminal, or with --no-ui, launch prints plain lines; see Running launchers.

Before each run

Before each run, launch pulls the default branch and starts the agent fresh, so changes to ub-agents.yaml, AGENTS.md and the role files apply once they land, without a restart. A new ub-agents version does need one; see Upgrading.

If ub-agents.yaml, ub-agents.local.yaml or an instruction file fails validation after a refresh, continuous launch (including --agent) pauses claims. It starts no new runs or recoveries and uses no attempts. The terminal banner, plain output, launch.log and status show the error, checkout commit and next step. Correct the file, or upgrade ub-agents for an unknown key or value. Every poll, or r, fetches and rereads even with an empty queue; valid files resume claims automatically. q and SIGTERM stop while paused as they do while idle. Startup validation, --once and numbered launches still fail on invalid files. Unsafe checkouts and failed fetches or fast-forwards still stop launch.

Checkout setup runs your own setup, such as installing dependencies, in every new worktree. Agents with a health check wait until it passes, without using up attempts.

Launch also checks runtime login before claiming ready work. A logged-out CLI holds its items at waiting without spending attempts; eligible alternatives and agents on other CLIs keep working. Log in with the command shown to resume automatically, without restarting launch.

Leftovers from earlier runs

Each launch first clears worktrees, run branches and scratch that earlier runs left on this machine, keeping anything still in use. A removed branch with unpushed commits has its SHA in the cleanup log under .ub-agents/sessions/; restore it with git branch <name> <sha>. To run your own code after each run, see Cleanup.

Logs

Launch writes to .ub-agents/launch.log, and each run keeps its log under .ub-agents/runs/ for 7 days. Launch output explains the lines.

$ ub-agents help launch
ub-agents launch
usage: ub-agents launch [NUMBER] [options]

Run the queue in the foreground under the configured gates. Without a number,
watch the queue; with a number, handle only that issue or PR, then exit. Use
--agent NAME to serve only one configured agent; without a number, the queue
keeps polling until you stop it.

options:
  --agent NAME           # serve only this configured agent (queue or NUMBER)
  --once                 # observe once, run at most one assignment, then exit
  --no-ui                # plain lines instead of the terminal view
  --config PATH          # project configuration (default: ub-agents.yaml)
  -h, --help             # show this help

examples:
  ub-agents launch
  ub-agents launch --agent issue-preparer
  ub-agents launch 143 --agent implementer