Skip to main content
waitForCodexCloudTask durably checks an existing task until it reaches a terminal state.
automations/wait-for-codex-task.automation.ts
taskId accepts a task ID or compatible signal, including startCodexCloudTask(...).id or continueCodexCloudTask(...).taskId. pollInterval defaults to "5m"; maxPolls defaults to 36 and accepts up to 120. Optional second argument { account } defaults to the project binding and is reused for every status check. Automate.ax checks immediately, then performs each remaining check in a durable child continuation, so provider work can outlive any individual Lambda invocation. The result emits when the task status becomes ready, applied, or error. It includes the prompt, attempts, messages, diff, branch, environment, and pull requests. The signal fails if the task remains pending for the complete polling budget.
Codex Cloud does not currently provide an official public REST API. This callable uses undocumented ChatGPT backend endpoints that may change without notice.