opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Commands are not executed properly with proper markdown

Open aklajnert opened this issue 2 weeks ago • 2 comments

Description

I have noticed a strange behavior in 1.0.222, not sure if it was before. I had an x in front of the first --- in my command markdown file. After consulting the docs I have noticed that it shouldn't be there, so I have removed it. I was surprised to notice, that such command doesn't work correctly.

I have prepared a minimal example:

---
description: "Just a simple test prompt"
agent: agent
---

Write "hello" in a response and finish.

The result of running it is as below, and it just stays there forever:

Image

Once I have added back the x as a first character of the file, the command works:

Image

It is the same behavior in the TUI and Opnecode Desktup.

OpenCode version

1.0.222

Steps to reproduce

Create a file with the following content at .opencode/command/test-prompt.md, and run /test-prompt.

---
description: "Just a simple test prompt"
agent: agent
---

Write "hello" in a response and finish.

Operating System

Zorin OS (based on Ubuntu 22.04)

Terminal

No response

aklajnert avatar Jan 01 '26 09:01 aklajnert