Skip to content

Agent Inspector chat input loses focus after every message, requiring click or Tab to type again #454

@AlexHimself

Description

@AlexHimself

Description

After sending a message in the Agent Inspector chat panel, the text input immediately loses keyboard focus. To type the next message you must click the input or press Tab to re-focus it. This makes conversational testing of an agent very friction-heavy.

Steps to Reproduce

  1. Open any project with a running agent (e.g. a minimal ASP.NET Core agent using the Responses protocol on localhost:8088)
  2. Open the Agent Inspector via the AI Toolkit panel or AI Toolkit: Open Test Tool
  3. Type a message in the chat input and press Enter
  4. Observe that the input field loses focus as soon as the message is submitted / the response streams in

Expected Behavior

The chat input retains (or immediately restores) keyboard focus after a message is sent, so the user can type the next message without any intermediate click or key navigation.

Actual Behavior

Keyboard focus leaves the chat input after each send. The user must click the input or press Tab to re-focus before typing the next message.

Additional Context

  • Reproduced with the server started both via VS Code tasks (F5) and manually (dotnet run in the terminal + opening the Inspector from the command palette) — confirming the issue is in the Inspector webview itself, not in the launch configuration.
  • Workaround: pressing Tab after each send re-focuses the input, but this is disruptive in a conversational flow.

Environment

  • VS Code version:
  • AI Toolkit extension version:
  • OS: Windows 11
  • Agent protocol: Responses

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs attentionThe issue needs contributor's attention

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions