needs order, and the run ends when all jobs end. A listening job — a
job driven by events — changes that: it listens for events and runs one
execution per event batch, inside the same run, until a resolution condition is
met. needs still gates when the job activates; from then on, events gate each
execution.
What you’ll build with it
Two driving use cases shape the design: Agentic PR-review loop. Job A opens a pull request with an agent. Job B (needs: [A]) listens for new review comments and runs an agent on each batch —
answering reviewers, applying requested changes — until the PR is closed or merged.
These sketches assume PR-comment and issue events from the GitHub integration,
which today delivers
push — richer event ingestion ships alongside listening
jobs.The model
A run is a DAG of jobs; a job has one or more executions; an execution runs the steps. A one-shot job has exactly one execution. A listening job gets one execution per event batch:needsgates the job — the listener activates only when its dependencies succeed.onevents gate each execution — every matching event (batch) starts one.- Executions serialize per job; events arriving during an execution coalesce
into the next batch (tune with
batch.debounce,batch.max_size,batch.max_wait). - The job resolves when an
untilevent arrives, thetimeoutelapses, ormax_executionsis reached.
The listening shape
The events the job listens for. Each entry uses the same
{source, event, filter?, with?} shape as a workflow trigger — one
event-selector shape, used at run level (triggers:) and at job level
(on/until).Events that resolve the listening job.
Maximum wall-clock time to keep listening before the job resolves.
Caps how many executions the job runs before it resolves.
Coalesces bursts of events:
debounce (quiet window before an execution
starts), max_size (events per batch), and max_wait (longest a batch waits
before flushing).What happens when
until fires: finish completes the job normally (default),
cancel cancels it.Related pages
Triggers
The trigger shape reused by
on and until.Integrations
The sources that emit the events a listening job reacts to.