Repository navigation
[NO-JIRA] Bound MCP server startup and kill the process group on a failed start (R14) - #23
Merged
Merged
Conversation
johnnymo87
added a commit
that referenced
this pull request
Nov 22, 2026
…ill the process group on a failed start A hung MCP server's initialize was awaited unbounded, so session/new, session/load, extensions/add and any extension lease hung with it. Startup is now bounded (default 25s, 0 = default). On a failed stdio start the child's process group is killed and stderr is collected with a 2s grace, since a grandchild holding the pipe kept spawn() waiting for EOF forever. ProcessExit's message now includes its source error. Port of patch 14 (fork #7) onto v1.60.2, in the fork-only module agents/mcp_startup_timeout.rs. Its parallel-load part is upstream (aaif-goose#12775). X-Shepherd-Wake: #23
johnnymo87
force-pushed
the
r14-mcp-startup-timeout
branch
from
November 22, 2026 06:17
ef64529 to
de7bb4b
Compare
johnnymo87
added a commit
that referenced
this pull request
Nov 22, 2026
…s cleaned up too; gate unix-only test helpers X-Shepherd-Wake: #23
…ill the process group on a failed start A hung MCP server's initialize was awaited unbounded, so session/new, session/load, extensions/add and any extension lease hung with it. Startup is now bounded (default 25s, 0 = default). On a failed stdio start the child's process group is killed and stderr is collected with a 2s grace, since a grandchild holding the pipe kept spawn() waiting for EOF forever. ProcessExit's message now includes its source error. Port of patch 14 (fork #7) onto v1.60.2, in the fork-only module agents/mcp_startup_timeout.rs. Its parallel-load part is upstream (aaif-goose#12775). X-Shepherd-Wake: #23
…s cleaned up too; gate unix-only test helpers X-Shepherd-Wake: #23
johnnymo87
force-pushed
the
r14-mcp-startup-timeout
branch
from
November 22, 2026 06:45
de7bb4b to
84bc347
Compare
johnnymo87
added a commit
that referenced
this pull request
Nov 22, 2026
…ill the process group on a failed start A hung MCP server's initialize was awaited unbounded, so session/new, session/load, extensions/add and any extension lease hung with it. Startup is now bounded (default 25s, 0 = default). On a failed stdio start the child's process group is killed and stderr is collected with a 2s grace, since a grandchild holding the pipe kept spawn() waiting for EOF forever. ProcessExit's message now includes its source error. Port of patch 14 (fork #7) onto v1.60.2, in the fork-only module agents/mcp_startup_timeout.rs. Its parallel-load part is upstream (aaif-goose#12775). X-Shepherd-Wake: #23
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.
Description
Port of patch 14 (fork #7) onto v1.60.2, for bead workstation-6w7i.26.4.4 (R14).
On v1.60.2 an MCP server that never finishes
initializehangs session/new, session/load,extensions/addand every lease that starts it. Nothing bounds the start. honkd'smcp/ops.rsneedsextensions/addto return.McpClient::connectboundsserve_with_lifecyclewithGOOSE_EXTENSION_STARTUP_TIMEOUT. The default is 25s.0means the default, not "no bound": a slow firstnpx -y/uvxinstall is the reason to raise it. The per-extensiontimeoutstill applies only to requests.spawn()waiting for EOF forever.ProcessExitnow includes its source error in its message, so the timeout shows up in the error.agents/mcp_startup_timeout.rs. Upstream files get only registration lines and notices.lease.rsjoin_all).Known gaps, unchanged from 1.54:
docker execclient, so a hung server inside the container is not killed.tools/listis bounded only by the 300s request timeout.Tests: 7 exact tests, added to
patched-test.yml. They failed before the change and pass after it. The process-group test fails if the kill is removed.cargo clippy -p goose -p goose-agent --all-targets -D warningsis clean.References