Skip to content

Copilot assignment polling continues waiting after request cancellation #3703

Open

Description

@flysheep-ai

Problem

Both assign_copilot_to_issue and the direct-assignment path of assign_copilot_to_issue_with_intent update the issue successfully, then optionally poll for a linked pull request. Cancellation during that polling does not interrupt time.Sleep, and canceled query errors are ignored. The handler can wait through the rest of the default eight-second polling window after the caller has canceled.

Reproduction and expected behavior

Using the real tool handlers with a local GraphQL HTTP mock, complete the issue assignment successfully, return no linked PR from the first poll, and cancel the request during the inter-attempt delay. With a one-hour PollConfig delay under testing/synctest, both handlers take the full virtual hour instead of returning at cancellation (tested at zero and one second).

Expected: stop optional polling promptly and preserve the already-confirmed successful assignment with the existing pending-PR result. Cancellation should not retry or claim to undo the completed assignment. Uncancelled calls should keep their existing delay, attempt count and result format.

Environment and scope

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions