Skip to content

Bug: webchat messages disappear when gateway removes orphaned user messages during long agent operations #33549

@pennyworth100

Description

@pennyworth100

Problem

During long agent operations (>2 min), the webchat UI loses messages. Gateway logs show:

[agent/embedded] Removed orphaned user message to prevent consecutive user turns.

Messages already displayed to the user simply vanish. This causes visible gaps in chat history and seriously undermines trust in the interface.

Steps to Reproduce

  1. Start a long-running agent operation (e.g. script/API call taking 2+ min)
  2. Observe webchat UI — a previous user message disappears
  3. Check gateway.err.log for Removed orphaned user message

Expected Behavior

Messages already rendered in the webchat UI should never be removed. The orphaned-message recovery mechanism should not affect visible chat history.

Actual Behavior

User-visible messages are deleted from the chat view mid-conversation.

Logs

2026-03-03T21:46:21.609Z [agent/embedded] Removed orphaned user message to prevent consecutive user turns. runId=03677ce2-eeef-4785-a7c6-e1e30304bcfa sessionId=boot-2026-03-03_19-34-02-306-f1688c3b
2026-03-03T21:48:41.031Z [diagnostic] stuck session: sessionId=main state=processing age=139s queueDepth=1

Context

  • Version: 2026.3.2
  • Channel: webchat (localhost)
  • Appears triggered by boot-hook sessions creating consecutive user turns
  • Also observed alongside stuck session diagnostics

Impact

Users lose trust in the webchat as a reliable interface. Critical UX regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    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