In Admin-->Workflow Automator, there is a default workflow automator called “Assign ticket to first responder”, this would ensure that the last responding agent gets assigned to the ticket automatically. If you don’t find the workflow, you can quickly create on by clicking on the New Ticket Automator section. The event would be “Reply is sent” or “Note is added of type Public” performed by Agent and drag and drop a condition block to check that there is no Agent assigned to the ticket (Agent is None) and in the action block choose the action as “set agent as Event performing agent”