Repository navigation
fix(server): apply history_length to legacy streaming sends - #1364
Merged
Iwaniukooo11 merged 3 commits intoOct 22, 2026
Merged
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/request_handlers/default_request_handler.py | 97.98% | 97.99% | 🟢 +0.02% |
| Total | 92.90% | 92.90% | ⚪️ 0.00% |
Generated by coverage-comment.yml
Iwaniukooo11
requested changes
Oct 21, 2026
Superagentic-AI
added a commit
to SuperagenticAI/superoptix
that referenced
this pull request
Oct 23, 2026
The streaming path ignored configuration.historyLength, so the initial Task event always carried full history. Apply it as SendMessage does, with the same 0.3 zero-means-unlimited rule. Mirrors a2aproject/a2a-python#1364.
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.
Problem
The legacy
on_message_send_streamignoredhistory_length. Task events kept full history and negative values weren't rejected.Fix
Validate at the top and apply it to yielded Task events, as
on_message_sendand the v2 stream handler do. Push notifications still get the full task.Tests
test_on_message_send_stream_limit_historyandtest_on_message_send_stream_negative_history_length_errorfail on main. 2289 passed.Fixes #1363