Context
A2A life-of-a-task expects refinements to carry referenceTaskIds. .NET sets this in A2AAgent.CreateA2AMessage:
a2aMessage.ReferenceTaskIds = typedSession.TaskId is not null ? [typedSession.TaskId] : null;
(Only when the prior task is not in InputRequired; see the companion input-required issue.)
Current Python state
_prepare_message_for_a2a (~L621) never sets reference_task_ids, so follow-up turns are not linked to the original task.
Proposed change
- When the session has a completed (non-
INPUT_REQUIRED) task_id, set a2a_message.reference_task_ids = [previous_task_id].
- Coordinate with the
input-required issue: INPUT_REQUIRED uses task_id instead.
Context
A2A life-of-a-task expects refinements to carry
referenceTaskIds. .NET sets this inA2AAgent.CreateA2AMessage:(Only when the prior task is not in
InputRequired; see the companioninput-requiredissue.)Current Python state
_prepare_message_for_a2a(~L621) never setsreference_task_ids, so follow-up turns are not linked to the original task.Proposed change
INPUT_REQUIRED)task_id, seta2a_message.reference_task_ids = [previous_task_id].input-requiredissue:INPUT_REQUIREDusestask_idinstead.