You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an intermittent but frequent System.Text.Json.JsonReaderException when using the Azure.AI.Agents.Persistent SDK (latest version). The error occurs when an Agent attempts to call a Microsoft Fabric tool.
The stack trace indicates that StreamingUpdate.FromEvent receives an empty or invalid payload, failing to parse it as JSON.
Regression Timeline & Comparison
We began noticing this behavior consistently starting on February 6th, 2026. Before this date, the integration was stable. Currently, the failure rate via SDK is extremely high.
Tests using Fabric Data Agent Directly works just fine. And Using ResponseApi also.
Reproduction Steps
Configure an Agent with a Microsoft Fabric tool connection.
Initialize a persistent thread and start a run with streaming enabled.
Iterate through the streaming updates using do while.
Observe the crash when the Agent triggers the Fabric tool.
Sample Code (Console App)
usingAzure.AI.Agents.Persistent;usingAzure.Identity;varurl="FOUNDRY_PROJECT_URL";varagentId="FOUNDRY_AGENT_ID";varagentClient=newPersistentAgentsClient(url,newDefaultAzureCredential());PersistentAgentThreadthread=awaitagentClient.Threads.CreateThreadAsync();awaitagentClient.Messages.CreateMessageAsync(thread.Id,MessageRole.User,content:"Give-me the client map locations using fabric");varrunTask=agentClient.Runs.CreateRunStreamingAsync(thread.Id,agentId);ThreadRun?currentRun;do{currentRun=null;awaitforeach(varupdateinrunTask){Console.WriteLine(update);switch(update){caseRunUpdaterunUpdate:currentRun=runUpdate;break;caseMessageContentUpdatemessageContentUpdate:Console.WriteLine(messageContentUpdate.Text);break;}}}while(currentRun?.Status!=RunStatus.Cancelled||currentRun?.Status!=RunStatus.Cancelling||currentRun?.Status!=RunStatus.Completed||currentRun?.Status!=RunStatus.Failed);
Error Message / Stack Trace
Unhandled exception. System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
at System.Text.Json.Utf8JsonReader.Read()
at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
at Azure.AI.Agents.Persistent.StreamingUpdate.FromEvent(SseItem`1 sseItem)
at Azure.AI.Agents.Persistent.AsyncStreamingUpdateCollection.AsyncStreamingUpdateEnumerator.MoveNextAsync()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am encountering an intermittent but frequent
System.Text.Json.JsonReaderExceptionwhen using theAzure.AI.Agents.PersistentSDK (latest version). The error occurs when an Agent attempts to call a Microsoft Fabric tool.The stack trace indicates that
StreamingUpdate.FromEventreceives an empty or invalid payload, failing to parse it as JSON.Regression Timeline & Comparison
We began noticing this behavior consistently starting on February 6th, 2026. Before this date, the integration was stable. Currently, the failure rate via SDK is extremely high.
Tests using Fabric Data Agent Directly works just fine. And Using ResponseApi also.
Reproduction Steps
Configure an Agent with a Microsoft Fabric tool connection.
Initialize a persistent thread and start a run with streaming enabled.
Iterate through the streaming updates using
do while.Observe the crash when the Agent triggers the Fabric tool.
Sample Code (Console App)
Error Message / Stack Trace
Environment / Context
SDK Version:
Azure.AI.Agents.Persistent latestTooling: Microsoft Fabric Tool.
Service: Azure AI Foundry (Persistent Agents).
Runtime: .NET 9 / .NET 10.
Beta Was this translation helpful? Give feedback.
All reactions