Some (weird right) commands in the global directory, do not do anything #1475

Closed
opened 2026-02-16 17:31:09 -05:00 by yindo · 7 comments
Owner

Originally created by @roderik on GitHub (Aug 24, 2025).

Originally assigned to: @thdxr on GitHub.

I have these 2 global commands
Image

They all show up in the auto complete.

If i do /comments, it prints out my prompt and gets going.

The front matter of this command

---
description: Add comprehensive documentation to TypeScript code changes
agent: code-commenter
---
Image

If i do /pr however, it just "does nothing"

---
description: Create a pull request with autonomous workflow management
agent: pr-creator
---

In the logs i found this when i do the /pr command

ERROR 2025-08-24T21:21:12 +1ms service=tui error=POST "http://127.0.0.1:57022/session/ses_7220b8433ffeBz4OlcimacK6n7/command": 400 Bad Request {"name":"UnknownError","data":{"message":"Error: ENOENT: no such file or directory, scandir '/Users/roderik/Development/asset-tokenization-kit/github.com:settlemint'"}} Failed to execute command

Actually, only /comments works, the others show a different error message, they appear not the check the global folder

/review

---
description: Perform comprehensive code review of current changes
agent: code-reviewer
---
ERROR 2025-08-24T21:22:35 +2ms service=tui error=POST "http://127.0.0.1:57022/session/ses_7220b8433ffeBz4OlcimacK6n7/command": 400 Bad Request {"name":"UnknownError","data":{"message":"Error: File not found: /Users/roderik/Development/asset-tokenization-kit/code-reviewer"}} Failed to execute command

/test

---
description: Run quality checks and automatically fix failures
agent: test-runner
---
ERROR 2025-08-24T21:22:58 +1ms service=tui error=POST "http://127.0.0.1:57022/session/ses_722097567ffexPzueHq00cR6E3/command": 400 Bad Request {"name":"UnknownError","data":{"message":"Error: File not found: /Users/roderik/Development/asset-tokenization-kit/test-runner"}} Failed to execute command

Looking at the error, it is the "agent" file that it looks for.
However it is completely unclear why comments works, and that the error messages differ between the others

any other debug information i can provide?

Originally created by @roderik on GitHub (Aug 24, 2025). Originally assigned to: @thdxr on GitHub. I have these 2 global commands <img width="1000" height="232" alt="Image" src="https://github.com/user-attachments/assets/852bbb63-9f30-43b3-935e-3300e6a53731" /> They all show up in the auto complete. If i do `/comments`, it prints out my prompt and gets going. The front matter of this command ``` --- description: Add comprehensive documentation to TypeScript code changes agent: code-commenter --- ``` <img width="1798" height="820" alt="Image" src="https://github.com/user-attachments/assets/66089661-9d0f-4e66-9cba-f7b52d6b3592" /> If i do `/pr` however, it just "does nothing" ``` --- description: Create a pull request with autonomous workflow management agent: pr-creator --- ``` In the logs i found this when i do the /pr command ``` ERROR 2025-08-24T21:21:12 +1ms service=tui error=POST "http://127.0.0.1:57022/session/ses_7220b8433ffeBz4OlcimacK6n7/command": 400 Bad Request {"name":"UnknownError","data":{"message":"Error: ENOENT: no such file or directory, scandir '/Users/roderik/Development/asset-tokenization-kit/github.com:settlemint'"}} Failed to execute command ``` Actually, only /comments works, the others show a different error message, they appear not the check the global folder /review ``` --- description: Perform comprehensive code review of current changes agent: code-reviewer --- ``` ``` ERROR 2025-08-24T21:22:35 +2ms service=tui error=POST "http://127.0.0.1:57022/session/ses_7220b8433ffeBz4OlcimacK6n7/command": 400 Bad Request {"name":"UnknownError","data":{"message":"Error: File not found: /Users/roderik/Development/asset-tokenization-kit/code-reviewer"}} Failed to execute command ``` /test ``` --- description: Run quality checks and automatically fix failures agent: test-runner --- ``` ``` ERROR 2025-08-24T21:22:58 +1ms service=tui error=POST "http://127.0.0.1:57022/session/ses_722097567ffexPzueHq00cR6E3/command": 400 Bad Request {"name":"UnknownError","data":{"message":"Error: File not found: /Users/roderik/Development/asset-tokenization-kit/test-runner"}} Failed to execute command ``` Looking at the error, it is the "agent" file that it looks for. However it is completely unclear why comments works, and that the error messages differ between the others any other debug information i can provide?
yindo closed this issue 2026-02-16 17:31:09 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 24, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1856: Missing ~/.local/share/opencode/bin directory causes misleading ENOENT errors - The ENOENT error you're seeing when commands try to access files in paths like '/Users/roderik/Development/asset-tokenization-kit/github.com:settlemint' is very similar to the directory access issues described here.
  • #2205: Custom commands fail when (even unused) provider is in config file - This describes custom commands failing with various errors, which matches your experience with some commands working while others don't.

The root cause appears to be related to the missing binary directory that agents need for execution, as detailed in #1856. You might want to try the workaround mentioned there: mkdir -p ~/.local/share/opencode/bin to see if that resolves some of your issues.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 24, 2025): This issue might be a duplicate of existing issues. Please check: - #1856: Missing `~/.local/share/opencode/bin` directory causes misleading ENOENT errors - The ENOENT error you're seeing when commands try to access files in paths like '/Users/roderik/Development/asset-tokenization-kit/github.com:settlemint' is very similar to the directory access issues described here. - #2205: Custom commands fail when (even unused) provider is in config file - This describes custom commands failing with various errors, which matches your experience with some commands working while others don't. The root cause appears to be related to the missing binary directory that agents need for execution, as detailed in #1856. You might want to try the workaround mentioned there: `mkdir -p ~/.local/share/opencode/bin` to see if that resolves some of your issues. Feel free to ignore if none of these address your specific case.
Author
Owner

@roderik commented on GitHub (Aug 24, 2025):

Did the suggestion, but no change

mkdir -p ~/.local/share/opencode/bin
@roderik commented on GitHub (Aug 24, 2025): Did the suggestion, but no change ``` mkdir -p ~/.local/share/opencode/bin ```
Author
Owner

@roderik commented on GitHub (Aug 24, 2025):

Maybe this is involved, my commands (carry over from CC) have things like

Trigger the @pr-creator agent to handle the complete PR creation workflow.

that do the actual work, this might be the cause of the file not found errors.
Still should not crash the command though right?

@roderik commented on GitHub (Aug 24, 2025): Maybe this is involved, my commands (carry over from CC) have things like ``` Trigger the @pr-creator agent to handle the complete PR creation workflow. ``` that do the actual work, this might be the cause of the file not found errors. Still should not crash the command though right?
Author
Owner

@rekram1-node commented on GitHub (Aug 24, 2025):

we will look into this

@rekram1-node commented on GitHub (Aug 24, 2025): we will look into this
Author
Owner

@roderik commented on GitHub (Aug 25, 2025):

Removing the faulty for opencode @ agent mentions makes the commands work btw

@roderik commented on GitHub (Aug 25, 2025): Removing the faulty for opencode @ agent mentions makes the commands work btw
Author
Owner

@arsham commented on GitHub (Aug 25, 2025):

I've also noticed that when you have @ anywhere in the command it would fail silently. I think letting it calling agents is a useful functionality.

@arsham commented on GitHub (Aug 25, 2025): I've also noticed that when you have `@` anywhere in the command it would fail silently. I think letting it calling agents is a useful functionality.
Author
Owner

@art-shen commented on GitHub (Aug 30, 2025):

How is it completed if the commands are still failing and show nothing in a conversation?

@art-shen commented on GitHub (Aug 30, 2025): How is it completed if the commands are still failing and show nothing in a conversation?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1475