Repository navigation
fix: keep idle Claude answers and server-terminal input intact - #419
Open
cursor[bot] wants to merge 2 commits into
Open
cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
A delivered turn left its assistant message id set. Claude Code 2.1.326 then answers a finished background task with a text delta and no new message_start, so the projection appended that answer onto the previous message. Drop the id when the turn or the idle answer ends. Co-authored-by: mubeda <mubeda@users.noreply.github.com>
The server terminal has no workspace, so re-admission succeeds with no admission. That None was passed to the seal path and closed the keyboard. Co-authored-by: mubeda <mubeda@users.noreply.github.com>
This branch has not been deployed
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 Changed
Two fixes:
message_startis stored under the turn, and a later idle answer does not reuse an id the previous one claimed.Why
Claude Code 2.1.326 answers a background task that finishes while no turn is running with a text delta and no
message_start. The previous turn left its provider message id set, and the projection appends a streaming delta onto the row with that id, so the task answer rewrote the previous assistant message.The server terminal has no workspace. Re-admission (a lagged orchestration broadcast, or a
terminal.beginInputthat races any other workspace change) therefore succeeds with no admission. ThatNonewas passed to the seal path, which closed the keyboard until input was attached again.UI Changes
No new UI. The existing chat transcript stops merging a later task answer into the previous message, and the server terminal keeps accepting keystrokes after a re-admission.
Checklist
No screenshots or video: both fixes are server behavior covered by tests.
Validation:
cargo test -p bibcode-server --lib -- follow_up_turn_tests(15 passed, includingan_idle_answer_does_not_extend_the_previous_assistant_message),cargo test -p bibcode-server --lib -- a_server_terminal_readmission_keeps_keyboard_input(passed),a_changed_workspace_that_cannot_be_admitted_seals_inputanda_workspace_change_while_input_begins_is_readmitted(passed),cargo fmt --all -- --check, andcargo clippy -p bibcode-server --lib --no-deps -- -D warnings.vp checkandvp run typecheckwere not run: this checkout has nonode_modulesandvpis not onPATH.