I've been experimenting with threading and running bits of python from iTerm in MacOS yesterday. Today I opened iTerm and two windows opened, one with thick red lines inside it. I received a Warning message from MacOS:

A session ended very soon after starting. Check that the command in profile “Default” is correct.

I said OK, the window with the red closed immediately, and I quit iTerm.

Question: What is really happening here? I've never seen red lines appear in iTerm2 or a session close immediately upon starting. Is this just "one of those things" or could something be seriously wrong that needs attention?

I only have one profile, called default.

enter image description here

edit: after coaching in comments, I restarted iTerm2, same red lines. Engaged a second brain cell and realized I can move the error message out of the way, revealing the message in red in the iTerm2 window: Broken Pipe

enter image description here

  • 1
    This conversation has been moved to chat since it's unlikely to help further improvement of the post.
    – Glorfindel
    Dec 7, 2018 at 17:22

1 Answer 1


I've seen this several times. It's caused by exiting an iTerm window. If you type exit in the window you'll be able to reproduce this behavior. I would check whatever command executes when iterm opens. This is defined in preferences.

  • Bingo! Yes, that happens just as you've described. mea culpa: I believe I probably typed that either because my threading mistakes left me with frozen or uncooperative behavior, or I thought I was at a python prompt (and forgot the parenthesis). Thank you, problem solved!
    – uhoh
    Dec 7, 2018 at 15:27
  • 1
    Great. Glad it worked and thanks for remembering to accept my answer.
    – Natsfan
    Dec 7, 2018 at 15:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .