BUG: Error: IndexError: list index out of range in env_runner_v2.py

How severe does this issue affect your experience of using Ray?

  • High: It blocks me from completing my task.

There seems to be a bug in env_runner_v2.py when" A new agent enters the environment at the very last step of the episode." There was a similar bug in sampler.py that has been resolved.

https://github.com/ray-project/ray/pull/14031

I modify it myself when I want to train my agent. But it would be great if it would be fixed.