When using a TUI app in iTerm on macOS, when I close it (either by running a generated command or aborting), the rest of the terminal session is useless because CTRL commands like CTRL+C are not recognized by iTerm anymore.
Instead it adds 9;5u or similar to the current prompt.