Skip to content

codemode: Executor nested tool search fails in TUI #40611

Closed

Description

@abeisleem

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

  1. 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
          }
        }
      }
    }
  2. Start a new interactive OpenCode 2 TUI session.

  3. Ask the agent to use Executor discovery.

  4. 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:4789 reports the daemon reachable.
  • executor tools search "tenancy plan" --base-url http://localhost:4789 succeeds.
  • opencode2 mcp list reports Executor connected.
  • A fresh non-interactive opencode2 run test 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

  1. opencode-agent commented on Aug 5, 2026

    @opencode-agent
    Contributor

    Executor already provides its own Code Mode runtime, so it should be opted out of OpenCode's outer Code Mode aggregation. Set codemode: false on that MCP server:

    {
      "mcp": {
        "servers": {
          "executor": {
            "type": "remote",
            "url": "http://localhost:4789/mcp",
            "oauth": false,
            "codemode": false
          }
        }
      }
    }

    This exposes executor_execute directly to the model while Executor continues to handle its own internal tools.search() calls.

  2. rekram1-node commented on Aug 21, 2026

    @rekram1-node
    Contributor

    executor is opted out by default

  3. rekram1-node commented on Aug 21, 2026

    @rekram1-node
    Contributor

    we changed that recently**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions