feat: Top level built-in command: /commands #2058

Closed
opened 2026-02-16 17:33:58 -05:00 by yindo · 6 comments
Owner

Originally created by @taqtiqa-mark on GitHub (Oct 12, 2025).

Originally assigned to: @thdxr on GitHub.

Given I have the `IDE AGENT` active.
When I use the top level built in `/commands`
Then I see the list of commands installed under `$OC_CONFIG/command/ide/*`
And then I see `/ide` as the command `$OC_CONFIG/command/ide/default.md`

Another scenario:

Given I have the `IDE AGENT` active.
And given there exists an unrelated user-defined/built-in command `/ide`
When I use the top level built in `/commands`
Then I see the list of commands installed under `$OC_CONFIG/command/ide/*`
And then I see `/ide_ide` as the command `$OC_CONFIG/command/ide/default.md`
Originally created by @taqtiqa-mark on GitHub (Oct 12, 2025). Originally assigned to: @thdxr on GitHub. ```gherkin Given I have the `IDE AGENT` active. When I use the top level built in `/commands` Then I see the list of commands installed under `$OC_CONFIG/command/ide/*` And then I see `/ide` as the command `$OC_CONFIG/command/ide/default.md` ``` Another scenario: ```gherkin Given I have the `IDE AGENT` active. And given there exists an unrelated user-defined/built-in command `/ide` When I use the top level built in `/commands` Then I see the list of commands installed under `$OC_CONFIG/command/ide/*` And then I see `/ide_ide` as the command `$OC_CONFIG/command/ide/default.md` ```
yindo closed this issue 2026-02-16 17:33:58 -05:00
Author
Owner

@rekram1-node commented on GitHub (Oct 12, 2025):

are you just saying slash commands should handle collisions differently? Because the title is confusing me

@rekram1-node commented on GitHub (Oct 12, 2025): are you just saying slash commands should handle collisions differently? Because the title is confusing me
Author
Owner

@taqtiqa-mark commented on GitHub (Oct 12, 2025):

are you just saying slash commands should handle collisions differently? Because the title is confusing me

Apologies. I am suggesting there should be a new built-in /commands, complimentary to /models, /agents, /themes.
And that the commands shown are conditional on the primary agent that is activated (bottom right corner in TUI)

@taqtiqa-mark commented on GitHub (Oct 12, 2025): > are you just saying slash commands should handle collisions differently? Because the title is confusing me Apologies. I am suggesting there should be a new built-in `/commands`, complimentary to `/models`, `/agents`, `/themes`. And that the commands shown are conditional on the `primary` agent that is activated (bottom right corner in TUI)
Author
Owner

@taqtiqa-mark commented on GitHub (Oct 12, 2025):

Take two different use cases:

  • A user employing opencode configured for a IDE role (hit tab until IDE AGENT).
  • The same user employing opencode configured for a TA role (hit tab until TA AGENT).

In each of those cases it is reasonable to anticipate that the set of Commands that have been introduced are quite different.
When the agent is IDE AGENT the list returned by /commands should not include any of the Commands that are in scope when the agent is switched to TA AGENT, and vice versa.

@taqtiqa-mark commented on GitHub (Oct 12, 2025): Take two different use cases: - A user employing opencode configured for a [IDE role](https://github.com/Cluster444/agentic) (hit `tab` until `IDE AGENT`). - The same user employing opencode configured for a [TA role](https://github.com/lastmile-ai/mcp-agent/tree/main/examples/workflows/workflow_deep_orchestrator) (hit `tab` until `TA AGENT`). In each of those cases it is reasonable to anticipate that the set of Commands that have been introduced are quite different. When the agent is `IDE AGENT` the list returned by `/commands` should not include any of the Commands that are in scope when the agent is switched to `TA AGENT`, and vice versa.
Author
Owner

@rekram1-node commented on GitHub (Oct 12, 2025):

When the agent is IDE AGENT the list returned by /commands should not include any of the Commands that are in scope when the agent is switched to TA AGENT, and vice versa.

Hm currently specifying an agent in the command is configuring what agent to use when executing the command, it doesn't mean that you have to currently be using that agent

Especially since you can specify a subagent

@rekram1-node commented on GitHub (Oct 12, 2025): > When the agent is IDE AGENT the list returned by /commands should not include any of the Commands that are in scope when the agent is switched to TA AGENT, and vice versa. Hm currently specifying an agent in the command is configuring what agent to use when executing the command, it doesn't mean that you have to currently be using that agent Especially since you can specify a subagent
Author
Owner

@taqtiqa-mark commented on GitHub (Oct 13, 2025):

Hm currently specifying an agent in the command is configuring what agent to use when executing the command

I believe I am addressing different behavior in the TUI regarding whether the command is listed or considered in-scope or "available".

Selecting the primary agent (tab action), sets the commands that are shown by /commands,

When I have the agent/ide.md as the active agent (IDE AGENT), then when I use the built-in /commands I do not want to see listed the commands: /grade, /comment, /appeal, /research that use the sub-agents of agent/ta.md (as you point out).

Similarly, when I have the agent/ta.md as the active agent (TA AGENT), then when I use the built-in /commands I do not want to see listed the commands: /ticket, /comment, /debug, /research that use the sub-agents of agent/ide.md.

Imagine the primary agent, by being set as the active agent (the TUI display in the lower right corner), sets rules common to all sub-agents and the commands listed in the TUI displays.

Note the overlapping commands /research and /comment. One pair under command/ide/ the other pair under command/ta/

Ideally this would then look like

# command/ide/research.md
---
description: Lorem ipsum.
---

@ide/research

**user_request**

$ARGUMENTS

and

# command/ta/research.md
---
description: Dolor sit amet.
---

@ta/research

**user_request**

$ARGUMENTS

etc.

@taqtiqa-mark commented on GitHub (Oct 13, 2025): > Hm currently specifying an agent in the command is configuring what agent to use when executing the command I believe I am addressing different behavior in the TUI regarding whether the command is listed or considered in-scope or "available". Selecting the primary agent (`tab` action), sets the commands that are shown by `/commands`, When I have the `agent/ide.md` as the active agent (`IDE AGENT`), then when I use the built-in `/commands` I do not want to see listed the commands: `/grade`, `/comment`, `/appeal`, `/research` that use the sub-agents of `agent/ta.md` (as you point out). Similarly, when I have the `agent/ta.md` as the active agent (`TA AGENT`), then when I use the built-in `/commands` I do not want to see listed the commands: `/ticket`, `/comment`, `/debug`, `/research` that use the sub-agents of `agent/ide.md`. Imagine the primary agent, by being set as the active agent (the TUI display in the lower right corner), sets rules common to all sub-agents and the commands listed in the TUI displays. Note the overlapping commands `/research` and `/comment`. One pair under `command/ide/` the other pair under `command/ta/` Ideally this would then look like ``` # command/ide/research.md --- description: Lorem ipsum. --- @ide/research **user_request** $ARGUMENTS ``` and ``` # command/ta/research.md --- description: Dolor sit amet. --- @ta/research **user_request** $ARGUMENTS ``` etc.
Author
Owner

@taqtiqa-mark commented on GitHub (Nov 23, 2025):

There is now a /commands. It went in a different direction. Nonetheless this is strictly obsolete.

@taqtiqa-mark commented on GitHub (Nov 23, 2025): There is now a `/commands`. It went in a different direction. Nonetheless this is strictly obsolete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2058