A Claude Code fork sub-agent's first request is its lead's conversation
with a result for each of the lead's in-flight calls ("Fork started —
processing in background") and its directive after. The lead's own resume
and every fork it started therefore match the same run at once; the first
to claim it won and the rest got a terminal 409 that Claude Code does not
retry, so the forks died. The 409 dates from e8cd4bac (#794); nothing
between v0.1.1108 and main changed it. A request that loses the claim now
gets a run of its own, told the conversation whole.
Verified: TestClaudeForksAnsweringTheLeadsCallsEachGetAnAnswer drives the
real server stack (httptest Handler, fake claude whose MCP calls go back
through /_magpie/claude-mcp) with a lead and 8 forks resuming at once.
Before the change it failed 7/20 plain and 5/10 under -race (409 for forks
and the lead); after, -count=30, -race -count=20 (macOS) and -race
-count=10 (Linux Docker) pass. TestClaudeBridgeSafeguardConcurrentHandoff
now expects the second caller to get its own run. go test -race
./internal/gateway is green on macOS and in Linux Docker; go vet for
darwin/linux/windows and gofmt clean. Not tried with a real Claude
subscription.