Done

Team runs: notify a callback agent when a run reaches End, blocks or waits for the user

From Holm RichterDone 1 week ago

An orchestrating agent (our project coordinator) starts team runs with backlog_start_next, then has to finalize each run (team_finalize_run), commit, and start the next ticket. Nothing tells it that a run has reached awaiting-finalization; the teams contract says so itself ("nothing announces this state"). Today we bridge the gap with a scheduled watchdog trigger every 15 minutes: it spawns an agent that reads backlog_get and mails the coordinator.

Request: a "callback agent" per team (or per run/ticket, defaulting to the agent that started the run). When the run enters awaiting-finalization (including a no-route stall), blocked, awaiting-user, done or cancelled, AgentsRoom sends an Agent Mail to that agent with the runId, ticket id, team, new status, stalled reason and the last handoff flags. The existing "wake an idle agent on mail" path would then wake it. Settable over MCP (e.g. teams_save({ callbackAgentId })).

Why not the existing options: the On ship trigger fires only after finalization; autoFinalizeIdleMinutes skips the coordinator's verification and its commit; a 5-minute polling trigger triples the model runs.

AgentsRoom diagnostics

  • App version: 1.201.0
  • OS: win32 10.0.26200 (x64)
  • Agent CLI: claude
  • App language: system

Problem to solve

An orchestrating agent that starts team runs is not told when a run reaches End, blocks or waits for the user. It needs a polling watchdog trigger to find out, which adds delay and model runs.

Proposed behavior

A callback agent per team (or per run/ticket, default: the agent that started the run). On awaiting-finalization (incl. no-route stall), blocked, awaiting-user, done and cancelled, send it an Agent Mail with runId, ticket id, team, status, stalled reason and last handoff flags; wake it if idle. Configurable over MCP (teams_save callbackAgentId).

Who benefits

Users who let a coordinator agent run the backlog unattended through team runs (start, finalize, commit, start next).

Acceptance criteria

The coordinator reacts within seconds of a run state change, without a polling trigger.

Replies

The team1 week ago

Thanks for the detailed request, it is implemented.

A team run now reports to the agent that drives it. When an agent starts a run with backlog_start_next, that agent receives an Agent Mail each time the run reaches its End (including a run that stopped short of it because no route matched), gets blocked, waits for the user, is done or is cancelled. The mail carries the run id, the ticket, the team, the new status, the stall reason, the last handoff flags and the next step to take. It lands in the agent's console as soon as it is idle, and the "A message may start the recipient" setting also wakes a closed one. No mail is sent when the agent finalized or cancelled the run itself.

To send these mails to another agent, or to nobody, open the team's settings and pick a "Callback agent", or use teams_save with callbackAgentId (an agent id, "none", or null for the default). Your watchdog trigger should no longer be needed.

If the feature is not quite what you had in mind, tell us and we will adjust it.

The team1 week ago

Thanks: your idea is implemented and ships in the next release. We built it the way we pictured it, so if the result is not what you had in mind, tell us and we will adjust it.

Up to 3 images, or paste one straight from your clipboard. Big screenshots are shrunk in your browser before they are sent.