I found the issue and the simplest fix.
Root cause: Your repo’s .git/config has the worktreeConfig extension enabled, but core.repositoryformatversion is set to 0 instead of 1. The worktreeconfig extension requires version 1.
Fix
Option 1 — Bump the format version (recommended if you need worktrees):
bash
git config core.repositoryformatversion 1
Option 2 — Remove the extension (if you don’t use git worktree):
bash
git config --unset extensions.worktreeConfig
Then retry generating the commit message or using Ai chat, should work fine after either fix.