microsoft / microsoft/vscode

Long-running Agent Host sessions accumulate issue and pull-request references without cleanup

Open
#336,500 0 comments 0 reactions 0 assignees View on GitHub
agent-host
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Description

In a long-running Agent Host session in the Agents Window, the resource pills beside the chat input keep accumulating every recorded GitHub issue and pull request. Older entries remain indefinitely, and there is no visible way to remove individual stale references or clear a collection.

In the observed session, the input footer had grown to:

- 15 Pull Requests
- 15 Issues
- 2 Artifacts

As the session continues, these collections become increasingly noisy and make it difficult to find the resources that are relevant to the current work.

## Steps to reproduce

1. Start an Agent Host session in the Agents Window.
2. Keep using the same session across multiple tasks involving GitHub issues and pull requests.
3. Record or encounter additional issues and pull requests throughout the session.
4. Observe the resource pills beside the chat input.

## Actual behavior

- Issue and pull-request entries continually accumulate for the lifetime of the session.
- Old or no-longer-relevant references remain mixed with current ones.
- The UI offers no apparent way to remove an individual entry or clear stale references.
- The summary counts continue growing, making the collections less useful over time.

## Expected behavior

Long-running sessions should have a manageable lifecycle for recorded resources. The UI should remain useful as references accumulate, for example by allowing stale entries to be removed or cleared and by avoiding duplicate entries for the same resource.

Explicitly recorded durable artifacts can remain persistent if that is intentional, but ordinary issue and pull-request references should not grow without any user control.

## Related work

- #335383 addressed preserving issue and pull-request titles in these pills.
- #335896 covers rich previews and interaction with the collections.

This report is specifically about retention and unbounded collection growth rather than pill rendering or preview content.

Contributor guide

Open the contributing guide

Research direction

Reproduce the accumulation in an Agent Host session in the Agents Window and inspect how issue and pull-request resource pills are recorded and displayed. Review related issues #335383 and #335896 for existing behavior and boundaries. Done means ordinary references have a manageable lifecycle, stale entries can be removed or cleared, duplicates are avoided, and intentional durable artifacts remain persistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.