Skip to content

Move pipeline execution out of the human-paced in-loop by firing on cron or webhook — but only after you've staged claims, reapers, and graduated autonomy so the trigger can't duplicate work or strand it on crash.

Guide

How to use triggers

The reading path

Six nodes, in order — principle → primitive → safety → placement → graduation.

01

Irreplaceable Work Lives at the Agentic Layer

principle

Why first: it frames out-loop execution as the goal. Scheduled and event-driven work is exactly what should not require a human typing a command.

02

Trigger

primitive

What it is: a configured entry point — cron (time-based) or webhook (event-based). Fires the pipeline; does not coordinate concurrent runs.

03

Work Claim

pattern

First failure mode: two firings, two agents, same task. Claim before spawning — a second firing that sees a claim skips instead of duplicating.

04

Orphan Reaper

pattern

Second failure mode: agent crashes mid-run, claim locks forever. The reaper detects stale claims and releases them. Read alongside Work Claim — never separately.

05

PITER Framework

framework

Where it fits: triggers occupy the T slot — the execution entry point — inside Plan → Implement → Test → Execute → Review.

06

Progressive Autonomy Staging

pattern

The graduation: how to earn unsupervised trigger execution. Stages and promotion criteria — the practical answer to "when can I trust this to run alone?"

Read top-to-bottom. Don't skip 03 and 04 — shipping a trigger without claims-plus-reaper is how you learn about concurrency the hard way.

Where triggers sit

The PITER slot — triggers are the E, not a sixth step.

P

Plan

spec the work

I

Implement

write the code

T

Test

verify behavior

trigger fires here

E

Execute

cron / webhook

R

Review

inspect output

The trigger is the entry point, not the pipeline. Same P-I-T-R around it — only who pressed go changes.

A trigger doesn't replace a pipeline. It replaces the human invocation of one.

The two failure modes

Always read together — one isn't safe without the other.

Duplicationconcurrent firings

t=0  cron fires → agent A spawns on task #42

t=1  webhook fires → agent B spawns on task #42

t=2two writes · race · inconsistency

solved byWork Claim

Claim before spawn. Second firing sees the claim, skips the task. No duplicate agents.

Strandcrash under claim

t=0  agent A claims task #42, starts work

t=1agent A crashes · claim held

t=2next firing skips · task never retried

solved byOrphan Reaper

Sweep stale claims. A claim past its TTL is released so the next firing can retry.

Ship Work Claim alone → pipeline stops forever on first crash.

Ship Orphan Reaper alone → every firing re-duplicates work.

They are one shipment, not two.

If you can't point at both patterns in your codebase, don't enable the trigger yet.

The graduation

Earn autonomy in stages — don't jump the stack.

Stage 1

Manual

human types the command

Stage 2

Triggered, watched

fires on schedule; human reviews every run

Stage 3

Supervised

runs autonomously; human spot-checks; alerts on failure

Stage 4

Out-loop

fully unattended; claims + reaper + dashboards carry the trust

HUMAN-PACED→ promotion earned by clean runs at current stage →AGENTIC

Each stage has promotion criteria. Skipping a stage is not brave — it's how a scheduled pipeline silently shreds production overnight.

Where to go next

Two adjacent guides compose with this one.

natural next step

how-to-build-metaagents

Triggers spawn agents. Once the entry point is automatic, the next lever is how those spawned agents are orchestrated.

composes cleanly

how-to-use-hooks

Different point in the lifecycle. Hooks fire on tool-use events inside a run; triggers fire the run itself. Both automate — they don't overlap.

Finish this guide before either — triggers set the outer shell; hooks and metaagents work inside the shell.

The discipline

A trigger without claims and a reaper is not automation — it's a time bomb with a cron expression.

Out-loop execution is earned, not declared. Principle motivates it, the primitive fires it, two patterns make it safe, PITER places it, and staging graduates it. Skip any layer and you've bought failure modes at machine speed.