Skip to content

Codex Cloud: supported task cancellation with verifiable stopped execution #51948

Description

@kirkmarple-clockgrove

What variant of Codex are you using?

Codex CLI 0.160.0, specifically subscription-backed Codex Cloud. Also inspected the official TypeScript/Python SDK documentation and upstream source at commit e974aad3b1a8f144273e882c614aefe69eaef615.

What feature would you like to see?

Please provide a documented CLI/API or SDK operation to cancel an existing Codex Cloud task and verify when its owned execution has actually stopped.

We want to integrate Cloud tasks into an external development controller. When a task reaches its deadline or is cancelled, the controller needs to stop its remote work before admitting a replacement. Ending the local submitting process does not establish that remote execution has ceased.

A possible interface would be:

# Proposed commands, not commands available today
codex cloud cancel TASK_ID --json
codex cloud status TASK_ID --json

The exact names and schema can follow the supported backend contract. The required behavior is:

  • Address a durable Cloud task identity and clearly define whether cancellation covers the current attempt, every active sibling attempt, and any continuing task work.
  • Distinguish “cancellation requested” from a terminal state that confirms the task's workers and running tools have stopped and will perform no further task-owned writes or publication.
  • Let another client reconnect and observe the same cancellation/terminal result after the submitting client disconnects.
  • Handle repeated cancellation and already-terminal tasks predictably. Expose actionable failure or unknown state when stopped execution cannot be confirmed.
  • Preserve existing task history, available results and reported usage. Cancellation should not require deleting or archiving the task.

If an existing supported route already provides this, please document its authentication, task/attempt identity mapping, and terminal-state guarantees.

Additional information

The evidence is absence from the inspected public integration surfaces, not proof that the Cloud service or UI cannot cancel work:

  • Installed codex cloud --help lists exec, status, list, apply, and diff, with no cancellation command. The upstream command enum matches.
  • The CloudBackend trait exposes creation, reads and patch application, but no cancellation operation. It does contain an AttemptStatus::Cancelled value; that read-side status alone does not supply a callable cancellation route or stopped-execution guarantee. The trait file is identical to the version originally inspected at rust-v0.160.0's pinned commit.
  • The SDK documentation describes local TypeScript threads and Python control of the local app-server. The TypeScript implementation invokes local codex exec and passes its abort signal to that child process.
  • App Server documents turn/interrupt. We did not find a documented mapping from subscription Cloud task IDs to that interface.
  • The CLI reference documents Cloud submission and listing, but we did not find a Cloud cancellation/stopped-state contract.

Related: #24777 already requests broad scriptable Cloud lifecycle management, including cancellation. This request focuses on cancellation completion semantics needed to prevent overlapping remote work. Downstream tracking: clockgrove/factory#885.

This is a feature request based on CLI help, public source and documentation inspection. No Cloud task was started or cancelled to reproduce a runtime failure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    codex-webIssues related to Codex WebenhancementNew feature or requestsessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions