Skip to content

fix: increase LengthDelimitedCodec max frame size to 256 MiB#53

Open
shadaj wants to merge 1 commit into
mainfrom
sandbox-99958bcf-dcbe-4c61-b295-c71f3defa2c2
Open

fix: increase LengthDelimitedCodec max frame size to 256 MiB#53
shadaj wants to merge 1 commit into
mainfrom
sandbox-99958bcf-dcbe-4c61-b295-c71f3defa2c2

Conversation

@shadaj

@shadaj shadaj commented Jul 2, 2026

Copy link
Copy Markdown
Member

The "Failed to send daemon message to client: frame size too big" error
occurs because LengthDelimitedCodec::new() defaults to an 8 MiB max
frame length. When a DaemonMessage exceeds this (e.g. replaying a long
conversation, large tool outputs, or file contents), the codec rejects
it.

Changes:

  • Added tokio-util dependency to infinity-protocol crate
  • Added length_delimited_codec() helper in infinity-protocol that
    builds a codec with a 256 MiB limit
  • Replaced all LengthDelimitedCodec::new() calls in infinity-daemon
    and infinity-agent-cli with the shared helper, ensuring both sides
    agree on the limit

Co-authored-by: Infinity 🤖 infinity@hydro.run

The "Failed to send daemon message to client: frame size too big" error
occurs because `LengthDelimitedCodec::new()` defaults to an 8 MiB max
frame length. When a DaemonMessage exceeds this (e.g. replaying a long
conversation, large tool outputs, or file contents), the codec rejects
it.

Changes:
* Added `tokio-util` dependency to `infinity-protocol` crate
* Added `length_delimited_codec()` helper in `infinity-protocol` that
  builds a codec with a 256 MiB limit
* Replaced all `LengthDelimitedCodec::new()` calls in `infinity-daemon`
  and `infinity-agent-cli` with the shared helper, ensuring both sides
  agree on the limit

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #53
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploying infinity with  Cloudflare Pages  Cloudflare Pages

Latest commit: a3e09f5
Status: ✅  Deploy successful!
Preview URL: https://1848c123.infinity-dc7.pages.dev
Branch Preview URL: https://sandbox-99958bcf-dcbe-4c61-b.infinity-dc7.pages.dev

View logs

@shadaj shadaj marked this pull request as ready for review July 2, 2026 20:57
@shadaj shadaj force-pushed the sandbox-99958bcf-dcbe-4c61-b295-c71f3defa2c2 branch from c341374 to a3e09f5 Compare July 2, 2026 22:42
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