[Bug]: opencode custom commands are not present in the list of availabe commads #13071
pbmol(GitHub profile, opens in a new tab) added labelsbug
pbmol(GitHub profile, opens in a new tab) added labelsneeds-triage
pbmol(GitHub profile, opens in a new tab) changed the title
pbmol(GitHub profile, opens in a new tab) changed the title
juliusmarminge added labelsneeds more info
juliusmarminge added labelsvia-triage
juliusmarminge removed labelsneeds-triage
juliusmarminge closed this
Sign in to join this conversation.
Triage#
Verdict: Not a regression in
0.0.43-nightly.20260922.2096(b5a0f810). Keep open, but this report is not enough to call a T3 bug. The previous nightly (0.0.43-nightly.20260922.2083,0141bc2bf) has the same OpenCode command path. Nothing between those builds touches slash-command discovery or the composer menu. The behavior has been stable since #11519.Desktop uses the shared web composer. There is no separate desktop command list.
What T3 does#
Typing
/at the start of the prompt lists three kinds of rows:/model,/plan,/defaultGET /commandfor this thread's directory/skill:…when Show skills in slash menu is on (default)Project commands in
.opencode/commands/*.md(and the legacy.opencode/command/directory) are OpenCode's job. T3 does not scan those folders. It callscommand.liston the OpenCode server and keeps entries whosesourceis not"skill". Skill-sourced rows are dropped on purpose so they are not listed twice. MCP commands (source: "mcp") are kept./compactis added by T3 even when OpenCode returns nothing.The directory for that probe is the thread worktree if the thread has one, otherwise the project root. A T3 worktree usually lives outside the repo, and OpenCode only walks upward from that directory, so a
.opencode/commandsfolder in the main checkout is invisible from the worktree.Two other filters hide provider commands even when OpenCode has them:
/must be at position 0 of the whole message. A/later in the text, including at the start of a later line, shows/model,/plan,/default, and skills only. OpenCode commands are omitted because OpenCode only expands a slash command when it is the entire message./skill:row.If
command.listerrors or takes longer than 10 seconds, T3 treats the command list as empty and still publishes that workspace snapshot. The composer then keeps/compactplus the local commands, and it does not probe that directory again until providers are refreshed. OpenCode often withholds the command list until MCP startup finishes (often well past 10 seconds): https://github.com/anomalyco/opencode/issues/8017Sending
/nameuses that samecommand.listlookup. When the name is missing, T3 sends the text as a normal prompt instead ofsession.command, so the command does not run.Where#
apps/server/src/provider/opencodeRuntime.ts—loadOpenCodeCommands(command.list)apps/server/src/provider/Layers/OpenCodeProvider.ts—openCodeCommandsToServerProviderSlashCommandsdropssource === "skill"apps/server/src/provider/Drivers/OpenCodeDriver.ts— 10s timeout becomes[], then replacesslashCommandsfor that cwdpackages/client-runtime/src/providerSkills.ts— skill names win over the same slash commandapps/web/src/components/chat/composerSlashCommandSearch.ts— provider commands only when/is at the start of the promptapps/web/src/components/ChatView.tsx— probe cwd isworktreePathor the project rootNot a duplicate#
No open T3 issue for OpenCode
.opencode/commandsmissing from/. Upstream OpenCode reports of commands missing until MCP or config load finishes: https://github.com/anomalyco/opencode/issues/8017 and https://github.com/anomalyco/opencode/issues/18987What would decide it#
Please reply with:
opencode --version)./as the first character of an empty composer, are/initand/reviewlisted?.opencode/commands/review.md), and whether a provider refresh a minute after startup makes it appear.If the TUI shows the command and T3 never does, including after a refresh, this becomes a T3 bug. If the TUI is also empty, it stays on OpenCode. If only worktree threads miss it, the probe cwd is the bug.
Next step#
Waiting on those answers. No patch from this triage.