Codex CLI inserts leading spaces into rendered command blocks, breaking copy/paste of long shell commands

Resolved 💬 5 comments Opened Apr 1, 2026 by SamCritch Closed Apr 2, 2026

What version of Codex CLI is running?

codex-cli 0.117.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.4 medium

What platform is your computer?

Darwin 25.3.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

iTerm2

What issue are you seeing?

Because the CLI has two spaces in the left-hand column, when copying and pasting multi-line shell commands it gives me which have long lines, line wrap is broken because the paste includes the two spaces.

What steps can reproduce the bug?

Ask Codex to create a CLI command or any text with long lines which wrap from one line to the other. Copy the line from the terminal and paste into e.g. another text editor. The long lines will be broken up into two separate lines.

What is the expected behavior?

Paste should be onto a single line. See screenshot where the "barcodes-edit-20.csv" text is on a new line than the text at the end of the previous screen row. It should be the same line.

<img width="222" height="388" alt="Image" src="https://github.com/user-attachments/assets/284b650d-7302-46a9-9e80-06019ed24ce3" />

Additional information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗