Stale unstarted record retries a worker start forever while the Claude is live (platform #567)

Open
#151 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
44/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
devtools

Research direction

Start with retry_starts and start_existing in advance.py, then trace the revive/resume paths and relay selection for PR conflicts. The report points to slots.json records and the two relay files as evidence; first reproduce the stale unstarted record and live worktree refusal. Done means a live Claude no longer leaves a brief retrying forever, the log describes the actual state, and tests cover that behavior and ensure a conflict gets only the appropriate relay.

Written by the indexing model from the issue text.

Description

Seen 2026-11-18 on the platform board. From about 1:56 PM to 8:55 PM ET every cascade pass logged "start: queued the worker start of #567 (minavo-use-one-name): its window has no Claude". Each start failed in the launcher with "swarm-start-scoped refused: another Claude is live in /home/memnar/ver/platform.minavo-use-one-name (pid 3126318): one Claude per worktree" (events DB, source launcher). Meanwhile the Claude in pane %276 had finished at 7:00 PM ET and sat idle at its prompt.

Cause: this is not pane inspection. retry_starts (advance.py) never looks at the pane; it starts every PR in slots.json unstarted. #567 had an unstarted record from 1:56 PM ET (brief /tmp/relay-567-merge-main.md, issue None, no brief_pane), written when the merge-main relay found no Claude (Flow.to_worker deferred start). The Claude was then resumed in a rework slot (rework record started 13:56 ET), but nothing removed the unstarted record. With no brief_pane, start_existing always calls swarm-start-scoped, which refuses, and unstarted_retry keeps the record. The log text "its window has no Claude" is wrong.

A second problem: at 1:56 PM ET the worker got two different relays for the same conflict: /tmp/relay-567-premerge.md (resolve on the speculative branch minavo-use-one-name-v5 only, never merge main into minavo-use-one-name) and /tmp/relay-567-merge-main.md (merge origin/main into minavo-use-one-name). The live Claude got the premerge one and did it (v5 tip 52643003). The merge-main one stayed in the stuck unstarted record. By 8:37 PM ET main had moved and v5 was stale, while the PR (draft, In Progress) still conflicted with main.

swarmbot relayed the merge-main work to %276 with tell_agent at about 8:50 PM ET. The worker pushed 9f21bd2d, and the Stop hook moved #567 to Auto Review and asked Codex at 8:55 PM ET.

Fix:

  1. When a revive or resume starts a Claude for a PR, or start_existing sees a live Claude in the PR's worktree, drop the unstarted record (or set brief_pane so only the brief line is sent). A refused start because a Claude is live must not be retried forever.
  2. Log what is true: "a Claude runs in the worktree; sending the brief" instead of "its window has no Claude".
  3. Send one relay per conflict: premerge on -vN for a Ready PR, or merge-main for an In Progress PR, never both.
    Tests for 1 and 3.
Dominant language
Python
Stars
3
Forks
0
Avg merge
5h 57m
Merged PRs (30d)
60

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tangentcode/tangentswarm

All issues in tangentcode/tangentswarm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.