-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow background exceptions to be fatal #5716
Conversation
Based on my testing, I believe it is currently invalid to let an agentchat runtime ignore background exceptions. What happens is, an agent is invoked to produce its response. Instead of the agent publishing its response, it raises an exception. The runtime catches this, logs it, and continues on. However, since no result was published the runtime now becomes idle and the runtime terminates. This causes early termination of the team, but it also doesn't propagate the error as it was ignored is the background. Based on this, I think the current design of agentchat does not allow for automatic recovery from exception and we should in fact require these exceptions to be surfaced. @ekzhu thoughts? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5716 +/- ##
==========================================
- Coverage 74.91% 71.67% -3.25%
==========================================
Files 175 115 -60
Lines 11137 8225 -2912
==========================================
- Hits 8343 5895 -2448
+ Misses 2794 2330 -464
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
CC @lokitoth for dotnet |
Agree. I think the exceptions should be surfaced to the application. |
Closes #4904
Does not change default behavior in core.
In agentchat, this change will mean that exceptions that used to be ignored and result in bugs like the group chat stopping are now reported out to the user application.