Autodrive

Autodrive is the forward-progress loop that makes pipelines autonomous: a background loop inside the runtime that, every 60 seconds, scans for drivable projects and runs each one to quiescence. It's why approving a gate, raising a budget, or retrying a subtask is enough — you never have to manually pump the pipeline afterwards.

What it does

Each tick, autodrive lists non-terminal projects and, for every one in planning or active, spawns a background driver that calls the runner's run_to_completion for that project. The driver executes eligible steps one after another until the project has nothing dispatchable — done, blocked on a gate, paused, or failed-awaiting-human.

Projects in paused are deliberately skipped: a pause (operator, budget breach, standalone gate rejection) means a human needs to act, and autodrive never overrides that.

What wakes a project

Anything that returns a project to a drivable state gets picked up within a tick:

  • A human gate resolving — approval or a reviewing-gate rejection both wake the project so the pipeline (or the rework) continues.
  • POST /v1/projects/{id}/resume after a pause.
  • A subtask retry — the queued attempt runs on the next tick.
  • A phase retrigger or artifact revert with a strict cascade queuing re-runs.

Safety properties

  • One driver per project, fleet-wide — a Postgres advisory lock keyed on the project id guarantees at most one driver across processes; an in-process in-flight set stops the 60s tick from stacking a second driver onto a long agent run.
  • Idempotent — driving an already-blocked project is a cheap no-op; the runner stops as soon as the project leaves active.
  • Kill switchCATENTIO_PIPELINE_AUTODRIVE=0 disables the loop without a code change (self-hosted deployments).
  • Projects whose id starts with __test__ are never driven — test fixtures in a shared database stay inert.

Autonomy and approvals

Autodrive drives execution, not judgement: human gates always stop the line until a person decides. There is no auto-approval of gates today.

Roadmap. A taste-learning auto-approve mode (gates resolving themselves once the system has enough accumulated confidence in your preferences) has been designed but is not yet available — treat any older reference to it as aspirational.

Manual stepping

POST /v1/projects/{id}/run-step advances a project by exactly one step, useful for watching a pipeline step-by-step. It takes the same per-project lock discipline, so it coexists safely with the loop.

Next