Skip to main content

Module tick

Module tick 

Source
Expand description

Core tick loop phases.

The engine ticks every ~10 seconds. Each tick runs six phases:

  1. Poll tmux for finished sessions
  2. Recover stuck in-progress tasks
  3. Route and dispatch:
    • 3a. Route new tasks to agents
    • 3b. Dispatch routed tasks (spawn agents)
  4. Unblock parents whose children are all done
  5. Run cron job scheduler

[tick_all] runs them for every project. Phases 1-2 and 3b-5 run for all projects at once; only routing is serial, because it holds the router write lock. Store-wide work (tick_global_sweeps, reconcile_dependencies) runs once per tick, not once per project.