fix(side-chat): deliver reply anchor on first turn - #2403
Merged
ymichael merged 4 commits intoAug 25, 2026
Merged
Conversation
# Conflicts: # apps/server/src/services/prompt-history.ts # apps/server/test/public/public-thread-fork.test.ts # apps/server/test/services/prompt-history.test.ts # packages/host-daemon-contract/src/protocol.ts # packages/host-daemon-contract/test/contract.test.ts
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.
What was wrong
Side-chat forks persisted the selected-message reply anchor as agent-only input, but deliberately started the native provider fork with empty input so it remained idle. The first real send built its provider command only from the new message, leaving the anchor out of the first provider turn. This affected Codex, Claude Code, and Pi before provider-specific translation. See #2316.
What changed
turn/startedexists; later turns never receive it again.thread.start.input.HOST_DAEMON_PROTOCOL_VERSIONto 168 becauseturn.submit.inputsemantics change. The wire shape and database schema are unchanged.How you verified
The deterministic first-turn assertion failed on
mainbefore the fix: expected[seed, firstReply], received only[firstReply].pnpm exec turbo run test --filter=@bb/server -- test/public/public-thread-fork.test.ts test/services/prompt-history.test.ts— 29 tests passed.pnpm exec turbo run test --filter=bb-plugin-side-chat— 25 tests passed.pnpm exec turbo run test --filter=@bb/host-daemon-contract -- test/contract.test.ts— 37 tests passed.pnpm exec turbo run typecheck --filter=@bb/server --filter=bb-plugin-side-chat --filter=@bb/db --filter=@bb/host-daemon-contract— 8 Turbo tasks passed.Fixes #2316