Skip to content

fix(webchat): align WebSocket payload limit with agent response buffer - #62

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-fd25
Draft

fix(webchat): align WebSocket payload limit with agent response buffer#62
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-fd25

Conversation

@cursor

@cursor cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

Bug

WebChat silently dropped agent replies larger than 8KiB. dispatch.c fills a 32KiB buffer but ws_send_to rejected payloads above 8192 bytes with no error surfaced to the user.

Impact

Dashboard/WebChat users saw no response for typical tool-heavy or long agent output.

Fix

  • Introduce WS_TEXT_MAX (32KiB) in ws.h, aligned with RESPONSE_BUF_SIZE
  • Update WebSocket buffers in ws.c, http_lws.c, and webchat.c
  • Add regression test accepting ~10KiB outbound payload

Validation

  • make test_ws (all tests pass)
Open in WebView Automation

Raise WS_TEXT_MAX to 32KiB to match dispatch RESPONSE_BUF_SIZE so agent
replies between 8KiB and 32KiB are delivered instead of silently dropped.

Co-authored-by: esadrianno <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant