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
/ command list blocks on all MCP servers connecting (multi-second delay before file-based commands show up) #48629
GET /command (the data source for the TUI / autocomplete) waits for every enabled MCP server to finish connecting before returning anything, because Command.init awaits mcp.prompts() alongside config/skill loading, and the MCP InstanceState init blocks on all servers settling (30s timeout each).
With a handful of MCP servers configured, the / menu lacks file-based commands and prompts for several seconds after startup, even though the commands themselves come from local files.
Numbers
Measured with opencode serve + time curl /command (9 MCP servers enabled, cold instance):
as-is: 5.6s (slowest chain: an npx-launched server + a heavy node CLI)
with all MCP disabled: 0.65s — file commands + 56 skills load entirely within this budget
So the file-based command listing itself is sub-second; the entire remaining delay is MCP connect waiting.
Expected
File-based commands should be available immediately; MCP prompts can join the list asynchronously once their servers connect (e.g. via an event that lets clients re-fetch).
One trade-off worth naming: a client that fetches /command exactly once without subscribing to events would miss MCP prompts from its first response during the connection window — fine for autocomplete, but it should be a stated decision rather than an accident.
Happy to send a PR if this direction sounds right — I have a working implementation with tests.
v2: add optimistic UI while MCP prompt commands resolve #34860: v2: add optimistic UI while MCP prompt commands resolve — related, covers the UX gap during MCP prompt submission, but the fix direction overlaps (making file-based commands available before MCP servers settle)
If your issue is distinct enough (e.g. you want async loading rather than just graceful degradation), feel free to clarify. Otherwise, adding your benchmarks and PR offer to #36288 would be very helpful.
Thanks for measuring the delay and explaining how slow MCP connections block local slash commands. This is fixed in v2: MCP servers connect in the background, command listing reads currently available prompts without waiting, and commands refresh as MCP prompts arrive. v1 now receives only critical fixes; please upgrade with npm i -g @opencode/cli@latest. If local commands still wait for MCP connections on v2, please open a new issue with your version and timings.
Activity
github-actions commentedon Sep 12, 2026
This issue might be a duplicate of existing issues. Please check:
Command.initawaitingmcp.prompts()blocks file-based commands from appearing), just triggered by an unreachable server instead of a slow oneIf your issue is distinct enough (e.g. you want async loading rather than just graceful degradation), feel free to clarify. Otherwise, adding your benchmarks and PR offer to #36288 would be very helpful.
neriousy commentedon Oct 20, 2026
Thanks for measuring the delay and explaining how slow MCP connections block local slash commands. This is fixed in v2: MCP servers connect in the background, command listing reads currently available prompts without waiting, and commands refresh as MCP prompts arrive. v1 now receives only critical fixes; please upgrade with
npm i -g @opencode/cli@latest. If local commands still wait for MCP connections on v2, please open a new issue with your version and timings.