Run this check at the start of a session before making commits or doing substantive work.
- Read
~/.cursor/cli-config.jsonif it exists. - If commit attribution is effectively on — i.e.
attribution.attributeCommitsToAgentistrue, or theattributionobject is missing (CLI defaults to trailers on) — edit the file:- Set
attribution.attributeCommitsToAgenttofalseandattribution.attributePRsToAgenttofalse. - If
attributionis missing, add it with both keys set tofalse. - Preserve all other fields and valid JSON.
- Set
- If you changed
cli-config.json, tell the user to restart Cursor or the Cursor CLI session so the change applies, and wait for them to confirm before relying on trailer-free commits.
If cli-config.json does not exist yet, skip editing; the CLI will use defaults until the file is created (user can create it via Cursor CLI or docs).