fix: load MCP servers on lazy-resume so tools work after restart#561
Merged
fix: load MCP servers on lazy-resume so tools work after restart#561
Conversation
Resumed sessions were missing McpServers and SkillDirectories in both the ResumeSessionConfig and the fresh-session fallback. This caused MCP tools (e.g., WorkIQ) to be unavailable until manual /mcp reload. Also guard /mcp reload on mobile — it requires a local SDK session which doesn't exist in remote mode. Show a friendly message instead of crashing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The public ResumeSessionAsync (used by sidebar resume, bridge resume, and external session resume) had the same missing McpServers/SkillDirectories as the lazy-resume path. Add them + regression test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Owner
Author
🔍 Multi-Model Code Review — PR #561 (Final review)PR: fix: load MCP servers on lazy-resume so tools work after restart Status of All Findings
Final Review (3/3 unanimous — no issues)All 3 reviewers confirmed:
Pre-existing note (not a blocker): Two other resume paths ( Recommendation✅ Approve — All findings resolved. All resume paths covered. Ready to merge. |
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.
Summary
Two fixes for MCP server availability:
1. MCP servers missing on lazy-resumed sessions
When sessions are lazily resumed after app restart, the
ResumeSessionConfigwas missingMcpServersandSkillDirectories. This meant MCP tools (e.g., WorkIQ, Maestro) were unavailable until the user manually ran/mcp reload.Fix: Load MCP servers and skill directories in
EnsureSessionConnectedAsyncbefore creating the resume config. Also applied to the fresh-session fallback path.2.
/mcp reloadcrashes on mobileThe command tried to access the local SDK session which doesn't exist in remote mode, throwing
InvalidOperationException. The guard existed inCopilotServicebut the UI called through without checking first.Fix: Guard in
Dashboard.razorbefore callingReloadMcpServersAsync, showing a friendly message.Test plan
LazyResumePath_IncludesMcpServersAndSkills— structural test verifying MCP servers in both resume and fallback configs🤖 Generated with Claude Code