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
When DurableAgent hits a fatal mid-turn error, stream consumers can receive an opaque "[object Object]" error instead of a real message.
In the same failure path, the run/stream state can remain ambiguous enough that consumers may still attempt reconnect/resume logic even though the turn is effectively dead.
This appears to be a separate bug from the underlying reasoning/tool-loop issue in:
This makes the real failure cause invisible to downstream consumers.
Separately, after this kind of fatal error, the failure is not always clearly terminal from the perspective of a stream consumer. A consumer may still treat the run as reconnectable/resumable even though the turn has already failed.
Expected behavior
Fatal stream errors should surface a useful message, not "[object Object]".
Non-recoverable stream failures should be clearly terminal so consumers do not keep trying to resume a dead turn.
Suggested fix
Replace String(error) for unknown errors with a safer formatter:
prefer error.message
otherwise serialize structured objects with JSON.stringify(...) when possible
fall back to a generic message only as a last resort
Ensure fatal stream-processing errors are exposed to consumers as terminal failures, so reconnect/resume logic can stop immediately.
Summary
When
DurableAgenthits a fatal mid-turn error, stream consumers can receive an opaque"[object Object]"error instead of a real message.In the same failure path, the run/stream state can remain ambiguous enough that consumers may still attempt reconnect/resume logic even though the turn is effectively dead.
This appears to be a separate bug from the underlying reasoning/tool-loop issue in:
reasoningitem #880Environment
workflow:4.2.0-beta.71@workflow/ai:4.1.0-beta.57ai:6.0.116Problem
In a fatal DurableAgent stream failure, a structured error object can be collapsed to:
I also saw the library log:
This makes the real failure cause invisible to downstream consumers.
Separately, after this kind of fatal error, the failure is not always clearly terminal from the perspective of a stream consumer. A consumer may still treat the run as reconnectable/resumable even though the turn has already failed.
Expected behavior
"[object Object]".Suggested fix
Replace
String(error)for unknown errors with a safer formatter:error.messageJSON.stringify(...)when possibleEnsure fatal stream-processing errors are exposed to consumers as terminal failures, so reconnect/resume logic can stop immediately.
Keep Preserve reasoning content in DurableAgent conversation history #1444 moving, since reasoning preservation appears to address one upstream trigger for this failure path.