-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug]: ACP concurrent session spawns — first agent fails to launch CC process #53319
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.ClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.Decent issue quality, but reproduction details are still incomplete.staleMarked as stale due to inactivityMarked as stale due to inactivity
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.ClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.Decent issue quality, but reproduction details are still incomplete.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
When spawning two ACP sessions (
sessions_spawn runtime:"acp") in rapid succession (~37s apart), the first agent's CC process never starts while the second eventually works fine.Environment
2026.3.220.1.16acpx, defaultAgent:claudeSteps to Reproduce
sessions_spawntwice in quick succession:02:22:28 UTC02:23:05 UTC(37s later)status: "accepted"with validchildSessionKeyandstreamLogPathObserved Behavior
Agent 1 (
0a73e5e1):lifecycle:startemitted at 02:22:28stallwarning at 02:23:28 (60s, no output)assistant_deltaevents ever appear — CC process never produced any outputps aux | grep claude.*reachfarshows no matching processAgent 2 (
ebf86699):lifecycle:startemitted at 02:23:05stallwarning at 02:24:05 (60s cold start)assistant_deltaappears at 02:25:17 — CC starts working normallyExpected Behavior
Both agents should launch successfully. A ~37s gap between spawns should not cause the first to silently fail.
Stream Log Evidence
Agent 1 stream log (3 lines total, never progresses):
Agent 2 stream log (resumes after cold start):
Workaround
Falling back to direct
claude --print --permission-mode bypassPermissionsvia exec works reliably for parallel spawns (tested 3 concurrent agents successfully).Analysis
The acpx backend appears to have a race condition during concurrent session initialization. The first session's CC process is either:
Since the session is "accepted" and
lifecycle:startfires, the issue is downstream of session registration — likely in the acpx CLI launch path.Related