Workflow triggers and actions¶
This page lists everything a workflow file can say: what makes it run, which agent runs it, and how that agent runs.
A workflow is one Markdown file in the folder's .agents/workflows folder. A workflow
of your own, in ~/.agents/workflows, is in every folder: its page says Your workflow:
in every folder. Create, edit and delete those in Settings ▸ Agent Configuration ▸
Workflows, on the Mac, the iPhone, the iPad and the web. The file
name, without .md, is the workflow's id. The file starts with front matter between two
--- lines, and everything under it is the prompt, sent to the agent as it is written:
---
name: Morning build check
on:
- schedule:
at: [":00"]
between: "09:00-09:00"
days: [mon, tue, wed, thu, fri]
agent: new
permission-mode: plan
labels: [build, morning]
---
Check the build and say whether it is green.
| In the file | Values | What it means |
|---|---|---|
name: |
Any text | The name shown on the folder page. Without it, the name is made from the file name. |
on: |
One trigger, or a list of them | What makes the workflow run. With a list, any one of them runs it. |
on: manual |
No settings | Nothing runs it but Run now, on its page or its row. Leaving on: out says the same. Its row reads "By hand, with Run now". See Run only by hand. |
on: schedule |
at:, and optionally between: and days: |
Runs at set times. At is a list of minutes past the hour, ":00" or ":30" and nothing else. Between is a range of hours such as "09:00-18:00"; without it, every hour. It can go past midnight, such as "22:00-02:00": the hours after midnight are part of the day before, so days: [fri] runs from Friday 22:00 to Saturday 02:00. Days is a list of mon, tue, wed, thu, fri, sat, sun; without it, every day. A time missed while the Mac slept or the app was closed is not run later; the workflow's page says it was missed. A server on a stopped workspace is started for it, when Start for scheduled workflows is on (Start workspaces from Dragon Rider); a Mac, or a server with the switch off, still misses it. |
on: an event name, such as branch.moved or agent.finished |
Optionally the event's details, as filters | Runs when that event happens. Any name on Events works, or a subject with .*, such as agent.*, for all of its events. Under the name, list its filters to narrow it: branch on branch.moved, such as branch: agents/fix-640, and why on person.away and person.back. A filter can take a list, meaning any of them, such as branch: [main, develop]. Any other key, or a value a filter cannot have, is an error in the file, naming the right ones; the workflow never runs until it is fixed. An event about this Mac runs matching workflows in every folder. A name this version does not know is shown on the workflow's page and never runs. |
on: a server's event, such as checks.failed |
Optionally server:, and the event's own filters |
Runs when a connector (an MCP server) reports that event. Its name is noun.verbed, with no prefix, as the server names it. Without server:, it hears every connector this folder can use that offers the name, including one added later. server: narrows it to one server's name, or a list of names. Every other key is the event's own filter, sent to the server as it is: a list is a list argument, not "any of". A filter the event doesn't take, or a value of the wrong type, is an error on the workflow's page, naming the filters it takes. A name whose noun is one of the app's subjects, such as branch.created, is never a server's event. See Events from MCP servers. |
on: - type: an event's type, with keys beside it |
provider:, topic:, subject:, debounce:, and the event's own filters |
The same trigger, written by its type, such as - type: pr.merged with provider: github and topic: alexec/agents under it (#4730). name: is read as type: for one release. With provider, topic or subject, it also runs on events from your other machines, on the bus; debounce: 30s runs it once for a burst on one subject and type, with the last event, and its prompt says how many came. The keys work under a name too (- pr.merged: with provider: github). See Subscribe by provider, topic and subject. |
agent: new |
The default | Each run starts a new agent. |
agent: standing |
Each run goes to the workflow's own agent, which keeps its conversation from run to run. | |
on: once |
at:, and optionally time-zone: and grace: |
An alarm (#4966): runs once, at a set time, then archives itself. At is a date and a time, such as "2026-11-13T09:15", in time-zone (an IANA name such as Europe/London), else in your time zone; a time with an offset, such as "2026-11-13T09:15:00+01:00", is that instant. Grace is how late it may still run, from 1m to 7d; without it, an hour. When the time comes while the Mac is off or asleep or Dragon Rider is stopped, it runs on wake or restart if it is still inside its grace; past it, it does not run: it is archived as missed (workflow.refused, missed_while_closed). Archived, the file stays, and its page keeps when it ran, what it started and how late. An alarm still waits for your approval, but it is on as soon as you approve it (Alex, 2026-11-12): approved after its time but inside its grace, it runs at once. manage_workflows refuses an alarm already past its grace. Its page shows the time it is due, and after it ran, "by its one-time alarm, 12 minutes late". It runs on each machine that runs the folder's workflows, as a schedule does, and is not sent to a bot's machines (runs-on: with a bot's name). |
agent: triggering |
Each run goes to the agent that set it off. For an event, it is the agent the event is about. A schedule, or an event with no agent, has no such agent, so it does not run. | |
agent: labelled |
to:, and optionally deliver: |
Each run starts no agent: it sends the file's words to the sessions of the folder that match to:. Behind Labelled workflows in Settings ▸ This app ▸ Early Features. See Send to labelled sessions. |
to: |
labels: or event-credential:, with optional filters |
For agent: labelled only, and it needs it: a file with agent: labelled and no to: stops the workflow, and its page says why. A session matches when it has every label in labels:, none of not-labels:, ran on runtime: (the runtime Auto picked, on Auto), and is on account:, an account profile's id, or default for the runtime's own sign-in. |
to: event-credential: |
true or false |
With true, send to sessions that use the runtime and account in the trigger event. The event must supply both values. You can omit labels: or use it to limit delivery further. |
deliver: |
next-turn, steer or wake |
For agent: labelled only. Without it, next-turn. See Send to labelled sessions. |
until: |
Events, as on: takes them |
For agent: labelled only (#6955): the events that end its broadcast. A server's event is heard only while a broadcast is active. See When a broadcast ends. |
for: |
A length of time, such as 4h or 2d |
For agent: labelled only: the most a broadcast lasts. Without it, 24 hours; 7 days at most. |
match: |
A detail of the events, or a list of them, such as volume |
For agent: labelled only: the details a start and an end must share, so two low volumes are two broadcasts. For a server's event, a detail of the server's own, such as repo. |
hold-starts: |
true or false |
For agent: labelled only. true queues agent starts in this folder while the broadcast is active. Set for: to give the time limit. |
hold-starts-except-high: |
true or false |
With hold-starts: true, set this to true to let high-priority sessions start when capacity and folder limits permit. The default is false. |
end-message: |
Words | For agent: labelled only: what a session that read the broadcast is told once, at its next turn after the end. |
permission-mode: |
plan, ask, approve-for-me or bypass-permissions; or, on a named runtime, one of its own modes, such as acceptEdits |
The mode the agent runs in. A workflow runs with nobody watching, so plan is how to say it must not change anything. The four words are the same on every runtime (Use Auto says what each is on each runtime): use them. On Auto, three of Claude's own modes are read as a word (#2873): default as ask, auto as approve-for-me and bypassPermissions as bypass-permissions. |
permission-requests: |
request-cards or yes-to-all |
Cursor, Grok and OpenCode only: whether each permission request is a card, or the app says yes to it. Without it, the value from Settings. On Auto it follows permission-mode:. |
sandbox: |
default, runtime or none |
Default sandbox, Runtime sandbox or No sandbox. Without it, the value from Settings. |
runtime: |
auto, claude, codex, antigravity, grok, copilot, cursor, opencode |
The runtime the agent runs on. auto picks the first runtime in your Auto order that can take the run, each time it runs; with auto, model: and permission-mode: must be the shared words, and a runtime's own value (such as model: opus) stops the workflow, with a line that says to use one of the shared words. Without it, Auto (#2873): never the runtime another agent used last, and never the default runtime that a session a person starts gets. So a file with no runtime: takes the shared words too, and a runtime's own value stops the workflow when its file is read: its page says why. The workflow page says which runtime a run will use and why, for example "Runs on Auto (the default)", and under each run on Auto, the runtime Auto picked and why it did not take the ones before it, for example "Auto picked Codex. Claude: not signed in". A name this version does not know stops the workflow running, and its page marks it. A runtime it knows but that can't take an agent when the workflow runs (not installed, not signed in, or out of the pool) stops that run the same way: nothing starts, and the page says why and names the runtimes that can. See Runtimes. |
model: |
fast, balanced or smart; or, on a named runtime, one of its own models |
The model the agent uses. Without it, the runtime's own default. |
effort: |
One of the runtime's levels, such as low or high |
How hard the agent thinks, on a named runtime. Without it, the runtime's own default, or the model's: low for fast, high for smart. On Auto, effort follows model:, so effort: does nothing there, and the workflow page says so. |
labels: |
A list of up to five names, each 1–24 characters | Each newly started workflow session gets these agent-owned labels. A standing or triggering run reusing an existing session keeps that session’s labels. |
options: |
Any other option the runtime offers, by its id, such as fast: true, or Claude's chrome: true (Use Chrome, #1837) |
Sets that option for the agent. |
enabled: |
true or false |
Its Enabled switch. false is turned off: none of its triggers run it, and Run now still does. Without it, or with true, it is on. The switch, Turn Off and Turn On write this line and nothing else: off adds enabled: false, on takes the line out. So the switch goes wherever the file goes, to another clone or another Mac or server, and shows in a commit. An agent cannot turn on a workflow whose file says false unless an agent turned it off, on this Mac or server, and the file has not changed since; only you can. Anything else stops the workflow running, and its page says what is wrong. |
archived: |
true or false |
Whether it is archived. Archive adds archived: true and Unarchive takes the line out, so it is archived wherever the file goes. See Off and archived. Anything else stops the workflow running, and its page says what is wrong. |
hours: |
working, not-working, or between:, days: and time-zone: |
When the workflow can start, for all its triggers. See Hours. A value that is not correct stops the workflow running, and its page says what is wrong. |
cooldown: |
A length of time in minutes, hours or days, such as 15m, 2h, 1h30m or 1d; at least a minute |
The least time from the start of one run to the start of the next. See Cooldown. A value that is not a length of time stops the workflow running, and its page says what is wrong. |
runs-on: |
A list of labels | Which machines run it (#1761; it replaced hosts:, which is no longer read). Without it, or with an empty list, every machine of yours that has the folder runs it and lists it, as before. With labels, only a machine that has every one of them runs it, on a schedule, on an event, or from Run now, except machine ids: a machine has one id, so with several ids each of those machines runs it (#2064). runs-on: [<Studio's id>, <box-1's id>] runs on Studio and on box-1; runs-on: [<box-1's id>, linux] runs on box-1 only while it is Linux. A machine's labels are its id (a Mac's hardware UUID, or on Linux the contents of /etc/machine-id), its os (macos or linux), its machine provider's id, and its user's or bot's name. The workflow's page offers the computers it knows by the names already on screen and writes the id, so renaming a computer does not unpin the workflow. Its Runs on section shows a label that is no computer (a bot's name, an os, a provider) as Also needs, and keeps it when the computers change. With a bot's name, such as runs-on: [review-bot], the bot's machines run it, once per trigger. A server's event (such as github's or a channel's) and a schedule go to the control plane, which sends each once, to one of the bot's machines that has the workflow (#2011). When none of the bot's machines is online, the control plane starts one of its stopped workspaces, from a provider of the bot's group with Start when used on, and sends the trigger when it joins (#2011). It starts one machine per bot at a time and makes none; at most 20 triggers wait for it, and it tries no other start for 15 minutes. A machine of a person in the bot's group sends the bot's schedules too, so a schedule reaches the control plane while the bot's machines are stopped. It can hear the bot's server events too (#2027): the workflow is listed there as heard for the bot and waits for that person's approval on that machine. Once it is approved, that machine's own servers hear its server triggers, and each match goes only to the control plane, never to a run on that machine. A server's event is one trigger by its server, event and id, so when several machines hear it, it still runs once. A machine event (machine.*, dropbox.*) runs on the machine that heard it. Any other event is claimed: the first of the bot's machines to claim it runs it. A value that is not a list stops the workflow running, and its page says what is wrong. |
continue-when-back: |
true or false |
A run's turn refused for a spent allowance waits for it, and carries on when it is back, as if you had chosen Continue. Without it, off: the run stops until somebody chooses. See Keep going when a runtime runs out. |
when-done: |
keep, archive-allowed or archive |
What a run may do with its session when it is done. Without it, keep: every run stays in the list. park, the word before #584, is read as keep. See When a run is done. Anything else stops the workflow running, and its page says what is wrong. |
priority: |
high, medium or low |
The priority of each session a run starts (#8047), on the same scale as a session's priority. It is set on the session as start_session sets one, so it wins over the priority the session would take from its issue, and the session goes in that order for a lease, the ci lease and a running place. set_session_priority on the session still overrides it. Without it, or none, the session follows its issue. Not for a triggering or labelled workflow, which starts no session of its own. Fix main is high. Set it on the workflow's page with the Priority menu. Anything else stops the workflow running, and its page says what is wrong. |
For example, to start a new agent whenever a pull request merges, or an agent in the folder finishes:
---
name: After the build
on:
- pr.merged
- agent.finished
agent: new
---
Deploy the docs, then say what you deployed.
To start a new agent for each file dropped into the folder's .agents/dropbox/ (see
Hand files to a workflow):
---
name: Review what lands in the drop box
on:
- file.added:
paths: [".agents/dropbox/review/*.pdf", ".agents/dropbox/review/*.md"]
agent: new
---
Read each dropped file and review it, then move it out of .agents/dropbox/, to reviewed/.
paths narrows the trigger to the files it takes, so a file dropped anywhere else does not
start it. A file the agent is done with leaves the drop box: moved to another folder inside
it, it arrives there, and a workflow that watches that folder runs.
A run started by an event, such as this one, is told the event at the end of its prompt,
details and all, so the agent reads the file's path there.
Only branch on branch.moved and why on person.away and person.back narrow an
event (see Names and filters). To narrow by more than one
value, give a list. This one runs when either of two agents' branches moves (branch.moved
is never raised for the default branch, #702):
---
name: Check the release branches
on:
- branch.moved:
branch: [agents/release-2.0, agents/release-2.1]
agent: new
---
Check that the branch named in the event builds, and say what broke if it doesn't.
To run a check once a batch of agents is done, rather than after each one, use
folder.idle. It runs once the last agent in the folder has stopped, and its own agent
finishing does not set it off again:
---
name: Check the batch
on:
- folder.idle
agent: new
---
Every agent here has stopped. For each agent in the event's ids, check that what it said it
did landed: its branch merged, its checks green. Remove worktrees whose branch is on main.
To run on a connector's event, name it as the server does, with its filters under it.
With GitHub and GitLab both set up and offering pull_request.opened, the first trigger
below hears either, and the event's server detail says which; the other two hear one
server each, with that server's own filter:
---
name: Review new pull requests
on:
- pull_request.opened
- pull_request.opened:
server: github
repo: alexec/Agents
- pull_request.opened:
server: gitlab
folder: alexec/agents
agent: new
permission-mode: plan
---
Review the pull request in the event's data, and list anything that looks wrong.
This folder's own github server names it pr.opened (#833): a pull request opened, or a
draft marked ready for review, by the repo's own people. The Review pull requests
workflow (.agents/workflows/review-pull-requests.md) starts a new agent on it that reads
the diff and leaves one comment, and never pushes, approves or merges. It comes with
enabled: false; turn it on with Turn On on the Mac, or its Enabled switch on the
iPhone, the iPad and the web page.
Under Triggers, the workflow's page shows a line for each server a trigger hears: when the server was last asked and when the last event came, or why not. See Start a workflow from an MCP event.
Every run is told why it started, in a note at the end of its prompt (#1562):
| What started it | The note |
|---|---|
An event, such as machine.disk_low |
The event's name, its sentence and every detail, so the agent can act on level: critical without looking it up |
| An MCP server's event | The same, then the server's data in a fence |
An event with an agent behind it (agent: triggering) |
The agent's title and what it did ("has just finished its work"), then the event's name, sentence and details |
| A schedule | because of its schedule: the 09:00 run. |
An alarm (once:) |
because of its one-time alarm, set for Fri 13 Nov 09:15 (Europe/London)., then how late it fired when it was late, and that the workflow is now archived |
| Run now | because the person ran it by hand, with Run now. |
manage_workflows run |
because the agent "<title>" (id <id>) ran it. |
A queued or held run is told the cause of the trigger that queued it. The workflow file
itself is not changed: there are no placeholders such as {{event.pr}} in its body.
Every agent event carries the agent's labels, runtime and started_by, so
agent.failed with runtime: [codex, grok] runs on a Codex or Grok agent's failure.
The values each detail takes are on Events.
A workflow never runs on an agent. event about its own agent: the agent doing its run,
the agent a new or standing workflow started, or a helper either of those started. So a
workflow on agent.finished runs once when another agent finishes, not again when its own
agent does. A triggering workflow's agent is only its own for the run: when you next
prompt that agent and it finishes, the workflow runs again. Waits still hear every event.
The hyphenated names from before events (agent-finished, agent-asked-permission,
agent-asked-form, agent-stopped and workflow-completed) and the pull-request
triggers (pull-request-checks-failed, pull-request-review-comments and
pull-request-conflicts) have been removed. A workflow that names one shows it on its
page and never runs on it; for a hyphenated name, the page says which event to use, such
as "Did you mean agent.finished?". manage_workflows will not write one, and
wait_for_event will not wait for one, and both name the event to use. On a workflow's page, its latest run
shows the event that caused it, with a link to it on the Events page.
A setting the runtime does not offer stops the workflow running, rather than falling back
to a default. A permission-mode: the runtime did not offer the last time it was used stops
the run, and the page names the modes it does offer. The workflow's page shows which values the runtime offers once it has been
used in this folder.
A workflow does not run, and its page says why, when:
- a run of it is still going;
- it is archived;
- it is turned off. Unlike archived, this is recorded on its row, as Did not run — it is turned off, counted on one line however many times it is skipped. Run now still runs it. A workflow that is off says why first, unless you turned it off on this Mac or server: Off: its file says enabled: false (checked in that way, or turned off on another clone), Off: written by an agent (see below), or Off: an agent turned it off. The Mac, the phone and the web page say the same. While one that started off is still waiting for your OK, its page says both, so approving it is not mistaken for turning it on;
- its file is new, or has changed since you approved it, and you have not approved it.
Its row and page say waiting for your OK and offer Approve. Approval is of the
file as you saw it: a file that changes afterwards waits again. It is of each skill the
file names as
.agents/skills/<name>/SKILL.mdtoo, shown under the file: a change to one waits again in the same way. A workflow that names a skill that is not there, is a link, or is outside.agents/skillsdoes not run. Changes made on the workflow's page in Dragon Rider count as approved unless the workflow was already waiting, and workflows that existed before this version were approved as they stood; - you denied it on this Mac or server. See Approve, Deny and Archive;
- it is approved and on, but the folder already has twenty (or the number you set) approved workflows turned on, taken in file-name order. Turning one off or archiving one in this folder makes room. See Limits;
- it was set off by a chain of workflows already three deep;
- the day's spending limit has been reached;
- the folder is not there;
- its
agent:istriggeringand the agent it would have resumed is gone, or nothing set it off; - its cooldown has not ended, or a run is still going and it has one. This trigger is held, not dropped, and runs once when the cooldown ends (see Cooldown);
- it is outside its
hours:. This trigger is held, not dropped, and runs once when its hours open (see Hours); - ten triggers are already queued behind a run that is going (see One run at a time);
- the file cannot be read, or names a trigger or
agent:value this version does not know. The page says what is wrong with the file.
On the Mac, each workflow on the folder page has Open, Run now (Approve and
Deny on This Host while it is waiting for your OK), Turn Off (Turn On once off), Archive
(Unarchive once archived) and Show in Finder. Its page has Run now and Turn
Off (Turn On once off) in its toolbar; on the iPhone, the iPad and the web page it has
an Enabled switch instead. It has a Triggers section listing each trigger on its own line: the
filters on it, whether it listens in this folder or on the whole Mac or server, which
agent a triggering run resumes, when a schedule is next due, and a trigger this
version does not know marked Unknown. Under them it says when the workflow last ran
and what set it off. A file that cannot be read still lists the triggers it could read.
Run only by hand¶
A workflow you only ever start yourself says on: manual, or has no on: at all.
Nothing else starts it: it runs when you press Run now, or when an agent runs it with
manage_workflows (only when it is turned on and approved). Pin it to the sidebar to keep
it one click away.
---
name: Release notes
on: manual
agent: new
permission-mode: plan
---
Draft release notes from the commits since the last tag.
Send to labelled sessions¶
A workflow with agent: labelled sends its words to sessions that are already there, and
starts none (#6954, epic #6951). Turn on Labelled workflows in Settings ▸ This app ▸
Early Features first: with it off, a run sends nothing, and the workflow's page says the
feature is off.
---
name: Allowance is out
on:
- cost.allowance_out
agent: labelled
to:
labels: [lane]
not-labels: [lead]
account: default
deliver: next-turn
---
A runtime's allowance ran out. Push nothing new until it is back.
deliver: next-turn(the default) queues nothing. At the start of each turn, a matching session gets the words of each active broadcast that it has not read, before its own prompt, once. An idle session is not started, and a session in a long turn hears it at its next turn. A session that starts later, while the broadcast is active, hears it at its first turn.deliver: steerputs the words into each matching session's running turn at once, when its runtime takes words in the middle of a turn. The rest hear it at their next turn.deliver: wakedoes the same, and also starts an idle session with the words.
steer and wake tell 20 sessions at once at most; the rest hear it at their next turn.
Neither ever starts a stopped session or one that waits for an answer: they hear it at
their next turn. The app sends the words itself, as From the app, with a line that
names the workflow and why it ran. Delivery asks for no approval.
A broadcast is active until it ends (When a broadcast ends). A
second run while it is active changes nothing, and the run says so, unless its event has a
worse level (low, then critical): then its words replace the old ones, and each session
that read the old words gets the new ones at its next turn. The workflow's cooldown and the chain limit apply
as to any run. Its workflow.ran event says who was told now (told, told_sessions),
how many hear it at their next turn (next_turn), and who was not told now and why
(not_told). The workflow's page lists its active broadcasts, with how many sessions
match now and how many were told. Before a run, the page shows how many sessions
a new broadcast would reach when the workflow has fixed recipients.
The broadcasts are in broadcasts.json in the app's folder, a bounded small file: 50
broadcasts at most (an ended one goes first to make room, else a new one is refused and
the run says why), 200 sessions told for each, 4,000 characters of words, and 32 KB for
each. An ended broadcast is deleted a day after it ends, and a session that is gone is
taken out of the sessions told.
On the wire, a labelled workflow has mode: new with to beside it, so a client that does
not know labelled still reads the list.
When a broadcast ends¶
---
name: Disk is low
on:
- machine.disk_low
until:
- machine.disk_ok
match: [volume]
for: 4h
agent: labelled
to:
labels: [lead]
end-message: Disk space is normal again. Carry on.
---
Disk space is low. Start nothing that builds until it is back.
A broadcast is active from its start to its end (#6955). It ends at the first of:
- an event of
until:with the samematch:details (a broadcast started by hand, with no details, ends at anyuntil:event); - the end of
for:, 24 hours without it. This ends the broadcast, not the alarm: the disk stays low, and no newmachine.disk_lowcomes until it was ok again; - selecting End Now beside that broadcast on the Mac workflow page;
- turning the workflow off, archiving it, or deleting it.
At the end, a session that did not read the broadcast gets no message. A session
that read it gets the end message once, at its next turn: a line that says the workflow
ended, then end-message:. The end raises workflow.completed with no agent, and
ended_by says why.
After a restart, the disk's state decides: a broadcast started by machine.disk_low, with
until:, whose volume is no longer low ended while the app was away. Other events rely on
for:.
With hold-starts: true, new sessions that agents start in this folder join the queue
until the broadcast ends and a place is free. The queue gives the workflow name as
the reason. Set hold-starts-except-high: true to let high-priority sessions start
while this hold is active. A person can still start a session. Sessions that are
already running can still use their tools.
One run at a time¶
A workflow runs once at a time. A trigger that comes while a run is going is queued, not refused, and runs when that run ends:
- Each queued trigger runs on its own, oldest first, one after another. Each run is told its own event, with that event's details (and a server's data, for a server's event), so two failed checks for two pull requests give two runs, one for each.
- Its event reads Queued for the workflow on the Events page until its turn, and Fired from then on. The workflow's row and page say how many are queued.
- At most ten wait. One more is refused, as Did not run — 10 triggers are already
queued for it, and that refusal is put on the log as
workflow.refusedwith reasonqueue_full. A queued trigger is not. - The queue survives the app restarting. Turning the workflow off or archiving it drops the queue, and each event it held says why.
- A trigger set off by a chain already three deep is refused, not queued.
- Run now is not queued: it says a run is still going while a run starts or uses the workflow's selected runtime. If you explicitly select a different runtime, Run now can start a run there while the earlier run is active.
- A workflow with a
cooldown:does not queue. It holds the latest trigger and runs once for it (see Cooldown): a cooldown is there to make a burst one run, and queueing each trigger would undo it.
When a run is done¶
Every run leaves a session behind. A workflow that runs often, such as a nightly check,
can put its runs away itself with when-done:. You set it, not the agent, as an agent
that starts a helper decides what becomes of it.
| Value | What happens |
|---|---|
keep |
The default, Keep each run. Every run stays in the list when it is done. A run may archive itself once you approve it. |
archive-allowed |
A run that finishes Complete or Nothing to do may archive itself, with archive_session and no id, when there is nothing for you to look at. It is told it may. Otherwise it stays. |
archive |
A run that finishes Complete or Nothing to do is archived, whatever the agent asks. |
- A run that ends Waiting on your answer, Partly done, Stuck or Waiting is never archived.
- Only the run's own turn counts. A run is not archived if you send it something before it finishes, or if it ends without saying how it went.
- An archived run says so in its conversation, and is still listed with the workflow's runs. Its worktree is cleaned up as when you archive a session.
- A
triggeringworkflow prompts somebody else's agent, sowhen-done:does nothing for it, and its page does not offer the menu. - Sessions you start go by your setting, not by
when-done:: with Agents may archive the chats I start on (the default), one whose turn ends Complete or Nothing to do afterarchive_sessionis archived, unless that turn showed you a file; off, it waits for you to approve it. See the settings reference.
The Triggers section of the workflow's page has a When done menu that writes this line. Keep each run takes it out.
Cooldown¶
A workflow on a busy trigger, such as agent.finished, can run many times a day. A
cooldown: limits how often:
---
name: Close landed issues
on:
- agent.finished
cooldown: 15m
---
- The cooldown counts from the start of the last run.
- A trigger that comes inside the cooldown, or while a run is still going, is held, not dropped. When the cooldown ends and no run is going, the workflow runs once, for the latest held trigger. A burst of triggers gives one run, and that run is told about the last of them.
- Each held trigger is recorded: on its event, on the Events page, and on the workflow's
row as Waiting — it is cooling down until 14:32, and runs once then, counted on one
line. A held trigger is not put on the log as
workflow.refused. - A schedule that comes due inside the cooldown is held the same way.
- Run now is not held. It runs at once, even inside the cooldown, and starts the cooldown again. It still waits for a run that is going.
- A trigger set off by a chain already three deep is refused, not held.
- Turning the workflow off or archiving it drops the held trigger. A held trigger survives the app restarting.
- Without
cooldown:, every trigger runs it, one run at a time, each queued behind the last (see One run at a time).
The Triggers section of the workflow's page says the cooldown, when it ends, and
whether a trigger is held for then. Its menu changes the cooldown by rewriting
cooldown: in the file. The folder page's row, the phone and the web page say "at most
once every 15 minutes" after the triggers.
Hours¶
hours: sets when a workflow can start, for all its triggers: for example, only in
working hours, or only outside them:
---
name: Night checks
on:
- agent.finished
hours:
between: "18:00-09:00"
days: [mon, tue, wed, thu, fri]
time-zone: Europe/London
---
- Between is a range of times, such as
"09:00-18:00", in hours or in hours and:00or:30. It can go past midnight. Without it, the hours are the full day. - Days is the days on which the hours start. Hours that go past midnight are part of
the day on which they start: with
days: [fri], Friday 18:00 to Saturday 09:00 is open. Without it, all days. - Time zone is an IANA name, such as
Europe/London. Without it, the hours use your time zone. Your Mac sets your time zone from its clock, and your servers use it too. Without your time zone, the hours use the time zone of the machine. - A trigger that comes outside the hours is held, not dropped, as a cooldown holds
one. When the hours open, the workflow runs once, for the latest held trigger. The
status card says Waits for its hours: opens Mon 09:00, and the row shows an
hourglass. A held trigger is not put on the log as
workflow.refused. - The status card always says the hours, such as Runs 09:00–18:00, Mon–Fri. When the file's time zone is not yours, the card names it: Runs 18:00–09:00, Mon–Fri (Europe/London), and the time when the hours open is in that zone.
- With
cooldown:andhours:, a held trigger runs when both let it. - A schedule runs only at a time that its own
between:anddays:and thehours:both let it. A schedule time outside the hours is not held. - Run now always runs, also outside the hours.
- On the workflow's page, on the Mac and the web page, Configuration has an Hours
menu under the cooldown. Some hours writes working hours (09:00-17:00, Monday to
Friday). Then set From and to (each half hour, or All day), the days, and
the Time zone (Your time zone leaves
time-zone:out). Each change writeshours:into the file. Any time removeshours:.
Working hours¶
A project's working hours are one setting, so when a team's hours change, you change one setting and not every workflow (#4821):
---
name: Night checks
on:
- agent.finished
hours: not-working
---
hours: workingis the project's working hours.hours: not-workingis all the time outside them: evenings, nights and the days that are not working days.- Set them in Project Settings ▸ General ▸ Working hours, on the Mac and the web page:
From, to, the Time zone and the days. They are kept in the project's
.agents/folder.jsonasworkingHours, so commit.agentsand every folder of the project gets them. Without the setting, working hours are 09:00-17:00, Monday to Friday. - The time zone is the setting's own when it has one. Without it, your time zone, then the machine's, as for the full form.
- The status card says Runs in working hours or Runs outside working hours, and the Hours menu on Configuration has Working hours and Outside working hours.
Limits¶
- There is no limit on workflows waiting for approval. Every workflow is listed and can be approved, denied or archived.
- At most twenty approved workflows turned on run in each folder. Twenty is the default; set another number, from 1 to 100, in Settings ▸ Cost ▸ The most workflows that may run in each folder on the Mac. Only you can: agents can't, through the app's tools. The setting is kept by this Mac and copied to each server, which applies it separately in each folder. Past it, a workflow is listed and says 20 workflows are already running in this folder. Turn one off or archive one in this folder to let it run, with the number in force. Turning one on when the limit is reached is refused with the same words, and it stays off. A change takes effect at once: raising it lets the ones past it run from their next trigger, and lowering it stops the last ones in file-name order from their next trigger; a run already going finishes.
Archived workflows and workflows denied on this Mac or server do not count. Turned-off ones take no place among the ones that run.
Approve, Deny and Archive¶
A workflow waiting for your OK offers three answers, on the Mac, the phone and the web page:
| Meaning | Where it is kept | |
|---|---|---|
| Approve | Yes, run here | This Mac or server, outside the folder |
| Deny on This Host | Don't run here | This Mac or server, beside the approval. Not in the workflow's file |
| Archive | Don't run anywhere | The workflow's file, as archived: true |
An approval goes with you, not with one machine (#5462)¶
Approve is of the file's content, not of one machine. When you approve a workflow (with the skills it names) on one of your machines, that machine signs a record of its content hash with its key on your machine lock and sends it to the control plane, which keeps it and signs nothing. Another machine of yours that has the same file takes the approval, once the lock it pinned says that one of your machines signed it, and runs the workflow with no new prompt. Its page then says where the approval came from, for example Approved by you on Studio, 2026-11-14.
- A new or changed file still waits. A file nobody approved, or one that changed since you approved it, has a hash no approval covers, so a push to the repo cannot change what runs without your OK, on any machine. A new machine never approves what the repo holds by itself.
- Deny on This Host stays on that machine. It means "not here": a file denied here is not approved by your approval elsewhere. Denying does not take back an approval you made on another machine; archive the file, or change it, to stop it everywhere.
- No control plane, no shared approval. A machine with no control plane or no machine lock asks, as before.
- A bot's machines (
runs-on:a bot's name) do not take your approvals. A workflow heard here for a bot waits for you on that machine, as above (#2027). - Connectors work the same way: an entry of
.agents/mcp.jsonthat you approved on another of your machines, with the same content, is approved here. See Add a connector by hand.
Deny is of the file as you saw it, the same way Approve is: a later change to the file waits for your OK again. Other Macs and servers are untouched: they still see it waiting, and any of them can approve it and run it. Nothing is written into the folder, so there is nothing to commit.
On the Mac or server that denied it:
- its triggers do not run it, and Run now does not either, until it is approved there;
- it stays in its place on the list, marked Denied on this host, not under Archived workflows;
- it no longer counts as waiting, so it frees a place among the three that may wait, and it does not count towards the approved workflows that may run;
- Approve is still there, and takes the denial back without bringing an archive back.
runs-on: in the file is not the same thing: it is a list written into the shared file,
and taking a computer off it is a change you commit.
Asked as a question¶
A workflow waiting for your OK is also asked as a question, the same one a change to
.agents/folder.json or .agents/pins.json made outside the app is (#569): over the
prompt of the agent whose turn was running when the file changed, and notified like
any question. When none was (a merge or pull, or something outside the app), Needs You
lists it; the new session page does not ask it (#3762). It says who changed the file, the lines removed and added against the copy
you last approved, and offers Keep and Undo:
- Keep is Approve, of the file as you were shown it.
- Undo writes the copy you last approved back into the file, or removes the file when you never approved one. The app keeps that copy beside its approval, outside the folder, from the moment it is approved. A workflow approved before copies were kept gets one the next time its file is seen as approved; until then Undo says it has nothing to put back, and Keep or Deny on This Host are the answers.
Off and archived¶
Both stop a workflow running, and both are kept in the workflow's own file, as
enabled: false and archived: true, so they go with the folder to every clone, Mac
and server. Turning a workflow off or archiving it changes a file in your folder,
which you may commit. Each writes its one line and nothing else, and doing the
opposite takes the line out again, leaving the file as it was. A workflow you had
approved stays approved: the app made the change you asked for, not a new workflow.
One still waiting for your OK still waits.
What stays on this Mac or server, and is not written into the folder, is the
workflow's history there: its runs and outcomes, a held trigger, the agent a
standing workflow keeps, what you have approved or denied, and who turned it off. That last is
why a workflow turned off on another clone says Off: its file says enabled: false
here.
They differ in what else they do:
| Turned off | Archived | |
|---|---|---|
| Where it is listed | In its place, marked Off | Under Archived workflows |
| Its triggers | Do not run it; each one skipped is counted on its row | Do not run it; nothing is recorded |
| Run now | Runs it, to try it | Refuses |
| The limits | Frees its place among the ones that run; turning it on again is refused when they are all taken | Frees its place |
| Turned back on by | Enabled, Turn On, the phone, or an agent if an agent turned it off (not one an agent wrote, or one whose file says enabled: false) |
Unarchive |
A new workflow an agent writes with manage_workflows starts turned off, whatever its
file says, so you turn it on knowingly once you have approved it: the app writes
enabled: false into it, and an agent cannot turn it on. An agent changing a workflow
that already exists through manage_workflows leaves its enabled: and archived:
lines as they were, whatever its new text says. A file you or an agent put in
.agents/workflows/ some other way, such as a merge or an edit, is on unless it says
enabled: false, and archived only if it says archived: true; a change to it waits
for your OK like any other.
Before this version, the switch and the archive were kept on the Mac or server rather than in the file. The first start of this version writes each one into its workflow's file once, so a folder's files may change then.
Off is for a workflow you still use but want quiet for a while: while a test is flaky, or while you are away. Archive is for one you are putting away.
Ready-made versions¶
The daemon removes unedited copies of the old Daily summary and Daily checks workflows and skills. It keeps edited copies and prevents the retired workflows from running. The daemon deletes the old Daily checks suggestions file 90 days after its last change. It also deletes saved Daily summary pages 90 days after their last change (#6714).
- A newer ready-made version replaces your copy only when you did not edit it. The daemon
keeps the digest of each copy it makes in
~/.agents/settings/ready-made-workflows.json. The copy keeps itsenabled:,archived:,muted:andcontinue-when-back:. The new version always asks for your approval again (#5091): it came from a repository, so a push there never changes what a workflow you approved does. - The ready-made workflows and skills are not in the app (#5091). They are in the public
repository agentloops-dev/dotagents, as
workflows/<id>.mdandskills/<id>/SKILL.md, the same layout as~/.agents: you can use them without Dragon Rider. Each release of Dragon Rider pins one tag of it, and that tag's commit. The daemon fetches the pinned tag, keeps the last copy in~/.agents/settings/ready-made-copy.json, and installs from that copy. With no network and no copy yet, it installs nothing, and tries again 10 minutes later. A first copy of the pinned commit is approved for you; a copy of any other commit waits for you. - The workflow's page and its row's help say "Updated to the new ready-made version on
" for 7 days after an update. A copy you edited is not updated: its page says "A newer ready-made version is available", with what the newer version changes (#4071). It says so only for a copy the daemon made after it started to keep digests.