You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent Host can delete durable sessions after transient resume failures #328590
agent-hostIssues for the agent-host implementation (not the protocol)bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded
An existing Agent Host session can disappear permanently after a transient Copilot SDK resume failure.
The SDK reports both genuinely empty sessions and unrelated failures with JSON-RPC code -32603. Agent Host treated nearly every -32603 as an empty session and replaced the existing SDK session with a new empty session using the same ID.
When that zero-turn state later lost its final subscriber, empty-session GC treated it as an abandoned provisional draft and invoked destructive disposal. That deleted the SDK event history, Agent Host session database, and worktree.
Expected
Network, authentication, corruption, and unknown resume failures preserve all durable session data and surface the error.
Empty-session recreation is limited to explicit SDK no events and Session not found responses.
Destructive empty-session GC only applies to pristine provisional sessions that have never materialized or persisted data.
Chat, changeset, and annotations subscriptions keep their owning session alive.
Additional context
The issue was reproduced with session f72992a0-b278-45e0-b094-4e78dd0b1370. Its exported debug bundle retained 2,552 SDK events, including 10 user messages, immediately before Agent Host GC deleted the live session.
agent-hostIssues for the agent-host implementation (not the protocol)bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded
Activity
roblourens commentedon Aug 5, 2026
Fixed in #328641