fix(server): keep OpenCode approvals, progress, and Stop responsive - #283
Merged
Conversation
(cherry picked from commit 62d39bf00d5ddd83a9b36a81321fe9aa4d2502bb)
… (#9282) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com> (cherry picked from commit d2b6f3b9296f682c6158b894ab33d98d0c4bfb2b)
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. (cherry picked from commit 01f3e50eca5102ccd881de6f942a98fe6a518ad4)
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenCode can appear stuck when its output pipes fill, an approval has no usable controls, or Stop finishes before delegated sessions stop. Lost reply events and disconnects can also leave approvals and running indicators stale.
Finish the previously started adoption of upstream #9005, #9282, and #9653. Keep output pipes drained, make permission replies bounded and retryable, keep automatic replies off the event pump, reconcile missing requests after reconnect, and wait for child cleanup on Stop. Native task progress updates only an active parent turn; duplicate plans are suppressed and cancelled tasks are omitted, completing the intent of #178.
Preserve Pylon's session-incarnation and turn-admission guards, compaction events, approval contracts, branding, and other providers. Explain OpenCode's workspace-wide permission scope through the existing detail field so web, desktop, and mobile all display it. Shared projection fixes restore failed approvals and finalize aborted text; local, external-server, remote, and tunnel connections use the same behavior.
Validation: all 400 focused tests across nine adapter, runtime, orchestration, web, mobile, and shared presentation files pass (including a real subprocess writing 2 MiB to each output pipe). Server, web, mobile, and client-runtime typechecks pass; targeted lint, formatting, and diff checks pass. No live provider session or production database was changed. Browser verification has not been run.
Implemented with GPT-6 Astra through the Codex harness, completing the earlier port and incorporating the task-progress work authored with Claude Opus 5 in Pylon.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.