Repository navigation
Description
Description
A remote MCP server (executor) configured with codemode: false per the v2 docs exposes 6 of its 7 tools natively (executor_skills, executor_resume, the four executor_*artifact* tools) but its execute tool is dropped - it never appears as executor_execute. The model instead gets Code Mode's own execute, whose catalog only contains native namespaces (browser, opencode): tools.search({query:'spotify'}) returns {items: [], remaining: 0, next: null} and direct paths fail with Unknown tool ... Did you mean tools.browser.files.get. The served execute description still embeds the server's ## Available integrations list, advertising tools that search can never return.
Expected: with codemode: false, all 7 server tools are on the native list as <server>_<tool> per the docs ("expose tools directly instead of through Code Mode"), including executor_execute, which reaches the server's own sandbox.
Actual: fingerprints proving the in-session execute is not the server's sandbox:
in-session execute |
server (raw MCP control session, same endpoint) | |
|---|---|---|
| search envelope | {items, remaining, next} |
{items, total, hasMore, nextOffset} |
emit |
undefined |
function |
search('spotify') |
0 results | 50 results (spotify.org.localSpotify...) |
| unknown-tool suggestions | tools.browser.* / tools.opencode.* only |
server envelope errors |
Regression window: config unchanged since 2026-09-21. It worked through 2026-10-02 on @opencode-ai/cli@next, which logged configuration compatibility diagnostic ... path=["mcp","servers","executor","codemode"] kind=unsupported action="Omitted native setting that cannot be represented in V1" - the flag was dropped, Code Mode stayed on, and tools.executor.execute was reachable. After switching to @opencode/cli 2.0.23 (2026-10-05) and 2.0.24 (2026-10-06 11:07), the flag is honored and the server's execute is lost.
Control: codemode: true works - the catalog contains tools.executor.execute and nesting await tools.executor.execute({code}) reaches the real sandbox (typeof emit → "function"), with live integration calls verified end-to-end. Interim workaround applied: keep codemode: true and nest.
Plugins
none
OpenCode version
v2.0.24 (channel: latest, bun global @opencode/cli; reporter previously on @opencode-ai/cli@next)
Steps to reproduce
- Add a remote MCP server with
"codemode": falsewhosetools/listreturns 7 tools including one namedexecute. - Start a session and list tools: 6
<server>_*tools appear,<server>_executedoes not, a genericexecutedoes. - Inside
execute:tools.search({query:'spotify',limit:3})→ 0 results, envelope{items, remaining, next}. - Control: open a raw MCP session (
initialize+tools/call execute) against the same endpoint → same query returns 50 results, envelope{items, total, hasMore, nextOffset}. - Set the server to
"codemode": trueand runopencode reload→executor (7 tools)appears in the catalog and nested calls work.
Screenshot and/or share link
No screenshot. Related, possibly the inverse side of the same bug: #51849 (connected MCP tools unavailable in Code Mode; there codemode: false is the working workaround, while here the false path is what drops the server's execute).
Operating System
Arch-based (kernel 7.2.5-3-omarchy, x64)
Terminal
kitty
Activity
github-actions commentedon Oct 6, 2026
This issue does not fully meet our contributing guidelines.
What needs to be fixed:
Descriptionfield. The report currently puts its description underSummaryand omits that required field.Please edit this issue to address the above within 72 hours, or it will be automatically closed.
This issue might be a duplicate of an existing issue. Please check:
Unknown tool; it reports related MCP tool exposure and search behavior, though the configuration differs.If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Oct 6, 2026
This issue still does not fully meet the Bug Report template requirement: the report is under "Summary", but the required "Description" field is missing. Please use the Bug Report template’s "Description" field with the existing report content. The needs:compliance label remains until that is updated.
github-actions commentedon Oct 6, 2026
Thanks for updating the issue with a clear description, reproduction steps, and system information!
opencode-agent commentedon Oct 15, 2026
I couldn't reproduce this on v2.0.24 (your version) or on the current latest, v2.0.29, so I'm closing it.
Setup: a remote streamable-HTTP MCP server named
executorwith"codemode": false. Itstools/listreturns 7 tools:execute,skills,resume, and fourartifact_*tools. I also pointed the model at a mock OpenAI-compatible provider that logs the exacttoolsarray OpenCode sends.Result on both versions: after the MCP server finishes connecting, the request includes all 7 tools as direct tools next to Code Mode's own
execute:A model call to
executor_execute({code: "typeof emit"})went to the MCP server's ownexecutehandler and returned its response, not OpenCode's Code Mode sandbox. On the registration path,executor_executeonly collides with the reserved bareexecutename when there's no namespace, so it isn't filtered out.Two things that could explain what you saw:
codemode: false, the server's MCPinstructionsgo into the system prompt verbatim (<mcp_instructions>). If those instructions say "use theexecutetool…" and list integrations, a model can call OpenCode's genericexecuteinstead ofexecutor_execute. That would explain the{items, remaining, next}envelope, the empty search results, and thetools.browser/tools.opencodesuggestions. A model listing its own tools isn't reliable evidence of what was sent, so check the provider request or the tool call name in the transcript.opencode run --standalone), I saw a request go out with the server's instructions but none of its tools. That affects all of the server's tools at once, not justexecute, so it doesn't match "6 of 7". It may be related to mcp: Code Mode tool calls fail with Unknown tool for connected servers (codemode:false works) #51849.If you can still reproduce this, please reopen with the provider request's tool names (or a session export showing the
executor_*tool list withoutexecutor_execute) and the server'stools/listentry forexecute.