Skip to content

fix(client): allow large sse events#36368

Open
harshmathurx wants to merge 1 commit into
anomalyco:v2from
harshmathurx:large-sse
Open

fix(client): allow large sse events#36368
harshmathurx wants to merge 1 commit into
anomalyco:v2from
harshmathurx:large-sse

Conversation

@harshmathurx

@harshmathurx harshmathurx commented Jul 11, 2026

Copy link
Copy Markdown

Closes #36343

Issue for this PR

Closes #36343

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Raises the generated Promise client's SSE frame buffer from 1 MiB to 32 MiB so supported large tool success events, such as image read events, do not disconnect /api/event subscribers with MalformedResponse.

The new ceiling still bounds malformed/unbounded SSE frames, but aligns the client with V2's supported media ingest path where a valid encoded image event can exceed 1 MiB.

How did you verify your code works?

  • Added a Promise client regression test that streams a >1 MiB SSE event through event.subscribe.
  • Ran bun test test/promise.test.ts from packages/client.
  • Ran git diff --check.
  • Attempted bun run generate from packages/client; blocked locally by dependency resolution: Cannot find module '@effect/platform/Cookies' from @effect/platform-node.
  • Attempted bun test test/generate.test.ts from packages/httpapi-codegen; blocked locally because this worktree has no installed effect package.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally where possible
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found one potentially related PR:

PR #33289: fix(app): prevent web client freeze from delta event bursts and SSE reconnect loops
#33289

This PR addresses SSE-related issues with event handling and reconnect loops, which could be tangentially related to the buffer size issue being fixed in PR #36368. However, it appears to be focused on a different aspect (preventing freezes and reconnect loops) rather than directly addressing the buffer size limitation for large SSE events.

The current PR (#36368) is specifically about raising the SSE frame buffer from 1 MiB to 32 MiB to support large tool success events. This appears to be a targeted fix distinct from the reconnect loop handling in #33289.

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jul 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@harshmathurx

harshmathurx commented Jul 11, 2026

Copy link
Copy Markdown
Author

Hi @kitlangton — pinging for a review on this PR. It references #36343 and the automated checks are passing, but the "needs:issue" label appears stuck because the GitHub-linked issue is not showing up in the sidebar. Could you confirm the issue is linked (or manually link it) and take a look when you have a moment? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant