Skip to content

Bug: No SSE stream connection when resuming a conversation #132

@nikitax75

Description

@nikitax75

Description

When resuming an existing conversation (clicking on a conversation from History and sending a follow-up message), the frontend does not establish a Server-Sent Events (SSE) connection to the stream URL returned by the API.

Steps to Reproduce

  1. Start cui-server and create a new conversation
  2. After the conversation completes, go to History tab
  3. Click on the conversation to open it
  4. Send a follow-up message

Expected Behavior

  • The frontend should connect to /api/stream/{streamingId} to receive real-time updates
  • The new message and response should appear in the UI without needing to refresh

Actual Behavior

  • The API call POST /api/conversations/start with resumedSessionId succeeds
  • The server returns a valid streamUrl
  • The frontend does NOT connect to the stream URL
  • The UI does not update to show the new messages
  • Refreshing the page shows the messages were saved correctly

Technical Details

API Response (correct):

{
  "streamingId": "xxx",
  "streamUrl": "/api/stream/xxx",
  "sessionId": "original-session-id",
  "cwd": "/app",
  "tools": [...]
}

Network activity comparison:

  • New conversation: Makes request to /api/stream/{id}
  • Resumed conversation: No stream request made ❌

Environment

  • cui-server version: 0.6.3
  • Node.js: 20.x
  • Browser: Chromium (tested via Playwright)

Workaround

Refreshing the page after sending a follow-up message shows the response correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions