Repository navigation
Description
Summary
With OpenCode Code Mode enabled, Executor's internal tools.search() can be resolved against OpenCode's outer Code Mode catalog instead of Executor's runtime catalog. This causes Executor discovery to fail in the interactive TUI even though the Executor daemon and direct CLI discovery are healthy.
Setting codemode: false for the Executor MCP server avoids the routing layer and fixes the problem by exposing executor_execute directly.
Environment
- opencode version:
0.0.0-next-16805 - OS: macOS Darwin 24.6.0 (arm64)
- Terminal: tmux
- Shell:
/bin/zsh - Executor version:
1.5.39 - Active plugins:
fetchmd.ts,tmux-notify.ts - Executor MCP endpoint:
http://localhost:4789/mcp
Reproduction
-
Configure Executor as a remote MCP server with the default Code Mode behavior:
{ "mcp": { "servers": { "executor": { "type": "remote", "url": "http://localhost:4789/mcp", "oauth": false } } } } -
Start a new interactive OpenCode 2 TUI session.
-
Ask the agent to use Executor discovery.
-
The tool invocation fails with:
Unknown tool 'search'. The tool may have been removed or renamed.
Expected Behavior
Executor's execute runtime should resolve its own internal tools.search() and tools.executor.coreTools.connections.list() calls when connected through OpenCode Code Mode.
Actual Behavior
The interactive TUI resolves tools.search() against OpenCode's outer Code Mode tool catalog, where it does not exist.
Changing the server configuration to:
{
"codemode": false
}exposes executor_execute directly. In this mode, tools.search({ query: "tenancy plan" }) works and returns the expected 14 tenancy-plan tools.
Additional Context
executor daemon status --base-url http://localhost:4789reports the daemon reachable.executor tools search "tenancy plan" --base-url http://localhost:4789succeeds.opencode2 mcp listreports Executor connected.- A fresh non-interactive
opencode2 runtest succeeded with the nested call, while the interactive TUI failed, suggesting inconsistent Code Mode catalog/routing behavior. - Restarting the OpenCode service and creating new TUI sessions did not reliably resolve the issue.
- The direct-tool workaround (
codemode: false) is currently working.
Activity
opencode-agent commentedon Aug 5, 2026
Executor already provides its own Code Mode runtime, so it should be opted out of OpenCode's outer Code Mode aggregation. Set
codemode: falseon that MCP server:{ "mcp": { "servers": { "executor": { "type": "remote", "url": "http://localhost:4789/mcp", "oauth": false, "codemode": false } } } }This exposes
executor_executedirectly to the model while Executor continues to handle its own internaltools.search()calls.rekram1-node commentedon Aug 21, 2026
executor is opted out by default
rekram1-node commentedon Aug 21, 2026
we changed that recently**