One method, two result shapes
The planner sends SendMessage to code-reviewer, and the agent logic decides the shape. A question with no text/x-diff part gets result.message, message 3b4b1206 in context dc423c62, and the client can only read its parts and send a new message in that context. A diff gets result.task, task e5c95b09 in context 49c5a238 in state TASK_STATE_INPUT_REQUIRED, and the client can answer with that taskId or follow the task with GetTask, SubscribeToTask, or CancelTask.
SendMessage
planner to code-reviewer, one method
code-reviewer decides
a question with no text/x-diff part: a message
anything else: a task
result.message
messageId 3b4b1206
contextId dc423c62, no task id
a question (02)
result.task
id e5c95b09, contextId 49c5a238
TASK_STATE_INPUT_REQUIRED
a diff (06)
WHAT THE CLIENT CAN DO NEXT
a new SendMessage
with contextId dc423c62 to continue
Nothing to poll, cancel, or subscribe to.
The message is the whole answer.
act on task e5c95b09
SendMessage with its taskId answers
GetTask and SubscribeToTask follow it
CancelTask asks to stop it