copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Make copilot cli auto-inject Co-authored by Copilot similar to how Claude auto-injects Co-authored by Claude

Open grantborthwick opened this issue 9 months ago • 10 comments

Describe the feature or problem you'd like to solve

Claude does this out of the box now, and this can be used to attribute commits to ai assistance. I think this would be useful to add for copilot as well. I'm doing this via commit hooks in my repo now to auto-detect.

Proposed solution

Users would be able to attribute commits to when copilot helped.

Example prompts or workflows

Commit all of the changes we've made so far => commit with Co-Authored-By: GitHub Copilot CLI [email protected]

Additional context

No response

grantborthwick avatar Feb 13 '26 19:02 grantborthwick

Need to re-build all in genuine

On Friday, February 13, 2026, Grant Borthwick @.***> wrote:

grantborthwick created an issue (github/copilot-cli#1455) https://github.com/github/copilot-cli/issues/1455 Describe the feature or problem you'd like to solve

Claude does this out of the box now, and this can be used to attribute commits to ai assistance. I think this would be useful to add for copilot as well. I'm doing this via commit hooks in my repo now to auto-detect. Proposed solution

Users would be able to attribute commits to when copilot helped. Example prompts or workflows

Commit all of the changes we've made so far => commit with Co-Authored-By: GitHub Copilot CLI @.*** Additional context

No response

— Reply to this email directly, view it on GitHub https://github.com/github/copilot-cli/issues/1455, or unsubscribe https://github.com/notifications/unsubscribe-auth/B4M4CUUP3XPNHRWSQXWC7HD4LYTB7AVCNFSM6AAAAACVCH75LWVHI2DSMVQWIX3LMV43ASLTON2WKOZTHEZTQOBWHA3TQMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

gouthamyoyo112-crypto avatar Feb 13 '26 20:02 gouthamyoyo112-crypto

This appears to now be a feature in the latest version, but I don't see an easy way to toggle it as enabled or disabled. I assume it's always enabled unless you prompt it to not do so.

Ixe1 avatar Feb 14 '26 11:02 Ixe1

Yeah really need a setting to turn this functionality off if you don't want it.

wiltaylor-daf avatar Feb 16 '26 06:02 wiltaylor-daf

Hey! We've added this functionality. You can disable it by setting include_coauthor to false in your config file

RyanHecht avatar Feb 25 '26 21:02 RyanHecht

Woule be better if "off" option is set by default.

kdb17wsl avatar Apr 23 '26 11:04 kdb17wsl

EDIT for anyone else who experiences this, see this discussion: https://github.com/orgs/community/discussions/194075

I wrote some code changes and committed to a personal project of mine: wx4stg/gopro_chase_review@4d43fca. I wrote all of the code in a terminal using the nano editor. Notably, none of the code utilized copilot and was entirely hand-written.

I then went to commit and push the code, but couldn't be bothered to find my github personal access token, so I decided to use visual studio code's github extension for authentication. I cannot remember if I committed on the command line and then used vscode to push, or if I committed and pushed from vscode's GUI. I will assume the latter based on what happened next.

visual studio code, presumably through the github CLI, injected a credit to the Copilot LLM with no outward facing indication that it was doing so. This is absolutely awful UX. I suggest (in order of how I think this should be solved):

  1. Revert this change completely. I wouldn't advertise "this chair was built using hammer", why should vscode advertise that "this commit was made with the assistance of copilot".
  2. Give a checkbox in the vscode UI or a flag in the github cli arguments to specify whether a user wants to credit copilot. If the GH CLI needs a flag, copilot should be credited only if the flag is present, and not when the flag is absent, to maintain compatibility with GUI software or scripts that were created before this "feature".
  3. Make this an "opt in" rather than "opt out" feature in vscode.

Regardless of if my suggestions are taken or ignored, this flag should not apply to code that was never touched by an LLM.

wx4stg avatar Apr 26 '26 22:04 wx4stg

For anyone landing here later.

In current Copilot CLI versions, add this to ~/.copilot/settings.json:

{
  "includeCoAuthoredBy": false
}

On older versions, the setting/key was:

{
  "include_coauthor": false
}

in ~/.copilot/config.json.

If the CLI is already running, restart it after changing the setting.

miikkamakela-into avatar Apr 27 '26 05:04 miikkamakela-into

It's fun that it injects it even i do not use copilot, but i would assume it would be then used by some scrapping and then stated that 99% of all commits are made with so-authored by Copilot lol.

Lxrdknows77 avatar Apr 27 '26 13:04 Lxrdknows77

After opening a PR, the commit message ends with the line Co-authored-by: Copilot [email protected].

  • The code is not authored by Copilot.
  • No AI is capable of creating something on its own.
  • The AI executes what my mind designs.
  • I pay for AI as a tool, not as a co-author.

Please make this disabled by default (especially for individual subscriptions) as soon as possible. Those who want to use this feature should enable it manually.

enniosousa avatar Apr 28 '26 19:04 enniosousa

What a stupid annoying default setting! Here is how to turn it of in v1.117

// .vscode/settings.json
{
  "git.addAICoAuthor": "off"
}

(BTW: I write the code, I review it, I commit it. I’m sick of how this tool is being anthropomorphized—it’s not a person, and it definitely didn’t co-author my code. I’m sick of the direction VSCode is heading.. Tampering the commit message without making the user aware of it is just pure evil!)

turbotimon avatar Apr 30 '26 12:04 turbotimon