-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
feat(cron): event triggers — polled condition-watcher scripts via code mode #101194
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.maintainerMaintainer-authored PRMaintainer-authored PR
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.maintainerMaintainer-authored PRMaintainer-authored PR
Type
Fields
Priority
None yet
Problem
Watching external state ("tell me when CI on my PR goes green", "ping me when a new P0 issue appears") currently requires heartbeat- or cron-waking the full agent so the model can poll — every check burns tokens, adds latency, and pollutes session context, even when nothing changed. Cron has exactly one event-shaped trigger (
on-exitprocess watcher); everything else is time-based.Proposal
Add polled condition-watcher triggers to cron: an optional
trigger: { script, once? }onevery/cronjobs. The gateway evaluates the JavaScript condition headlessly in the existing code-mode QuickJS sandbox on each due tick — with the owning agent's tool policy and persistedtrigger.statefor change detection — and runs the normal payload only when the script returnsfire: true. Quiet ticks cost no tokens and leave no run history.Poll-over-push keeps core wiring at zero per source: anything a tool can reach becomes a trigger source. Push sources (webhooks/hook bus) can later feed the same script contract. Gated by
cron.triggers.enabled(default off) since enabled installs run agent-authored scripts headlessly with the agent's full toolset.Design discussed and approved with @steipete (poll model, tool inheritance, config gate, long-term convergence of event sources onto this pipeline).