Skip to content

fix(qoder): expand ${QODER_PLUGIN_ROOT} in plugin hook commands#598

Open
lingbin wants to merge 1 commit into
DietrichGebert:mainfrom
lingbin:fix-qoder-hook-plugin-root
Open

fix(qoder): expand ${QODER_PLUGIN_ROOT} in plugin hook commands#598
lingbin wants to merge 1 commit into
DietrichGebert:mainfrom
lingbin:fix-qoder-hook-plugin-root

Conversation

@lingbin

@lingbin lingbin commented Jul 15, 2026

Copy link
Copy Markdown

.qoder-plugin/plugin.json loads hooks/qoder-hooks.json as a live plugin
hook config, but the two commands contained the literal placeholder
PONYTAIL_DIR. Qoder never expands PONYTAIL_DIR, so it ran the string
verbatim:

node /PONYTAIL_DIR/hooks/ponytail-mode-tracker.js
Error: Cannot find module '...MODULE_NOT_FOUND'

surfacing in Qoder as a non-blocking UserPromptSubmit hook error on
every prompt, with the ponytail ruleset never injected -- a functional
silent failure despite the non-blocking status.

Qoder expands ${QODER_PLUGIN_ROOT} (the plugin install root) in plugin
hook commands at runtime [1], the same mechanism the sibling
hooks/claude-codex-hooks.json already uses via ${CLAUDE_PLUGIN_ROOT}.
Swap the placeholder for that variable in both commands and reword the
now-stale _comment: the file is loaded live by the plugin manifest, not
copied into settings.json as a template.

commandWindows / timeout / statusMessage from claude-codex-hooks.json
are intentionally not mirrored: the Qoder plugin-hook docs document only
"type" and "command" hook keys [1], so adding the rest would be
unverified speculation.

Verified: with QODER_PLUGIN_ROOT set, both hook scripts exit 0 and the
mode-tracker emits the "PONYTAIL MODE ACTIVE -- level: full" banner plus
the full ruleset (its isQoder double-duty branch), restoring ponytail
behavior under Qoder.

[1] https://docs.qoder.com/en/cli/plugins#writing-plugin-hooks

.qoder-plugin/plugin.json loads hooks/qoder-hooks.json as a live plugin
hook config, but the two commands contained the literal placeholder
PONYTAIL_DIR. Qoder never expands PONYTAIL_DIR, so it ran the string
verbatim:

  node <cwd>/PONYTAIL_DIR/hooks/ponytail-mode-tracker.js
  Error: Cannot find module '...MODULE_NOT_FOUND'

surfacing in Qoder as a non-blocking UserPromptSubmit hook error on
every prompt, with the ponytail ruleset never injected -- a functional
silent failure despite the non-blocking status.

Qoder expands ${QODER_PLUGIN_ROOT} (the plugin install root) in plugin
hook commands at runtime [1], the same mechanism the sibling
hooks/claude-codex-hooks.json already uses via ${CLAUDE_PLUGIN_ROOT}.
Swap the placeholder for that variable in both commands and reword the
now-stale _comment: the file is loaded live by the plugin manifest, not
copied into settings.json as a template.

commandWindows / timeout / statusMessage from claude-codex-hooks.json
are intentionally not mirrored: the Qoder plugin-hook docs document only
"type" and "command" hook keys [1], so adding the rest would be
unverified speculation.

Verified: with QODER_PLUGIN_ROOT set, both hook scripts exit 0 and the
mode-tracker emits the "PONYTAIL MODE ACTIVE -- level: full" banner plus
the full ruleset (its isQoder double-duty branch), restoring ponytail
behavior under Qoder.

[1] https://docs.qoder.com/en/cli/plugins#writing-plugin-hooks
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