Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The daemon

The daemon is a long-running tome process. It:

  • starts runs, and launches each run’s orchestrator,
  • records the step progress the orchestrator reports,
  • watches for triggers (file changes, cron times, messages) and starts or signals runs,
  • creates and watches the sessions that agents run in,
  • recovers when it restarts: runs that were in progress are failed.

The daemon does not decide what a workflow does. It doesn’t decide step order either. The orchestrator does that.

Every tome command that touches runs talks to the daemon over a local socket in ~/.tome. If the daemon isn’t running, those commands stop with an error that says how to start it.

tome daemon start     # in the background
tome daemon status    # exit code 3 if it isn't running
tome daemon stop
tome daemon install   # start at login (launchd on macOS, systemd --user on Linux)

tome start and tome stop are shorthands for tome daemon start and tome daemon stop.

A daemon that crashes is restarted by the login service. tome daemon stop is a clean exit, so it stays stopped.

When it stops, the daemon refuses new requests, and attached tome run or watch commands end with a “shutting down” error. It gives its background work up to 5 seconds to finish, then closes the database. Anything still stuck after that, such as a terminal multiplexer that doesn’t respond, is abandoned. Runs it left in progress are failed when the daemon next starts.

With cmux, start the daemon from a terminal inside cmux. cmux only lets its own processes control it, and the daemon inherits that from where it started. See Backends.

See Operating tome for more.