Skip to content

Agent Host chat input reverts while typing after draft sync rejection #331592

Description

@roblourens

Problem

Text typed into the chat input for an Agent Host session can repeatedly disappear, leaving the input reverted to an earlier prefix. In the reported case, the input kept returning to I want to as additional words were typed.

The Agent Host protocol logs show this sequence:

  1. I want to was the last server-confirmed chat/draftChanged value.
  2. The UI remained open and editable after the host considered the backing session explicitly deleted.
  3. Each longer draft was sent optimistically through chat/draftChanged.
  4. The host rejected each action with Session was explicitly deleted.
  5. Subscription state returned to the last confirmed draft, and that state was reflected back into the live chat input.

As a result, every newly typed suffix disappeared shortly after draft synchronization ran. The same state transition can also occur when reconnect processing replaces optimistic state with a fresh server snapshot.

Expected

Failure to synchronize a draft should not destroy text currently being edited locally.

Actual

A protocol rollback or snapshot can be interpreted as an incoming draft update and overwrite the live editor contents. This can make the input appear impossible to type into while the underlying session remains stale or unavailable.

(Written by Copilot)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions