BUG: Error: Directory "commands" in /Users/username/.config/opencode is not valid. Did you mean "command"? #2143

Closed
opened 2026-02-16 17:34:23 -05:00 by yindo · 4 comments
Owner

Originally created by @GratefulDave on GitHub (Oct 17, 2025).

Originally assigned to: @rekram1-node on GitHub.

This just randomly started to happen after one of your last updates....

brew install sst/tap/opencode
==> Auto-updating Homebrew...
Adjust how often this is run with `$HOMEBREW_AUTO_UPDATE_SECS` or disable with
`$HOMEBREW_NO_AUTO_UPDATE=1`. Hide these hints with `$HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
==> Fetching downloads for: opencode
==> Fetching sst/tap/opencode
==> Downloading https://github.com/sst/opencode/releases/download/v0.15.7/opencode-darwin-arm64.zip
==> Downloading from https://release-assets.githubusercontent.com/github-production-release-asset/975734319/62a2c21f-d6a0-4cca-a9ee-2ff5b4bebd45?sp=r&sv=2018-11-09&sr=b&spr
##################################################################################################################################################################### 100.0%
==> Installing opencode from sst/tap
🍺  /opt/homebrew/Cellar/opencode/0.15.7: 4 files, 84.6MB, built in 1 second
==> Running `brew cleanup opencode`...
Disable this behaviour by setting `HOMEBREW_NO_INSTALL_CLEANUP=1`.
Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
❯ opencode
Error: Directory "commands" in /Users/username/.config/opencode is not valid. Did you mean "command"?
Originally created by @GratefulDave on GitHub (Oct 17, 2025). Originally assigned to: @rekram1-node on GitHub. This just randomly started to happen after one of your last updates.... ``` brew install sst/tap/opencode ==> Auto-updating Homebrew... Adjust how often this is run with `$HOMEBREW_AUTO_UPDATE_SECS` or disable with `$HOMEBREW_NO_AUTO_UPDATE=1`. Hide these hints with `$HOMEBREW_NO_ENV_HINTS=1` (see `man brew`). ==> Fetching downloads for: opencode ==> Fetching sst/tap/opencode ==> Downloading https://github.com/sst/opencode/releases/download/v0.15.7/opencode-darwin-arm64.zip ==> Downloading from https://release-assets.githubusercontent.com/github-production-release-asset/975734319/62a2c21f-d6a0-4cca-a9ee-2ff5b4bebd45?sp=r&sv=2018-11-09&sr=b&spr ##################################################################################################################################################################### 100.0% ==> Installing opencode from sst/tap 🍺 /opt/homebrew/Cellar/opencode/0.15.7: 4 files, 84.6MB, built in 1 second ==> Running `brew cleanup opencode`... Disable this behaviour by setting `HOMEBREW_NO_INSTALL_CLEANUP=1`. Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`). ❯ opencode Error: Directory "commands" in /Users/username/.config/opencode is not valid. Did you mean "command"? ```
yindo closed this issue 2026-02-16 17:34:23 -05:00
Author
Owner

@jasoncheow commented on GitHub (Oct 17, 2025):

I just faced the same issue and found it related to this recent PR https://github.com/sst/opencode/commit/9b52d33889482d52fc2ccb86a48cfdcade21157b#diff-2ca52542d251bb69bf981f39dd51de9943a6c2cb4ee53d7799c83bbf322a0891R123 where commands is one of the INVALID_DIRS.

I removed commands in ~/.config/opencode/—which was empty for me—and opencode works.

@jasoncheow commented on GitHub (Oct 17, 2025): I just faced the same issue and found it related to this recent PR https://github.com/sst/opencode/commit/9b52d33889482d52fc2ccb86a48cfdcade21157b#diff-2ca52542d251bb69bf981f39dd51de9943a6c2cb4ee53d7799c83bbf322a0891R123 where `commands` is one of the `INVALID_DIRS`. I removed `commands` in `~/.config/opencode/`—which was empty for me—and `opencode` works.
Author
Owner

@rekram1-node commented on GitHub (Oct 17, 2025):

if you just move “commands” and make it called “command” it should fix itself

Dax made it error intentionally because a lot of people were putting incorrect dirs and wondered why it didnt load

@rekram1-node commented on GitHub (Oct 17, 2025): if you just move “commands” and make it called “command” it should fix itself Dax made it error intentionally because a lot of people were putting incorrect dirs and wondered why it didnt load
Author
Owner

@veracioux commented on GitHub (Oct 17, 2025):

@rekram1-node See PR. I improved the error msg a bit to hopefully prevent future submissions of the same issue.

@veracioux commented on GitHub (Oct 17, 2025): @rekram1-node See PR. I improved the error msg a bit to hopefully prevent future submissions of the same issue.
Author
Owner

@rekram1-node commented on GitHub (Oct 17, 2025):

yeah that works thx

@rekram1-node commented on GitHub (Oct 17, 2025): yeah that works thx
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2143