fix: terminal content duplication on WebSocket reconnect (v0.35.50)#382
Merged
jpelaez-23blocks merged 1 commit intoJun 4, 2026
Merged
Conversation
When a WebSocket disconnected and reconnected, the server sent 5000 lines of tmux history that was appended to the existing terminal buffer, causing visible content duplication every reconnect cycle. For high-output agents like jarvis (Claude Opus thinking animation), this created a devastating re-render every 30-40 seconds. Now clears the terminal buffer on reconnect before fresh history arrives. Also includes: chat paste-probe delivery, sending/thinking state split, and tab validation on localStorage restore. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
sendChatMessage()uses tmux buffer paste with poll-based verification instead ofsend-keys -l. Blocks sending at permission prompts.Root Cause (Terminal)
When a WebSocket disconnects (heartbeat timeout, network blip), the server sends 5000 lines of
tmux capture-panehistory on reconnect. The client never cleared the terminal buffer first — history was appended to existing content. For jarvis (Claude Opus thinking animation producing dense ANSI output), this caused a full visual re-render every ~35 seconds.Test plan
aimaestro-active-tabfrom localStorage, set to invalid value, reload — should default to chat🤖 Generated with Claude Code