ai-devkit icon indicating copy to clipboard operation
ai-devkit copied to clipboard

feat(agent): event-driven agent wait and blocked notifications in Rex

Open codeaholicguy opened this issue 2 weeks ago • 0 comments

Summary

Make ai-devkit agent wait and agent orchestration event-driven in Rex, and forward blocked / done agent states to the existing Telegram/Slack bridges.

Context

  • agent wait (packages/cli/src/commands/agent/wait.command.ts) and the agent-orchestration skill poll for progress.
  • Rex emits terminal.program_status_changed events (rex events --json, Lua rex.on) and supports rex wait.
  • packages/channel-connector already forwards agent interactions to Telegram/Slack. Rex plans mobile push but doesn't have it yet.

Proposed approach

  • With the Rex runtime, wait subscribes to program_status_changed for the agent's block instead of polling (polling stays as the fallback).
  • Optional: the channel connector pushes "agent X is blocked: " from Rex events.

Acceptance criteria

  • [ ] agent wait on a Rex-hosted agent returns on done/blocked/idle without polling
  • [ ] Blocked notifications reach the configured channel (opt-in)
  • [ ] Tests in package tests/ folders

Depends on: #459, #461.

codeaholicguy avatar Nov 18 '26 09:11 codeaholicguy