René's URL Explorer Experiment


Title: Startup getSnapshot() on the critical path delays the first tools/list ~10s (health-probe clients show 'tools fetch failed') · Issue #461 · getsentry/XcodeBuildMCP · GitHub

Open Graph Title: Startup getSnapshot() on the critical path delays the first tools/list ~10s (health-probe clients show 'tools fetch failed') · Issue #461 · getsentry/XcodeBuildMCP

X Title: Startup getSnapshot() on the critical path delays the first tools/list ~10s (health-probe clients show 'tools fetch failed') · Issue #461 · getsentry/XcodeBuildMCP

Description: Summary On a cold start, the stdio transport comes up fast (initialize responds in well under a second), but the first tools/list response is delayed ~10–17s. During that window the server is up and healthy, but any MCP client that uses ...

Open Graph Description: Summary On a cold start, the stdio transport comes up fast (initialize responds in well under a second), but the first tools/list response is delayed ~10–17s. During that window the server is up an...

X Description: Summary On a cold start, the stdio transport comes up fast (initialize responds in well under a second), but the first tools/list response is delayed ~10–17s. During that window the server is up an...

Opengraph URL: https://github.com/getsentry/XcodeBuildMCP/issues/461

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Startup getSnapshot() on the critical path delays the first tools/list ~10s (health-probe clients show 'tools fetch failed')","articleBody":"## Summary\n\nOn a cold start, the stdio transport comes up fast (`initialize` responds in well under a second), but the **first `tools/list` response is delayed ~10–17s**. During that window the server is up and healthy, but any MCP client that uses a short-timeout health probe for `tools/list` (e.g. Claude Code's `claude mcp list`) reports the server as `Connected · tools fetch failed`, even though in-session tool calls work fine once the client's longer startup timeout has elapsed.\n\nThe delay appears to come from the startup lifecycle snapshot being `await`ed on the critical path *after* the transport is running but *before* the server settles into steady state.\n\n## Environment\n\n- **XcodeBuildMCP**: 2.6.2 (latest published; behaviour re-checked against `main` HEAD — the relevant code is unchanged there)\n- **Transport**: stdio (`xcodebuildmcp mcp`)\n- **Host**: macOS (Apple Silicon), Xcode 27\n- **Client**: Claude Code (short `tools/list` health probe); also reproducible by timing a raw `tools/list` over stdio\n\n## Observed behaviour / timings\n\n- `Server running on stdio` logged at ~385ms\n- `initialize` round-trips in ~0.8s\n- First `tools/list` returns after ~10–17s\n- In-session tool calls (`list_sims`, builds, etc.) all work — this is purely a first-response latency issue, so it presents as **cosmetic** but it makes the server look broken to any health-probe client.\n\n## Where it comes from (from source, `main` HEAD)\n\n`src/server/start-mcp-server.ts` starts the stdio transport, marks the lifecycle `running`, and then **awaits the startup snapshot on the critical path**:\n\n```ts\n// src/server/start-mcp-server.ts  (main)\nlifecycle.markPhase('starting-stdio-transport');\nawait startServer(server, { /* ... */ });        // transport is now up\n// ...\nlifecycle.markPhase('running');\nconst startupSnapshot = await lifecycle.getSnapshot();   // \u003c-- awaited before the server settles\nlog('info', `[mcp-lifecycle] start ${JSON.stringify(startupSnapshot)}`);\n// ...\nlifecycle.markPhase('deferred-initialization');\nvoid bootstrap.runDeferredInitialization({ /* ... */ }); // \u003c-- already fire-and-forget\n```\n\n`lifecycle.getSnapshot()` (in `src/server/mcp-lifecycle.ts`) gathers, among other things, the active simulator os_log sessions (`listActiveSimulatorLaunchOsLogSessions()`) and a peer-process sample (`matchingMcpProcessCount`). That snapshot is `await`ed synchronously in the startup sequence, so the server does not become responsive to the first `tools/list` until it resolves.\n\nNotably, a `runDeferredInitialization(...)` fire-and-forget hook already exists immediately below the `getSnapshot()` call — the startup snapshot looks like a natural fit for the same deferred path.\n\n## What I ruled out\n\n- **Peer-count (`matchingMcpProcessCount`) sampling is not the cause.** The `[mcp-lifecycle] startup anomalies: peer-count-high` warning is a red herring: reaping the leaked peer processes down to a normal count did **not** change the ~10s. So the cost is in the snapshot's other work (the simulator os_log session enumeration path), not the peer sample.\n- **Not a client-side timeout knob.** The delay is server-side; raising the client MCP timeout does not make `tools/list` return faster — it only lets the (successful) slow response through.\n\n## Suggested fix\n\nMove the startup `getSnapshot()` (and specifically the simulator os_log session enumeration it performs) **off the startup critical path** so the first `tools/list` is answered immediately — e.g. make the start-time snapshot fire-and-forget (`void lifecycle.getSnapshot().then(...)`) or fold it into the existing `runDeferredInitialization(...)` block just below it. The telemetry/anomaly logging it feeds is not something the first `tools/list` needs to block on.\n\n## Repro sketch\n\n1. `xcodebuildmcp mcp` over stdio.\n2. Send `initialize`, then immediately `tools/list`; time the `tools/list` response.\n3. Observe `initialize` fast, `tools/list` ~10s+ on a cold start.\n\nHappy to test a patch or provide more startup profiling if useful. Thanks for the great tool.\n","author":{"url":"https://github.com/diskude","@type":"Person","name":"diskude"},"datePublished":"2026-07-06T11:29:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/461/XcodeBuildMCP/issues/461"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:467447a6-7918-7a5e-ad78-3397cac4dc48
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id83CC:4D576:1376AB4:1BC701F:6A4CC113
html-safe-noncee3a92787137dc25432b85afb65e657ea3064e2ad687e237aa7b3a1d8a06558b3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0NDOjRENTc2OjEzNzZBQjQ6MUJDNzAxRjo2QTRDQzExMyIsInZpc2l0b3JfaWQiOiI2NzA0NDM0NjgyMjk5OTkwMjkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd82021d9706b262e90ccf2bb067b85c60bcd9f04e0cf0ac2ebdd79083e3bf4de
hovercard-subject-tagissue:4818672839
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/XcodeBuildMCP/461/issue_layout
twitter:imagehttps://opengraph.githubassets.com/78eada12dd911dac2f6321b3d8e8c8dfafc92152374cf64bd6f5a278b679989d/getsentry/XcodeBuildMCP/issues/461
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/78eada12dd911dac2f6321b3d8e8c8dfafc92152374cf64bd6f5a278b679989d/getsentry/XcodeBuildMCP/issues/461
og:image:altSummary On a cold start, the stdio transport comes up fast (initialize responds in well under a second), but the first tools/list response is delayed ~10–17s. During that window the server is up an...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamediskude
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
go-importgithub.com/getsentry/XcodeBuildMCP git https://github.com/getsentry/XcodeBuildMCP.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id945551361
octolytics-dimension-repository_nwogetsentry/XcodeBuildMCP
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id945551361
octolytics-dimension-repository_network_root_nwogetsentry/XcodeBuildMCP
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec03e7e569190bc89b638cdd4acb4b6c6b38a170a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/getsentry/XcodeBuildMCP/issues/461#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2FXcodeBuildMCP%2Fissues%2F461
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2FXcodeBuildMCP%2Fissues%2F461
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2FXcodeBuildMCP
Reloadhttps://github.com/getsentry/XcodeBuildMCP/issues/461
Reloadhttps://github.com/getsentry/XcodeBuildMCP/issues/461
Reloadhttps://github.com/getsentry/XcodeBuildMCP/issues/461
Please reload this pagehttps://github.com/getsentry/XcodeBuildMCP/issues/461
getsentry https://github.com/getsentry
XcodeBuildMCPhttps://github.com/getsentry/XcodeBuildMCP
Please reload this pagehttps://github.com/getsentry/XcodeBuildMCP/issues/461
Notifications https://github.com/login?return_to=%2Fgetsentry%2FXcodeBuildMCP
Fork 300 https://github.com/login?return_to=%2Fgetsentry%2FXcodeBuildMCP
Star 6k https://github.com/login?return_to=%2Fgetsentry%2FXcodeBuildMCP
Code https://github.com/getsentry/XcodeBuildMCP
Issues 14 https://github.com/getsentry/XcodeBuildMCP/issues
Pull requests 8 https://github.com/getsentry/XcodeBuildMCP/pulls
Discussions https://github.com/getsentry/XcodeBuildMCP/discussions
Actions https://github.com/getsentry/XcodeBuildMCP/actions
Projects https://github.com/getsentry/XcodeBuildMCP/projects
Security and quality 0 https://github.com/getsentry/XcodeBuildMCP/security
Insights https://github.com/getsentry/XcodeBuildMCP/pulse
Code https://github.com/getsentry/XcodeBuildMCP
Issues https://github.com/getsentry/XcodeBuildMCP/issues
Pull requests https://github.com/getsentry/XcodeBuildMCP/pulls
Discussions https://github.com/getsentry/XcodeBuildMCP/discussions
Actions https://github.com/getsentry/XcodeBuildMCP/actions
Projects https://github.com/getsentry/XcodeBuildMCP/projects
Security and quality https://github.com/getsentry/XcodeBuildMCP/security
Insights https://github.com/getsentry/XcodeBuildMCP/pulse
Startup getSnapshot() on the critical path delays the first tools/list ~10s (health-probe clients show 'tools fetch failed')https://github.com/getsentry/XcodeBuildMCP/issues/461#top
https://github.com/diskude
diskudehttps://github.com/diskude
on Jul 6, 2026https://github.com/getsentry/XcodeBuildMCP/issues/461#issue-4818672839
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.