Class InteractionContinuation

java.lang.Object
com.google.genai.gaos.InteractionContinuation

public final class InteractionContinuation extends Object
Automatic continuation for interactions.create().

Hand-written (not generated). Every create entry point of Interactions, AsyncInteractions and their request builders delegates here. It mirrors the Python SDK's _interactions_continuation.py: a unary loop that follows requires_continuation hops and merges them into one Interaction, a streaming wrapper (ContinuationEventStream) that yields every hop's events in order and resumes from checkpoints, and a whole-call deadline.

Behavior summary (see Interactions.create(CreateInteractionRequest, Options)):

  • automaticContinuation defaults to true. It is a no-op for background=true and for agent interactions, whose loops are managed by the server.
  • Continuation hops send continuation_token; with store enabled (the default) they also send the hop that issued the token as previous_interaction_id and omit input; with store=false the original input is resent.
  • A failure after progress throws ContinuationInterruptedException (cause attached) carrying the token to resume from; a first-hop failure throws the underlying error.