run_prompt_task has a second caller besides dispatch_pending:
dispatch_heartbeat. The heartbeat prompt acts autonomously on the wire
(sends messages, approves workflows), so an ungated heartbeat let every
non-leader instance sharing one agent key self-prompt and act — the same
duplicate-actor bug the dispatch gate prevents, arriving through the
heartbeat door. Gating before pool.try_claim closes it; solo dev is
unaffected since an absent lock means leader.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>