[Bug]: OpenCode abort timeout does not enable Force stop
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Code-derived reproduction, not executed:
- Start an OpenCode turn and wait until prompt admission has completed.
- Keep the turn active and withhold terminal events.
- Configure
client.session.abortto remain pending until its request is cancelled. - Request Stop and allow the adapter’s 10-second abort timeout to expire.
- Keep the same behavior for subsequent interrupt attempts.
Expected behavior
A timed-out abort should mark Stop unresponsive and offer Force stop.
Actual behavior
The adapter’s timeout fails before the session manager’s 15-second timeout. While the turn remains unfinalized, the adapter resets turn.interrupted and wraps the failure in ProviderAdapterInterruptError.
ProviderTurnControlService does not classify that error as unresponsive. The interrupt effect follows generic failure/retry handling, rather than enabling Force stop.
Impact
Minor bug or occasional failure
A provider that never answers abort can leave Stop unresolved without offering the intended Force stop recovery action. It needs a provider that doesn't confirm the stop (or the timing described above), so it is occasional rather than constant.
Version or commit
main @ 9e85538535
Environment
OpenCode adapter with a controlled SDK endpoint. Runtime environment not tested.
Where
- packages/provider-opencode/src/server/adapter.ts:3474–3497:
session.aborthas its own 10-second timeout; an unfinalized turn propagates that failure. - adapter.ts:3502–3512: every failure is wrapped in
ProviderAdapterInterruptError. - apps/server/src/orchestration-v2/ProviderTurnControlService.ts:229–241: the unresponsive classification requires
ProviderAdapterInterruptTimeoutError. - apps/server/src/orchestration-v2/EffectWorker.ts:809–832: generic failures are retried or marked failed.
Found by reading the code while porting the Stop / Force stop changes (6b1245cced, 5f2c27e706) into a fork. Derived from the code at 9e85538535; not reproduced at runtime.