Skip to content

wrong agent to start a new invocation when last invocation was rewound #4169

@chelxxx

Description

@chelxxx

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Describe the bug
When we use rewind_async to cancel an invocation, roll back the state changes, and start a new invocation, rewound events are filtered out for LLM calls, but not when determining which agent to hand off to first.

To Reproduce
Please share a minimal code and data to reproduce your problem.
Steps to reproduce the behavior:

  1. Install '...'
  2. Run '....'
  3. Open '....'
  4. Provide error or stacktrace

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. macOS, Linux, Windows]
  • Python version(python -V):
  • ADK version(pip show google-adk):

Model Information:

  • Are you using LiteLLM: Yes/No
  • Which model is being used(e.g. gemini-2.5-pro)

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    core[Component] This issue is related to the core interface and implementationrequest clarification[Status] The maintainer need clarification or more information from the author

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions