Resolve waits and control Runs
Resolve human decisions, steer active work, and apply pause, resume, interrupt, cancel, Policy, rebind, truncate, or branch controls.
Before you begin
Open the exact namespace, Agent, session, and Run address. Inspect the authoritative status and pending waits before acting. Every mutation needs a caller-stable eventId or documented idempotency key and its specific Policy action. Repeating that identifier must return the recorded control outcome.
Steps
- List open waits with
GET .../sessions/:session/waits. Resolve one withPOST .../waits/:promiseId/resolveand body{ "eventId": "approval-42", "value": ... }. The value must satisfy the schema pinned when Agent code calledctx.await(). - Add fresh operator or user direction through
POST .../sessions/:session/steerswith a boundedeventId,text, and optionaldata. Actor identity is derived from authentication, never accepted from the body. - Pause at a safe point with
POST .../runs/:run/pause; continue through/resume. Resume requires an expliciteventId. - Interrupt with
/interrupt.safe-pointpreserves the normal boundary;abortadditionally requiresrun:abortand stops current work before continuing. - Cancel through
/cancelwhen no future work should run. Committed facts and audit history remain. - Use
/policyto change a Policy hash, turn limit, or micro-USD budget at a safe point. Use/rebindonly when every new fixed binding satisfies the deployed contracts; scoped rebind derives assignments from accepted authority. - Use
/truncateto move the same Run’s history to an earlier fact with required steering text. Use/branchwhen the original history must remain and a new Run should continue from the selected fact.
Verify
Read the control receipt and refresh Run detail. Confirm the journal records the authenticated actor, event id, operation, mode, payload hash, scheduler transition, and resulting status. When a Resource call has an unknown outcome, reconcile it according to the operation contract before resuming.
Next steps
Use Inspect a Run for journal paging and Stream a Run for reconnectable output. Review Durable execution for the Agent-side wait and handle contract.