fix: defer MCP command loading to background#9163
Closed
OscSer wants to merge 4 commits intoanomalyco:devfrom
Closed
fix: defer MCP command loading to background#9163OscSer wants to merge 4 commits intoanomalyco:devfrom
OscSer wants to merge 4 commits intoanomalyco:devfrom
Conversation
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
Collaborator
|
/review |
Contributor
|
lgtm |
github-actions bot
pushed a commit
to kiennq/opencode
that referenced
this pull request
Jan 28, 2026
Properly fixes MCP auto-start by explicitly calling initialization during bootstrap. Previous lazy-evaluation approach never triggered. - Initializes MCP commands asynchronously via Command.initMCPCommands() - Publishes command.updated event when MCP commands ready - Adds graceful handling for missing commands - Caches MCP template promises to avoid recomputation Based on PR anomalyco#9163 by Oscar Serna. Co-authored-by: Oscar Serna <oscr.serna@gmail.com>
kiennq
added a commit
to kiennq/opencode
that referenced
this pull request
Jan 29, 2026
Properly fixes MCP auto-start by explicitly calling initialization during bootstrap. Previous lazy-evaluation approach never triggered. - Initializes MCP commands asynchronously via Command.initMCPCommands() - Publishes command.updated event when MCP commands ready - Adds graceful handling for missing commands - Caches MCP template promises to avoid recomputation Based on PR anomalyco#9163 by Oscar Serna. Co-authored-by: Oscar Serna <oscr.serna@gmail.com>
kiennq
added a commit
to kiennq/opencode
that referenced
this pull request
Jan 30, 2026
Properly fixes MCP auto-start by explicitly calling initialization during bootstrap. Previous lazy-evaluation approach never triggered. - Initializes MCP commands asynchronously via Command.initMCPCommands() - Publishes command.updated event when MCP commands ready - Adds graceful handling for missing commands - Caches MCP template promises to avoid recomputation Based on PR anomalyco#9163 by Oscar Serna. Co-authored-by: Oscar Serna <oscr.serna@gmail.com>
kiennq
added a commit
to kiennq/opencode
that referenced
this pull request
Feb 2, 2026
Properly fixes MCP auto-start by explicitly calling initialization during bootstrap. Previous lazy-evaluation approach never triggered. - Initializes MCP commands asynchronously via Command.initMCPCommands() - Publishes command.updated event when MCP commands ready - Adds graceful handling for missing commands - Caches MCP template promises to avoid recomputation Based on PR anomalyco#9163 by Oscar Serna. Co-authored-by: Oscar Serna <oscr.serna@gmail.com>
kiennq
added a commit
to kiennq/opencode
that referenced
this pull request
Feb 3, 2026
Properly fixes MCP auto-start by explicitly calling initialization during bootstrap. Previous lazy-evaluation approach never triggered. - Initializes MCP commands asynchronously via Command.initMCPCommands() - Publishes command.updated event when MCP commands ready - Adds graceful handling for missing commands - Caches MCP template promises to avoid recomputation Based on PR anomalyco#9163 by Oscar Serna. Co-authored-by: Oscar Serna <oscr.serna@gmail.com>
kiennq
added a commit
to kiennq/opencode
that referenced
this pull request
Feb 3, 2026
Properly fixes MCP auto-start by explicitly calling initialization during bootstrap. Previous lazy-evaluation approach never triggered. - Initializes MCP commands asynchronously via Command.initMCPCommands() - Publishes command.updated event when MCP commands ready - Adds graceful handling for missing commands - Caches MCP template promises to avoid recomputation Based on PR anomalyco#9163 by Oscar Serna. Co-authored-by: Oscar Serna <oscr.serna@gmail.com>
kiennq
added a commit
to kiennq/opencode
that referenced
this pull request
Feb 5, 2026
Properly fixes MCP auto-start by explicitly calling initialization during bootstrap. Previous lazy-evaluation approach never triggered. - Initializes MCP commands asynchronously via Command.initMCPCommands() - Publishes command.updated event when MCP commands ready - Adds graceful handling for missing commands - Caches MCP template promises to avoid recomputation Based on PR anomalyco#9163 by Oscar Serna. Co-authored-by: Oscar Serna <oscr.serna@gmail.com>
kiennq
added a commit
to kiennq/opencode
that referenced
this pull request
Feb 5, 2026
Properly fixes MCP auto-start by explicitly calling initialization during bootstrap. Previous lazy-evaluation approach never triggered. - Initializes MCP commands asynchronously via Command.initMCPCommands() - Publishes command.updated event when MCP commands ready - Adds graceful handling for missing commands - Caches MCP template promises to avoid recomputation Based on PR anomalyco#9163 by Oscar Serna. Co-authored-by: Oscar Serna <oscr.serna@gmail.com>
kiennq
added a commit
to kiennq/opencode
that referenced
this pull request
Feb 7, 2026
Properly fixes MCP auto-start by explicitly calling initialization during bootstrap. Previous lazy-evaluation approach never triggered. - Initializes MCP commands asynchronously via Command.initMCPCommands() - Publishes command.updated event when MCP commands ready - Adds graceful handling for missing commands - Caches MCP template promises to avoid recomputation Based on PR anomalyco#9163 by Oscar Serna. Co-authored-by: Oscar Serna <oscr.serna@gmail.com>
kiennq
added a commit
to kiennq/opencode
that referenced
this pull request
Feb 7, 2026
Properly fixes MCP auto-start by explicitly calling initialization during bootstrap. Previous lazy-evaluation approach never triggered. - Initializes MCP commands asynchronously via Command.initMCPCommands() - Publishes command.updated event when MCP commands ready - Adds graceful handling for missing commands - Caches MCP template promises to avoid recomputation Based on PR anomalyco#9163 by Oscar Serna. Co-authored-by: Oscar Serna <oscr.serna@gmail.com>
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.
What does this PR do?
Prevents
Command.state()from waiting on MCP prompt loading, allowing user commands to appear immediately on startup without being blocked by MCP initialization.Key changes:
Command.initMCPCommands()called during bootstrapcommand.updatedevent when MCP commands are ready, syncing the TUI without blockingSession.prompt.command()to handle missing commands gracefullyHow did you verify your code works?
Issues
Fixes #8868
Fixes #8017