Repository navigation
Description
Description
On Windows, Claude Code dispatches hook commands through a POSIX shell. ${CLAUDE_PLUGIN_ROOT} expands to a backslash-separated path (C:\Users\<user>\.claude\plugins\cache\...), and because the hook commands leave it unquoted, the shell eats the backslashes before node ever sees it.
Every hook of the plugin therefore fails with MODULE_NOT_FOUND. Nothing is recorded, and nothing says so: the hook is non-blocking, and journal.cjs exits 0 unconditionally by design. aidd telemetry check reports hook fired -- no run file in aidd_docs/runs yet, which reads as "not started yet" rather than "broken".
Affected file(s)
plugins/aidd-telemetry/hooks/hooks.json—SessionStart,Stop,PostToolUseplugins/aidd-context/hooks/hooks.json—SessionStart, same line
Expected behaviour
A session on Windows writes its run file to aidd_docs/runs/.
Observed behaviour
Nothing is ever written. Proof captured from a real Claude Code session transcript (hook_non_blocking_error attachment). Two hooks pointing at the same file, differing only by quoting:
{
"hookEvent": "SessionStart",
"command": "node C:\Users\<user>\.claude\probe.cjs UNQUOTED",
"stderr": "Error: Cannot find module 'C:\Users<user>.claudeprobe.cjs'",
"exitCode": 1
}C:\Users\<user>\.claude\ became C:\Users<user>.claude. The quoted variant of the same command resolved and executed normally.
Proposed solution
Quote the path argument, as ralph-loop already does (bash "${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh"):
- "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/journal.cjs session-start"
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/journal.cjs\" session-start"Applies to all three aidd-telemetry commands and the one in aidd-context. Quoting is a no-op under cmd.exe and required under sh, so it is safe regardless of which shell the host picks.
Verified locally: after quoting, a fresh Windows session produced a complete run file — session_start, task_declared, file_written, turn_end — and aidd telemetry check returned session journalled ok / records join ok — 26 of 26 records, 0 unattributed.
Context / Technical constraints
Why this stayed invisible, and why it is worth a guard rather than only a patch:
journal.cjscatches everything and exits 0 — "a measurement layer that breaks a session is worse than one that misses a session". Sound, but it also means a hook that never starts is indistinguishable from one that ran and had nothing to do.- On macOS and Linux the expansion carries no backslash, so the defect cannot appear there.
--inaidd telemetry checkis ambiguous between "measurement has not run yet" and "measurement can never run". A line stating whether the recorder's own command resolves would have turned a multi-hour investigation into one look.
Related: #707 (a real session per tool, on Windows and on Linux) — this is exactly the class of defect that would have caught.
Environment
| AI tool | Claude Code |
| aidd-cli version | 5.3.0 |
| OS | Windows 11 Pro (10.0.26100) |
| node | 24.12.0 |
| aidd-telemetry | 0.2.0 |
QA
- On Windows, install
aidd-telemetryand enabletelemetry.enabledin.aidd/config.json. - Start a Claude Code session in that repository and complete one exchange.
aidd_docs/runs/*.jsonlmust exist and carry at leastsession_startandturn_end.- Before the fix: the directory is never created, and no error surfaces anywhere.
I agree to follow this project's Code of Conduct.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
VincentMenard76 commentedon Sep 11, 2026
Refuted by the reporter — closing as not reproducible
I filed this. It is wrong, and the fix it asks for corrects nothing. Here is what was measured afterwards, on the same machine.
What refutes it
I reverted
SessionStartto the unquoted form in the live plugin cache and left it there. Three sessions since:SessionStartformsession_start+turn_endsession_start+turn_endsession_start+turn_endThe command this issue claims cannot run, runs.
What my original evidence actually established
The transcript excerpt in the issue is genuine, but it comes from a probe hook carrying a hardcoded backslash path, not from the plugin's own command:
C:\Users\…path is destroyed by the shell${CLAUDE_PLUGIN_ROOT}expands to a backslash-separated pathClaude Code substitutes the token itself, and whatever it substitutes survives unquoted. A literal path and a token are not equivalent inputs; that is the step I got wrong.
What the symptom actually was
Two stacked causes, neither of them quoting:
aidd-telemetry@aidd-frameworkwastruein a tracked project.claude/settings.jsonand absent from~/.claude/plugins/installed_plugins.json— alone among the enabled plugins, across five consecutive auto-install batches. Its skills loaded; its hooks did not exist at runtime./plugin installfixed it. Journalling began 21 minutes after I quoted the commands, and because of the install — a correlation I read as a cause..aidd/config.jsonis a tracked file. A branch predating the commit that added it does not carry it, sotelemetryEnabled()returns false and the hook runs and writes nothing, silently. Measured in that repository: 20 of 25 active branches do not carry that commit, including branches committed to the same day.The one thing worth keeping
aidd telemetry checkreportedrecorder declared yesalongsidehook fired --while the recorder was not installed at all.--reads as "has not fired yet" and meant "cannot ever fire". A claim separating enabled but not installed from installed, not yet fired would have ended this in one look instead of a day. I am glad to open that separately if it is useful — it is the only actionable thing this investigation produced.No pull request will follow. Sorry for the noise, and thanks to anyone who spent time reading it.
VincentMenard76 commentedon Sep 11, 2026
Closing as not reproducible — see the refutation above.