> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Archive cloud task

> Archive a completed Codex cloud task.

`archiveCodexCloudTask` removes one Codex cloud task from the current-task list.

```ts automations/archive-codex-task.automation.ts theme={null}
import { automation, onSchedule } from "automate.ax"
import { archiveCodexCloudTask } from "automate.ax/codex"

export default automation("Archive Codex task", () => {
  onSchedule({ schedule: "0 0 * * 0" })
  archiveCodexCloudTask({ taskId: "task_e_abc123" })
})
```

Archiving does not delete the task. Restore it with `unarchiveCodexCloudTask`. Optional second argument `{ account }` defaults to the project binding.

<Warning>
  Codex Cloud does not currently provide an official public REST API. This
  action calls undocumented ChatGPT backend endpoints that may change without
  notice.
</Warning>
