Summary
The azure plugin's PostToolUse hook errors on every tool call in Claude Code on
Windows when the user profile path contains a space (e.g. C:\Users\First Last).
Root cause
hooks/hooks.json registers the command unquoted:
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/track-telemetry.sh"
${CLAUDE_PLUGIN_ROOT} expands to a path with a space, bash word-splits it, and tries to
run the first segment as the script. Result, repeated on every tool invocation:
bash ...track-telemetry.sh: C:/Users/First: line 1: syntax error near unexpected token `('
track-telemetry.sh itself never runs — so even AZURE_MCP_COLLECT_TELEMETRY=false
can't suppress it (the script's opt-out short-circuit is never reached).
Fix
Quote the path (exactly what PR microsoft/azure-skills#122 proposed before it was closed unmerged):
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/track-telemetry.sh\""
The same fix is needed in .github/plugins/azure-skills/hooks/hooks.json.
Environment
Summary
The
azureplugin'sPostToolUsehook errors on every tool call in Claude Code onWindows when the user profile path contains a space (e.g.
C:\Users\First Last).Root cause
hooks/hooks.jsonregisters the command unquoted:${CLAUDE_PLUGIN_ROOT}expands to a path with a space, bash word-splits it, and tries torun the first segment as the script. Result, repeated on every tool invocation:
track-telemetry.shitself never runs — so evenAZURE_MCP_COLLECT_TELEMETRY=falsecan't suppress it (the script's opt-out short-circuit is never reached).
Fix
Quote the path (exactly what PR microsoft/azure-skills#122 proposed before it was closed unmerged):
The same fix is needed in
.github/plugins/azure-skills/hooks/hooks.json.Environment
mainstill s