Human-in-the-Loop

Preview

Approvals, clarifications and interventions during autonomous execution.

Autonomy is a spectrum, configured per task. Pimsy supports approval gates on specific effects, clarification requests when an objective is genuinely ambiguous, and live intervention on a running task.

Interaction types#

approvalblocking
The runtime pauses before a declared effect and waits for an explicit decision. Timeouts suspend the run rather than proceeding.
clarificationblocking
Raised during comprehension when interpretation ambiguity exceeds threshold and no cheap probe resolves it.
checkpoint reviewoptional
The run publishes an intermediate result for review and continues unless the reviewer intervenes.
interventionasynchronous
A user injects guidance, redirects the plan, or cancels while the run is live.

Configuring gates#

ts
await pimsy.tasks.create({
  objective: class="tok-str">"Clean up stale feature flags across all services and open PRs per repository.",
  approvals: {
    required: [class="tok-str">"git.push", class="tok-str">"pull_request.open"],
    mode: class="tok-str">"batch",          // batch | per_effect
    timeout: class="tok-str">"24h",
    onTimeout: class="tok-str">"suspend"    // suspend | cancel
  }
});

Responding to an approval#

approval.requested payload
{
  class="tok-str">"approval_id": class="tok-str">"apr_91kd2",
  class="tok-str">"run_id": class="tok-str">"run_7c1a9d",
  class="tok-str">"step_id": class="tok-str">"s8",
  class="tok-str">"effect": class="tok-str">"pull_request.open",
  class="tok-str">"summary": class="tok-str">"Open PR #draft in acme/checkout: fix null tax profile for guest orders",
  class="tok-str">"diff_stat": { class="tok-str">"files": class="tok-num">3, class="tok-str">"additions": class="tok-num">41, class="tok-str">"deletions": class="tok-num">7 },
  class="tok-str">"risk": class="tok-str">"low",
  class="tok-str">"expires_at": class="tok-str">"class="tok-num">2026-class="tok-num">09-16T09:class="tok-num">12:00Z"
}

Last updated 2026-09-10