Skip to content

Better craft Copilot CLI identity in VS Code - #315086

Merged
Anthony Kim (anthonykim1) merged 7 commits into
mainfrom
anthonykim1/copilotCLIsystemPrompt
May 8, 2026
Merged

Anthony Kim (anthonykim1) merged 7 commits into
mainfrom
anthonykim1/copilotCLIsystemPrompt

Conversation

@anthonykim1

@anthonykim1 Anthony Kim (anthonykim1) commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings May 7, 2026 19:46
@anthonykim1 Anthony Kim (anthonykim1) added this to the 1.120.0 milestone May 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves Copilot CLI’s in-product identity when used via the VS Code chat experience by injecting a VS Code-specific system message into Copilot CLI-backed sessions, ensuring the model doesn’t present itself as a “terminal assistant”.

Changes:

  • Add a VS Code-specific systemMessage to agent-host Copilot session configuration (including provisional-session materialization).
  • Add a VS Code Copilot CLI chat-panel identity system message to Copilot CLI session options (including when resuming/getting sessions).
  • Add unit tests verifying that the system message is passed through in both the agent-host and extension session flows.
Show a summary per file
File Description
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Introduces and wires a VS Code-specific system message into the SDK session config builder.
src/vs/platform/agentHost/test/node/copilotAgent.test.ts Adds coverage that provisional-session materialization forwards the system message to the SDK.
extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSessionService.ts Always sets a Copilot CLI chat-panel identity system message (optionally prefixed by prompt variable context).
extensions/copilot/src/extension/chatSessions/copilotcli/node/test/copilotCliSessionService.spec.ts Adds coverage that createSession/getSession pass the identity system message and preserve variable context ordering.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 0

@anthonykim1
Anthony Kim (anthonykim1) marked this pull request as ready for review May 7, 2026 20:38
@anthonykim1
Anthony Kim (anthonykim1) marked this pull request as draft May 7, 2026 22:26
@anthonykim1
Anthony Kim (anthonykim1) marked this pull request as ready for review May 7, 2026 23:43
TylerLeonhardt
TylerLeonhardt previously approved these changes May 8, 2026
@anthonykim1
Anthony Kim (anthonykim1) marked this pull request as draft May 8, 2026 01:02
@github-actions

github-actions Bot commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Base: e4067ee3 Current: 121da83b

No screenshot changes.

@anthonykim1
Anthony Kim (anthonykim1) marked this pull request as ready for review May 8, 2026 02:27
TylerLeonhardt
TylerLeonhardt previously approved these changes May 8, 2026
@anthonykim1
Anthony Kim (anthonykim1) enabled auto-merge (squash) May 8, 2026 03:33
@anthonykim1
Anthony Kim (anthonykim1) merged commit 547a00d into main May 8, 2026
26 checks passed
@anthonykim1
Anthony Kim (anthonykim1) deleted the anthonykim1/copilotCLIsystemPrompt branch May 8, 2026 03:48
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jun 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better customize identity for Copilot CLI in VS Code

5 participants