Roo-Code/src
Daniel bfbfaf6d46
fix: await MCP server initialization before returning McpHub instance (#11518)
* fix: await MCP server initialization before returning McpHub instance

MCP tools were unavailable on the first task turn when started via IPC
because McpHub's constructor fired initializeGlobalMcpServers() and
initializeProjectMcpServers() without awaiting them. getInstance()
returned a hub with servers still in "connecting" state.

Store the combined initialization promise and expose waitUntilReady(),
then await it in McpServerManager.getInstance() so the hub is only
returned after all servers have connected or timed out.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: assign McpHub instance only after waitUntilReady() resolves

Closes race condition where concurrent callers of getInstance() could
receive a hub that has not finished initialization. The hub is now
created in a local variable and only assigned to this.instance after
waitUntilReady() completes.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Roo Code <roomote@roocode.com>
2026-02-17 17:32:15 -07:00
..
__mocks__ Add timeout to OpenAI Compatible Provider Client (#9898) 2025-12-08 17:36:53 -08:00
__tests__ Reapply Batches 3-4: Skills, browser removal, provider removals (6 major-conflict cherry-picks) (#11475) 2026-02-14 22:06:24 -07:00
activate ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
api Add Anthropic Claude Sonnet 4.6 support across providers (#11509) 2026-02-17 12:28:18 -07:00
assets Show the Roo provider on the welcome screen (#8317) 2025-09-25 16:13:04 -04:00
core Release v3.48.0 (#11511) 2026-02-17 13:26:35 -07:00
extension Reapply Batch 2: 9 minor-conflict non-AI-SDK cherry-picks (#11474) 2026-02-14 16:40:07 -07:00
i18n Reapply Batches 3-4: Skills, browser removal, provider removals (6 major-conflict cherry-picks) (#11475) 2026-02-14 22:06:24 -07:00
integrations Reapply Batch 1: 22 clean non-AI-SDK cherry-picks (#11473) 2026-02-14 13:47:12 -07:00
services fix: await MCP server initialization before returning McpHub instance (#11518) 2026-02-17 17:32:15 -07:00
shared Reapply Batches 3-4: Skills, browser removal, provider removals (6 major-conflict cherry-picks) (#11475) 2026-02-14 22:06:24 -07:00
types Revert to pre-AI-SDK state (January 29, 2026) (#11462) 2026-02-13 16:45:18 -05:00
utils Reapply Batch 1: 22 clean non-AI-SDK cherry-picks (#11473) 2026-02-14 13:47:12 -07:00
workers Count tokens worker (#3037) 2025-04-29 12:29:25 -07:00
.gitignore PNPM + Turbo monorepo + Nightly releases (#3407) 2025-05-21 21:01:20 -07:00
.prettierignore PNPM + Turbo monorepo + Nightly releases (#3407) 2025-05-21 21:01:20 -07:00
.vscodeignore debug: Add ErrorBoundary component for better error handling (#5085) 2025-07-23 08:45:35 -04:00
esbuild.mjs Revert to pre-AI-SDK state (January 29, 2026) (#11462) 2026-02-13 16:45:18 -05:00
eslint.config.mjs Fix linter errors (#3821) 2025-05-21 23:16:43 -07:00
extension.ts Reapply Batch 1: 22 clean non-AI-SDK cherry-picks (#11473) 2026-02-14 13:47:12 -07:00
package.json Changeset version bump (#11513) 2026-02-17 14:25:31 -07:00
package.nls.ca.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.de.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.es.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.fr.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.hi.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.id.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.it.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.ja.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.ko.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.nl.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.pl.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.pt-BR.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.ru.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.tr.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.vi.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.zh-CN.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
package.nls.zh-TW.json ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
tsconfig.json Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
turbo.json Improve turbo task dependency declarations (#4323) 2025-06-04 09:32:27 -07:00
vitest.config.ts Show console logging in vitests when the --no-silent flag is set (#7467) 2025-08-28 12:51:21 -04:00
vitest.setup.ts Show console logging in vitests when the --no-silent flag is set (#7467) 2025-08-28 12:51:21 -04:00