Repository navigation
Conversation
A steer that changes launch settings (such as Full -> Accept Edits) makes the ACP bridge restart the agent and reload its session before sending the steer. The bridge completed the running turn as interrupted before the restart and the replacement session reset the thread's assembler state, so the thread looked idle for the whole restart (~26s for OpenCode) until a new turn began. The rebuild now keeps the turn open: it closes the old prompt's open tool calls, skips the assembler reset for the replacement session, and continues the steer in the same turn, as a steer without a restart already does. If the replacement fails to start, the turn settles as failed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/acp-steer-with-permission-mode-change-looks-hung-thr_eb5u4tftq7
branch
October 27, 2026 22:35
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.
Human comments
What was wrong
When a steer changes an ACP launch setting (for example permission mode Full → Accept Edits), the ACP bridge restarts the agent process and reloads its session before sending the steer.
rebuildAgentSessionstopped the old session, which settled the running prompt asinterrupted, and the replacement session'sstartAgentSessionemittedsession.reset, which deleted the delta assembler's open turn. So for the whole restart (~26s for OpenCode), the thread showed "Worked for Ns", hid the steer, and swapped the stop button for send. It looked hung until a brand-new turn began.What changed
packages/provider-bridge-acp/src/bridge/bridge.ts:rebuildAgentSessioncloses the old prompt's open tool calls (ACP_PROMPT_INTERRUPTED_METHOD) and clears the old session's active prompt without settling the turn.resumerequest now carriescontinuesTurn. When it's set, thesession.resetis skipped so the open turn stays.runTurnloop continues the steer in the same turn on the replacement session, instead of emitting a newturn/started. This matches how a steer without a restart already works.failedwith the error. Before, it had already ended asinterrupted.No wire change: the events the server receives keep the same shape, so there's no
HOST_DAEMON_PROTOCOL_VERSIONbump.How you verified
pnpm exec turbo run test typecheck --filter=@bb/provider-bridge-acp: all tests pass, typecheck clean.bridge.test.tshas two new assertions. Both fail on the parent commit and pass on this branch:turn/startedand nointerruptedcompletion.failed.pnpm start:worktreeservers, one per build, with a real OpenCode (opencode/big-pickle) thread steered viabb thread tell --permission-mode accept-editsduringsleep 60. A headless browser sampled what was visible every 0.5s.t1interrupted, newt2t1🤖 Generated with Claude Code