Before submitting
Area
apps/server
Steps to reproduce
- Configure an OpenCode 2.0.22 provider instance (T3-spawned server, no
serverUrl, no OpenCode plugins).
- Start a new thread with
opencode/big-pickle and ask it to call t3_thread_configuration, or ask any thread to delegate_task to an OpenCode model and have the child call it.
- Look at
~/.local/share/opencode/log/opencode.log and T3's server log.
Expected behavior
OpenCode 2 threads and delegated OpenCode 2 children can call T3's MCP tools (delegate_task, task_status, t3_thread_*, ...), like Claude, Codex and Cursor threads.
Actual behavior
The agent finds no T3 tools. OpenCode2AdapterV2.ts names the server t3-code-<threadId> (non-alphanumerics to _). With V2 thread ids that is 96 characters for a project thread (thread:project:<projectId>:<uuid>) and over 100 for a delegated child (thread:delegated-task:command%3Amcp%3A<uuid>%3Adelegate-task%3A<clientRequestId>). OpenCode 2 rejects both:
- Project threads (65-100 chars):
mcp.add succeeds and GET /api/mcp shows the server connected, but OpenCode registers MCP tools under the server name as namespace and requires each namespace segment to match ^[A-Za-z0-9_-]{1,64}$ (packages/core/src/tool.ts namespaceError). All 72 tools are skipped; only the OpenCode log says so.
- Delegated children (over 100 chars): OpenCode's router (
maxParamLength 100) answers PUT /api/experimental/mcp/:server with 404, so T3 logs "Could not add T3 Code's MCP server to OpenCode." and the child runs without T3 tools.
Reproduced on main @ e22c880 with the free opencode/big-pickle model and no OpenCode plugins, so no third-party provider is involved. supportsMcpTools: false in the adapter's capabilities is not the cause; prepareTurn registers the server either way.
Impact
Major degradation or frequent failure
Version or commit
main @ e22c880 (also nightly 0.0.46-nightly.20261004.2648 and .20261005.2667)
Environment
Linux x64 (NixOS VM), Node 24.21, OpenCode 2.0.22 spawned by T3, opencode/big-pickle; also seen with cursor/claude-opus-5-5-1m via cursor-opencode-provider 0.8.0
Logs or stack traces
# OpenCode log, project thread (72 such lines, one per tool)
level=ERROR message="Skipping invalid tool registration" name=create_threads namespace=t3-code-thread_project_ce04e4e2-6c29-4ff0-a1d7-b089dd63e258_d3b2d715-c4a1-4b63-bb65-1634c3a3a8c4 error="Invalid tool namespace: \"t3-code-thread_project_ce04e4e2-..._d3b2d715-...\""
# T3 server log, delegated child
WARN Could not add T3 Code's MCP server to OpenCode.
ClientError:
[cause]: HttpClientError: Decode error (404 PUT http://127.0.0.1:34513/api/experimental/mcp/t3-code-thread_delegated-task_command_3Amcp_3A7ca20ace-cbf6-4ffc-bbf8-69558d406fca_3Adelegate-task_3Aoc-child-check-1)
The agent's answer in both cases: "NO_T3_TOOLS" (main thread thread:project:ce04e4e2-…:d3b2d715-…), "CHILD_NO_T3_TOOLS" (child of thread:project:760891bb-…:924738ca-…).
Workaround
None for delegated children. For main threads, an OpenCode 2 plugin can re-register long t3-code-* servers under a short alias and re-apply T3's per-thread permission rules to it.
Related: #8860 (same class of bug: long V2 ids over a 100-char route limit, fixed in T3's own routes by #8898); #15736 (Code Mode catalog flapping on the same prepareTurn/mcp.add path, with a 44-char name, so a different bug).
Model: Claude Opus 5.5 (1M). Harness: Claude Code in T3 Code.
Before submitting
Area
apps/server
Steps to reproduce
serverUrl, no OpenCode plugins).opencode/big-pickleand ask it to callt3_thread_configuration, or ask any thread todelegate_taskto an OpenCode model and have the child call it.~/.local/share/opencode/log/opencode.logand T3's server log.Expected behavior
OpenCode 2 threads and delegated OpenCode 2 children can call T3's MCP tools (
delegate_task,task_status,t3_thread_*, ...), like Claude, Codex and Cursor threads.Actual behavior
The agent finds no T3 tools.
OpenCode2AdapterV2.tsnames the servert3-code-<threadId>(non-alphanumerics to_). With V2 thread ids that is 96 characters for a project thread (thread:project:<projectId>:<uuid>) and over 100 for a delegated child (thread:delegated-task:command%3Amcp%3A<uuid>%3Adelegate-task%3A<clientRequestId>). OpenCode 2 rejects both:mcp.addsucceeds andGET /api/mcpshows the serverconnected, but OpenCode registers MCP tools under the server name as namespace and requires each namespace segment to match^[A-Za-z0-9_-]{1,64}$(packages/core/src/tool.tsnamespaceError). All 72 tools are skipped; only the OpenCode log says so.maxParamLength100) answersPUT /api/experimental/mcp/:serverwith 404, so T3 logs "Could not add T3 Code's MCP server to OpenCode." and the child runs without T3 tools.Reproduced on
main@ e22c880 with the freeopencode/big-picklemodel and no OpenCode plugins, so no third-party provider is involved.supportsMcpTools: falsein the adapter's capabilities is not the cause;prepareTurnregisters the server either way.Impact
Major degradation or frequent failure
Version or commit
main @ e22c880 (also nightly 0.0.46-nightly.20261004.2648 and .20261005.2667)
Environment
Linux x64 (NixOS VM), Node 24.21, OpenCode 2.0.22 spawned by T3,
opencode/big-pickle; also seen withcursor/claude-opus-5-5-1mvia cursor-opencode-provider 0.8.0Logs or stack traces
The agent's answer in both cases: "NO_T3_TOOLS" (main thread
thread:project:ce04e4e2-…:d3b2d715-…), "CHILD_NO_T3_TOOLS" (child ofthread:project:760891bb-…:924738ca-…).Workaround
None for delegated children. For main threads, an OpenCode 2 plugin can re-register long
t3-code-*servers under a short alias and re-apply T3's per-thread permission rules to it.Related: #8860 (same class of bug: long V2 ids over a 100-char route limit, fixed in T3's own routes by #8898); #15736 (Code Mode catalog flapping on the same
prepareTurn/mcp.addpath, with a 44-char name, so a different bug).Model: Claude Opus 5.5 (1M). Harness: Claude Code in T3 Code.