Repository navigation
agentHost: add setting to turn off Copilot's Co-authored-by trailer - #339437
Open
Spencer Schoenberg (spencrr) wants to merge 1 commit into
Open
Spencer Schoenberg (spencrr) wants to merge 1 commit into
Spencer Schoenberg (spencrr) wants to merge 1 commit into
Conversation
Copilot started reviewing on behalf of
Spencer Schoenberg (spencrr)
October 3, 2026 00:28
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The default conflicts with the linked consent requirement, and the descriptions omit the known subagent limitation.
Review effort: Balanced
Findings: 1
Open (3)
What changed in this PR
Adds an application-scoped setting controlling Copilot commit attribution in Agent Host sessions.
Changes:
- Mirrors the new setting to all Agent Hosts.
- Passes
coauthorEnabledduring session creation and resume. - Adds launcher coverage for enabled, disabled, and absent values.
| File | Description |
|---|---|
chat.shared.contribution.ts |
Registers the user-facing setting. |
copilotCliConfig.ts |
Defines its host configuration schema. |
copilotSessionLauncher.ts |
Forwards the value to the SDK. |
copilotSessionLauncher.test.ts |
Tests configuration forwarding. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The agent host never set the SDK's `coauthorEnabled` session option, so Copilot sessions (including the Agents window) always told the agent to add a `Co-authored-by: Copilot` trailer to its commits, with no way to opt out. Add `chat.agentHost.copilot.includeCoAuthoredBy` (default true, so behavior is unchanged), mirror it to all agent hosts through root config, and pass it to the SDK when a session is created or resumed.
Spencer Schoenberg (spencrr)
force-pushed
the
dev/spencrr/vscode-agent-window-attribution-fix
branch
from
October 3, 2026 01:25
3824b79 to
113f00f
Compare
Copilot started reviewing on behalf of
Spencer Schoenberg (spencrr)
October 3, 2026 02:44
View session
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Copilot sessions that run in the agent host, like the ones in the Agents window, tell the agent to add this trailer to the commits it makes:
It comes from a
<git_commit_trailer>block that the Copilot runtime puts in the system prompt. The SDK has a session option for it,coauthorEnabled, which defaults to on. The agent host never sets it, so the only way to avoid the trailer today is to tell the agent not to add it in every session.The settings people reach for don't help here.
git.addAICoAuthoronly affects commits made through VS Code's Git UI. The CLI'sincludeCoAuthoredByis applied by the CLI app rather than the runtime, so SDK-hosted sessions like ours never see it.This adds
chat.agentHost.copilot.includeCoAuthoredByand passes it to the SDK ascoauthorEnabledwhen a session is created or resumed.Some notes:
true, so attribution works the same as today unless you opt out. That matches the CLI and the SDK. Whether it should default to off, or follow the consent flow planned forgit.addAICoAuthorin Update on "Co-authored-by: Copilot" in commit messages #314311, is a product call I've left out of this PR; it only adds the opt-out. The one difference is that the host now always sends the value, so the SDK makes an extrasession.options.updatecall after each create and resume.coauthorEnabledshowed up in the runtime in the same version asenableScriptSafety, which we already require at launch, so I don't expect that call to fail anywhere that works today.agentHostmirroring, using the default all-hosts scope.Localisn't enough. On my machine the Agents window talks to a CLI-launched agent host over a websocket, which counts as a remote target, andLocalsettings never reach it.coauthorEnabled: falsethe main prompt drops the<git_commit_trailer>block, but ageneral-purposesub-agent's prompt still has it. The SDK doesn't give the host a way to set it per sub-agent (there's no sub-agent hook, andupdateSubagentSettingsonly covers things like model and effort), so the fix belongs in the runtime: includeCoAuthoredBy: false is not inherited by task subagents; their commits still get the Co-authored-by trailer github/copilot-cli#4576. Once that lands, sub-agents should follow this setting without another VS Code change.Related: #314311 (see this comment), github/copilot-sdk#1172 (the request for the option, which shipped in github/copilot-sdk#1428), and github/copilot-cli#4576.
How to test
"chat.agentHost.copilot.includeCoAuthoredBy": false.Co-authored-by: Copilottrailer. You can also open~/.copilot/session-state/<session-id>/events.jsonland check that thesystem.messageevent has no<git_commit_trailer>block.true(or remove it) and start another session. The trailer comes back.What I ran locally:
node test/unit/node/index.js --run src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts: 95 passing, including the new test, which fails with the launcher change reverted.copilotCliConfig.test.ts,agentHostConfigurationSync.test.tsandagentConfigurationService.test.tsadded: 138 passing.npx eslintandbuild/hygiene.tson the changed files: clean.npm run typecheck-client: no new errors. My checkout doesn't have Electron's typings installed, so there are 370 unrelatedelectronerrors, but the list is the same with and without this change.I haven't done the manual Agents window run above against a dev build.