def _next_attempt(self) -> None:
        """Prepare for the next attempt: Reset the environment and setup the next agent."""
        assert self._env is not None
        self._i_attempt += 1
        self._env.hard_reset()
        self._setup_agent()
Prepare for the next attempt: Reset the environment and setup the next agent.
sweagent/agent/agents.py