You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#816 fixes the problem for SendMessage calls by calling limitTaskHistory in DefaultRequestHandler.
But it seems for SendStreamingMessage (both rest and jsonRPC), it does not take effect.
The fix is a one-line addition. #816 already added limitTaskHistory to the SendMessage blocking path in DefaultRequestHandler. The streaming path (SendStreamingMessage) just needs the same call.
Root cause
In DefaultRequestHandler, the blocking onMessageSend path calls:
But the streaming path in onSendStreamingMessage (or equivalent handler) does not — it passes the full task history to the agent without respecting historyLength.
Fix
// In SendStreamingMessage handler, before passing tasks to agent:List<Task> limitedHistory = limitTaskHistory(tasks, historyLength);
This is the same limitTaskHistory method already used in the non-streaming path. The streaming handler needs the same pre-processing step.
Relevance to A2A spec
This is directly related to the multi-turn conversation proposal (#2061 in the A2A spec repo), where historyLength controls how much prior context is injected. The Java SDK accepts the parameter but silently drops it for streaming — fixing this makes the SDK's streaming path conform to the same semantics as the blocking path.
I don't have a Java environment set up to submit the PR, but the fix is trivial — happy to review if someone submits.
This is the same pattern used in onMessageSend (line 630-631). The fix from #816 was applied to both paths. Can you confirm whether you're still seeing the issue on the latest version? If not, this can be closed.
Activity
kuangmi-bit commentedon Jul 20, 2026
The fix is a one-line addition. #816 already added
limitTaskHistoryto theSendMessageblocking path inDefaultRequestHandler. The streaming path (SendStreamingMessage) just needs the same call.Root cause
In
DefaultRequestHandler, the blockingonMessageSendpath calls:But the streaming path in
onSendStreamingMessage(or equivalent handler) does not — it passes the full task history to the agent without respectinghistoryLength.Fix
This is the same
limitTaskHistorymethod already used in the non-streaming path. The streaming handler needs the same pre-processing step.Relevance to A2A spec
This is directly related to the multi-turn conversation proposal (#2061 in the A2A spec repo), where
historyLengthcontrols how much prior context is injected. The Java SDK accepts the parameter but silently drops it for streaming — fixing this makes the SDK's streaming path conform to the same semantics as the blocking path.I don't have a Java environment set up to submit the PR, but the fix is trivial — happy to review if someone submits.
fix: apply historyLength to SendStreamingMessage responses
fix: apply historyLength to SendStreamingMessage responses (a2aprojec…
kuangmi-bit commentedon Jul 23, 2026
This appears to already be fixed in the current
mainbranch.DefaultRequestHandler.onMessageSendStreamalready applieslimitTaskHistoryat line 740-741:This is the same pattern used in
onMessageSend(line 630-631). The fix from #816 was applied to both paths. Can you confirm whether you're still seeing the issue on the latest version? If not, this can be closed.kabir commentedon Jul 23, 2026
It was fixed in #983?