#7417·CopilotKit

Bug: assistant text emitted after a tool call in the same run never reaches the v1 client

Author: dattatrayamCreated Sep 24, 2026Updated Sep 30, 2026
Labelsbug

♻️ Reproduction Steps

  1. Configure a v1-style CopilotRuntime with agents: { default: ... } (custom BuiltInAgent subclass or any agent) whose response includes text, then a tool call, then more text, all in the same run.
  2. Trigger a chat interaction producing that text → tool call → text pattern.
  3. Observe the rendered message in the v1 (useCopilotChat) client.

✅ Expected Behavior

Both text segments (before and after the tool call) should render as one continuous assistant message, matching the full AG-UI event stream.

❌ Actual Behavior

Only the first text segment renders. The server-side AG-UI stream itself is complete and correctly ordered — verified via full per-event server-side tracing: TEXT_MESSAGE_START/CONTENT/END, TOOL_CALL_START/ARGS/END, a second TEXT_MESSAGE_START/CONTENT/END, then RUN_FINISHED with no error. Nothing is dropped upstream of the v1-compat translation layer.

Working hypothesis, after ruling out three other candidates: the v1-compat bridge treats TOOL_CALL_START as "this turn is done" and stops forwarding further text content for the same run.

Note: diagnosed against @copilotkit/[email protected]'s compiled output, not current TypeScript source, so I don't have a precise file:line citation for current main the way I did for the clone() bug above. Happy to help narrow it down if a maintainer can point at the relevant file (likely something translating AG-UI events into the v1 GraphQL message stream).

Screenshots

No response

CopilotKit Version

bash
backend:
├── @ag-ui/[email protected]
├── @copilotkit/[email protected]

frontend:
├── @copilotkit/[email protected]
├── @copilotkit/[email protected]

Logs (Optional)

bash