Get the current status of an in-flight agent chat run.
startAgentChat. While the run is executing, status is queued or running. Once it transitions to completed, failed, or cancelled, polling can stop — text, messages, and toolCalls are populated on success; error is populated on failure.
userId matches the caller’s effectiveUserId. A mismatch returns 404 (not 403) to avoid leaking that a run exists.Polling cadence. Poll every 1–2 s. Runs typically complete within 10–60 s depending on tool chain length; the Trigger.dev task has a generous timeout so don’t give up too early.Terminal signals — stop polling when:status === "completed" — success. Read text, messages, toolCalls.status === "failed" — terminal failure. Read error for the reason.status === "cancelled" — the run was cancelled (manual or system).run_. Anything else returns 400 immediately without hitting Trigger.dev.Related: Start an agent chat run, Stream an agent chat run.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Trigger.dev run id, starts with run_. Returned by startAgentChat.
Current run status.
queued, running, completed, failed, cancelled Final assistant message text. Present only when status === 'completed'.
Full message log (user + assistant + tool turns). Present only when completed.
Tools the agent invoked during the run. Present only when completed.
Error message. Present only when status === 'failed'.