René's URL Explorer Experiment


Title: Docker stdio MCP servers duplicated on /new and /resume (v1.0.68) · Issue #4049 · github/copilot-cli · GitHub

Open Graph Title: Docker stdio MCP servers duplicated on /new and /resume (v1.0.68) · Issue #4049 · github/copilot-cli

X Title: Docker stdio MCP servers duplicated on /new and /resume (v1.0.68) · Issue #4049 · github/copilot-cli

Description: Summary On v1.0.68, running /new or /resume (resuming a session not started during the current CLI run) spawns a fresh set of stdio MCP docker run clients without tearing down the previous set. Duplicates accumulate within the same CLI p...

Open Graph Description: Summary On v1.0.68, running /new or /resume (resuming a session not started during the current CLI run) spawns a fresh set of stdio MCP docker run clients without tearing down the previous set. Dup...

X Description: Summary On v1.0.68, running /new or /resume (resuming a session not started during the current CLI run) spawns a fresh set of stdio MCP docker run clients without tearing down the previous set. Dup...

Opengraph URL: https://github.com/github/copilot-cli/issues/4049

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Docker stdio MCP servers duplicated on /new and /resume (v1.0.68)","articleBody":"## Summary\n\nOn **v1.0.68**, running `/new` or `/resume` (resuming a session not started during the current CLI run) spawns a **fresh set of stdio MCP `docker run` clients without tearing down the previous set**. Duplicates accumulate within the **same** CLI process for its entire lifetime.\n\nThis looks related to #3440 but is a **different code path**: #3440 was about `session.disconnect()` not killing stdio processes (fixed in 1.0.51). Here, **no disconnect happens at all** — the CLI re-initializes MCP servers on `/new`/`/resume` and spawns a new set while the old set stays connected, so the kill-on-disconnect logic never runs.\n\n## Environment\n\n- Copilot CLI **1.0.68**\n- macOS (Darwin arm64)\n- MCP servers configured as stdio Docker containers (`docker run -i --rm …`) in `~/.copilot/mcp-config.json` — one `github-mcp-server` + three `grafana` instances\n\n## Actual behavior\n\nEvery configured stdio MCP server is duplicated per `/new` or `/resume`. `docker ps` shows 2× (or more) of every server, all parented to the same live `copilot` process. Because the containers run with `--rm`, they only self-remove when the whole CLI exits — so they pile up for the entire CLI session.\n\n## Affected version\n\n1.0.68\n\n## Steps to reproduce the behavior\n\n1. Configure one or more stdio Docker-based MCP servers.\n2. Start the CLI (session A) → one set of `docker run` clients spawns.\n3. Run `/new`, **or** `/resume` a session that was **not** opened during the current CLI run.\n4. A second set of clients spawns; the first set is **not** disconnected.\n\n## Expected behavior\n\nOn `/new` or `/resume`, the CLI should either **reuse** the existing MCP server connections or **disconnect** the outgoing session's stdio MCP servers before starting new ones.\n\n## Additional context\n\n### Evidence\n\nSingle `copilot` PID `71692`, alive ~19 min, holding **two full sets** spawned ~2 min apart — none orphaned, all share that PID as parent:\n\n```console\n$ ps -eo pid,ppid,etime,command | grep '[d]ocker run'\n72222 71692 19:12 docker run -i --rm --network host … github-mcp-server\n72225 71692 19:11 docker run -i --rm … grafana/mcp-grafana -t stdio\n72226 71692 19:11 docker run -i --rm … grafana/mcp-grafana -t stdio\n72227 71692 19:11 docker run -i --rm … grafana/mcp-grafana -t stdio\n72869 71692 17:32 docker run -i --rm --network host … github-mcp-server\n72870 71692 17:31 docker run -i --rm … grafana/mcp-grafana -t stdio\n72871 71692 17:31 docker run -i --rm … grafana/mcp-grafana -t stdio\n72880 71692 17:30 docker run -i --rm … grafana/mcp-grafana -t stdio\n\n$ docker ps --format '{{.Image}}' | sort | uniq -c\n   6 grafana/mcp-grafana\n   2 nexus…/github/github-mcp-server\n```\n\n### Impact\n\nResource leak: duplicated containers consume memory/CPU and, for named containers, cause `container \"x\" already exists` errors on the next spawn. The only reliable cleanup today is fully exiting the CLI.\n\n### Related\n\n- #3440 (fixed the disconnect path in 1.0.51; this is the `/new` + `/resume` re-init path, still leaking on 1.0.68)","author":{"url":"https://github.com/rjvq85","@type":"Person","name":"rjvq85"},"datePublished":"2026-07-07T13:00:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/4049/copilot-cli/issues/4049"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6b023219-fc37-78b2-189d-a6cb857576b2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB2C6:2EEEB5:C596EC:10DCB90:6A4D55EF
html-safe-noncecd77c38b3edfd1ec50556dc65f93e1451d7e16cb46eeac567eeab75248a63321
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkM2OjJFRUVCNTpDNTk2RUM6MTBEQ0I5MDo2QTRENTVFRiIsInZpc2l0b3JfaWQiOiI4OTQ3NDE1NzM4NDIwNjQ3NDA3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1961a7ab90bd3197d69b82acfaed0c8519451dad3a849a5806442da534ad0d09
hovercard-subject-tagissue:4828743692
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/github/copilot-cli/4049/issue_layout
twitter:imagehttps://opengraph.githubassets.com/365693dd7d57f96d5f805a7e3995bac5848c862f277c7842ced4d00765a93bda/github/copilot-cli/issues/4049
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/365693dd7d57f96d5f805a7e3995bac5848c862f277c7842ced4d00765a93bda/github/copilot-cli/issues/4049
og:image:altSummary On v1.0.68, running /new or /resume (resuming a session not started during the current CLI run) spawns a fresh set of stdio MCP docker run clients without tearing down the previous set. Dup...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerjvq85
hostnamegithub.com
expected-hostnamegithub.com
None92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6
turbo-cache-controlno-preview
go-importgithub.com/github/copilot-cli git https://github.com/github/copilot-cli.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id585860664
octolytics-dimension-repository_nwogithub/copilot-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id585860664
octolytics-dimension-repository_network_root_nwogithub/copilot-cli
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
release56fc8347865a14e2ec811533d68f929cf4e0ec19
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/copilot-cli/issues/4049#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcopilot-cli%2Fissues%2F4049
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%2Fgithub%2Fcopilot-cli%2Fissues%2F4049
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=github%2Fcopilot-cli
Reloadhttps://github.com/github/copilot-cli/issues/4049
Reloadhttps://github.com/github/copilot-cli/issues/4049
Reloadhttps://github.com/github/copilot-cli/issues/4049
Please reload this pagehttps://github.com/github/copilot-cli/issues/4049
github https://github.com/github
copilot-clihttps://github.com/github/copilot-cli
Notifications https://github.com/login?return_to=%2Fgithub%2Fcopilot-cli
Fork 1.7k https://github.com/login?return_to=%2Fgithub%2Fcopilot-cli
Star 10.9k https://github.com/login?return_to=%2Fgithub%2Fcopilot-cli
Code https://github.com/github/copilot-cli
Issues 1.8k https://github.com/github/copilot-cli/issues
Pull requests 26 https://github.com/github/copilot-cli/pulls
Discussions https://github.com/github/copilot-cli/discussions
Actions https://github.com/github/copilot-cli/actions
Projects https://github.com/github/copilot-cli/projects
Models https://github.com/github/copilot-cli/models
Security and quality 2 https://github.com/github/copilot-cli/security
Insights https://github.com/github/copilot-cli/pulse
Code https://github.com/github/copilot-cli
Issues https://github.com/github/copilot-cli/issues
Pull requests https://github.com/github/copilot-cli/pulls
Discussions https://github.com/github/copilot-cli/discussions
Actions https://github.com/github/copilot-cli/actions
Projects https://github.com/github/copilot-cli/projects
Models https://github.com/github/copilot-cli/models
Security and quality https://github.com/github/copilot-cli/security
Insights https://github.com/github/copilot-cli/pulse
Bughttps://github.com/github/copilot-cli/issues?q=type:"Bug"
Docker stdio MCP servers duplicated on /new and /resume (v1.0.68)https://github.com/github/copilot-cli/issues/4049#top
triagehttps://github.com/github/copilot-cli/issues?q=state%3Aopen%20label%3A%22triage%22
https://github.com/rjvq85
rjvq85https://github.com/rjvq85
on Jul 7, 2026https://github.com/github/copilot-cli/issues/4049#issue-4828743692
#3440https://github.com/github/copilot-cli/issues/3440
#3440https://github.com/github/copilot-cli/issues/3440
session.disconnect() does not kill stdio MCP server processes spawned for that session #3440https://github.com/github/copilot-cli/issues/3440
triagehttps://github.com/github/copilot-cli/issues?q=state%3Aopen%20label%3A%22triage%22
Bughttps://github.com/github/copilot-cli/issues?q=type:"Bug"
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.