Generate Commit Message does not work for bash script changes

Describe the Bug

When I make a new bash shell script or make changes to a new shell script, and I click the button to Generate Commit Message, the commit message fills with a description of the previous commit’s changes, and not the current working changes.

Steps to Reproduce

Make changes to a script.sh file
Click Generate Commit Message button

Expected Behavior

It should inspect the actual changes

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.44
VSCode Version: 1.105.1
Commit: 20adc1003928b0f1b99305dbaf845656ff81f5d0
Date: 2025-12-24T21:41:47.598Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.2.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. We’ve seen a similar issue with commit message generation, and in another case opening the project with a clean profile helped.

Can you try running:

cursor --user-data-dir=/tmp/cursor-test

Then check if commit message generation works for a bash script?

It’d also help to get some diagnostics:

  • Cmd+Shift+P → Git: Show Git Output: please share the logs, especially when you click Generate Commit Message
  • Help → Toggle Developer Tools → Console: please share a screenshot of any errors that mention git
  • Are you using a multi-root workspace, or any special Git configuration?

Thanks for your quick response. This issue seems to be intermittent and I’m not sure what the proper reproduction steps are. My git setup is pretty basic except I am using submodules. It seems to happen after I’ve been in Cursor a long time, producing a lot of code, committing commits, and then I’ll get to a point where I’m editing scripts and it’ll show up. Simply restarting Cursor did seem to fix it for now. I’ll reply with your diagnostic suggestions when this happens again.

I was able to reproduce the issue, even after using your command cursor --user-data-dir=/tmp/cursor-test, by having Cursor agent generate some basic github actions which made the .github/workflows/ci.yml file on my public repo at this commit Update .gitignore to exclude 'dist' directory; modify tsconfig.json t… · pRizz/zeckendorf-article@99cea82 · GitHub

There is nothing interesting showing up in the git log and there are no errors in the developer console. Attaching a screenshot for posterity. The generate commit message seems to have generated content referring to the previous commit:

Enhance TypeScript configuration by adding “strict” mode and updating “compilerOptions” in tsconfig.json for better type safety and error checking.

This has nothing to do with my ci.yml change.

Actually, here is another screenshot which do have some developer console errors mentioning git when Cursor starts up fresh, and no action was even taken:

workbench.desktop.main.1s:13199

[Background Composer] Error updating branch on git status change: Error: No Tull commit provider registered

Thanks for the detailed info and the repro steps. This looks like a known issue with commit message generation in projects that use submodules.

I see the console error “No full commit provider registered”, which helps explain the cause. We’re tracking similar issues related to submodules.

You can try this temporary workaround:

  • Before generating a commit message, make sure you have the correct project directory open, not the submodule
  • If it happens again, try closing and reopening the workspace

For a deeper look, next time it happens could you share:

  • Cmd+Shift+P → Git: Show Git Output, the logs right when you click Generate Commit Message
  • Are you using a multi-root workspace?
  • Does it reproduce in a project without submodules?

I’ll pass this to the engineers for further investigation.

I did repro it in my repo that does not have git submodules:

It can be reproduced on this specific commit with my instructions:

1 Like