How to switch off Agent terminal auto cancellation?

This sometimes gets in the way when debugging. The algorithm does not recognize well cases when it is not worth interrupting the (legacy) terminal.

For example, it kills the Vite server while it is running.