When sending a command to an InteractiveShell, the implemented logic is meant to filter out the leading shell prompt. While the logic is correct, the line is still erroneously added to the output.