`agent` CLI output always comes with leading whitespace

Hello all -

The agent CLI tool always prints code and commands in such a way that copying will result in leading whitespace:

With larger blocks of code - especially Python code - it’s a huge pain remove this extra leading space from every line.

Am I missing something for being able to copy output without this space? OpenCode and Claude Code show the code indented, but when I highlight to copy the empty space to the left of the text isn’t selected:

I’m using Konsole Version 26.04.3 as my terminal, but I doubt that’s the issue.

Any suggestions or tips? Thank you!

Hey @Chris_Cameron, thanks for the report! You’re not missing anything. The interactive UI indents output with real space characters, so terminal selection picks them up.

There are two ways to get a clean copy today:

  1. Type /copy in the CLI. This opens a picker of previous messages (you can also drill into individual steps of a message) and copies the raw text to your clipboard with no indentation. On Linux it needs xclip (X11) or wl-clipboard (Wayland) installed.
  2. For one-off runs, non-interactive mode prints without the indent: agent -p "your prompt".

I’ve also passed along the feedback about making direct terminal selection cleaner!