Repository navigation
Waking a seat when something outside the rig changes, or at a time of day #1802
klueless-io
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
Thanks, @klueless-io, for laying this out the same way as #1647: what you're trying to do, what stops you, and the questions before any code. Your reading of |
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
Hi Mike. Following the same route as #1647: here is what I'm trying to do, what stops me, and three questions before anyone writes code.
What I'm trying to do. Have a seat wait for something outside OpenRig, most often "this GitHub PR merged / CI finished / got a new commit", and be woken only when it happens. Separately, wake a seat at a time of day (a 06:30 daily briefing).
What stops me. A seat can wait with
--wake-after, but then the agent wakes on every check. On one overnight wait for a PR, our lead seat woke every 10 minutes and re-read its whole context each time: about 22M cache-read tokens, nearly all of it to learn nothing had changed. The daemon's watchdog policies (watchdog-jobs-repository.ts) evaluate conditions cheaply, but all of them look inside OpenRig; none can run a command or fetch a URL. For a time of day,periodic-remindertakes an interval in seconds and ends when the seat that registered it is replaced, which for a seat that is fresh-started each morning is every day. The clock-time jobs that do exist (quiet hours, a mode's scheduled end) end something for a person once; they don't wake a seat each day.What we do instead today (all outside OpenRig, so the rig can't see or show them):
gh pr viewand exits on a real change, run as a background command by the seat (zero model tokens; the exit wakes the seat);gh apicheck of threads we're watching.They work, but each rig reinvents them, and the daemon,
rig psand any UI know nothing about them.What might fit. Two small things on the existing watchdog substrate, both declarable in
rig.yamlnext tocompaction_strategy:Questions.
rigruns on the operator's own machine? If yes, should it be limited (a script inside the rig's spec folder only, a timeout, no shell string), or would you rather have a fetch-only probe first?periodic-reminder?rig.yaml, or stay CLI/API-registered like today's watchdog jobs?Happy to build a first slice once the shape is agreed, as I did with #1692 (now merged).
Story
Picture a hotel. The guest upstairs (a seat) is waiting for a parcel: a PR merging, CI going green. The only tool the hotel gives it is an alarm clock (
--wake-after). The guest has no memory between naps, so every time the alarm rings it re-reads its whole diary before looking out the window. By morning that's 22M tokens to learn the van hasn't come.Downstairs, the concierge desk (the watchdog policies) is cheap and tireless, but never looks out the front door. It takes wake-up calls only as "in N seconds", booked in the name of a guest who checks out every night.
So we've hired our own doormen and stood them on the pavement: one watches GitHub, one rings the bell at 06:30, one checks at 08:00 that the work got done. They work, but management can't see them, and every new hotel hires its own. The ask: let the concierge look outside, and let the hotel own the wake-up book.
All reactions