Back to Signal Feed
CodeTracked since May 19, 2026

Apply /api/run stateDelta to session before agent execution

google/adk-go PR #633 fixes a runtime correctness gap where `RunAgentRequest.StateDelta` on `/api/run` and `/api/runSSE` was parsed but never applied to session state, so subsequent agent runs could ignore caller-provided context updates. The fix centralizes a new `applyStateDeltaIfPresent` helper that writes a non-empty delta into the session before starting the run.

/api/run/api/runSSEstateDeltaRunAgentRequest

What Happened

  • google/adk-go PR #633 fixes a runtime correctness gap where `RunAgentRequest.StateDelta` on `/api/run` and `/api/runSSE` was parsed but never applied to session state, so subsequent agent runs could ignore caller-provided context updates. The fix centralizes a new `applyStateDeltaIfPresent` helper that writes a non-empty delta into the session before starting the run.
  • google/adk-go PR #633 fixes a runtime correctness gap where `RunAgentRequest.StateDelta` on `/api/run` and `/api/runSSE` was parsed but never applied to session state, so subsequent agent runs could ignore caller-provided context updates. The fix centralizes a new `applyStateDeltaIfPresent` helper that writes a non-empty delta into the session before starting the run.
  • 1 evidence item attached for review.

What is Different

Before

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

Now

Introduced a shared `applyStateDeltaIfPresent` path used by both `RunHandler` and `RunSSEHandler` that checks for a non-nil/non-empty `stateDelta`, shallow-copies it, appends it via `sessionService.AppendEvent`, and ensures execution proceeds against the updated session state.

Why Track This

Why It Matters

Developers using ADK REST run endpoints for resume/continuation flows now get runs that honor caller-supplied session updates, so resumed agents execute from the latest state instead of silently continuing with stale context and failing to reflect `stateDelta` input. This is implemented by persisting the delta as a state event before execution (with map copying to avoid shared-mutation bugs), so operators should monitor session-event append failures, event ordering under concurrent runs, and any client assumptions that depended on the previous no-op handling of `stateDelta`.

Impact

Developers using ADK REST run endpoints for resume/continuation flows now get runs that honor caller-supplied session updates, so resumed agents execute from the latest state instead of silently continuing with stale context and failing to reflect `stateDelta` input. This is implemented by persisting the delta as a state event before execution (with map copying to avoid shared-mutation bugs), so operators should monitor session-event append failures, event ordering under concurrent runs, and any client assumptions that depended on the previous no-op handling of `stateDelta`.

What To Watch Next

  • Watch whether /api/run becomes a repeated pattern.
  • Track follow-up changes around Agent Memory and Context Engineering.
  • Compare future signals against this evidence trail.
  • Re-check risk flags: append_event_write_failures, concurrent_session_state_races.
Open Topic TimelineOpen Technical EventOpen Original Sourceappend_event_write_failures / concurrent_session_state_races / state_delta_merge_conflicts / sse_and_non_sse_path_divergence

Supporting Evidence