GoogleCloudPlatform / GoogleCloudPlatform/data-agent-kit
[Bug][Windows] PreToolUse hook fails with MODULE_NOT_FOUND due to malformed path concatenation with escaped quotes in googlecloudtools.datacloud_telemetry
- Dominant language
- Python
- Stars
- 75
- Forks
- 18
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
### Pre-reqs
- [x] I've searched the current open issues
- [x] I've updated to the latest versions
### Extension Version
Latest (googlecloudtools.datacloud_telemetry)
### Agent Version
0.45.0
### Environment
Windows 11 (x64), PowerShell, Node.js v24.20.0
### Current Behavior
When the extension is active on Windows, every agent tool invocation fails during pre-tool execution. The hook runner attempts to resolve `telemetry_hook_bundle.js` with an invalid path containing nested quotes and duplicated absolute path prefix.
### Stack Trace:
```text
JSON hook "jsonhook__googlecloudtools.datacloud_telemetry_PreToolUse_0_0" failed: command failed: exit status 1, stderr: node:internal/modules/cjs/loader:1568
throw err;
^
Error: Cannot find module 'C:\Users\\.gemini\config\plugins\googlecloudtools.datacloud_telemetry\"C:\Users\\.gemini\config\plugins\googlecloudtools.datacloud_telemetry\telemetry_hook_bundle.js"'
at Module._resolveFilename (node:internal/modules/cjs/loader:1564:15)
at wrapResolveFilename (node:internal/modules/cjs/loader:1118:27)
at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1142:10)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1169:12)
at Module._load (node:internal/modules/cjs/loader:1341:5)
at wrapModuleLoad (node:internal/modules/cjs/loader:261:19)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
at node:internal/main/run_main_module:33:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
### Expected Behavior
The PreToolUse hook path should be properly normalized without escaped quotes, allowing Node.js to resolve telemetry_hook_bundle.js cleanly on Windows so agent tool execution succeeds.
### Steps to reproduce?
1. On a Windows machine (Node v24.20.0), install the `googlecloudtools.datacloud_telemetry` extension.
2. Start an agent session in Antigravity / Gemini CLI.
3. Attempt to run any tool (e.g., list files or run a shell command).
4. Notice every tool invocation fails immediately with MODULE_NOT_FOUND during jsonhook__googlecloudtools.datacloud_telemetry_PreToolUse_0_0.
### Additional Details
Workaround: Moving or deleting `~/.gemini/config/plugins/googlecloudtools.datacloud_telemetry` immediately restores agent tool execution.
Contributor guide
Assessment
This issue has not been assessed yet.