agentHost: recover from expired GitHub credentials - #330556
Merged
Connor Peet (connor4312) merged 3 commits intoAug 13, 2026
Merged
Conversation
Recover Agent Host sessions when GitHub credentials expire without requiring a window restart. - Emit complete protected resource metadata when providers require authentication. - Resend the current client token before escalating to the shared sign-in flow. - Update live Copilot SDK sessions with new credentials and restart only as a fallback. - Re-arm authentication notifications after each client authentication attempt. - Handle model-list authorization failures as authentication challenges. - Keep recovery and transformed-token state isolated per Agent Host connection. - Add local, remote, multi-host, concurrency, and live credential update coverage. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…-auth-recovery # Conflicts: # src/vs/platform/agentHost/node/copilot/copilotAgent.ts # src/vs/platform/agentHost/test/node/copilotAgent.test.ts # src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.ts # src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts
Clear a notification-scoped Agent Host credential when the client no longer has a matching authentication session. - Forward an empty token after token resolution fails. - Reset staged recovery state after credential removal. - Verify that a later token can start recovery again without prompting. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Tyler James Leonhardt (@TylerLeonhardt)Matched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds live recovery for expired Agent Host GitHub credentials without restarting the window.
Changes:
- Adds connection-scoped token resend and sign-in escalation.
- Updates live Copilot SDK sessions, with safe restart fallback.
- Expands authentication protocol metadata and recovery coverage.
Show a summary per file
| File | Description |
|---|---|
agentHostChatContribution.test.ts |
Tests local recovery flows. |
agentHostAuth.test.ts |
Tests token recovery state. |
agentHostChatContribution.ts |
Handles authentication notifications. |
agentHostAuth.ts |
Implements recovery coordination. |
remoteAgentHost.contribution.test.ts |
Tests remote and multi-host recovery. |
REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md |
Documents remote recovery behavior. |
remoteAgentHost.contribution.ts |
Adds per-connection recovery. |
mockAgent.ts |
Adds observable authentication state. |
copilotAgentSession.test.ts |
Tests live credential updates. |
copilotAgent.test.ts |
Covers updates, concurrency, and fallback. |
claudeAgent.test.ts |
Updates authentication-state assertions. |
agentSideEffects.test.ts |
Tests observable notification emission. |
copilotAgentSession.ts |
Updates SDK session credentials. |
copilotAgent.ts |
Coordinates credential updates and restarts. |
codexAgent.ts |
Removes obsolete auth events. |
claudeAgent.ts |
Removes obsolete auth events. |
agentSideEffects.ts |
Publishes observable auth requirements. |
agentService.ts |
Emits complete resource metadata. |
notifications.ts |
Changes the authentication wire contract. |
agent.ts |
Exposes observable auth state. |
.github/skills/sessions/SKILL.md |
Documents recovery guidance. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 21/21 changed files
- Comments generated: 1
- Review effort level: Balanced
roblourens
approved these changes
Aug 12, 2026
Connor Peet (connor4312)
deleted the
connor4312/agent-host-auth-recovery
branch
August 13, 2026 01:01
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.
agentHost: recover from expired GitHub credentials
Recover Agent Host sessions when GitHub credentials expire without requiring a
window restart.
Protocol contract: microsoft/agent-host-protocol#396
(Commit message generated by Copilot)