Field guide / 12 min
Review Codex Cloud tasks before applying them locally
Remote execution produces a candidate diff; your local checkout remains the acceptance boundary.
The experimental cloud command can submit a task to a named environment, list or inspect task state, display a selected attempt’s unified diff, and apply that diff to the local working tree. Applying is not merging and does not prove the patch fits the current branch. Inspect the exact task, attempt, local status, and resulting tests before accepting anything.
Verified terminal sequence
- $
codex cloud exec --env ENV_ID "Run the migration checks" - $
codex cloud status TASK_ID - $
codex cloud diff TASK_ID - $
codex cloud apply TASK_ID
Working principles
Environment is authority
The environment selects repository access, setup, and credentials. Use an explicit ID and review its boundary before submission.
Attempt identity matters
Best-of-N tasks can produce several candidates. Inspect and apply the same numbered attempt rather than assuming the default.
Apply is only transport
The command applies a patch through Git mechanics; it does not resolve product correctness, local drift, or approval.
Field procedure
- 01
Submit a bounded task
Name the environment, branch when needed, goal, allowed changes, and checks expected from the remote run.
- 02
Track exact state
Record the returned task ID and poll status without creating duplicate tasks during slow execution.
- 03
Inspect the candidate
Read the unified diff for the intended attempt and compare it with task scope and repository conventions.
- 04
Prepare the checkout
Confirm branch and working-tree state. Preserve unrelated local edits and do not apply into an unknown dirty tree.
- 05
Apply and verify locally
Apply the chosen task, inspect git diff, then run affected tests and review before committing.
PASS / FAIL
Acceptance checklist
- Environment, branch, task, and attempt are recorded.
- Polling cannot submit a duplicate job.
- The diff is reviewed before apply.
- Local unrelated changes are preserved.
- Tests and final diff are inspected after apply.
WATCH / REJECT
Failure patterns
- Applying whichever attempt happens to be first.
- Assuming remote tests cover local branch drift.
- Calling an applied patch complete before local verification.