[Bug] Global commands/ directory not recognized on Windows, only command/ works #6748

Open
opened 2026-02-16 18:05:08 -05:00 by yindo · 1 comment
Owner

Originally created by @ylitchan on GitHub (Jan 18, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description
On Windows, custom commands placed in the global config directory ~/.config/opencode/commands/ are not recognized. However, renaming the directory to command/ (singular) makes it work correctly.
Expected Behavior
According to the source code in packages/opencode/src/config/config.ts:
const COMMAND_GLOB = new Bun.Glob("{command,commands}/**/*.md")
Both command/ and commands/ should be valid directory names.
Actual Behavior

  • ~/.config/opencode/commands/commit.md → Not recognized (command not shown in / menu)
  • ~/.config/opencode/command/commit.md → Works correctly
    Environment
  • OS: Windows 11
  • OpenCode Version: 1.1.25
  • Shell: Git Bash / PowerShell
    Possible Cause
    The {command,commands} glob pattern in Bun.Glob may not work correctly on Windows, possibly d
Originally created by @ylitchan on GitHub (Jan 18, 2026). Originally assigned to: @rekram1-node on GitHub. Description On Windows, custom commands placed in the global config directory `~/.config/opencode/commands/` are not recognized. However, renaming the directory to `command/` (singular) makes it work correctly. Expected Behavior According to the source code in `packages/opencode/src/config/config.ts`: const COMMAND_GLOB = new Bun.Glob("{command,commands}/**/*.md") Both command/ and commands/ should be valid directory names. Actual Behavior - ~/.config/opencode/commands/commit.md → Not recognized (command not shown in / menu) - ~/.config/opencode/command/commit.md → Works correctly Environment - OS: Windows 11 - OpenCode Version: 1.1.25 - Shell: Git Bash / PowerShell Possible Cause The {command,commands} glob pattern in Bun.Glob may not work correctly on Windows, possibly d
yindo added the windowsopentui labels 2026-02-16 18:05:08 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 18, 2026):

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

  • #8235: Config and Data directories follow the Linux XDG standard even on windows

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

@github-actions[bot] commented on GitHub (Jan 18, 2026): This issue might be a duplicate of existing issues. Please check: - #8235: Config and Data directories follow the Linux XDG standard even on windows Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6748