Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: opencode custom commands are not present in the list of availabe commads #13071

Closedpbmol(GitHub profile, opens in a new tab) opened this issue 6 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

with the nightly build 0.0.43-nightly.20260922.2096

  1. create a custom command in .opencode/commands folder.
  2. type /
  3. the custom commands should be suggested in the list of availabe commads

it was working with the previous version.

Expected behavior

the custom commands should be suggested in the list of availabe commads

Actual behavior

the custom commands is not present in the list of availabe commads

Impact

Blocks work completely

Version or commit

0.0.43-nightly.20260922.2096

Environment

maos 27

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

No response

  1. pbmol(GitHub profile, opens in a new tab) added labelsbug

  2. pbmol(GitHub profile, opens in a new tab) added labelsneeds-triage

  3. pbmol(GitHub profile, opens in a new tab) changed the title

  4. pbmol(GitHub profile, opens in a new tab) changed the title

  5. 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:

    1. Local commands: /model, /plan, /default
    2. OpenCode commands from GET /command for this thread's directory
    3. Skills as /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 calls command.list on the OpenCode server and keeps entries whose source is not "skill". Skill-sourced rows are dropped on purpose so they are not listed twice. MCP commands (source: "mcp") are kept. /compact is 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/commands folder 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.
    • A command whose name matches a visible skill is replaced by the /skill: row.

    If command.list errors or takes longer than 10 seconds, T3 treats the command list as empty and still publishes that workspace snapshot. The composer then keeps /compact plus 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/8017

    Sending /name uses that same command.list lookup. When the name is missing, T3 sends the text as a normal prompt instead of session.command, so the command does not run.

    Where

    • apps/server/src/provider/opencodeRuntime.ts — loadOpenCodeCommands (command.list)
    • apps/server/src/provider/Layers/OpenCodeProvider.ts — openCodeCommandsToServerProviderSlashCommands drops source === "skill"
    • apps/server/src/provider/Drivers/OpenCodeDriver.ts — 10s timeout becomes [], then replaces slashCommands for that cwd
    • packages/client-runtime/src/providerSkills.ts — skill names win over the same slash command
    • apps/web/src/components/chat/composerSlashCommandSearch.ts — provider commands only when / is at the start of the prompt
    • apps/web/src/components/ChatView.tsx — probe cwd is worktreePath or the project root

    Not a duplicate

    No open T3 issue for OpenCode .opencode/commands missing 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/18987

    What would decide it

    Please reply with:

    1. OpenCode version (opencode --version).
    2. In that same project, does the OpenCode TUI list the command?
    3. In T3, with / as the first character of an empty composer, are /init and /review listed?
    4. Is the thread on the main checkout or a worktree?
    5. One command filename (for example .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.

  6. juliusmarminge added labelsneeds more info

  7. juliusmarminge added labelsvia-triage

  8. juliusmarminge removed labelsneeds-triage

  9. thanks for the reply,

    1. OpenCode version v1.18.31.
    2. In that same project, does the OpenCode TUI list the command? yes
    3. In T3, with / as the first character of an empty composer, are /init and /review listed? i use to see them all including custom ones but now i see only /model and /usage-limits
    4. Is the thread on the main checkout or a worktree? main
    5. One command filename (for example .opencode/commands/review.md), and whether a provider refresh a minute after startup makes it appear. no
    Image

    as mentioned it was working fine, after the latest nightly update stoped

  10. @juliusmarminge actually if I press / as soon as the t3 code app starts, I can see the commands but after a few seconds they disappier

  11. in 0.0.43-nightly.20260925.2237 it started woking again, without chenging anything else on my system. in the last couple of days I saw it was very incosistent, it was working on and off, mostly off.

  12. pbmol(GitHub profile, opens in a new tab)commented

    I can confirm is reletad to https://github.com/pingdotgg/t3code/pull/13264, in fact if I disable opencode from the providers and enable it back it start working again. We have 2 custom mcps, so at startup it could be that they are not ready and giving a timeout.

    Any ETA on when it will be merged?

  13. Note

    Grok responding on behalf of Julius.

    Fixed by #19636, which just landed on main. When the OpenCode workspace command probe times out (for example while slow MCP servers are still starting), T3 now reports the command list as pending instead of caching an empty list, so it keeps your commands and retries. Your custom .opencode/commands entries should stay in the / menu after startup on the next nightly. Thanks for tracking down the timeout! If it still happens on a build that includes #19636, comment here and we will reopen.

  14. juliusmarminge closed this

Sign in to join this conversation.