await_human() rather than calling this directly. Use this endpoint when:
- You’re building a non-SDK client
- You want to create a task without polling (e.g. fire-and-forget with
callback_url) - You’re testing the wire format
Request
Response
Idempotency behavior
Strict Stripe-style: same key, same task, always. If any task withidempotency_key already exists — terminal or not — the response is 200 OK with the existing task. The client should treat this as success and proceed to poll. If the existing task is already terminal, the next poll returns immediately with the stored response (for completed) or the appropriate terminal status (for timed_out, cancelled, verification_exhausted), and the SDK translates those into typed errors.
This is what makes direct-mode await_human() resumable across agent restarts: a re-invocation with the same key after the human completed during your downtime returns the stored decision instead of creating a duplicate ticket.
To create a fresh task for the same logical event (e.g. a yesterday’s task timed out and you want a new review today), pass a distinct key — convention is to suffix with a retry counter:
Errors
Notification side-effects
Channel notifications fire in aBackgroundTask AFTER the response is sent — a slow Slack API call won’t block your task creation, and a Slack outage won’t fail a successful task write. The dashboard sees the task immediately regardless.