[BUG] Terminal tool gets stuck after exit code

Here is a fix: Agent not detecting that a command has completed - #18 by LQrX6PXc4