--trailer in git commit messages can't be stopped

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I tried adding a note to rules:

Use simple `git commit -m "message"` format. **Never use `--trailer` flags.**

…but it is still added to messages. I tried several models. None of them can see this happening. They are convinced the message does not contain this flag. I suspect you have a system prompt somewhere that is superseding all user rules?

I have to remove this every time I prompt for a commit. The only reason I have this workaround is because I do not allow the git commit command so it presents the terminal tool for me to edit.

Steps to Reproduce

Ask a model to write a commit message

Expected Behavior

Does not ignore my rules.

Operating System

MacOS

Version Information

Version: 2.4.22 (Universal)
VSCode Version: 1.105.1
Commit: 618c607a249dd7fd2ffc662c6531143833bebd40
Date: 2026-01-26T22:51:47.692Z
Build Type: Stable
Release Track: Early Access
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.2.0

For AI issues: which model did you use?

Auto, Kimi k2, Grok Code

Does this stop you from using Cursor

No - Cursor works, but with this issue

There is a MUCH more serious bug here. I just noticed all of the recent commit messages I edited before running where using the NON-EDITED version. In other words, it showed me a git commit command. I then edited the commend to fix what it said and clicked run. It ran. Later I was looking at my commit messages for the branch and every single one has the wrong information!! (and this stupid --trailer flag!).

Hey, thanks for the report. There are two separate issues here:

  1. About the --trailer flag

This is an Attribution feature - you can turn it off:
Cursor Settings > Agents > Attribution - just toggle it off.

  1. About ignoring edited commands

This is a known bug - when you edit a suggested command before running it, the agent still executes the original version. That’s why your commit messages ended up with the wrong text.

Duplicate: Agent Mode Ignores User-Modified Commands in Terminal

The team is aware. For now, the workaround is to not edit the command, but to cancel and ask the agent to suggest the needed command directly (for example: “commit with message X, no trailer”).

Let me know if adjusting the Attribution setting resolves at least the first part of the issue.

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.