Skip to content

Agent runner cannot pass temp_state via state_delta; session service ignores temp state during invocation #3399

@dincal

Description

@dincal

Describe the bug
When passing a state_delta to the agent runner, I need to include a temp_state. However, in the current ADK flow, the session service ignores the provided temp_state when creating the invocation and injecting events. As a result, temp-only state cannot be applied for a single turn and is effectively dropped.

To Reproduce

  1. Create an agent invocation through the agent runner with state_delta that includes a temp_state payload intended only for the current turn.
  2. Observe that the session service builds the invocation and injects events without applying the provided temp_state.
  3. The agent runs as if temp_state was never provided.

Impact

  1. Cannot apply ephemeral, per-turn overrides or sandboxed state adjustments.
  2. Forces callers to mutate persistent state for transient needs, which is undesirable and error-prone.

Metadata

Metadata

Labels

services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions