microsoft / microsoft/vscode

Agent Host can send a queued steering message after removal or while it is being edited

Open
#336,466 0 comments 0 reactions 1 assignee Claimed by @roblourens View on GitHub
agent-host
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Description

In an Agent Host chat in the Agents Window, a queued steering message can still be delivered after the user removes it from the queue. A steering message can also be delivered automatically while the user is actively editing that queued item.

Both behaviors make the visible queue state unreliable: removing a message does not reliably cancel it, and editing does not protect it from being consumed with incomplete or unintended content.

## Scenario 1: removed message is still sent

1. Start an Agent Host turn that runs long enough to accept steering messages.
2. Add a steering message to the queue.
3. Remove the steering message from the queue before it is delivered.
4. Let the current agent activity continue.

**Actual:** The removed steering message is subsequently sent to the agent.

**Expected:** Removing a queued steering message atomically cancels delivery. Once it disappears from the queue, it must never be sent.

## Scenario 2: message is sent while being edited

1. Start an Agent Host turn that runs long enough to accept steering messages.
2. Add a steering message to the queue.
3. Begin editing the queued message.
4. Keep the editor active while the queue would otherwise advance.

**Actual:** The steering message can be sent while it is still being edited.

**Expected:** Queue processing pauses for an item while it is being edited. The item should become eligible for delivery only after the edit is explicitly saved or otherwise completed.

## Related issues

- #289499 specifies that queue auto-send must not occur while a user is editing a queued item and that dismiss removes the item from the queue.
- #321389 addressed the visibility and placement of the cancellation UI, but not delivery after cancellation.

This report concerns the underlying queue state/delivery race rather than whether the controls are visible.

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.