fix[bug](graph): add execution_id to base Runtime and restore ctx.execution_id in escalation handler#5194
Merged
TimothyZhang7 merged 1 commit intoaden-hive:mainfrom Feb 21, 2026
Conversation
9829135 to
571838a
Compare
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.
Description
Fixes two problems with
escalate_to_coder:NodeContexthad noexecution_idfield, soctx.execution_idraisedAttributeErrorand crashed the agent76d4d0dworked around the crash by swappingctx.execution_idtostream_id, butstream_idis actuallyctx.node_id(line 232 of event_loop_node.py), so the escalation event was carrying a node name like"intake"instead of the real execution ID like"exec_abc123".No downstream code reads this value today so it wasn't visibly broken, but it's incorrect data sitting in the AgentEvent.
This PR adds
execution_idas a proper field onNodeContext, wires it through from the runtime, and restores the originalctx.execution_idin the escalation handler.Type of Change
Related Issues
Fixes #5180
Changes Made
execution_id: str = ""field toNodeContextdataclass (node.py)execution_idproperty toStreamRuntimeAdapterto expose the private_execution_id(stream_runtime.py)execution_idproperty to baseRuntimereturning""so both runtime types share the same interface (core.py)self.runtime.execution_idthroughGraphExecutor._build_contextintoNodeContext(executor.py)execution_id=ctx.execution_idin theescalate_to_coderhandler, replacing thestream_idworkaround (event_loop_node.py)execution_idtoDummyRuntimeintest_graph_executor.pyto match the contractTesting
cd core && ruff check .)Checklist