youngkermit8-coder opened a new pull request, #2042: URL: https://github.com/apache/rocketmq-dashboard/pull/2042
## What changed - cap the combined stdout and stderr read from one Claude Code streaming process at 5 MiB - terminate the child process as soon as that limit is exceeded - return the structured `llm.provider.output_too_large` error already used for oversized CLI output - cover oversized stdout, oversized stderr, and a combined-output overflow while preserving the existing bounded-output and timeout cases ## Why `ClaudeCodeAgentProvider.stream()` read stdout through an unbounded `BufferedReader.readLine()` and collected stderr with `readAllBytes()`. A misbehaving or compromised Claude upstream could therefore make Studio retain arbitrarily large child-process output and exhaust the JVM heap. This streaming path is separate from the non-streaming CLI completion path. Fixes #2040. ## Verification - baseline regression on exact `rocketmq-studio` head: all 3 overflow cases failed because no exception was raised - `ClaudeCodeAgentProviderTest` — 5/5 passed - AI package tests — 66/66 passed - full backend suite — 1057/1057 passed - Checkstyle — 0 violations - `git diff --check` — passed Signed-off-by: youngkermit8-coder <[email protected]> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
