listCodexCloudTasks returns recent Codex cloud tasks from the connected ChatGPT workspace.
automations/check-codex-tasks.automation.ts
environmentId optionally filters the results to one configured environment. filter accepts current, archived, or all and defaults to current; use archived to find a task before restoring it with unarchiveCodexCloudTask. limit accepts 1 through 20 and defaults to 20. Pass a previous cursor to retrieve the next page. Optional second argument { account } defaults to the project binding.
Each task includes its ID, ChatGPT URL, title, status, last update time, branch, environment label, archive state, attempt count, pull requests, and the latest attempt’s changed-file and line counts. The list endpoint does not report a stable environment ID, so environmentId is null; use getCodexCloudTask when you need it. status is pending, ready, applied, or error.