Cancel & Resume v Cancel Generation buttons

What is the purpose of the Cancel & Resume button that appears at the bottom of the Composer pane above the input field interface when in Agent mode with YOLO enabled?

Previously this button always said Cancel Generation but I think since Agent mode was introduced we now see Cancel & Resume at times and I think this only appears in some cases when Agent mode has run a terminal command.

Am I correct that this means Agent mode is stuck and can’t interact with the terminal output and we need to click this button every time it appears? Or will Agent mode sort it out with enough time?

I am confused why we see this button and when we should click it.