feat: add MCP auto-reconnect + expand terminal rendering optimization#40
Merged
feat: add MCP auto-reconnect + expand terminal rendering optimization#40
Conversation
New P2 item from QwenLM/qwen-code#2866 upstream backports analysis: - Claude Code: MAX_ERRORS_BEFORE_RECONNECT = 3, SSE auto-reconnect, session expired (404) auto-refresh - Qwen Code: no MCP reconnect mechanism - Source: services/mcp/client.ts L1225-L1357 Also confirmed PR #2866 items already covered: - Compress orphan funcCall → item 1 (compression) enhancement - API-round grouping → item 1 grouping.ts (63 lines) - Follow-up suggestions → item 3 (Speculation) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Item 54 expanded from "Fullscreen Rendering" to full "终端渲染优化": - DEC 2026 synchronized output (BSU/ESU atomic rendering) - Cell-level differential rendering (ink/log-update.ts) - Double buffering (frontFrame/backFrame swap) - DECSTBM hardware scroll - CharCache/StylePool/CharPool caching (16K cap) - Damage tracking (dirty rectangle) - Render throttling (~60fps via queueMicrotask) - Alt-screen fullscreen mode Qwen Code has only message-splitting (useGeminiStream.ts L632-634). Claude Code has 8-layer anti-flicker in customized Ink engine (~7000 LOC). Item 70: MCP Auto-Reconnect (from PR #2866 analysis) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
wenshao
added a commit
that referenced
this pull request
Apr 5, 2026
Closed PR #76 — contained 6 files from previously closed PRs #69/#72 (repeated submission), plus 4 items of which 2 duplicated existing (Plugin Marketplace = P3 #11, Tips = p2-tools #19). Extracted 2 new items to p2-tools: - #39 /clear multi-mode (clear screen / clear history / full reset) - #40 /thinkback session recall (timeline key event review) Total: 193 items. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 5, 2026
Closed
wenshao
added a commit
that referenced
this pull request
Apr 8, 2026
P1 (1 item): - #27 Error recovery classification routing — truncation→continuation, overflow→compaction, transport→backoff, with per-category budgets P2 (2 items): - #40 drain-before-call — drain background notification queue before each LLM call so model sees latest results - #41 Post-compact identity re-injection — inject agent identity block when messages≤3 after compression (multi-agent scenario) All 3 items have full detail sections in their respective files with standard format (problem/solution/source/status/cost/comparison). Co-Authored-By: Claude Opus 4.6 (1M context) <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
From PR QwenLM/qwen-code#2866 analysis + terminal flicker source code comparison:
New item: MCP Auto-Reconnect (P2, item 70)
MAX_ERRORS_BEFORE_RECONNECT = 3+ SSE auto-reconnect + session 404 refreshservices/mcp/client.tsL1225-L1357Expanded item: Terminal Rendering Optimization (P2, item 54)
Expanded from "Fullscreen Rendering" to full 8-layer anti-flicker:
Qwen Code only has message-splitting (useGeminiStream.ts L632).
🤖 Generated with Claude Code