Uh oh!
There was an error while loading. Please reload this page.
fix(runners): Preserve state_delta in NodeRunner path - #5767
fix(runners): Preserve state_delta in NodeRunner path#5767trongthanht3 wants to merge 8 commits into
Conversation
DeanChensj
commented
May 20, 2026
@gemini-cli /review |
🤖 Hi @DeanChensj, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
The changes look solid and correctly address the issue where state_delta was not being attached to the initial user event in the ADK 2.0 NodeRunner path. This ensures that session state updates requested via /run or /run_sse are visible to nodes and agents before they execute.
I've left one minor suggestion for code conciseness in runners.py, but overall this is a great fix with excellent test coverage. Approving!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
adk-bot
commented
May 20, 2026
Response from ADK Triaging Agent Hello @trongthanht3, thank you for creating this PR! Your PR description is very detailed, and we appreciate the thorough testing plan and logs! However, we noticed that the To resolve any formatting or style issues, please ensure you run pre-commit locally across all files: pre-commit run --all-filesYou can refer to the Development Setup section of our contributing guidelines for details. This will help us review and merge your changes more quickly. Thanks! |
adk-bot
commented
May 26, 2026
Thank you @trongthanht3 for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit c56bec8. Closing this PR as the changes are now in the main branch. |
Merge a0d90de into e623b3b Merge google#5767Resolvesgoogle#5763 ORIGINAL_AUTHOR=trongthanht3 <trongthanht3@gmail.com> GitOrigin-RevId: 3c3fb06 Change-Id: I4281c6d6d68e5beb2998cf7698f3210854fd5199
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
state_deltapassed to/runendpoint is silently ignored in Workflow (NodeRunner) path #5763Problem:
/runand/run_ssealready passstate_deltaintoRunner.run_async, but the ADK 2.0 NodeRunner execution path was not attaching that delta to the initial user event. As a result, workflow nodes and rootLlmAgentexecutions could not see the requested state before running.Solution:
Thread
state_deltathrough the NodeRunner path and persist non-empty deltas on the initial user event viaEventActions, matching the legacy runner behavior while preserving existing user-event isolation-scope handling.Testing Plan
Unit Tests:
Passed results:
Manual End-to-End (E2E) Tests:
Ran
adk webwith an agent callback that logs session state before execution:Sent
/runand/run_sserequests with:{ "app_name": "state_delta_app", "user_id": "e2e-user", "session_id": "e2e-session", "new_message": { "role": "user", "parts": [ { "text": "hello" } ] }, "state_delta": { "test_state": "must_change" } }Observed:
Checklist
Additional context
No dependent changes are required.