In v1.0.32 and below, there's a known bug in the built-in terminal for codex that causes it to crash after a few messages. I'm fixing it in the next update, for now if you're a codex user please go to Settings > Terminal > switch to one of the external terminals.