The invocation context to run a nested agent against.
The single place where "what a node sees" is translated into "what an
agent sees", so an agent run as a node (BaseAgent.runImpl) and one run
directly go through the same seam.
It hands back the node's own invocation context unchanged, and that is the
intended behaviour rather than a placeholder.
adk-python's counterpart (agents/context.py get_invocation_context) is
documented as returning "a copy with the proxy session", which reads as
though the agent is handed a different view of state. It is not: that
Context.session returns self._invocation_context.session, so the copy
substitutes the same object, and Context._state is built directly over
session.state. A Python agent run as a node reads session state exactly
as a TypeScript one does.
The other thing that copy carries — the isolation scope — is already
applied by the time this runs: the node runner builds the child invocation
context with the node's scope, so it is present on the object returned.
That leaves the node's own state, which is this node's pending delta over
session.state — the same thing an agent reads, so the two cannot
disagree. The agent-node cases in
core/test/workflow/state_consistency_test.ts pin that.