You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Slash commands are not resolved when using "opencode run" #7345
When running OpenCode interactively, slash commands (e.g. /mycmd) are correctly resolved by OpenCode before being sent to the LLM. The command is expanded or executed internally, and only the resolved result is passed to the model.
However, when using opencode run, slash commands are not resolved. Instead, the raw slash command (e.g. /mycmd) is forwarded verbatim to the LLM. Since the LLM has no knowledge of OpenCode-specific slash commands, it responds with a hallucinated error message.
This results in inconsistent behavior between interactive and non-interactive usage and makes opencode run unreliable for automation.
Expected Behavior
opencode run should behave the same as interactive mode.
Why this matters (Ralph Wiggum workflow)
This behavior is particularly annoying when using Ralph Wiggum–style workflows, where OpenCode is run repeatedly in a loop. I would like to run a slash command in a loop, without workaround
Plugins
No response
OpenCode version
1.1.6
Steps to reproduce
Define a custom command /mycmd with the content: Say hello to the user
Run OpenCode interactively and invoke /mycmd - Observe that the command is resolved and executed correctly
Activity
github-actions commentedon Jan 8, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Jan 8, 2026
@jgordijn-ah use the "--command mycmd" and it works we dont resolve the /mycmd we expect the flag, we may change that tho
jgordijn-ah commentedon Jan 9, 2026
Ok, thanks. I missed that one. You may close this issue or keep it if you want to change that behavior. I'll leave that up to you.
test: add OpenCode eval suite + register opencode in x-x init
test: add OpenCode eval suite + register opencode in x-x init
test: add OpenCode eval suite + register opencode in x-x init
test: add OpenCode eval suite + register opencode in x-x init (#14)
Wire up the OpenCode routine in launchd, daily at 6 AM