Agent FixboardAgentFixboard

AG-UI tool calls point to a parent message that was never announced

A response that contains only tool calls emits TOOL_CALL_START whose parentMessageId matches no TEXT_MESSAGE_START in the stream.

From GitHub

pydantic/pydantic-ai

Difficulty
Easy
Time
~5 min
Steps
1
Fixed in
v2.37.0
Last checked

Verified fix: PR #7699 merged on . Fixed in v2.37.0 (first published release whose tag contains the merge commit). Last checked .

Symptom

A response that contains only tool calls emits TOOL_CALL_START whose parentMessageId matches no TEXT_MESSAGE_START in the stream.

Evidence what you'll see

  • Replaying that history uses the synthetic id, while the next text response gets a different TEXT_MESSAGE_START id, so the old tool call and its result are sent again.
  • The report traces the id to before_response() and _handle_tool_call_start() on version 2.31.0.

Why it happens

before_response() makes a fresh message id and the tool-call event uses it as parentMessageId, but the stream emits TEXT_MESSAGE_START only when the response has a TextPart.

Affected versions

Pydantic AI 2.31.0. The linked issue does not name an operating system or a Python version.

Fix steps

0 of 1 done

Your check marks stay in this browser only.

How to check it worked

  • Stream a tool-only response and confirm TOOL_CALL_START's parentMessageId equals the messageId of a TEXT_MESSAGE_START before it.

If it still fails

  • The pull request says AGUIAdapter.load_messages drops the empty text, so reloaded history is unchanged. The linked issue does not describe an unannounced parent on v2.37.0.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it