Repository navigation
Description
Problem
ProPR starts work when an issue is labeled, but never stops work when the issue stops wanting it.
- Only
labeledis handled.packages/core/src/webhook/webhookHandler.tsacts on theissuesevent'slabeledaction only. Closing the issue, removing the trigger label, or removing the model label doesn't cancel a queued or running task. The one exception is removingultrafixfrom a PR, which stops that loop.
OpenAI's Symphony reconciles on every scheduler tick:
- It refreshes the tracker state of each running issue. A terminal issue stops the agent and cleans its workspace; a no-longer-eligible issue stops the agent and keeps the workspace.
- It records distinct terminal reasons, such as
CanceledByReconciliationandTimedOut.
Proposal
-
Cancel on intent withdrawal. Handle
issues.closedandissues.unlabeled, when the removed label is a processing trigger:- cancel queued jobs for that issue;
- request cancellation of a running implementation task, through the same path as
propr task stopor the UI; - leave any already-opened PR alone.
For PRs,
pull_request.closedwithout a merge should cancel in-flight follow-up, review and Ultrafix work for that PR. Before starting, the worker re-checks the issue or PR state, which covers missed webhooks and polling mode. -
Record terminal reasons. Give task state a cancellation or failure reason:
timed_out,cancelled_issue_closed,cancelled_label_removed,cancelled_pr_closed,cancelled_by_user. Surface it in the task view, the Inbox and MCP (get_task), and use it in retry decisions (never retry cancellations).
Acceptance criteria
- Closing an issue, or removing its trigger label, while its task is queued or running cancels the task within one event, or one poll interval in polling mode. The task shows
cancelled_issue_closedorcancelled_label_removed, and the issue's state labels reflect it. - Removing a model label doesn't cancel anything.
- Closing a PR without merging stops in-flight follow-up, review and Ultrafix work for it.
- The worker's pre-start re-check prevents starting a job whose issue is already closed or unlabeled.
pr-followup.mdand the task-state docs describe the new behavior.
Out of scope
Stall detection (killing sessions that emit no output for N minutes). Hung sessions haven't been a real problem, and agents legitimately go quiet for long stretches, so an inactivity cutoff risks false positives. The existing overall task timeout remains the backstop.
Activity
[-]Stop work when an issue or PR withdraws intent, and detect stalled agent sessions[/-][+]Stop work when an issue or PR withdraws intent[/+]propr-dev commentedon Sep 30, 2026
🤖 AI processing has started for this issue using codex agent with gpt-6-astra model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
codexgpt-6-astra2659/gpt-6-astra-stop-work-when-an-issue-o-20260930-2350-tvvmainissue-2659-20260930-2350-gpt-6-astra-tvv🔍 Track Task Execution
fix(ai): Resolve issue #2659 - Stop work when an issue or PR withdraw…
[2659 by GPT-6 Astra] Stop work when an issue or PR withdraws intent (#…