Skip to content

Bug: tasks cancel returns 'Task runtime does not support cancellation yet' - no way to clear stale_running CLI tasks #62419

@king6731253

Description

@king6731253

Bug Description

CLI tasks that get stuck in stale_running state cannot be cancelled or cleared through any normal means. The openclaw tasks cancel command explicitly returns "Task runtime does not support cancellation yet", making it impossible to clean up orphaned tasks.

Steps to Reproduce

  1. Have several CLI tasks (e.g., exec-approval-followup type) that get stuck in stale_running state
  2. Try to cancel them with openclaw tasks cancel <task-id>
  3. Observe: returns "Task runtime does not support cancellation yet"
  4. Try openclaw tasks maintenance --apply
  5. Observe: outputs "0 reconcile · 0 cleanup · 0 prune" - does nothing
  6. Try gateway restart
  7. Observe: stale_running tasks persist after restart

Expected Behavior

  • Users should be able to manually cancel stuck CLI tasks
  • The tasks cancel command should actually work for CLI runtime tasks
  • The maintenance command should detect and clean up stale_running orphaned tasks
  • Gateway restart should clear stale task markers

Actual Behavior

  • openclaw tasks cancel returns "Task runtime does not support cancellation yet" for ALL CLI tasks
  • openclaw tasks maintenance --apply does 0 reconciliation/cleanup/prune for stale_running tasks
  • Gateway restart does not clear stale_running markers
  • No CLI command or workaround exists to clear these tasks

Task Details (for reference)

7 stuck tasks (all exec-approval-followup, exit code 0 but followup never transitioned):

  • 05b80529-5f55-4a06-a12a-3a25810906d7
  • 87cdf907-6a2c-4679-82be-a1c6138c2780
  • b2104428-f9a0-4d69-9734-0a7e46600fb0
  • c9fa3163-428d-479b-8465-75c28c301c42
  • bfaf23f7-53b3-4b31-825f-cde488ba1aae
  • 6e3d7c42-0b8c-4c85-9f54-28b758b894f0
  • 35a4140c-df91-4273-9ccd-0f29f03a1c09

Environment

  • OpenClaw: 2026.4.5
  • Platform: macOS
  • Node: v22.22.0
  • Tasks audit output: 7 stale_running errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions