Show sign-in dialog when delegating to session targets while unauthenticated#307257
Draft
Copilot wants to merge 2 commits into
Draft
Show sign-in dialog when delegating to session targets while unauthenticated#307257Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…ticated When a user tries to delegate to Copilot CLI, Cloud, or other session targets while not signed in, trigger the sign-in/setup dialog instead of letting the request fail with a non-actionable error. The sign-in check is added to three entry points: - SubmitAction.handleDelegation() for the session target picker - CreateRemoteAgentJobAction.run() for the "Continue in..." dropdown - CreateRemoteAgentJobFromEditorAction.run() for the editor context menu This matches the existing Local session behavior where the setup dialog is shown when the user's entitlement is Unknown and anonymous access is not enabled. Fixes #296117 Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/12f524df-1f4f-414c-b3bc-5ce531b1b112 Co-authored-by: cwebster-99 <60238438+cwebster-99@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add login prompt for unauthenticated Copilot CLI users
Show sign-in dialog when delegating to session targets while unauthenticated
Apr 1, 2026
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.
Delegating to Copilot CLI, Cloud, or other remote session targets while signed out produces a non-actionable error ("Authorization failed. Please sign into GitHub and try again.") instead of prompting the user to sign in. The Local session already handles this correctly via
CHAT_SETUP_ACTION_ID.Adds the same
ChatEntitlement.Unknown+!anonymousguard used by the Local session's setup flow to all three delegation entry points:SubmitAction.handleDelegation()— session target picker sendsCreateRemoteAgentJobAction.run()— "Continue in…" dropdownCreateRemoteAgentJobFromEditorAction.run()— editor context menu "Continue in…"When the guard triggers,
CHAT_SETUP_ACTION_IDis invoked to show the sign-in dialog. If the user completes sign-in, delegation proceeds normally. If dismissed, the action is silently aborted.