Skip to content

protocol: raise stream limit for messages over 64 KiB - #16

Merged
anish749 merged 2 commits into
mainfrom
fix-stream-limit
Jul 26, 2026
Merged

protocol: raise stream limit for messages over 64 KiB#16
anish749 merged 2 commits into
mainfrom
fix-stream-limit

Conversation

@anish749

Copy link
Copy Markdown
Owner

asyncio's StreamReader defaults to a 64 KiB buffer, so readline() raises ValueError: Separator is not found, and chunk exceed the limit on any larger newline-delimited message. This hit both endpoints of the daemon protocol: exec responses carrying cell outputs failed on the client, and large --file code payloads failed on the daemon, where the error was swallowed and surfaced as "daemon closed connection".

Both endpoints now pass a shared proto.STREAM_LIMIT of 64 MiB. Added a round-trip test over a real unix socket that sends a 200 KiB request and reads back a larger response; it fails with the original ValueError without the fix.

anish749 added 2 commits July 26, 2026 11:37
asyncio StreamReader defaults to a 64 KiB buffer, so readline() raised
ValueError on larger newline-delimited messages: exec responses carrying
cell outputs on the client side, and large --file code payloads on the
daemon side. Set a shared STREAM_LIMIT on both endpoints.
@anish749
anish749 merged commit 86536f9 into main Jul 26, 2026
1 check passed
@anish749
anish749 deleted the fix-stream-limit branch July 26, 2026 09:51
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