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
Commit 37aa730
Browse filesBrowse the repository at this point in the historyBrowse files
fix(agents): trigger after_agent_callback on cancellation
When agent execution was cancelled via asyncio.CancelledError (e.g. client
disconnect or RPC timeout), _handle_after_agent_callback was bypassed,
causing execution metrics and timers in plugins to leak. This adds an explicit
exception handler for CancelledError to ensure after_agent_callback runs for
side-effects during cancellation, while preserving the invariant that
end_invocation short-circuits and unhandled errors do not trigger
after_agent_callback.
Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 980466771
0 commit comments