Scion Triggers: how the pieces fitState as of 2026-11-19 00:57 UTC

Actions and targets

Actions are the scheduler’s event handlers, made callable without a schedule. Each has three steps: Validate at authoring, Authorize at every fire (frozen ceiling + live permission + standing), and Fire. The permission is always the one the creator would need to do the same thing by hand.

Fire coreshared by triggersand schedulesrecorded authorityof the rule creator messagepermission: agent.messageS1 literal text · S2 templated, offline queue dispatch_agentpermission: agent.create (template scope)headless create (S1 PR 2) · from events in S2 execpermission: agent.attach, checked at firefrom exec schedules · trigger action in S2 P8 github.commentpermission: github_trigger.commentStage 3 G3 existing agentstandard event envelope via the hub’s one delivery path;optional wake / interrupt; external payload framed as data new agent from a project templatetask rendered from the event; labels trigger, trigger_event,trigger_source; env ids; ~/.scion/trigger-event.json process in a running agent’s containerfixed argv over Conduit (exec-start / exec-status), no LLM turn;event data only via SCION_TRIGGER_CONTEXT GitHub issue or PR threadhub posts as the App with a short-lived installation token(issues: write); idempotency marker per fire
Stage 1 lets a trigger carry only message; dispatch_agent and exec move into the core in Stage 1 PR 2 for schedules first, and become trigger actions in Stage 2 (P1 and P8). A conversation action and a delete_agent action are Stage 4 candidates.

message

Delivered through the hub’s canonical delivery path (authorize, phase and hold gates, persist, render envelope, broker or Conduit). The envelope gains webhook.received and a generic trigger.fired type, plus trigger id, event id, source, subject, attributes and a size-capped external_payload section that the agent is told is data, not instructions. Stage 2 adds templated text and an offline: skip | queue policy: a queued fire waits (TTL default 24 h) and is nudged when the agent starts running, re-checking full authority on every retry.

dispatch_agent

The trusted / untrusted templating rule

Trusted (hub-generated or author-written)Untrusted (sender-controlled)
event.id, event.source.*, event.received_at, trigger.*, project.*, result.* (after the fire)event.type, event.subject, event.occurred_at, event.attributes.*, event.payload.* (scalars)

Untrusted values may fill data slots only, each must be opted in by name (untrustedVars, which the CLI derives and records), no slot is ever silently truncated (a value over its bound refuses the fire), and a task that used untrusted values gets a hub-written “data, not instructions” trailer. Template, secrets, workspace, remotes and URLs only ever come from literal authoring-time values. The rule copies the lifecycle-hooks precedent.

exec in an agent

Exec schedules (ptone/scion#7818, design AGREED; Phases B, 1, A2, 2, 4 and the web UI merged upstream by 2026-11-17) run an argv in an agent’s container over Conduit, with no LLM turn. Triggers reuse that path rather than building a second one (decided by ptone 2026-11-17, Stage 2 addendum P8, ptone/scion#8241):

Sources differ: the plan (rev 9) says P8 needs all three experiments on (hub.triggers, hub.exec_schedules, hub.conduit), as does the exec-alignment assessment; the P8 scope note names none. The Stage 2 design text still lists exec as a non-goal; P8 was added afterwards by scope note.

github.comment

The hub posts a templated comment as the GitHub App, using the project’s installation token narrowed to issues: write. It is for acknowledgements (“on it, here is the agent”), guidance, and the optional unmatched-command reply. Every comment ends with a per-fire idempotency marker; a per-project bucket limits it to 1/s, burst 5. Agents still post their own results with gh and their repo-scoped token.

Why the hub posts, and what is not decided: the Stage 3 design states the purpose as acknowledgements and guidance; it does not cite token scoping. Separate research (2026-11-16) found GitHub cannot scope a token to one PR or issue: the finest grain is one repository × permission for an hour, so today an agent’s token can write to every PR in its repo. It compared four options (read-only agent token plus a hub-brokered write API; credential-less agent with hub-posted replies; an egress proxy; per-agent ceiling plus revocation) and chose none; that decision is with ptone.