Skip to content

Align Cloud Agent closer to Mission Control's existing behavior#313243

Open
A-Georgiou wants to merge 4 commits into
microsoft:mainfrom
A-Georgiou:ageorgiou/cloud-agent-pr-decouple
Open

Align Cloud Agent closer to Mission Control's existing behavior#313243
A-Georgiou wants to merge 4 commits into
microsoft:mainfrom
A-Georgiou:ageorgiou/cloud-agent-pr-decouple

Conversation

@A-Georgiou

@A-Georgiou A-Georgiou commented Apr 29, 2026

Copy link
Copy Markdown

Port of microsoft/vscode-copilot-chat#5078 (by @Oregand) to vscode core.

VS Code's Cloud Agent flow was still doing pre-PR work that Mission Control / CCA PR Decoupling no longer needs:

  • Drop the delegate/commit/push modal. New-request path goes straight to delegate(). Permissive GitHub auth kicks in via the standard non-modal createIfNone sign-in prompt.
  • Send the raw user prompt. Stop calling IChatDelegationSummaryService.summarize on the delegation path. problem_statement is now the user prompt + resolved references only.
  • Match MC's minimal pull_request payload. Drop body_placeholder and body_suffix, keep title, base_ref, and optional head_ref.
  • Drop the pre-delegation git preflight. Removed detectedUncommittedChanges, checkBaseBranchPresentOnRemote, buildConfirmation, and handleConfirmationData.
  • Delete dead code. CopilotCloudGitOperationsManager is now unreachable - removed the whole file.

Port of microsoft/vscode-copilot-chat#5078 (by @Oregand) to vscode core.

VS Code's Cloud Agent flow was still doing pre-PR work that Mission
Control / CCA PR Decoupling no longer needs:

- Drop the delegate/commit/push modal. New-request path goes straight
  to delegate(). Permissive GitHub auth kicks in via the standard
  non-modal createIfNone sign-in prompt.
- Send the raw user prompt. Stop calling
  IChatDelegationSummaryService.summarize on the delegation path.
  problem_statement is now the user prompt + resolved references only.
- Match MC's minimal pull_request payload. Drop body_placeholder and
  body_suffix — keep title, base_ref, and optional head_ref.
- Drop the pre-delegation git preflight. Removed
  detectedUncommittedChanges, checkBaseBranchPresentOnRemote,
  buildConfirmation, and handleConfirmationData.
- Delete dead code. CopilotCloudGitOperationsManager is now
  unreachable — removed the whole file.

Regressions fixed (from original PR review):
1. Current remote-tracking branch preserved as base_ref when available
2. Auth cancellation gate moved inside delegate() for all callers
3. Uncommitted-changes warning checks both workingTree and indexChanges
4. Base-branch fallback now shows stream.progress notice

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 29, 2026 14:39
@A-Georgiou

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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

Ports Mission Control’s “PR-decouple” cloud agent delegation behavior into VS Code core by simplifying the Cloud Agent flow (no modal/preflight/summarization) and aligning the job payload shape.

Changes:

  • Remove the delegate/commit/push confirmation modal + git preflight; new requests delegate immediately.
  • Stop summarizing chat history for delegation; send the raw user prompt plus resolved references as the problem context.
  • Align the remote-agent job pull_request payload to a minimal shape and delete the now-unreachable git operations manager.
Show a summary per file
File Description
extensions/copilot/src/extension/chatSessions/vscode/copilotCodingAgentUtils.ts Removes PR body placeholder/suffix helpers no longer used in the decoupled flow.
extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts Implements direct delegation, permissive auth gating inside delegate(), base-ref selection tweaks, minimal PR payload.
extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudGitOperationsManager.ts Deletes unreachable preflight/commit/push helper (entire file removed).
extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts Updates uncommitted-changes detection to include working tree changes.
extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts Same uncommitted-changes detection update for the other CLI participant implementation.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 3

- Use optional chaining with nullish coalescing on hasChanges checks
  across all three files to guard against partial changes objects in
  mocks/stubs (indexChanges/workingTree may be undefined).
- Gate the branch-not-on-remote progress message behind
  selectedMatchesActive so it only fires when the active repo matches
  the selected repo, avoiding misleading messages in multi-root
  workspaces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@A-Georgiou A-Georgiou changed the title Align Cloud Agent with Mission Control PR-decouple behavior Align Cloud Agent closer to Mission Control's existing behavior Apr 30, 2026
@rebornix rebornix assigned rebornix and unassigned alexdima May 5, 2026
@rebornix rebornix added this to the 1.119.0 milestone May 5, 2026
@deepak1556 deepak1556 modified the milestones: 1.119.0, On Deck May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants