chore: revert "feat: pass invocation_state to edge condition calls (#2305)"#2389
Merged
zastrowm merged 1 commit intoMay 29, 2026
Conversation
…agents#2305)" This reverts commit a1c0e1a.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
|
Assessment: Approve Clean, well-motivated revert that fixes a serialization regression in Graph integration tests. The PR description provides excellent root cause analysis and clear rationale for reverting rather than fixing forward. Review Notes
The acknowledgement that the feature itself is valuable (edge conditions receiving |
8 tasks
yonib05
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reverts #2305.
This PR introduced a regression that breaks all Graph integration tests that use
FileSessionManagerwith aTypeError: Object of type Agent is not JSON serializable.Root Cause
The PR stored
self._current_invocation_stateinserialize_state()and passed the same dict reference to agent node executors. Python'sAgent._execute_event_loop_cyclemutates the passedinvocation_statedict by addinginvocation_state["agent"] = self(a backwards-compat shim inagent.py:1012). After a node completes, the session manager hook firessync_multi_agent→serialize_state()→json.dump(), which hits the non-serializable Agent object now sitting inself._current_invocation_state.Why revert rather than fix-forward