Run Status
Represents the current state of a Run. You can view the current status of a run by looking at the Run.status field.
Entries
When Runs are first created or when you complete the RequiredAction, they are moved to this 'queued' status. They should almost immediately move to IN_PROGRESS.
While IN_PROGRESS, the Assistant uses the mode and tools to perform steps. You can view progress being made by the Run by examining the RunSteps.
When using the Tool.FunctionTool, the Run will move to a REQUIRED_ACTION state once the model determines the names and arguments of the functions to be called. You must then run those functions and submit the outputs using RunHandler.submitToolOutputs before the run proceeds. If the outputs are not provided before the Run.expiresAt timestamp passes (roughly 10 minutes past creation), the run will move to an EXPIRED status.
You can attempt to cancel an IN_PROGRESS using RunHandler.cancel. Once the attempt to cancel succeeds, status of the Run moves to CANCELLED. Cancellation is attempted but not guarenteed.
You can view the reason for the failure by looking at the Run.lastError object in the run (see RunError). The timestamp for the failure is recorded under the Run.failedAt.
The Run successfully completed! You can now view all ThreadMessages the Assistant added to the Thread, and all the steps the Run took. You can also continue the conversation by adding more ThreadMessages to the Thread and creating another Run.
This happens when the function calling outputs were not submitted before Run.expiresAt and the Run expires. Additionally, if the runs take too long to execute and go beyond the time stated in Run.expiresAt, OpenAI's systems will expire the Run.