Repository navigation
🔌 fix: Load MCP Tools When the Agent Builder Is Open - #17534
dustinhealy wants to merge 1 commit into
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the builder MCP discovery change.
No open issues 🎉
What changed in this PR
Fixes MCP tool discovery in Agent Builder when the current chat uses an ephemeral agent. Builder authorization observers no longer depend on the chat agent type, while hydration and panel-visibility gates remain unchanged.
Changes:
- Enables builder observers without selecting the ephemeral chat agent for editing.
- Updates component coverage and adds a cold-cache browser regression using a model spec that hides composer tool controls.
| File | Description |
|---|---|
e2e/specs/mock/mcp.spec.ts |
Adds browser coverage for MCP status, discovery requests, and tool selection. |
e2e/config/librechat.e2e.yaml |
Adds a model spec that isolates builder discovery from composer observers. |
client/src/components/SidePanel/Agents/AgentPanelSwitch.tsx |
Removes the ephemeral-agent restriction on builder observers. |
client/src/components/SidePanel/Agents/AgentPanelSwitch.spec.tsx |
Verifies observers activate without selecting the ephemeral agent for editing. |
Review effort: Balanced
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Opening Agent Builder while chatting with an ephemeral agent can leave MCP details showing Unknown and no tools. The builder incorrectly inherits the current chat's restriction on observing tool authorization.
Enable the builder's observers independently of the chat agent type. The existing hydration and panel-visibility gates remain in place, and opening the builder does not select the ephemeral chat agent as the agent being edited.
How it works
The visible builder owns discovery of its tool catalog and authorization state. This also lets its active queries refetch after connection mutations invalidate them.
Type of change
Testing
Tested environments/configuration: Chromium, synthetic local MCP server using the real MCP SDK, mock model, disposable MongoDB. The cold-cache model spec hides composer tool controls so another observer cannot mask the regression. No model inference request is required.
Automated tests:
Screenshots
Matching captures from the running application at 1280 × 720 with identical scenario and lockfile hashes. Only synthetic test data is shown.
Risk / compatibility
The change enables discovery when the builder is visible even if the active chat is ephemeral. It preserves the existing hydration and visibility gates. No API or configuration changes.
Checklist