RobotRock

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

ValueTypical use
lowBackground work, demos, or test tasks
normalDefault when omitted or never set
highNeeds attention soon
urgentBlocking or time-critical work
import { taskPriorities } from "robotrock";
// ["low", "normal", "high", "urgent"]

Thread semantics

  • Set on create — pass priority as a top-level field (like threadId and assignTo), not inside context.
  • Overwrites — when a new task in the thread includes priority, it replaces the thread's current priority.
  • Omit to keep — later tasks without priority leave 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, and urgent. normal is hidden to reduce noise.
  • Examples — tasks submitted from the dashboard Submit to inbox flow always get low priority 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" }]
}

On this page