fix(server): unblock OpenCode approvals and stop (#9653)

OpenCode could show an Approval badge with no controls, appear stuck on TodoWrite, and keep showing a running turn after Stop.

- Show every permission, including old saved requests. Keep failed replies retryable and close completed requests even when reply events are lost.
- Keep OpenCode output pipes drained and automatic replies out of the event loop. Handle disconnects, reconnects, and confirmed stops without stale requests or running states.
- Show native task progress and command results. Do not treat TodoWrite or approval history as file edits or executed commands.
- Ignore late aborts and task updates after a turn finishes.

Fixes #4795
Fixes #7113
Fixes #5760

Created with GPT-6 Astra (preview) in Codex. Reviewed and merged with Claude Fable 5.1 in Claude Code.
01f3e50ecaTheo Browne committed on 9/4/2026, 12:41:32 PM· committed by GitHubparentf034732
17 files changedLine totals unavailable