Repository navigation
fix: preserve root task input across clarification turns - #7419
Open
vinitsonawane45 wants to merge 4 commits into
Open
vinitsonawane45 wants to merge 4 commits into
vinitsonawane45 wants to merge 4 commits into
Conversation
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
Fixes #7384: Preserve the original task input when a root
LlmAgent(mode="task")asks a clarification question and then resumes.Root cause
Root task agents used a fixed node-path-based isolation scope, allowing separate root task invocations in the same session to share a scope.
When a root task resumed after clarification, the original user message could not be recovered through the existing function-call-based reconstruction because root tasks do not have a delegating function call.
Additionally, nested workflow scopes contain
@characters, so checking only for@could incorrectly treat a nested scope as a root task scope.Fix
target_node_name@ctx.invocation_id./, avoiding incorrect matching of nested workflow-node paths.Tests
assert len(parts) == 2to catch duplicated clarification answers.Validation
git diff --check: passed.The broader unit suite also encountered Windows-specific failures in unrelated Cloud Run and Bash tests; the entire suite should not be described as passing.
Isolation behavior
Root task invocations use per-invocation scopes. Clarification and resumption within the same task are preserved, while separate root task invocations do not share intermediate task execution history.
Fixes #7384