Repository navigation
Answer undeliverable client tool results with an error result - #7
Merged
Merged
Conversation
…esult A result above the realtime message size limit, a non-serializable value, or a transport error on send used to leave the agent waiting on its server-side tool timeout. The dispatcher now sends a short error result in its place and exposes the limit as MAX_CLIENT_TOOL_RESULT_BYTES.
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.
When a client tool handler returned a value that could not be sent (serialized above the ~64 KB data-channel limit, non-JSON-serializable, or a transport error on send), the SDK emitted
tool_failedbut the agent never received aclient_tool.result, so it waited out its server-side tool timeout (30 s by default) before recovering.MAX_CLIENT_TOOL_RESULT_BYTES, 60 000 bytes serialized) and non-serializable results are replaced by an error result that tells the agent why.MAX_CLIENT_TOOL_RESULT_BYTESis exported and documented indocs/client-tools.md.Tests added; full suite passes. Patch changeset included.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.