microsoft / microsoft/vscode

Agent host logs an error when releasing sampling interest during shutdown

Open
#336,240 0 comments 0 reactions 1 assignee Claimed by @anthonykim1 View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Problem

When an agent-host session shuts down, cleanup can try to release the MCP sampling interest after the SDK session has already gone away. This produces an error during an otherwise normal shutdown.

Example:

```text
[trace] [Copilot:] Session shutdown: type=routine, apiDuration=0ms
[error] Error: Request session.eventLog.releaseInterest failed with message: Session not found for sessionId:
[Copilot:] Failed to release sampling event interest
```

The sampling interest should be released before disconnecting the SDK session. If the session has already shut down, there is nothing left to release.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.