You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): the lefthook trailer job aidd telemetry prints fails on Windows #999
aidd telemetry on, in a repository whose prepare-commit-msg belongs to lefthook, prints a job for the user to add to lefthook.yml (sessionTrailerLefthookJob in cli/src/contexts/telemetry/domain/formats/commit-session-trailer.ts). That job's run contains double quotes:
run: | delegate="$(git rev-parse --git-common-dir)/hooks/aidd-session-trailer.sh" if [ -f "$delegate" ]; then sh "$delegate" {1} {2}; fi
On Windows, lefthook 2.1.14 runs a job as "sh.exe" -c "<script>" and escapes nothing (#948). A double quote followed by a space truncates the script, so every commit fails with -c: line N: syntax error. #998 fixed this repository's own lefthook.yml; the snippet the CLI gives users still has the same defect.
Expected behaviour
The job the CLI prints runs on Windows, as it does on macOS and Linux, and aidd telemetry still recognises it. It finds the job by looking for aidd-session-trailer.sh in the text of lefthook.yml (cli/src/runtime/git/git-adapter.ts).
Notes
fix(lefthook): run the pre-commit on Windows #998 gives the shape: no double quote in any run, with the lookup in a script that the run line names. A user's repository has no scripts/session-trailer-delegate.sh, though, so the CLI must decide where that script lives, for example beside the delegate in the hooks directory.
The Husky line (sessionTrailerHuskyLine) is a plain shell file and is not affected.
Activity
blafourcade commentedon Oct 15, 2026
Superseded by #993: the commit-trailer job is gone, telemetry no longer touches lefthook.