← Back to PRs

#22627: control-ui: agent runner queue view

by vctorabrdge open 2026-02-21 12:23 View on GitHub →
app: web-ui gateway size: M
Adds an Agent runner section to the Agents overview for cron-backed per-agent task queueing. - Queue tasks via one-shot isolated cron jobs using naming convention `queue:<agentId>:`. - Show per-agent recent sessions and link to open that session in Chat. - Show per-agent queued jobs (filtered by name prefix) with actions: Run / Disable / Remove / View runs. Notes: - Queued jobs are NOT auto-deleted after run (per requested behavior). - Delivery is set to `none` by default for queued jobs. <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds an Agent runner section to the Agents overview that enables per-agent task queueing using cron-backed isolated jobs. Tasks are queued by creating one-shot cron jobs with a naming convention (`queue:<agentId>: <task>`), scheduled 3 seconds in the future. The implementation displays recent sessions per agent with links to open them in Chat, shows queued jobs with management actions (Run/Disable/Remove/View runs), and integrates cleanly with the existing cron infrastructure. **Key changes:** - New `app-agents-queue.ts` module handles task queueing logic via cron RPC - New `agents-runner.ts` view component renders the per-agent queue UI - Integration into Agents overview tab with proper state management - Reuses existing cron controllers (`runCronJob`, `toggleCronJob`, `removeCronJob`, `loadCronRuns`) **Minor issues:** - The `QUEUE_PREFIX` constant is duplicated across `app-agents-queue.ts` and `agents-runner.ts` (consider extracting to a shared constant) - The `makeQueueJobName` function in `app-agents-queue.ts:8` doesn't normalize the `agentId` parameter, though agent IDs should already be normalized by callers <h3>Confidence Score: 4/5</h3> - This PR is safe to merge with only minor style improvements recommended - The implementation is solid, follows existing patterns, and integrates cleanly with the codebase. The two issues identified are minor style concerns (DRY violation and defensive normalization) rather than bugs. The core functionality correctly reuses existing cron infrastructure, handles errors appropriately, and implements the stated feature requirements. No breaking changes or security concerns. - No files require special attention - the style improvements are optional refinements <sub>Last reviewed commit: 98f301a</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs