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
{{ message }}
Repository navigation
(bg-agents): hold a respawn's marker until the new worker is published #1033
In src/main/bg-agents/bg-agents-ipc.js (around :91 and :127), the per-job respawn flight is released as soon as runVerb returns. A restore waits for the worker's descriptor only after that, for up to 15 s. During that gap, a manual Respawn click in the Agents view, or a handoff, starts a fresh check, sees the job still dead, and can run a second claude respawn. The test at test/bg-duplicate-1020.test.js (around :308-310) currently allows that second respawn.
This needs a user action within seconds; the automatic overlap is already handled.
Fix: keep a per-job marker until the descriptor is published, or for 15 s, and make same-job callers join it.
Also decide how to treat a runVerb that returns ok:false without a refusal, such as the 60 s VERB_TIMEOUT_MS: the CLI may already have started the worker, so it should count as uncertain rather than allow a retry.
Activity
(bg-agents): hold a respawn's marker until the new worker is published (
(bg-agents): hold a respawn's marker until the new worker is published (