Agent keeps running commands in dead terminal

It is so annoying. It just uses previous terminal to run new commands, but they dont work. This thing occured after recent update



and sometimes it is just waiting for nothing when command is already done