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
plugin: give plugins the error that runner.Run yielded #1883
AfterRunCallback is func(agent.InvocationContext) (plugin.go#L189), so a plugin cannot tell whether runner.Run yielded an error to its caller. The runner hands a root agent's error straight to the caller and keeps running the agent if the caller goes on reading (runner.go#L720-L731). No plugin callback runs for that error.
A plugin that reports how a run ended has to infer it from agent and model callbacks. The BigQuery Agent Analytics plugin does this in #1787, where it writes INVOCATION_COMPLETED or INVOCATION_ERROR. Some runs reach the plugin through exactly the same callbacks whether or not the caller got an error:
A custom agent that drops its child's error and answers itself, compared with one that forwards the error to a caller that keeps reading. The plugin can't tell these apart, so it has to report one of them wrongly.
A custom root agent whose Run yields an error and returns, with the caller reading to the end.AfterAgentCallback runs either way (agent.go#L199-L215).
An agent-level AfterModelCallback that rejects a model response. ADK yields that error without any further plugin callback (base_flow.go#L1046-L1050).
A fix should let a plugin know, by the end of a run, whether runner.Run yielded an error to its caller and which one, for every runner entry point (Run, RunLive, and the node path).
Activity
dhakad22klx commentedon Oct 17, 2026
Hi @wojtas000, i am working on this. Please assign.