Skip to content

Agent Host session restore hangs after Copilot SDK/runtime bump #332885

Closed

Description

Summary

Opening an evicted existing Agent Host Copilot session can hang indefinitely after commit a29f231 (#332803), which updated:

  • @github/copilot-sdk from 1.0.11 to 1.0.13-preview.0
  • @github/copilot from 1.0.81-0 to 1.0.81-12

The affected session remains selected in the Agents Window, but its state never hydrates. The renderer eventually reports Session state did not hydrate.

Live first-parent A/B validation

I built and launched both revisions against isolated clones of the same VS Code Insiders profile, signed into both, and opened the same existing session (copilotcli:/4dc85b76-8604-480b-8301-ad3a3df8c6b0, title "Redesign AH Session Databbase"). To exercise the cold restore path, I opened other sessions before reopening the target.

Bad: a29f231dfa3

08:49:40.790 restoreSession start
08:49:40.791 restore: reading provider metadata

No subsequent event appeared for:

  • restore: provider metadata resolved
  • Calling SDK resumeSession
  • Restored session
  • restoreSession done

After 60 seconds, both the session and default-chat subscriptions timed out:

outcome=timeout
sdkResumeOutcome=notStarted
servedFromMemory=0
timeToRestoreStartMs=0
timeToRestoreCompleteMs=undefined
totalDurationMs=60000-60002

The renderer then logged:

Failed to subscribe to existing session ... Session state did not hydrate

Good: first parent 3fcbd108b3154f6dc47ea9656d3a20e04aeefa43

With the same profile data and interaction sequence:

08:54:08.022 restoreSession start
08:54:08.023 restore: reading provider metadata
08:54:08.027 restore: provider metadata resolved
08:54:08.051 Calling SDK resumeSession
08:54:08.271 SDK resumeSession succeeded (220.9 ms)
08:54:08.402 Restored session with 11 turns
08:54:08.404 restoreSession done

Subscription telemetry reported success in 382 ms:

outcome=success
servedFromMemory=0
timeToRestoreStartMs=0
timeToRestoreCompleteMs=382
totalDurationMs=382

Additional investigation

  • The target session.db passes PRAGMA quick_check and contains the expected 11 turns.
  • sessionDataService.ts and sessionDatabase.ts are unchanged across the first-parent boundary.
  • The correct session URI is selected and the expected session/default-chat subscriptions are sent, so this is below the nested session/chat tree UI.
  • Main-process and extension-host logs contain no causal error at the failed open.
  • The hang is before SDK resume, while Agent Host is awaiting provider metadata acquisition (CopilotAgent.getChatMetadata, including stored metadata and SDK getSessionMetadata).
  • The same failure was seen in multiple latest-build runs, while the parent build consistently completed SDK metadata/resume operations.

Assessment

The first-parent A/B test identifies a29f231dfa3 as the first bad commit with high confidence. The executable implementation behind the provider metadata request changed with the SDK/runtime dependency bump, while the VS Code database and metadata call path did not.

A mixed-version repin test would determine whether the regression is specifically in @github/copilot-sdk 1.0.13-preview.0 or @github/copilot 1.0.81-12.

Recommended next steps

  1. Reproduce with SDK 1.0.13-preview.0 + runtime 1.0.81-0, then SDK 1.0.11 + runtime 1.0.81-12, if compatible.
  2. Add timing/cancellation around client.getSessionMetadata(sessionId) to identify and contain the stalled RPC.
  3. Ensure a stalled metadata request rejects or restarts the Copilot client rather than keeping _restoreSessionInFlight pending indefinitely.

Activity

  1. added
    bug
    important
    freeze-slow-crash-leak
    on Aug 27, 2026
  2. added a commit that references this issue on Aug 27, 2026
    3327a40
  3. added this to the 1.136.0 milestone on Aug 27, 2026
  4. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Aug 27, 2026
  5. locked and limited conversation to collaborators on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugfreeze-slow-crash-leakimportantinsiders-releasedperfverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions