-
Notifications
You must be signed in to change notification settings - Fork 602
Open
Description
Bug Description
When running opencode run with oh-my-opencode plugin enabled on Windows, the following error occurs:
[oh-my-opencode] Downloading comment-checker binary...
17148 | hook_event_name: "UserPromptSubmit",
17149 | prompt: ctx.prompt,
17150 | session: { id: ctx.sessionId },
17151 | hook_source: "opencode-plugin"
17152 | };
17153 | for (const hook of matcher.hooks) {
^
TypeError: undefined is not an object (evaluating 'matcher.hooks')
at executeUserPromptSubmitHooks (C:\Users\kmedi\.cache\opencode\node_modules\oh-my-opencode\dist\index.js:17153:31)
at executeUserPromptSubmitHooks (C:\Users\kmedi\.cache\opencode\node_modules\oh-my-opencode\dist\index.js:17127:45)
at <anonymous> (C:\Users\kmedi\.cache\opencode\node_modules\oh-my-opencode\dist\index.js:17417:58)
[oh-my-opencode] Failed to download comment-checker: Executable not found in $PATH: "powershell"
[oh-my-opencode] Comment checking disabled.
Environment
- OS: Windows 11
- OpenCode Version: 1.0.223
- oh-my-opencode: latest (installed via
bunx oh-my-opencode@latest install) - Shell: PowerShell / CMD
Steps to Reproduce
- Install oh-my-opencode with
bunx oh-my-opencode install --no-tui --claude=yes --gemini=yes - Complete authentication (
opencode auth login) - Run
opencode run "any prompt"
Expected Behavior
OpenCode should run without errors.
Actual Behavior
TypeError occurs because matcher.hooks is undefined. Additionally, powershell is not found in PATH even though running on Windows.
Workaround
Removing oh-my-opencode from the plugin list in opencode.json allows opencode to run normally.
Additional Context
- The error occurs in
executeUserPromptSubmitHooksfunction - Seems like
matcherobject doesn't havehooksproperty initialized - PowerShell path detection issue on Windows native environment
Metadata
Metadata
Assignees
Labels
No labels