Skip to content

fix(remote): raise daemon WS ws_max_size for blob responses - #19

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-management-5bc5
Draft

fix(remote): raise daemon WS ws_max_size for blob responses#19
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-management-5bc5

Conversation

@cursor

@cursor cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

Remote file_blob_read responses (and any worker→daemon WS frame carrying a max-size blob) were silently dropped when the base64+JSON payload exceeded 16MiB — uvicorn's default ws_max_size. A concrete trigger: read or recognize a ≥12MiB file from an active remote workspace; the worker encodes and replies (~28MiB for a 20MiB cap), but the daemon websocket server closes the connection.

Commit bb62730 fixed the worker receive limit (websockets.connect(max_size=REMOTE_WS_MAX_SIZE)), but the daemon server side was still capped at 16MiB, leaving inbound blob responses broken.

Root cause

run_remote_worker_server_until_stopped() created uvicorn.Config without ws_max_size, so inbound frames from workers were limited to 16MiB while REMOTE_BLOB_MAX_BYTES allows 20MiB raw (~28MiB on the wire).

Fix

  • Set ws_max_size=REMOTE_WS_MAX_SIZE on the remote worker uvicorn server (shared constant with the worker client).
  • Add regression test asserting daemon limit exceeds uvicorn default and covers max blob base64 size.

Validation

  • pytest tests/test_remote_worker_server_panel.py::test_remote_worker_ws_max_size_covers_blob_responses tests/test_attachment_sync.py -v
Open in Web View Automation 

Uvicorn defaults to 16MiB while file_blob_read responses carry up to
20MiB raw (~28MiB base64+JSON). Worker receive limit was fixed in
0.2.10 but the daemon server still dropped large inbound frames.

Co-authored-by: Yuxuan Liu <Osc-7@users.noreply.github.com>
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