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
{{ message }}
Repository navigation
DurableAgent surfaces fatal stream errors as [object Object] and does not clearly signal a terminal failure to stream consumers #1545
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.
Activity
[ai] Fix fatal stream errors surfacing as [object Object]
[ai] Fix fatal stream errors surfacing as [object Object]