fix: TUI first paint no longer waits on companion MCP - #664
Closed
justrach wants to merge 3 commits into
Closed
Conversation
After the plugins receipt, interactive --yolo still handshook codedb-pro on the main thread (registry empty under defer_join) and probed with timeout 0. Print mcp/companion receipts, queue the companion like deferred MCP, cap the probe, and skip inline io.async when concurrent fails.
The previous check rejected any '256, 256, 0' substring, including the comment that explained the old unbounded runCapped.
justrach
marked this pull request as ready for review
August 28, 2026 11:33
plugins:/mcp:/companion: are the same dim session_notice as the existing plugins line. connectCompanion with a PATH stub emits the companion receipt and does not addServer. TUI first paint stays the welcome composer — those lines print before alt-screen.
cursor Bot
pushed a commit
that referenced
this pull request
Aug 29, 2026
…companion MCP Queue codedb-pro onto pending_starts on interactive --yolo, cap the license probe at 2s, and print dim mcp:/companion: receipts after plugins: so a hang is named.
cursor Bot
pushed a commit
that referenced
this pull request
Aug 29, 2026
Companion MCP queues in the background so first paint is not the handshake. Mid-turn stall/reconnect stays off the transcript.
Owner
Author
|
Landed on |
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 you saw
Then nothing for a long time. Plugin scan was already fine. The hang was the next work, with no receipt.
Where the time went
After
plugins:, interactive--yolostill did two things on the main thread before the alt screen:registry.toolsempty, so a PATH-installedcodedb-prolooked “not connected” andaddServerran the full stdio probe + handshake (5s / 15s caps) in front of first paint.codedb-pro probewith timeout 0. If that binary blocks, boot never continues.A
defer_joinfan-out that could notio.concurrentalso fell back toio.async, which can run the handshake inline.What we did
plugins:so the next phase is named:mcp: N server(s) in background/mcp: connecting N server(s)...mcp: ready in Xmsif that wait is ≥80mscompanion: codedb-pro (background)pending_startson interactive--yolo(same as ADR 0035 MCP defer). Native tools run now; catalogs merge on the next request.codedb-pro probeat 2s.asyncwhendefer_joincannot get a thread.GRAFF_BOOT_DEBUG.How it looks
Line REPL (
graff --yolo) keeps the same dimplugins:line and adds two siblings:graff tui --yoloprints those, then takes the alt screen. First paint is the welcome composer — noplugins:/companion:on the grid.Check
graff tui --yoloshould paint right after the plugin line. You should seecompanion: codedb-pro (background)if the binary is on PATH. MCP tools still arrive on the next turn //mcp.Opt out of the companion the same way as before:
{"skills": {"codedbpro": false}}.Tier 1 green (1762 tests).