Skip to content

fix: resolve PONYTAIL_DIR placeholder in qoder-hooks.json for plugin auto-loading - #726

Open
wusai2333 wants to merge 1 commit into
DietrichGebert:mainfrom
wusai2333:fix/qoder-hooks-plugin-root
Open

fix: resolve PONYTAIL_DIR placeholder in qoder-hooks.json for plugin auto-loading#726
wusai2333 wants to merge 1 commit into
DietrichGebert:mainfrom
wusai2333:fix/qoder-hooks-plugin-root

Conversation

@wusai2333

Copy link
Copy Markdown

Summary

  • plugin.json declares "hooks": "./hooks/qoder-hooks.json", so qodercli loads this file directly as plugin hooks at runtime
  • The PONYTAIL_DIR placeholder is never substituted by the plugin system, causing Cannot find module (CJS loader) errors on every UserPromptSubmit and PreToolUse event
  • Replace with ${CLAUDE_PLUGIN_ROOT} (resolved by the qodercli plugin runtime, same pattern as other plugins like i-have-adhd) and use the command + args format

Reproduction

Install ponytail as a qodercli plugin (qoder plugins install /path/to/ponytail). Every prompt submit triggers:

UserPromptSubmit hook error
Failed with non-blocking status code: node:internal/modules/cjs/loader:1520

Test plan

  • qoder plugins validate passes with hooks (2) loaded
  • Both hooks execute with exit 0 when tested with ${CLAUDE_PLUGIN_ROOT} resolved to the install path
  • Install from this branch and confirm no hook errors on session start

…ading

plugin.json declares "hooks": "./hooks/qoder-hooks.json", so qodercli
loads this file directly at runtime. The PONYTAIL_DIR placeholder is
never substituted, causing a CJS module-not-found error on every
UserPromptSubmit and PreToolUse event.

Replace with ${CLAUDE_PLUGIN_ROOT} (resolved by the plugin runtime) and
switch to the command+args format used by other qodercli plugins.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant