Back to Signal Feed
CodeTracked since May 19, 2026

Apply /api/run stateDelta before ADK agent execution

Fixes a correctness bug in google/adk-go where `RunAgentRequest.stateDelta` was accepted by `/api/run` but not applied, causing resumed runs to ignore caller-provided state updates.

google/adk-goadkrestRunAgentRequeststateDelta

What Happened

  • Fixes a correctness bug in google/adk-go where `RunAgentRequest.stateDelta` was accepted by `/api/run` but not applied, causing resumed runs to ignore caller-provided state updates.
  • Fixes a correctness bug in google/adk-go where `RunAgentRequest.stateDelta` was accepted by `/api/run` but not applied, causing resumed runs to ignore caller-provided state updates.
  • 1 evidence item attached for review.

What is Different

Before

Scattered source updates, isolated context, and manual follow-up across multiple feeds.

Now

Added `applyStateDeltaIfPresent` and wired it into both `RunHandler` and `RunSSEHandler` so non-empty `stateDelta` is appended as a session event before agent execution, then merged into subsequent `Get()` state; includes a shallow-copy of the delta map to prevent request mutation from altering stored session event data.

Why Track This

Why It Matters

Clients and operators using `/api/run` or `/api/run/sse` for resume workflows will now get expected session context updates before the agent starts, so reruns no longer silently proceed from stale state and recoverability improves for long-running conversations. The fix now records `stateDelta` as a session event through `sessionService.AppendEvent` before execution, and teams should watch for edge cases in event ordering and malformed/rapidly changing `stateDelta` payloads that could still affect merge behavior at high scale.

Impact

Clients and operators using `/api/run` or `/api/run/sse` for resume workflows will now get expected session context updates before the agent starts, so reruns no longer silently proceed from stale state and recoverability improves for long-running conversations. The fix now records `stateDelta` as a session event through `sessionService.AppendEvent` before execution, and teams should watch for edge cases in event ordering and malformed/rapidly changing `stateDelta` payloads that could still affect merge behavior at high scale.

What To Watch Next

  • Watch whether google/adk-go becomes a repeated pattern.
  • Track follow-up changes around AI Debugging and Error Localization.
  • Compare future signals against this evidence trail.
  • Re-check risk flags: state_delta_ignored_after_retry, state_delta_mutation_during_processing.
Open Topic TimelineOpen Technical EventOpen Original Sourcestate_delta_ignored_after_retry / state_delta_mutation_during_processing / session_event_ordering_conflicts / sse_http_behaviour_divergence

Supporting Evidence