Skip to content

RemoteA2AAgent streaming mode mismatch with ClientConfig #983

@ankity

Description

@ankity

Describe the Bug:
RemoteA2AAgent derives streaming mode from agentCard.capabilities().streaming(), but client execution path uses both clientConfig.isStreaming() and agentCard.capabilities().streaming().
This causes inconsistent mode decisions between layers when these values differ (e.g., card says streaming=true, client config says streaming=false), which can lead to send/stream flow mismatch and stuck completion behavior.

Steps to Reproduce:

  1. Configure an A2A client with:
    • AgentCard capability streaming = true
    • ClientConfig streaming = false
  2. Build remote agent via RemoteA2AAgent.builder(...).a2aClient(client).build().
  3. Invoke remote agent in non-stream mode (message:send path).
  4. Observe inconsistent behavior between remote agent mode assumptions and client transport mode (in our case, response returns but top-level reactive flow completion is inconsistent/hangs).

Expected Behavior:
A single effective streaming decision should be used consistently across RemoteA2AAgent and client transport.
If client config disables streaming, all layers should behave non-streaming.

Observed Behavior:
Mode decision is inconsistent:

  • RemoteA2AAgent appears to use AgentCard capability only.
  • Client transport path gates behavior with both client config and AgentCard capability.
    This mismatch can produce control-flow inconsistencies (including completion/hanging symptoms).

Environment Details:

  • ADK Library Version (see maven dependency): 0.7.0
  • OS: macOS

Model Information:

  • Which model is being used: N/A / not model-specific (A2A transport+mode handling issue)

Screenshots / Video:
N/A

Additional Context:
In our integration, client config explicitly disables streaming:

.clientConfig(ClientConfig.builder().setStreaming(false).build())

Even with this, behavior suggests another layer still treats streaming capability differently (derived from AgentCard).

Minimal Reproduction Code:

AgentCard agentCard = ... // capabilities.streaming() == true

Client client =
    Client.builder(agentCard)
        .withTransport(JSONRPCTransport.class, new JSONRPCTransportConfig(httpClient))
        .clientConfig(ClientConfig.builder().setStreaming(false).build())
        .build();

RemoteA2AAgent remote =
    RemoteA2AAgent.builder()
        .name(agentCard.name())
        .description(agentCard.description())
        .agentCard(agentCard)
        .a2aClient(client)
        .build();

// invoke non-stream operation (message:send)
// observe mismatch in mode behavior between remote agent and client transport

How often has this issue occurred?:

  • Always (100%)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions