Repository navigation
Subscriptions: agents that wake on an event and run until done #5669
YauhenBichel
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The idea
Cursor shipped Subscriptions: an agent subscribes to an event source and
wakes when something happens, rather than being invoked. Their examples — monitor
PRs, Slack threads, or scheduled tasks; cloud agents auto-subscribe to PRs they
create and drive them to completion, fixing CI and addressing bot comments.
Two ideas are bundled there, and they are worth separating because OpenSRE's
position on each is different:
until one turn ends.
Source: https://x.com/cursorreleases/status/2090127692897415313
OpenSRE already does both — three times, welded shut
This is the interesting part. OpenSRE has wake-on-event machinery in three
places, and each one is hard-wired to a single source and a single action:
POST /alerts→AlertInbox→ listenertailer→classifier→correlator→investigation.pytools/system/watch_dog/And the drive-to-completion half already exists as a first-class concept:
SessionGoal (
core/agent_harness/session_goal/) runs turns until the goal isreached or the turn budget is spent.
run_goal,chat_until_goal, a turnbudget, a stop condition — that is exactly "keep going until feedback is in."
So OpenSRE is not missing the capability. It is missing the primitive: a way
to say subscribe to this source, with this condition, and run this goal when it
fires — without writing a fourth bespoke integration.
The example that makes it concrete
TaskKind.GITHUB_PR_SWEEPalready exists(
infrastructure/scheduling/scheduler/tasks.py). It builds a PR digest throughthe headless agent path — on a schedule.
That is the same job Cursor describes, done by polling. A subscription version
would wake on the PR event instead of sweeping on a cron: no delay when something
happens, no wasted run when nothing did. Same agent, same goal, different trigger.
If we want one worked example to design against, this is it — it already exists,
so the comparison is concrete rather than hypothetical.
What a subscription primitive would need
Sketching only, to give the discussion something to argue with:
push; some have to be polled and turned into events. That asymmetry has to be
in the design from the start.
one, a subscription is just a firehose.
condition. SessionGoal is the existing shape.
drives to completion can spend unboundedly if the source is noisy.
subscribed.
/watch,/watches,/unwatchalready model this vocabulary forprocesses.
The part worth arguing about
An agent that wakes by itself and drives to completion is a different risk class
than one you invoke.
Today a human is in the loop at the start of every OpenSRE action. A subscription
removes that, by design — the whole point is that it acts while you are not
watching. Three questions follow:
thing. Fixing CI, pushing commits, or closing incidents is another. Cursor's
example explicitly includes fixing CI.
classic failure. If the agent comments on a PR and the subscription watches PR
comments, it wakes itself forever.
events is a hundred agent runs unless something caps it. The watchdog's cooldown
is the existing precedent.
Questions this discussion is for
until done are separable. If only one is worth building first, which?
patterns, a Slack thread, deploys? Concrete answers beat a general mechanism.
watchdog each solved this once. Is a shared primitive worth the refactor, or is
a fourth purpose-built path cheaper?
the other. Does the primitive hide that difference or expose it?
subscription rather than global?
watching, the output has to land somewhere legible. This overlaps with the
cross-device session discussion.
What would help most
If you have wanted OpenSRE to notice something and act on it without being asked
— what was the event, and what should it have done? A concrete pair beats a
general mechanism, and one worked example is enough to design the primitive
against.
All reactions