Skip to content

fix: drop commandWindows from hooks.json for Claude.ai marketplace validation (#593)#601

Open
prayag0one4 wants to merge 1 commit into
DietrichGebert:mainfrom
prayag0one4:fix/drop-commandwindows-marketplace-593
Open

fix: drop commandWindows from hooks.json for Claude.ai marketplace validation (#593)#601
prayag0one4 wants to merge 1 commit into
DietrichGebert:mainfrom
prayag0one4:fix/drop-commandwindows-marketplace-593

Conversation

@prayag0one4

Copy link
Copy Markdown

Problem

The Claude.ai plugin marketplace validator rejects claude-codex-hooks.json because commandWindows is not a recognized field in the supported hooks schema. Installation from the marketplace fails with:

MARKETPLACE_ERROR:REMOTE_SYNC_FAILED — status: failed_content
Unknown hook field(s) [commandWindows]

Root Cause

The commandWindows field is redundant. The shared command field already runs cross-platform:

  • Claude Code expands ${CLAUDE_PLUGIN_ROOT} before the shell sees it
  • VS Code Copilot ignores commandWindows and runs command through PowerShell on Windows
  • node is natively available in both bash and PowerShell

Fix

Remove all three commandWindows fields from claude-codex-hooks.json. Update the regression test to assert commandWindows is absent (marketplace validation guard) and remove the now-unused CMD_VAR_SYNTAX guard.

Verification

All 6 hooks-windows tests pass, including the new marketplace validation check. The command field remains cross-platform — node runs natively on both bash and PowerShell, and exec-free is already enforced by existing tests.

Closes #593

Copilot AI review requested due to automatic review settings July 16, 2026 01:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the unsupported commandWindows field from the Claude/Codex hooks config so the Claude.ai plugin marketplace validator accepts the plugin, and updates the Windows regression tests to enforce the new schema constraint.

Changes:

  • Drop commandWindows from hooks/claude-codex-hooks.json (marketplace-schema compatibility).
  • Update tests/hooks-windows.test.js to assert commandWindows is absent and simplify the “script ships in hooks/” check to only validate command.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
hooks/claude-codex-hooks.json Removes commandWindows from hook entries to satisfy marketplace validator schema.
tests/hooks-windows.test.js Adds a marketplace validation guard for commandWindows and adjusts Windows hook command assertions accordingly.

Comment thread tests/hooks-windows.test.js Outdated
// via PowerShell, so the shared `command` field must be cross-platform (plain
// `node`, no bash-only syntax). commandWindows is not part of the supported
// hooks schema on the Claude.ai plugin marketplace validator, so it is omitted
// — {{CLAUDE_PLUGIN_ROOT}} expansion and `node` work everywhere.
Comment thread tests/hooks-windows.test.js Outdated
// already runs cross-platform (Claude Code expands ${CLAUDE_PLUGIN_ROOT}
// before the shell sees it, and VS Code Copilot ignores commandWindows and
// runs `command` through PowerShell on Windows anyway), it is omitted.
test('hooks.json has no unrecognized fields for marketplace validation (#593)', () => {
Comment on lines +42 to 44
for (const hook of commandHooks()) {
assert.equal(hook.commandWindows, undefined, `hook must not use commandWindows (not supported by marketplace validator): ${hook.command}`);
}
…lidation (DietrichGebert#593)

commandWindows is not part of the supported hooks schema for the Claude.ai
plugin marketplace validator, which rejects it as an unknown field. The
shared `command` field already runs cross-platform: Claude Code expands
${CLAUDE_PLUGIN_ROOT} before the shell sees it, VS Code Copilot ignores
commandWindows and runs `command` through PowerShell on Windows, and `node`
is natively available in both bash and PowerShell.

Update the regression test to assert commandWindows is absent and remove
the now-unused CMD_VAR_SYNTAX guard. Fix comment placeholder syntax
({{CLAUDE_PLUGIN_ROOT}} → ${CLAUDE_PLUGIN_ROOT}) and narrow test name.
@prayag0one4
prayag0one4 force-pushed the fix/drop-commandwindows-marketplace-593 branch from 27a35c9 to 2909eb0 Compare July 16, 2026 01:21
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.

Marketplace validation fails: unrecognized commandWindows field in hooks.json breaks install via Claude.ai plugin marketplace

2 participants