Priority
Four priority levels with aging, so low-priority work is not starved and critical work is never overtaken within a working day.
| Priority | Base score |
|---|---|
CRITICAL | 1000 |
HIGH | 100 |
NORMAL (default) | 10 |
LOW | 1 |
Aging
A queued task's effective score is its base plus one point per minute waiting. With that rate:
- a
LOWtask waiting about 9 minutes overtakes a freshNORMALtask; - after about 1.5 hours it overtakes a fresh
HIGHtask; CRITICALis never overtaken by aging within a working day.
Ties go to the task that was queued first.
With Redis
With Redis the queue is BullMQ, whose priorities are fixed when a job is added, so aging applies as of enqueue time. Freed slots, the reconcile sweep and worker offers still go highest effective priority first. The in-memory queue re-evaluates aging on every dispatch.
Set it
--priority HIGH with agentctl task create, the priority field in the dashboard, or "priority": "HIGH" in the API.