fix(desktop): re-enable mcp_command reconciliation and harden spawn site#909
Merged
Conversation
69274aa to
8ef8eac
Compare
wpfleger96
approved these changes
Jun 8, 2026
Re-enable the generic `reconcile_provider_mcp_commands` migration that was accidentally removed from the startup sequence in PR #877. This reconciles `mcp_command` values in managed-agents.json against the discovery table on every launch — fixing stale "sprout-mcp-server" references and any future drift without a dedicated one-off function. Extended to cover both `app_data_dir()` and `canonical_dev_data_dir` so worktree instances are also healed. Additionally, harden the spawn site in runtime.rs: if `mcp_command` references a binary that cannot be resolved, log a warning and continue spawning without MCP rather than hard-failing. This prevents this entire class of breakage permanently, regardless of whether reconciliation ran. Fixes the user-reported issue where agents created before v0.3.12 fail to spawn because "sprout-mcp-server" no longer exists. Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
8ef8eac to
02cc882
Compare
tlongwell-block
pushed a commit
that referenced
this pull request
Jun 9, 2026
* origin/main: (32 commits) docs: add NIP-ER event reminders (#875) feat(acp): pass slash commands through to ACP connectors (#919) fix(sdk): resolve multi-word display names and add NIP-27 nostr:npub mention extraction (#905) fix(desktop): re-enable mcp_command reconciliation and harden spawn site (#909) Fix desktop DM and sidebar UI polish (#908) Animate reaction counts (#904) Mobile custom emoji + settings redesign (#906) Renew TTL when unarchiving ephemeral channels (#902) chore(release): release version 0.3.13 (#903) Collapse channel header actions (#901) sprout-agent: make Databricks defaults env-only (#868) Restyle settings sections (#894) Add emoji reaction particles (#890) Move settings into the app shell (#893) Tune chat text sizing (#891) Style channel header navigation (#889) fix: rename missed known_acp_provider_exact → known_acp_runtime_exact (#900) chore(deps): update radix-ui-primitives monorepo (#898) chore(deps): update actions/checkout digest to df4cb1c (#897) refactor: rename ACP "provider" to "runtime" across the codebase (#783) ... # Conflicts: # desktop/src/features/agents/ui/CreateAgentDialog.tsx
tlongwell-block
pushed a commit
that referenced
this pull request
Jun 9, 2026
* origin/main: (32 commits) docs: add NIP-ER event reminders (#875) feat(acp): pass slash commands through to ACP connectors (#919) fix(sdk): resolve multi-word display names and add NIP-27 nostr:npub mention extraction (#905) fix(desktop): re-enable mcp_command reconciliation and harden spawn site (#909) Fix desktop DM and sidebar UI polish (#908) Animate reaction counts (#904) Mobile custom emoji + settings redesign (#906) Renew TTL when unarchiving ephemeral channels (#902) chore(release): release version 0.3.13 (#903) Collapse channel header actions (#901) sprout-agent: make Databricks defaults env-only (#868) Restyle settings sections (#894) Add emoji reaction particles (#890) Move settings into the app shell (#893) Tune chat text sizing (#891) Style channel header navigation (#889) fix: rename missed known_acp_provider_exact → known_acp_runtime_exact (#900) chore(deps): update radix-ui-primitives monorepo (#898) chore(deps): update actions/checkout digest to df4cb1c (#897) refactor: rename ACP "provider" to "runtime" across the codebase (#783) ... Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co> # Conflicts: # desktop/src/features/agents/ui/CreateAgentDialog.tsx
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.
Problem
Agents created before the
sprout-mcp-serverbinary was removed (#850, shipped in 0.3.12) still have"mcp_command": "sprout-mcp-server"baked intoagents/managed-agents.json. Inspawn_agent_child, a non-emptymcp_commandmust resolve to a real binary on PATH or spawn fails hard — so these agents now show as stopped and can't re-spawn.#850 added a reconcile that was meant to clear the stale value, but it only ran against
app_data_dir, missing configs under worktree-style data dirs. That reconcile was then removed entirely in #877 (0.3.13), so nothing self-heals stale configs anymore.The user-reported workaround (symlinking anything named
sprout-mcp-serveronto PATH) confirms the root cause: it satisfiesresolve_command()and spawn succeeds again.Fix
Add a targeted one-shot migration
clear_stale_mcp_commandthat:"sprout-mcp-server"→"". User-customizedmcp_commands are never touched.canonical_dev_data_dir(deduped) — closing the gap that let worktree-dir configs survive chore: deprecate sprout-mcp — fill CLI gaps, remove crate and all references #850.Wired into
lib.rssetup alongside the existing migrations. Noruntime.rschange is needed — the empty-string spawn path (is_empty()→None) is already correct.Tests
4 new unit tests: stale value cleared; custom / empty / absent values untouched.
just desktop-tauri-test→ 434 passed, 0 failed (full desktop tauri suite).