Repository navigation
agentHost: Prefer stored Copilot restore metadata - #332984
Merged
roblourens merged 3 commits intoAug 27, 2026
Merged
Conversation
Use Agent Host's persisted working directory and registry timestamps when restoring registered Copilot sessions, avoiding unnecessary SDK metadata requests that can block hydration. Preserve SDK lookups for external and legacy sessions. Fixes #332885. (Written by Copilot) Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Improves Copilot session restoration by preferring persisted Agent Host metadata over potentially stalled SDK metadata requests.
Changes:
- Pass registry timestamps during explicit restoration.
- Restore working-directory and project metadata from persisted state.
- Skip redundant SDK metadata calls and add targeted tests.
Show a summary per file
| File | Description |
|---|---|
agentService.ts |
Supplies registry metadata during restoration. |
copilotAgent.ts |
Adds persisted-metadata restore path. |
agentService.test.ts |
Verifies registry fallback propagation. |
copilotAgent.test.ts |
Covers SDK lookup avoidance. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Balanced
Use the first persisted working directory when the legacy singular metadata key is absent, so list-only session metadata also avoids the SDK lookup. (Written by Copilot) Co-authored-by: Copilot <[email protected]>
roblourens
marked this pull request as ready for review
August 27, 2026 17:36
Dmitriy Vasyura (dmitrivMS)
approved these changes
Aug 27, 2026
roblourens
enabled auto-merge (squash)
August 27, 2026 18:18
roblourens
deleted the
roblou/agents/vscode-issue-332885-workaround-1eeaf422
branch
August 27, 2026 18:33
This was referenced Aug 27, 2026
roblourens
added a commit
that referenced
this pull request
Aug 28, 2026
Revert "agentHost: Prefer stored Copilot restore metadata (#332984)" The workaround is no longer needed. This reverts commit 3327a40. (Written by Copilot) Co-authored-by: Copilot <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #332885
What changed
Why
A Copilot SDK
session.getMetadatarequest can remain pending for an affected persisted session, preventing Agent Host state hydration. Registered Agent Host sessions already retain the metadata needed to begin restore, so the restore path can avoid depending on that request when the stored metadata is complete.Validation
npm run compilenpm run hygienenpm run typecheck-client(Written by Copilot)