Skip to content

Bug: /executeCommand SSE stream omits blank-line event delimiters #27587

@Pluviobyte

Description

@Pluviobyte

What happened?

The A2A server streaming /executeCommand endpoint writes Server-Sent Events with a single trailing newline:

res.write(`data: ${JSON.stringify(jsonRpcResponse)}\n`);

A spec-compliant SSE/EventSource client requires a blank line (\n\n) to dispatch an event. Without that blank line, consecutive data: lines are folded into one record and the final event is never properly terminated, so clients cannot parse individual streaming updates.

What did you expect to happen?

Each JSON-RPC response emitted by the streaming endpoint should be a separate SSE event, delimited by a blank line:

data: {...}\n\n

Root cause

The handler emits \n instead of \n\n. The existing streaming test did not catch this because it used a Mocha-style done callback, which Vitest 3 does not honor, so the test returned before its asynchronous assertions ran.

Proposed fix

Append the missing blank line to each event and convert the streaming test to async/await so it genuinely validates emitted events.

Related PR: #27549

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/non-interactiveIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationeffort/medium2-3 days: UI state, async flow, cross-component refactorskind/bugpriority/p2Important but can be addressed in a future release.status/bot-triagedstatus/need-information

    Type

    No fields configured for Bug.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions