Replay a task run's event
Run the task again on the exact event an earlier run received (its trigger_event), not on whatever is newest now. Use it when an event-triggered run failed, was skipped, or did the wrong thing. Starts a new run with replay_of set to this run; it skips the task’s condition, as Run now does. A real replay does everything the task normally does, sends included, so check what the original run already did first. Pass test_run: true to replay it as a test run: writes refused, deliveries captured. 422 no_trigger_event if no event started this run, 402 insufficient_credits if the account is out of AI credits, 409 if the task already has a run in flight or the account is at its run limit.
Authorizations
API key in the format: Bearer {api_token}
Headers
Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.
255Path Parameters
Task run id (trun_...) whose event to replay
Body
Replay as a test run: real research, but writes are refused and deliveries are captured on the run. Defaults to false.
Response
Accepted — the replay runs in the background on a new run; poll GET /task_runs/{id}.
The run's own conversation (aichat_...): what it read, called and said. Read it with search_chats.
When a stop was requested. The run stays running until it reaches its next step, then settles as cancelled.
pending, running, completed, failed, needs_input, timed_out, unknown, skipped, cancelled condition, no_paid_plan_or_credits, no_recent_activity, no_task_activity, no_personal_sources, wake_gate, wake_limit, rate_limited, misfire, task_busy, account_at_capacity, null delivered, not_delivered, not_requested, unknown How the agent closed a completed run: verified (it re-checked the result), recorded (it reported without re-checking), or recovered (it never reported; summary is its last message). Null unless an agent turn completed the run.
verified, recorded, recovered, null scheduled, event, manual The event that started this run, {type, data}, exactly as the run received it; data matches the event's webhook payload. Null for a run no event started. POST /task_runs/{id}/replay runs the task again on it.
The run (trun_...) whose event this run replays. Null unless started by POST /task_runs/{id}/replay.

