You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pulse dispatched multiple workers concurrently for the same set of tasks (t153–t160, 7 UI tasks), and at least one worker committed the work directly to main before the others finished. The result was 3× the token spend for 1× the output — two workers' entire sessions were wasted.
08:37 — Worker C commits t153–t160 directly to main again (7 more identical commits)
08:38 — Pulse marks t153–t160 complete
Three workers ran the same 7 tasks. Only one was needed.
Estimated waste: ~560K tokens (2× the useful work), roughly $5–15 at Sonnet pricing.
Expected Behavior
Before dispatching a task, the pulse should check whether a commit touching the relevant files has already landed on main since the task was opened. If yes, mark the task complete and skip dispatch entirely.
At minimum: if a task is already assigned to a worker (GitHub assignee), do not dispatch a second worker for it.
Root Cause Analysis
Two separate gaps:
1. No pre-dispatch check against recent main commits.
The dispatch pipeline checks GitHub issue state and assignee, but does not check whether commits matching the task's scope have already landed on main. A worker that commits directly to main (without a PR) completes the work invisibly — the issue stays open until the pulse's chore: mark tXXX complete commit runs, which happens after dispatch decisions for the next cycle.
2. The CONFLICTING close comment is misleading.
When the pulse closes a PR as conflicting, it says:
"The linked issue (if any) remains open for a worker to re-attempt with a fresh branch."
This implies re-dispatch is needed. In this case the issue was already done — the comment caused a third worker to be dispatched unnecessarily (Worker C's direct commits at 08:37).
Steps to Reproduce
Have multiple workers enabled with pulse: true on a repo
Dispatch 7+ tasks simultaneously
One worker commits directly to main (no PR) and finishes before others open their PRs
Observe: pulse closes the other workers' PRs as conflicting, then dispatches again
Environment
aidevops version: 3.6.118
AI Assistant: Claude Code (claude-sonnet-4-6)
OS: Ubuntu 24.04.4 LTS
Shell: bash 5.2.21(1)-release
gh CLI: 2.45.0
Proposed Fix
Short term: In pulse-wrapper.sh's dispatch loop, before dispatching a task, run:
If a match is found, mark the issue complete and skip dispatch.
Also: Change the _close_conflicting_pr comment to not say "remains open for a worker to re-attempt" — instead check whether the work is already on main and say so explicitly. A misleading close comment is itself a dispatch trigger.
Description
The pulse dispatched multiple workers concurrently for the same set of tasks (t153–t160, 7 UI tasks), and at least one worker committed the work directly to main before the others finished. The result was 3× the token spend for 1× the output — two workers' entire sessions were wasted.
Observed sequence (2026-04-04, 08:00–09:00 UTC, repo: Ultimate-Multisite/gratis-ai-agent):
CONFLICTING— Worker B's entire session discardedThree workers ran the same 7 tasks. Only one was needed.
Estimated waste: ~560K tokens (2× the useful work), roughly $5–15 at Sonnet pricing.
Expected Behavior
Before dispatching a task, the pulse should check whether a commit touching the relevant files has already landed on main since the task was opened. If yes, mark the task complete and skip dispatch entirely.
At minimum: if a task is already assigned to a worker (GitHub assignee), do not dispatch a second worker for it.
Root Cause Analysis
Two separate gaps:
1. No pre-dispatch check against recent main commits.
The dispatch pipeline checks GitHub issue state and assignee, but does not check whether commits matching the task's scope have already landed on main. A worker that commits directly to main (without a PR) completes the work invisibly — the issue stays open until the pulse's
chore: mark tXXX completecommit runs, which happens after dispatch decisions for the next cycle.2. The
CONFLICTINGclose comment is misleading.When the pulse closes a PR as conflicting, it says:
This implies re-dispatch is needed. In this case the issue was already done — the comment caused a third worker to be dispatched unnecessarily (Worker C's direct commits at 08:37).
Steps to Reproduce
pulse: trueon a repoEnvironment
Proposed Fix
Short term: In
pulse-wrapper.sh's dispatch loop, before dispatching a task, run:If a match is found, mark the issue complete and skip dispatch.
Also: Change the
_close_conflicting_prcomment to not say "remains open for a worker to re-attempt" — instead check whether the work is already on main and say so explicitly. A misleading close comment is itself a dispatch trigger.Related Issues