fix: increase LengthDelimitedCodec max frame size to 256 MiB#53
Open
shadaj wants to merge 1 commit into
Open
Conversation
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
Deploying infinity with
|
| 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 |
c341374 to
a3e09f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Failed to send daemon message to client: frame size too big" error
occurs because
LengthDelimitedCodec::new()defaults to an 8 MiB maxframe length. When a DaemonMessage exceeds this (e.g. replaying a long
conversation, large tool outputs, or file contents), the codec rejects
it.
Changes:
tokio-utildependency toinfinity-protocolcratelength_delimited_codec()helper ininfinity-protocolthatbuilds a codec with a 256 MiB limit
LengthDelimitedCodec::new()calls ininfinity-daemonand
infinity-agent-cliwith the shared helper, ensuring both sidesagree on the limit
Co-authored-by: Infinity 🤖 infinity@hydro.run