fix(cli): reload MCP config after project selection - #966
Conversation
|
This looks like the stronger fix for #957 because the regression test exercises the actual activateProject() flow and verifies that the selected project's MCP server reaches the base agent definition. PR #973 appears to address the same root cause with overlapping changes. Before merging, could we confirm that this PR also clears every derived local-agent cache that depends on the previous cwd/project root? If yes, I would suggest merging #966 and closing #973 as a duplicate to avoid two competing fixes. |
|
Thanks for catching this. The local agent registry has two derived caches that depend on the previous working directory: I also expanded the regression test to warm the caches in the launch project, switch projects through Validation on the new head (
This incorporates the cache-reset part of #973 while keeping the project-picker coverage in this PR. |
|
Perfect, thanks for the thorough follow-up. Clearing both cwd-dependent caches and testing the full activateProject() transition addresses the concern. The added assertion that the old project's agent is absent is especially valuable. This now seems like the right PR to merge for #957. I’d suggest closing #973 as a duplicate once a maintainer has reviewed this update. |
Summary
.agents/mcp.jsonis loaded before the client is recreated.--agentoverride behavior.Fixes #957
Testing