Priority
Use priority on sendToHuman() to mark how important a thread is. Priority is thread-scoped: it applies to every task that shares the same threadId, not to a single task in isolation.
Enum values
| Value | Typical use |
|---|---|
low | Background work, demos, or test tasks |
normal | Default when omitted or never set |
high | Needs attention soon |
urgent | Blocking or time-critical work |
import { taskPriorities } from "robotrock";
// ["low", "normal", "high", "urgent"]Thread semantics
- Set on create — pass
priorityas a top-level field (likethreadIdandassignTo), not insidecontext. - Overwrites — when a new task in the thread includes
priority, it replaces the thread's current priority. - Omit to keep — later tasks without
priorityleave the thread unchanged. - Default — threads with no stored priority behave as
normal.
Example: set priority on the first task
import { robotrock } from "@/lib/robotrock";
const first = await robotrock.sendToHuman({
type: "incident-review",
name: "Production outage — approve rollback",
priority: "urgent",
actions: [
{ id: "approve", title: "Approve rollback" },
{ id: "reject", title: "Reject" },
],
});
const threadId = first.task.threadId;Example: raise priority on a later task
await robotrock.sendToHuman({
type: "incident-review",
name: "Escalation — customer impact confirmed",
threadId,
priority: "urgent", // overwrites any previous thread priority
actions: [{ id: "ack", title: "Acknowledge" }],
});Example: add a task without changing priority
await robotrock.sendToHuman({
type: "incident-review",
name: "Post-mortem draft ready",
threadId,
// priority omitted — thread keeps its current priority
actions: [{ id: "approve", title: "Approve" }],
});Inbox behavior
- Sorting — open tasks and threads are ordered by priority (highest first), then by most recent activity.
- Badge — the inbox list and task detail show a badge for
low,high, andurgent.normalis hidden to reduce noise. - Examples — tasks submitted from the dashboard Submit to inbox flow always get
lowpriority for testing.
MCP
Pass priority on the send_to_human tool when using the MCP integration:
{
"type": "code-review",
"name": "Review security patch",
"priority": "high",
"actions": [{ "id": "approve", "title": "Approve" }]
}Related
- Send to human — top-level task fields
- Threads — grouping tasks with
threadId - Updates — thread status messages
- Task lifecycle — look up tasks by id