Public: anyone can read this; the crew can change it.

Watches: let Talk's agent put itself in a loop, woken by a free computed chec… #16557

shipped production is serving it opened this has it

Landed in pull #16562 · run

opened this

Owner's ask: the agent stays in the loop on work it started ("don't stop until it ships") without the owner returning to say continue. Today it cannot: a turn ends when it answers, and the agent's own token is refused by say so it cannot wake itself (docs/features/talk.md). The forge's app schedules (app_deploy schedules, cron to an app path) call an app, not an agent turn.

Owner's direction, later: the agent should set up its own routines, as Claude Code, Grok and Muse do, and there must be a UI so the person can see them. Their own docs are prior art to read before building (the owner named them; this issue has not read them, and the agent could only fetch pages the owner links). Ask the owner for the links, or read the three products' routine and scheduled-task docs first and note what each does for: who creates one, how it is stopped, what it may do unattended, and how a person sees it.

Prior art in this repository: Routines (core/talk_routines.ts, crew/routines.ts, crew/routine_report.ts, docs/features/talk-captain.md). They already run on an editable schedule (every 15 to 1440 minutes or daily), post at most three computed lines into the Captain thread, cost no spend because no model writes them, run once on waking if owed, and reach the phone only when the report needs the owner. core/talk_memory.ts carries standing rules into every turn, and a thread resumes its session and renews it at 85% context.

Add a fourth routine kind, a watch, in that same machinery:

  1. A watch is a short brief the agent leaves itself plus what it waits for, as data the forge can evaluate without a model: a pull is green, landed or changed; a run ended; an issue gained a comment; a check on main turned green. "Done" is stated up front ("pull 16532 landed").
  2. Each tick evaluates that condition for free. Nothing changed: nothing happens and nothing is spent. Changed: it starts one ordinary Talk turn as the owner through talk() with the brief, the change and the thread's memory, so the same limits apply (12 a minute, the account's budget, resting). When the condition is met the watch ends itself and says so in one line.
  3. The agent can create one itself, through a tool (routine, create, list, pause, end), within limits the forge enforces and not the agent's word: a watch never widens powers (its turn has the owner's role at most and every write still goes through the same held-for-yes rules); a cap on live watches (say 5), a per-watch spend cap and a maximum age (say 7 days) after which it ends and says it ran out; one watch cannot create another; an agent's own watch is shown to the owner at once and the owner can end it in one tap. Whether creation needs a Do it first or only a visible notice is the owner's call; default to a Do it until a week of watches has run clean.
  4. UI, the owner sees all routines in one place: a Routines list on /settings/captain and on the home page's doors (and the terminal's Captain screen), showing for each routine its kind (check-in, friends watch, morning paper, watch), who made it (owner or agent), what it waits for, its schedule, when it last looked and what it found, what it has spent, when it ends, and Pause, Run now and End. A watch the agent made is marked so. Phone width works, controls are 44px, and an empty list says what a watch is and how one starts.
  5. Tests: no change means zero model turns; a change wakes exactly one; a met condition ends the watch; a forge that was down wakes once, not once per missed tick; the cap, age and spend limits end it; a watch cannot widen a role or skip a held write; a stranger or another person's token cannot create or see one; the list page, the API, the tool and the terminal show the same rows.

First watches to prove it on: Talk on a phone, pull #16532 (green and landed), and the lane check (a pull merged since the last merge). Report in the pull what a watch cost for a day when nothing changed (expected: nothing).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs