Repository navigation
Start Builders with no window when an agent connects - #19
Closed
oddessentials wants to merge 9 commits into
Closed
oddessentials wants to merge 9 commits into
oddessentials wants to merge 9 commits into
Conversation
The connect command now launches Builders headless. It answers the MCP handshake, list_worlds and list_items itself, and starts the Builders window only when a tool needs the editor or the agent calls the new show_window tool. Closing the window keeps the agent connected; its next call opens the window again. Existing connections must be re-added with --headless to stop the window appearing at every session start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r rendering Only the window's first reply is dropped, and only when the relay sent it an initialize, so a client id equal to the internal one still gets its answer. show_window restores a minimized window and answers while a render runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The relay closed the window's pipe while its reader thread was still reading it. If the window wrote anything after that, every later read failed yet returned a byte, so the relay never quit and flooded stderr. The relay now sends the window a notification, which only a window the relay started acts on, once. The reader ends when the window exits. Refs #18 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Opening a Claude Code session must not open Builders. Keep the headless relay, in low-processor mode, that answers list_worlds and list_items itself, starts the window when a call needs the editor, and hands disconnects to it. Remove the show_window tool, the delay before relaunching a window that failed to start, and reaping of exited window processes. Keep the full page check after pushes to main, so the page can't go live before the release it describes. Tell connected users how to replace a registration without --headless. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On macOS and Linux, Godot collects a child's exit status only when its process status is checked, so every window closed during a session stayed a zombie until the relay exited. Keep its PID and check it each frame until it has gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macOS answers is_process_running for an app from NSRunningApplication without calling waitpid, so a closed window could stay a zombie. Keep its PID until get_process_exit_code reports it has exited, which collects it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
What changes
--headless -- --mcpnow starts a windowless relay. It answerslist_worldsandlist_itemsitself and opens the Builders window on the first other tool call.show_windowtool opens the window or brings it to the front.list_itemsreloads custom items another window changed.The disconnect fix (refs #18)
The relay used to close the window's pipe while its reader thread was still reading it. On Windows, if the window wrote anything after that, every later read failed yet returned a byte, so the relay never quit, used a full CPU core and flooded stderr. The window had always saved and exited; the relay was what stayed behind.
Before the fix, on Windows, with a call in flight at disconnect: 6 of 26 runs hung.
Testing
tests/run.gd -- mcp: 221 passed, 0 failed.tests/mcp_smoke.mjsplain and--windowed: 11/11 each. The smoke test now disconnects with a call in flight.🤖 Generated with Claude Code