Skip to content

[Bug] Canceling team runs via API not working - 500 #4786

@bogdanrau

Description

@bogdanrau

Description

When attempting to cancel an active run (via the /teams/<team_id>/runs/<run_id>/cancel endpoint), the run fails to cancel and continues running in the background.

Steps to Reproduce

  1. Create a new team run and obtain a run_id.
  2. While that run is running, attempt to cancel via /teams/<team_id>/runs/<run_id>.
  3. Observe in the console the following error (redacting sensitive info):
WARNING  Attempted to cancel unknown run 522f2e7f-46e3-49ba-9073-180274991c36   
INFO   <IP ADDRESS> - "POST /teams/team_name/runs/522f2e7f-46e3-49ba-9073-180274991c36/cancel HTTP/1.1" 500

Agent Configuration (if applicable)

Vanilla teams endpoint.

Expected Behavior

The run should stop executing.

Actual Behavior

The run continues to execute. After a while, getting the session info or runs via either /sessions/<session_id> or /sessions/<session_id>/runs reveals that the team continued the run until resolution in the background.

Screenshots or Logs (if applicable)

No response

Environment

- OS: Linux

Possible Solutions (optional)

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions