You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Slow chat startup: npx commands for mcp, @upsta, and @model block chat initiation #820
There is a noticeable delay when starting a chat session in opencode. When a user opens opencode and writes in the chat (e.g., "hi"), there is a delay before a response appears. This appears to be due to the application executing npx commands for multiple processes—such as loading the mcp servers, as well as @upsta and @model—right when a chat session is initiated, which may hold up the main thread and block chat responsiveness.
Questions to consider:
Does loading the mcp servers need to hold the main thread, or could it be deferred or parallelized?
Can the startup of @upsta and @model (also using npx) be optimized so chat is available more quickly?
Steps to reproduce:
Open opencode.
Write "hi" in the chat.
Notice the delay before receiving a response.
Expected behavior:j Chat should respond with minimal delay. Startup times should be improved by optimizing how and when npx is run for mcp, @upsta, and @model, and by exploring whether mcp loading can avoid holding the main thread.
Activity
pbnj commentedon Jul 24, 2025
I notice this in particular the more MCP servers are registered and enabled.
With 5 MCP servers enabled:
With the same 5 MCP servers disabled:
Interactively with 5 MCP servers enabled (~15s for a response):
GMT20250724-203238_Clip_Peter.they_them.s.Clip.07_24_2025.mp4
Interactively with the same 5 MCP servers disabled (~1s for a response):
GMT20250724-203656_Clip_Peter.they_them.s.Clip.07_24_2025.mp4
arsham commentedon Aug 23, 2025
Have you found any solution to this?
rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!