fix(opencode): avoid shell cancel race (#30641)

This commit is contained in:
Aiden Cline
2026-06-03 22:44:25 -05:00
committed by GitHub
parent 9251e5d8c4
commit 2a33addd29
2 changed files with 4 additions and 5 deletions

View File

@@ -78,7 +78,7 @@ export const layer = Layer.effect(
yield* cancelBackgroundJobs(background, sessionID)
const data = yield* InstanceState.get(state)
const existing = data.runners.get(sessionID)
if (!existing || !existing.busy) {
if (!existing) {
yield* status.set(sessionID, { type: "idle" })
return
}