Problem
An issue can be dispatched even though it already has a run in progress.
Observed behavior:
- The issue already has a run / active worker associated with it.
- The issue status is effectively
in_progress or should be treated as in-progress because a run exists.
- Tasq still exposes or dispatches it as
ready.
- As a result, the same issue can be picked up again and duplicate work / duplicate PRs can be created.
Concrete example from Yamame workflow:
tq issue #141 already had a run / PR branch (agent/issue-141, PR #2165).
- It was still able to appear as ready/dispatchable, causing confusion around whether the work should reuse the existing run or start a new one.
Expected behavior
If an issue already has an active run, Tasq should not dispatch it again as ready.
The queue/dispatch decision should treat such issues as non-dispatchable until one of these is true:
- the active run is completed and the issue is intentionally moved back to
ready, or
- the run is cancelled/failed and the issue is explicitly requeued, or
- the issue status is otherwise changed by an explicit user action.
Suggested checks
- Review the queue query / dispatch eligibility rules for issues with existing run records.
- Ensure status transitions cannot leave an issue visible as
ready while an active run exists.
- Add a regression test covering: issue is
ready -> dispatched/run created -> status becomes or remains effectively in_progress -> queue must not return it as dispatchable again.
- If status and run state can diverge, define which source of truth wins for dispatch eligibility.
Impact
This can create duplicate agent work and duplicate PRs for the same ticket. It also makes follow-up instructions like "reuse the existing issue/run/PR" unreliable because the issue tracker still presents the ticket as ready for a fresh dispatch.
Problem
An issue can be dispatched even though it already has a run in progress.
Observed behavior:
in_progressor should be treated as in-progress because a run exists.ready.Concrete example from Yamame workflow:
tq issue #141already had a run / PR branch (agent/issue-141, PR #2165).Expected behavior
If an issue already has an active run, Tasq should not dispatch it again as
ready.The queue/dispatch decision should treat such issues as non-dispatchable until one of these is true:
ready, orSuggested checks
readywhile an active run exists.ready-> dispatched/run created -> status becomes or remains effectivelyin_progress-> queue must not return it as dispatchable again.Impact
This can create duplicate agent work and duplicate PRs for the same ticket. It also makes follow-up instructions like "reuse the existing issue/run/PR" unreliable because the issue tracker still presents the ticket as ready for a fresh dispatch.