The Run object
string
Unique identifier for the run.
string
The chat this run belongs to.
string
Current status of the run:
pending, running, completed, failed, or cancelled.string
ISO 8601 timestamp of when the run was created.
string
ISO 8601 timestamp of the last update to the run.
Lifecycle
When you send a message, the Run moves through the following states:- pending — the run is queued and waiting to start.
- running — the agent is actively executing, making tool calls and generating output.
- completed, failed, or cancelled — the run has finished.
Cancelling a run
You can stop an active run at any time. Any credits reserved but not yet consumed are released back to your balance.Realtime streaming
To follow a run’s progress in real time, request a short-lived token and subscribe to the event stream via Trigger.dev realtime.1. Get a realtime token
2. Subscribe to the stream
Error states
If a run fails due to insufficient credits, it ends with a402 admission error before any provider call is made. This protects your balance from partial execution charges. For more details on how credits are reserved and refunded, see Credits.
Runs can also fail due to provider errors or invalid tool responses. In all failure cases, the run status becomes failed and the error details are available through the event stream or by fetching the run directly.
Related concepts
Chats
Learn how to create chats and send messages that trigger runs.
Waitpoints
Discover how runs pause and resume for human-in-the-loop interactions.