Skip to content

fix(gateway): reject oversized ASAP responses instead of truncating JSON - #61

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

fix(gateway): reject oversized ASAP responses instead of truncating JSON#61
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-6a31

Conversation

@cursor

@cursor cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

Bug

Inbound POST /asap task responses larger than the 64 KiB gateway HTTP buffer were silently truncated while returning HTTP 200, producing invalid JSON-RPC for callers.

Root cause

handle_asap copies the serialized response into RESP_BUF_SIZE (65536) without checking length, while the ASAP agent buffer allows up to 256 KiB.

Fix

Return JSON-RPC -32603 when the serialized response exceeds the gateway buffer instead of truncating mid-payload.

Open in Web View Automation 

Co-authored-by: esadrianno <esadrianno@gmail.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