Description
The task tool prompt contains the following instruction:
in packages/opencode/src/tool/task.txt
- When you are instructed to execute custom slash commands. Use the Task tool with the slash command invocation as the entire prompt. The slash command can take arguments. For example: Task(description="Check the file", prompt="/check-file path/to/file.py")
...however this simply doesn't work.
Apparently when using task via TUI/UI
if an agent adds in the prompt field of task
something like /slashcommand from an existing custom command
it simply sends the text as-is and doesn't "expand" the command.
I also tried asking the agent to instead of filling the prompt field try doing it with a field called command both with / at the beginning and without it, neither works.
I also tried with command in markdown and json and other configs.
Plugins
none
OpenCode version
1.3.9
Steps to reproduce
Steps to reproduce:
- create a simple slash command: if you see this say SLASH COMMANDS WORKS
- optionally create an agent without permissions (because the agent could decide to read opencode's configuration to find the command without knowing what's happening)
- optionally create an agent that only has task permissions specifically for the previous agent (because otherwise it could decide to also perform strange actions to brute force find the custom command, plus if it has more permissions sometimes it can get confused)
- ask an agent with task permission "I want you to use the task tool specifically with agent 'X' and in its prompt put exactly `/someslashcommand'"
- the slash command doesn't occur... it only sends the literal text /slashcommand instead of expanding it.
Screenshot and/or share link
No response
Operating System
Arch Linux
Terminal
Kitty/Zellij
Description
The task tool prompt contains the following instruction:
in packages/opencode/src/tool/task.txt
...however this simply doesn't work.
Apparently when using task via TUI/UI
if an agent adds in the prompt field of task
something like
/slashcommandfrom an existing custom commandit simply sends the text as-is and doesn't "expand" the command.
I also tried asking the agent to instead of filling the prompt field try doing it with a field called command both with / at the beginning and without it, neither works.
I also tried with command in markdown and json and other configs.
Plugins
none
OpenCode version
1.3.9
Steps to reproduce
Steps to reproduce:
Screenshot and/or share link
No response
Operating System
Arch Linux
Terminal
Kitty/Zellij