Skip to main content
runCodexCloudTask submits a task and returns a signal that materializes after Codex reaches a terminal state.
automations/run-codex-task.automation.ts
The task submission fields match startCodexCloudTask. pollInterval accepts a compact duration or milliseconds and defaults to "5m". maxPolls accepts 1 through 120 and defaults to 36, giving the default wait roughly three hours to finish. Optional second argument { account } defaults to the project binding and is reused for every status check. Automate.ax checks immediately, then runs each remaining check as a new action after a durable delay. It does not keep a Lambda invocation open. The returned signal continues in the first child context where the task is no longer pending. The result is the same detailed task returned by getCodexCloudTask; inspect status for ready, applied, or error. The signal fails when the polling budget is exhausted. Use startCodexCloudTask when you only need immediate task identity. Use waitForCodexCloudTask when the task was submitted separately or when you need to wait for a follow-up turn.
Codex Cloud does not currently provide an official public REST API. This callable uses undocumented ChatGPT backend endpoints that may change without notice.