| … | … | @@ -2899,21 +2899,31 @@ export const make = Effect.fn("OpenCode2Adapter.make")(function* (instanceId: Pr | |
| 2920 | + | busy.delete(sessionId); | |
| 2921 | + | yield* lock.withPermit( | |
| 2922 | + | Effect.suspend(() => | |
| 2923 | + | state.active === stopped ? finishTurn(state, { status: "interrupted" }) : Effect.void, | |
🟠 High v2/adapter.ts:2923
A delayed session.execution.interrupted from the forcibly settled turn can mark the next turn interrupted, causing its prompt to be skipped. finishTurn clears state.active here without preserving an execution barrier, so route treats the stale end as belonging to the replacement turn; preserve the stale-execution/start barrier when settling this turn.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @packages/provider-opencode/src/server/v2/adapter.ts around line 2923: |
| 2 | |
| 3 | A delayed `session.execution.interrupted` from the forcibly settled turn can mark the next turn interrupted, causing its prompt to be skipped. `finishTurn` clears `state.active` here without preserving an execution barrier, so `route` treats the stale end as belonging to the replacement turn; preserve the stale-execution/start barrier when settling this turn. |