| Phase | 10 — CLI & peripheral |
| Status | Not started |
| Depends on | 06, 08 |
| Size | L |
| Drop-in critical | partial (backend API + requirements cache) |
Port codex-cloud-tasks(-client), codex-cloud-requirements, codex-backend-client,
and codex-chatgpt: browsing/applying remote Codex Cloud tasks and enforcing
workspace-managed requirements for Business/Enterprise accounts.
reference-codex/codex-rs/cloud-tasks/src/,cloud-tasks-client/src/,cloud-tasks-mock-client/src/.cloud-requirements/src/(CloudRequirementsLoader),backend-client/src/,chatgpt/src/.
- cloud-tasks (
codex cloud/cloud-tasks): list/fetch tasks from the ChatGPT backend (https://chatgpt.com/backend-api,CODEX_CLOUD_TASKS_BASE_URLoverride), view diffs, apply locally, report apply status. Types:TaskId,TaskStatus,TaskSummary,ApplyOutcome,DiffSummary. Mock mode viaCODEX_CLOUD_TASKS_MODE=mock. - cloud-requirements: fetch
requirements.tomlfor eligible accounts; 5-retry backoff, 15s timeout, HMAC-SHA256-validatedcloud-requirements-cache.json, 30min TTL / 5min refresh, fail-closed for eligible accounts; hook into the config builder (spec 04). - backend-client: REST client for
backend-apiendpoints (CodeTaskDetailsResponse,ConfigFileResponse, task list, sibling turns). - chatgpt: ChatGPT backend session/workspace access.
- Cloud-tasks flow (auth → list → fetch diff → apply → report) works against the mock client and matches Codex's apply outcome on fixtures.
requirements.tomlcache file format (incl. HMAC) is byte-compatible (golden); TTL/refresh/fail-closed behavior matches.- Backend request/response shapes match captures.
- Real backend requires ChatGPT auth + network; rely on the mock client + captured responses for hermetic tests.
- Fail-closed logic for enterprise accounts must be exact (security-relevant).
- The TUI for cloud (Codex's
cloud-tasksuses its own ratatui screens — port under Phase 9 follow-up if needed); voice/realtime (47).