Fix copying over line breaks

Resolved 💬 2 comments Opened Jun 9, 2026 by nullbio Closed Jun 9, 2026
💡 Likely answer: A maintainer (fcoury-oai, contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

CLI

What feature would you like to see?

@fcoury-oai I saw that you removed the double-blanks, that's great! We're one step closer to workable copying from the CLI.

However we still need to fix the newline insertion issue.

Can we please get a way to copy on highlight that preserves the original newline intent, so we stop getting \n linebreaks everywhere the TUI wraps text in the copied buffer? For example, an app-level copy/export path that copies from Codex CLI’s logical transcript buffer, not from the rendered terminal rows.

I believe OpenCode does this? It's something myself and others have been frustrated by for years now, and neither Anthropic or OpenAI has done anything about it. Tagging you because based on your recent double blank fix, I'm hoping you may be the person there that actually cares about this problem. Thank you.

Additional information

See above.

View original on GitHub ↗

2 Comments

fcoury-oai contributor · 2 months ago
Can we please get a way to copy on highlight that preserves the original newline intent, so we stop getting \n linebreaks everywhere the TUI wraps text in the copied buffer? For example, an app-level copy/export path that copies from Codex CLI’s logical transcript buffer, not from the rendered terminal rows.

Did you try raw mode? That's exactly what it's for.

Type /raw or alt-r if your terminal supports it.

If it doesn't, do /keymap then search for raw and redefine it to your heart's content 🙂

Let me know if that works for you.

nullbio · 2 months ago

Wow. How did I not know about this! Thank you. That did solve my problem :) Alt+r works too. What a relief haha.