You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Spawn MCP servers on demand (first tool use) instead of eagerly at session start #53028
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Every configured MCP server starts with the session, whether the session uses it or not. With several stdio servers configured that is several extra processes per session from the first message on, and it compounds the process growth in #51249, #46174 and #52965 (multi-GB RAM from unused or duplicate servers).
Proposal: spawn each MCP server lazily, on the first tool call that actually needs it, and keep it for the rest of the session. A session that never touches MCP tools starts none of them. A failed demand-start gets a small bounded retry so a transient startup error does not wedge the first call.
Config, rulesets and server behavior stay unchanged, only the start timing moves. This complements the release-side work in #52946 and the session-scoped direction of #52305.
Checked both. #30123 was auto-closed for inactivity while mixing eager startup with leak reports, and its own duplicate notice suggested splitting the eager startup behavior into a separate issue, which is what this request does. #52251 was auto-closed by the 2-hour template window. Neither was declined on merit, and eager startup is still the current behavior.
Activity
github-actions commentedon Oct 3, 2026
This issue might be a duplicate of existing issues. Please check:
davtur19 commentedon Oct 3, 2026
Checked both. #30123 was auto-closed for inactivity while mixing eager startup with leak reports, and its own duplicate notice suggested splitting the eager startup behavior into a separate issue, which is what this request does. #52251 was auto-closed by the 2-hour template window. Neither was declined on merit, and eager startup is still the current behavior.