Missions and probes
The commands that list, run and retry missions, turn probes on and off, answer their decisions, and create, edit or delete their files.
Not all work is a code task. A mission is a job made of steps that does not change code in a worktree, such as a nightly check or a weekly digest. A probe starts work for you: it fires a mission on a schedule, or it watches a source such as Shortcut and fires a mission or a task flow when something new matches its rule.
This page covers the mission and probe commands, the way decide answers their questions, and the doc command that creates, edits and deletes their files. Every command here needs --workspace. Actions that only read run locally; actions that start or change something go through the daemon. The keys of the files themselves are in YAML keys.
The examples use these two files:
version: 2label: Nightly checkconfirm: falsesteps: - id: count type: command run: echo 3 notes changed timeout_seconds: 30label: Weeknightsenabled: falseschedule: days: [mon, tue, wed, thu, fri] at: "22:00"fires: mission: nightly-checkmission
Section titled “mission”mission lists your missions, shows one in detail, starts a run and retries a run that blocked.
| Action | Runs | What it is for |
|---|---|---|
mission list |
local | Every mission, with its last run and stats. |
mission show <name> |
local | One mission and all its runs, step by step. |
mission run <name> |
daemon | Start a run now. |
mission retry <name> <run> |
daemon | Retry a blocked run. |
Mission names follow ^[a-z][a-z0-9-]*$, else Invalid mission name "Bad". Run ids look like r-0001, else Invalid run id "r-1": expected the format r-0001. Any other action fails with Unknown mission action "foo": use list, show, run or retry.
mission list
Section titled “mission list”mission list prints every mission in the workspace with how it has been doing.
astranize mission list --workspace notes{"type":"missions","missions":[{"name":"nightly-check","label":"Nightly check","confirm":false,"steps":[{"id":"count","type":"command"}],"successRate":null,"runsThisMonth":0,"probes":["weeknights"]}]}The mission has never run, so successRate is null. The weeknights probe fires it.
| Field | Meaning |
|---|---|
steps |
Step ids and types as written in the file, so command stays command. |
lastRun |
The latest run, when there is one. |
successRate |
The share of finished runs (done, not_done, failed, blocked) that ended done, or null when there are none. |
runsThisMonth |
Runs started this calendar month. |
probes |
Probes whose fires.mission is this mission. |
invalid |
Why the file did not load, when it does not. steps is then empty. |
repeat, description |
Present when the file has them. |
mission show
Section titled “mission show”mission show prints one mission and every run it has had.
astranize mission show nightly-check --workspace notes{"type":"mission","mission":{"name":"nightly-check","label":"Nightly check","confirm":false,"steps":[{"id":"count","type":"command"}],"lastRun":{"id":"r-0001","mission":"nightly-check","status":"done","trigger":{"by":"manual"},"startedAt":"2026-11-20T02:34:34.599Z","finishedAt":"2026-11-20T02:34:34.984Z","costUsd":0,"rounds":1},"successRate":1,"runsThisMonth":1,"probes":["weeknights"]},"runs":[{"id":"r-0001","mission":"nightly-check","status":"done","trigger":{"by":"manual"},"startedAt":"2026-11-20T02:34:34.599Z","finishedAt":"2026-11-20T02:34:34.984Z","costUsd":0,"rounds":1,…}]}Each run has an id, a status, a trigger (by: manual, or the probe and item that fired it), startedAt, finishedAt, costUsd and rounds, which counts rounds for missions with repeat. mission show also gives each run what the app’s run screen shows:
| Field | Meaning |
|---|---|
steps |
One entry per step: step, status (pending, running, done, skipped, failed, waiting or unknown), startedAt, finishedAt, skipReason, costUsd, tokens and cacheTokens. |
outputs |
The files the steps wrote under the run’s folder, with path and bytes. |
activeMs |
Active time so far. |
currentStep, turnStartedAt |
The step working now, and when its turn started. |
blockedReason |
Why a blocked run stopped. |
mission run
Section titled “mission run”mission run starts a run now, as if you pressed its button. The daemon queues it like any other job.
astranize mission run nightly-check --workspace notes{"type":"mission_run_queued","run":{"id":"r-0001","mission":"nightly-check","status":"running","trigger":{"by":"manual"},"startedAt":"2026-11-20T02:34:34.599Z","costUsd":0,"rounds":1}}A mission runs one run at a time. When a run is already in progress, your request waits in the mission’s inbox until it ends, and you get {"type":"mission_trigger_queued","mission":"nightly-check"}.
--follow does nothing here, because there is no task id to follow. To watch the run, use events; its lines carry "mission":"nightly-check".
mission retry
Section titled “mission retry”mission retry runs a blocked run again.
astranize mission retry nightly-check r-0002 --workspace notes{"type":"mission_retry_queued","mission":"nightly-check","runId":"r-0002","held":false}held: true means the retry is saved but waits for the mission’s current run to finish. A run that is not blocked fails with Mission run nightly-check/r-0001 is done: only a blocked run can be retried.
probe lists your probes, turns them on and off, and helps you write and test the rule of a probe that watches a source.
| Action | Runs | What it is for |
|---|---|---|
probe list |
local | Every probe and its state. |
probe show <name> |
local | One probe with its open decisions, held fires, failing deliveries and baseline. |
probe enable <name> [--baseline fire|ignore] |
daemon | Turn the probe on. |
probe disable <name> |
daemon | Turn it off. |
probe poll <name> |
daemon | Check a watching probe’s source now. |
probe preview <name> |
local | Show what the source returns through the rule, without firing. |
probe translate --source <provider>.<source> --text <rule> |
local | Turn a rule written in words into filters. |
probe rule <name> |
local | Turn the probe’s rule.text into filters and write them into its file. |
Any other action fails with Unknown probe action "foo": use list, show, preview, poll, enable, disable, translate or rule.
probe list and show
Section titled “probe list and show”probe list prints every probe with its state. probe show prints one probe with everything waiting on it.
astranize probe list --workspace notesastranize probe show weeknights --workspace notes{"type":"probes","probes":[{"name":"weeknights","label":"Weeknights","enabled":false,"kind":"schedule","schedule":{"days":["mon","tue","wed","thu","fri"],"at":["22:00"]},"fires":{"mission":"nightly-check"},"nextFireAt":null,"held":0,"failing":0,"pendingBaseline":null,"openDecisions":0,"usesAi":false,"aiCallsThisMonth":0}]}{"type":"probe_detail","probe":{"name":"weeknights",…},"decisions":[],"held":[],"failing":[],"baseline":[]}The probe is off, so nextFireAt is null.
| Field | Meaning |
|---|---|
kind |
schedule, which fires on days and times or every N minutes, or observe, which watches a source. |
nextFireAt |
The next scheduled fire, or null while the probe is off. |
held, failing |
Fires held back by max_per_hour, and deliveries that keep failing. |
pendingBaseline |
Items found on the first check that wait for your choice: fire them or ignore them. |
usesAi, aiCallsThisMonth |
Whether the rule has a residual, the part an agent checks, and how many AI calls the probe made this month. |
probe show adds the open decisions, the held items, the failing items with their attempts and lastError, and the baseline items. When the probe’s record of seen items is broken, it also adds a notice.
probe enable and disable
Section titled “probe enable and disable”probe enable turns a probe on, and probe disable turns it off. Both print the probe’s new state.
astranize probe enable every-thursday --workspace notes{"type":"probe","probe":{"name":"every-thursday","label":"Every Thursday","enabled":true,"kind":"schedule","schedule":{"days":["thu"],"at":["09:00"]},"fires":{"mission":"weekly-digest"},"nextFireAt":"2026-11-26T12:00:00.000Z","held":0,"failing":0,"pendingBaseline":null,"openDecisions":0,"usesAi":false,"aiCallsThisMonth":0}}The probe is on and fires next on Thursday at 09:00 local time. probe disable prints the same line with "enabled":false and "nextFireAt":null.
The first time a watching probe looks at its source, the source already has items in it. You decide whether those count as new. Pass --baseline to decide up front; without it, the probe asks you with a probe_baseline decision.
| Flag | Type | Default | Effect |
|---|---|---|---|
--baseline |
fire or ignore |
ask | For a watching probe: fire the items already in the source, or ignore them. |
--baseline with disable fails with probe disable não aceita --baseline, and any other value with probe enable aceita --baseline=fire ou --baseline=ignore.
probe poll, preview, translate and rule
Section titled “probe poll, preview, translate and rule”These four actions are for probes that watch a source. The only source today is shortcut.stories, read with an integration token from the Vault: the one named Shortcut, or the one set with token: vault:<name> under watch.
astranize probe poll ready-stories --workspace notesastranize probe preview ready-stories --workspace notesastranize probe translate --workspace notes --source shortcut.stories --text "stories in Ready for dev with the label notes"astranize probe rule ready-stories --workspace notesYou write a probe’s rule in plain words, such as “stories in Ready for dev with the label notes”. translate and rule ask claude, with the haiku model, to turn those words into exact filters. Anything the filters cannot express stays in residual, and an agent checks it for each item.
| Action | What it does and prints |
|---|---|
poll |
Checks the source now, through the daemon, then prints {"type":"probe",…}. |
preview |
Prints what the rule would match, without firing or saving anything: {"type":"probe_preview","name":"…","count":N,"items":[{"id","title","url"}]}, with at most 20 items. |
translate |
Prints the filters for a rule you pass in, without writing anything: {"type":"probe_rule","rule":{"text","filters","residual","status":"fresh"},"dropped":[…],"compiled":{…},"changes":null}. |
rule |
Writes the filters into the probe’s file and prints {"type":"probe_rule","name","rule","dropped","changes","disabled"}. It counts as one AI call. |
translate takes these flags:
| Flag | Required | Effect |
|---|---|---|
--source |
yes | <provider>.<source>, today shortcut.stories. Without it: probe translate needs --source=<provider>.<source>, like shortcut.stories. |
--text |
yes | The rule. Without it: probe translate needs --text=<rule>. |
--token |
no | vault:<name>, the Vault token to read the source with. Anything else fails with probe translate: o token só vem do Vault: use --token=vault:<nome>. |
--name |
no | The name of the probe you are about to create. When no probe has that name yet, the call is counted on it, so its AI calls show up once it exists. |
On a schedule probe, poll and preview fail with A Sonda "weeknights" não observa uma fonte.
Create, edit and delete with doc
Section titled “Create, edit and delete with doc”There is no mission create or probe create. You can write the YAML file yourself, or use doc, the command the app uses to create, save and delete mission and probe files. doc checks the file before writing it, refuses a save when the file changed on disk since you read it, and keeps every version in the history.
| Action | What it is for |
|---|---|
doc list mission |
The missions in the workspace, with valid, error and the hash of each file. --deleted lists the deleted ones you can restore. |
doc get mission <name> |
The file’s text, hash and validation. |
doc create mission <name> --patch <json> |
A new mission from the blank template plus your changes. |
doc save mission <name> --expect-hash <hash> --patch <json> |
Change a mission. --expect-hash is the hash you last read. |
doc delete mission <name> |
Delete it. A copy stays in the history. |
doc history mission <name> |
Its saved versions. |
doc restore mission <name> <version> --expect-hash <hash> |
Bring a version back. For a deleted file, the hash is absent. |
The same actions work with probe instead of mission. Messages from doc are in Brazilian Portuguese today.
For example, to create a mission and then turn its confirmation off:
astranize doc create mission weekly-digest --workspace notes --patch '[{"op":"set","path":["label"],"value":"Weekly digest"},{"op":"set","path":["steps"],"value":[{"id":"count","type":"command","run":"echo 5 notes changed"}]}]'astranize doc save mission weekly-digest --workspace notes --expect-hash sha256:d928… --patch '[{"op":"set","path":["confirm"],"value":false}]'{"type":"document_saved","kind":"mission","name":"weekly-digest","hash":"sha256:d92890d19463168862c07b1a0095956aa9052d634ca781638ca7eccf34b4d595","validation":{"ok":true,"errors":[],"warnings":[]}}{"type":"document_saved","kind":"mission","name":"weekly-digest","hash":"sha256:f2b2a20a05d52f416a0bcbefc525ccca5a409d9cebc8bdf49e297753e6eb146b","validation":{"ok":true,"errors":[],"warnings":[]}}The blank template starts with version: 2 and confirm: true. A patch is a list of set, remove and insert operations on YAML paths.
To delete a mission, list what can be restored, and restore it:
astranize doc delete mission weekly-digest --workspace notesastranize doc list mission --deleted --workspace notesastranize doc restore mission weekly-digest 2026-11-22T04-39-28.201Z --expect-hash absent --workspace notes{"type":"document_deleted","kind":"mission","name":"weekly-digest","version":{"version":"2026-11-22T04-39-28.201Z","at":"2026-11-22T04:39:28.201Z","bytes":116}}{"type":"deleted_documents","kind":"mission","documents":[{"kind":"mission","name":"weekly-digest","version":"2026-11-22T04-39-28.201Z","at":"2026-11-22T04:39:28.201Z"}]}{"type":"document_saved","kind":"mission","name":"weekly-digest","hash":"sha256:f2b2a20a05d52f416a0bcbefc525ccca5a409d9cebc8bdf49e297753e6eb146b","validation":{"ok":true,"errors":[],"warnings":[]}}Deleting a mission moves its runs and records to the trash too, and deleting a probe moves what it has seen and its fires. A new mission or probe with the same name starts clean.
A refused doc command exits with 1 and prints an error with a code:
code |
Example | Cause |
|---|---|---|
in-use |
"nightly-check" está em uso: Weeknights, with users |
The mission has an active run, a probe that fires it, or an open confirmation. A probe has open decisions or fires still to go out. |
changed-on-disk |
o arquivo mudou no disco; recarregue antes de salvar |
--expect-hash is not the file’s current hash. |
invalid |
o documento não é válido, with validation |
The result does not load. |
exists |
já existe "weekly-digest" |
create with a name already taken. |
{"type":"error","message":"in-use: \"nightly-check\" está em uso: Weeknights","code":"in-use","users":[{"kind":"probe","id":"weeknights","label":"Weeknights"}]}decide –mission
Section titled “decide –mission”Missions ask you things too: whether to start a run, whether to try more rounds, what to do with a blocked run. You answer with decide plus --mission, and the answer goes through the daemon.
astranize decide D-1 --workspace notes --mission nightly-check --option runastranize decide r-0002 D-3 --workspace notes --mission nightly-check --option endThe first form answers a decision about the mission itself. The second answers a decision inside one of its runs, so it takes the run id first.
| Form | Decision | Options |
|---|---|---|
decide <D-n> --mission <name> |
mission_confirm: a mission with confirm: true asks before a probe run. |
run or skip. When several items are waiting at once, also pick, with --text listing the item ids to run, one per line. |
decide <r-nnnn> <D-n> --mission <name> |
A decision inside a run. | mission_rounds: more:<n> or end. blocked: only retry. Agent, action and wait decisions: their own options. |
decide –probe
Section titled “decide –probe”Probes ask two kinds of question: what to do with the items already in a source (probe_baseline), and what to do with fires held back by the hourly limit (probe_held). You answer with decide plus --probe.
astranize decide D-2 --workspace notes --probe ready-stories --option fire{"type":"probe_decision","probe":"ready-stories","decision":"D-2","outcome":"fired"}| Decision | Options |
|---|---|
probe_baseline |
ignore, fire |
probe_held |
wait, fire_now, discard |
outcome is fired, ignored, waiting, discarded or failed. On failed, a message says that nothing was fired, and the decision stays open.
| Error | Cause |
|---|---|
A probe decision is answered with --option <id> only |
--text on a probe decision. |
decide --probe=<name> takes only <D-n> |
More than one id: a probe decision takes only its decision id. |
decide takes --probe or --mission, not both |
Both flags. |
A Sonda "weeknights" não observa uma fonte e não tem decisões |
A schedule probe has no decisions of its own. |
