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
I create a command in the .opencode/command directory in a project, if I run the command in the terminal via
opencode run translate --model opencode/big-pickle or another model the command context "template" is not being provided, while if I run it in the GUI it puts the template in the message and it runs.
I'm sure about this because I even copied the commit command md file while keeping the command file the same in the opencode project and still the model outputed this:
➜ opencode run translate --model nvidia/minimaxai/minimax-m2
<think>The user has just said "translate" which is very vague. I need to understand what they want me to translate. They could want me to:
1. Translate text from one language to another
2. Translate code from one programming language to another
3. Translate documentation
4. Something else entirely
Since this is ambiguous, I should ask for clarification about what specifically they want translated and from/to what languages or formats.
</think>
I need more information to help you translate. Could you please specify:
1. What do you want translated? (text, code, documentation, etc.)
2. What is the source language/format?
3. What is the target language/format?
For example:
- "Translate this English text to Spanish"
- "Convert this Python code to JavaScript"
- "Translate this API documentation from English to French"
```
### OpenCode version
1.0.137
### Steps to reproduce
1. Create a command md file
2. Run command in terminal via opencode run <command> --model
3. Profit
### Screenshot and/or share link
_No response_
### Operating System
ArchLinux Btw
### Terminal
Wezterm
This appears to be a distinct bug where the command template/context is missing in CLI execution but present in GUI execution. The root cause seems to be that the frontmatter context from the command markdown file is not being properly passed to the model when invoked via CLI.
Activity
github-actions commentedon Dec 9, 2025
This is a specific issue about custom commands not receiving context when executed via the CLI (
opencode run) compared to the GUI.While there are some related issues about command execution problems:
opencode runand TUI exits hang on v0.15+ #3213:opencode runhangs on v0.15+This appears to be a distinct bug where the command template/context is missing in CLI execution but present in GUI execution. The root cause seems to be that the frontmatter context from the command markdown file is not being properly passed to the model when invoked via CLI.
AbbasCiatek commentedon Dec 9, 2025
Side note the command will not work without specifying a model, it will throw a default provider error.
rekram1-node commentedon Dec 9, 2025
to run a command with opencode run you need to use command flag are you doing that?
iamralch commentedon Dec 24, 2025
In my case, the issue also occurs when running a command from the OpenCode TUI. This is a major blocker for my development workflow.
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.