🤖 fix: restore agent skills slash commands #1786
Closed
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.
Fixes agent skills slash commands (e.g.
/mux-docs) by making skill discovery/resolution resilient and debuggable.agentSkills.list/getwith toasts instead of falling through to “Unknown command”.muxMetadata.rawCommandfor agent-skill user messages.agentSkills.list/getwithworkspaceIdand add a transcript display regression test.📋 Implementation Plan
Plan: Restore agent skills as slash commands (suggestions + execution + display)
Findings (what changed + when)
c172866ade9de0a61996b6eb6174ce864aa72d78— Mon Jan 19, 2026 —🤖 feat: expose agent skills as slash commands (#1673)agentSkills.list/getoRPC endpoints + ChatInput interception for/{skill}.Current symptoms (from your repro)
/suggestions (even with prefix filtering and after scrolling)./mux-docsresults in “Unknown command”.Most likely failure point
In
src/browser/components/ChatInput/index.tsx:agentSkillDescriptorsloaded viaapi.agentSkills.list(...).api.agentSkills.get(...)to resolve unknown slash commands into a skill invocation.Recommended approach (fix root cause + add guardrails)
Approach A (recommended): Make skill lookup reliable + make failures debuggable
Net LoC (product code only): ~40–120
Surface the real error (frontend)
src/browser/components/ChatInput/index.tsxapi.agentSkills.list(...)fails, show a non-spammy toast like “Failed to load agent skills” with a short error message./{something}andapi.agentSkills.get(...)throws, show a toast like:Harden agent skills discovery/lookup (backend)
agentSkills.list/getshould be best-effort and never take down the feature due to a runtime-specific edge.Concrete hardening targets:
src/node/orpc/router.ts→resolveAgentDiscoveryContext(...)workspaceName, and add a defensive fallback ifruntimeConfigis missing/corrupt).aiService.sendMessage(projectPath === name).src/node/services/agentSkills/agentSkillsService.tsruntime instanceof SSHRuntimecheck to aRemoteRuntime-based check (SSH + Docker).Add a regression test that matches your repro
agentSkills.list({ workspaceId })returns at least the built-ins (e.g.mux-docs)agentSkills.get({ workspaceId, skillName: "mux-docs" })succeedsagentSkills.getproduces a skill-specific error toast (not generic “unknown command”).Approach B (follow-up): Fix transcript display for skill invocations
Net LoC (product code only): ~5–15
Once skills execute again, also fix the display regression so the transcript shows the original slash command (
muxMetadata.rawCommand) instead of the synthetic “Run the … skill” text.5e45e7cc74af3351892650849ffe1f87116bf6ed(🤖 fix: add compact retry shortcut for stream errors (#1752)).src/browser/utils/messages/StreamingMessageAggregator.tsValidation / exit criteria
/mux-docsruns the skill (no “Unknown command”)./menu (and via prefix filtering like/mux).make typecheck+make static-checkpass.Notes
Generated with
mux• Model:openai:gpt-5.2• Thinking:xhigh• Cost: $4.36