Skip to content

Human gates

Human gates are blocking steps in a task graph. They let an operator inspect work, approve continuation, or reject and force a replan.

A gate is usually modeled as a step with isGate: true after the work that needs review. Use a free-form category such as Human approval, and set gatePrompt when the operator needs specific review instructions.

next_ready_steps surfaces gate steps when their dependencies are satisfied, including gates already waiting in awaiting_gate. A gate step is not agent work. Request only gate steps returned by next_ready_steps, then poll them for the decision.

Call:

request_gate({ "stepId": "WEB-7.4" })

This puts the gate into awaiting_gate so the operator can resolve it from the Meshive Inbox. The same gate also appears in the task detail pane’s gate tab.

Move the task to awaiting_decision while waiting:

set_task_state({
"taskId": "WEB-7",
"state": "awaiting_decision",
"note": "Waiting for human approval on WEB-7.4"
})

Call:

get_gate_status({ "stepId": "WEB-7.4" })

The response reports the gate step status and the human decision when one exists.

  • approved: continue to downstream steps.
  • rejected: stop the current path, mark the task failed if useful, and replan or ask the operator what should change.
  • awaiting_gate: keep waiting and do not continue dependent work.

Agents must not call start_step or complete_step on a gate step. Meshive rejects those calls because gates are resolved by humans.

Agents should attach useful artifacts before requesting a gate. The operator should have enough context to approve or reject without reading the agent’s private transcript.

Agents should not continue downstream work until Meshive reports the gate as approved. When an operator approves, Meshive marks the gate done and readies downstream steps. When an operator rejects, Meshive marks the gate failed and moves the task board state to failed.