Skip to content

fix(grpc): surface worker runtime exceptions - #8041

Open
KXH (KXHXK) wants to merge 1 commit into
microsoft:mainfrom
KXHXK:fix/worker-runtime-exceptions
Open

fix(grpc): surface worker runtime exceptions#8041
KXH (KXHXK) wants to merge 1 commit into
microsoft:mainfrom
KXHXK:fix/worker-runtime-exceptions

Conversation

@KXHXK

@KXHXK KXH (KXHXK) commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • add an ignore_unhandled_exceptions option to GrpcWorkerAgentRuntime, matching the existing single-threaded runtime default
  • retain the first unhandled event, read-loop, or background-task exception and raise it from stop() after cleanup when propagation is enabled
  • replace done-callback re-raises with deterministic logging and lifecycle-based propagation
  • add offline regression coverage for default logging, event-handler failures, read-loop failures, background-task failures, and first-exception preservation

Fixes #6140

Validation

  • python -m pytest packages/autogen-ext/tests/test_worker_runtime.py --grpc -q (14 passed, 8 skipped)
  • ruff check and ruff format --check for both changed files
  • mypy for both changed files (Success: no issues found)
  • git diff --check

Signed-off-by: KXH <shepherdlaurie238@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

worker runtime does not emit exceptions from main loop

1 participant