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
{{ message }}
Repository navigation
v0.3 JSON-RPC and REST GetTask return no history when history_length is 0 #1311
A v0.3 JSON-RPC or REST client that sends historyLength: 0 gets the task back with empty history. In v0.3, 0 means unlimited, and the gRPC path returns the full history.
Why
to_core_send_message_configuration (compat/v0_3/conversions.py:320) and to_core_get_task_request (:1077) pass 0 through as a limit, and the core reads 0 as no history. FromProto already maps 0 to None for gRPC since #1306.
In the v0.3 protocol specification, history_length = 0 signifies unlimited history. However, in the v1.0 core protobuf models, history_length = 0 explicitly tells the engine to truncate history to 0 items; unlimited history requires the field to remain unset.
In src/a2a/compat/v0_3/conversions.py, to_core_get_task_request and to_core_send_message_configuration check if history_length is not None:. Because 0 is not None is True, 0 is set on the protobuf request rather than being omitted.
As a workaround you can omit history_length or pass None instead of 0.
Your implementation of an upstream fix in PR #1312 is the right approach. Assigning the issue to you till it gets reviewed.
Activity
rohityan commentedon Oct 8, 2026
Hi @ConnorMoss02, thanks for reporting this.
In the
v0.3protocol specification,history_length = 0signifies unlimited history. However, in the v1.0 core protobuf models,history_length = 0explicitly tells the engine to truncate history to 0 items; unlimited history requires the field to remain unset.In
src/a2a/compat/v0_3/conversions.py,to_core_get_task_requestandto_core_send_message_configurationcheckif history_length is not None:. Because0 is not NoneisTrue,0is set on the protobuf request rather than being omitted.As a workaround you can omit
history_lengthor passNoneinstead of0.Your implementation of an upstream fix in PR #1312 is the right approach. Assigning the issue to you till it gets reviewed.
ConnorMoss02 commentedon Oct 8, 2026
Thanks for confirming. Happy to adjust #1312 if the reviewers want anything changed.