shouldPauseInvocation

Returns whether to pause the invocation right after this event.

"Pausing" an invocation is different from "ending" an invocation. A paused invocation can be resumed later, while an ended invocation cannot.

Pausing the current agent's run will also pause all the agents that depend on its execution, i.e. the subsequent agents in a workflow, and the current agent's ancestors, etc.

Note that parallel sibling agents won't be affected, but their common ancestors will be paused after all the non-blocking sub-agents finished running.

Both of the following conditions must hold to pause an invocation:

  1. The app is resumable (isResumable).

  2. The current event has a long running function call (this includes tool-confirmation / HITL requests, which are emitted as a synthetic long-running adk_request_confirmation call).

Mirrors Python ADK 1.x InvocationContext.should_pause_invocation. (Pausing is tied to resumability: only a resumable app checkpoints the paused point so a later turn can resume it.)

Return

Whether to pause the invocation right after this event.

Parameters

event

The current event.