[FEATURE] Don't include the left layout indent when copying code blocks (Codex handles this well)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 12, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Problem: When I select a code block in a response with the mouse and copy it, every pasted line starts with extra leading
whitespace. That whitespace is the response area's layout indent, not part of the code. For indentation-sensitive content
like Python or YAML, a top-level statement with leading spaces fails to parse, so I have to strip it by hand each time.

Steps to reproduce:

  1. Ask Claude to output some code.
  2. Drag-select the whole code block and copy.
  3. Paste into an editor. Every line has extra leading whitespace.

Expected: The selection contains only the code, so it can be pasted and run or saved as is.

Comparison: In Codex (screenshot 2), the same action copies cleanly with no extra whitespace.

Possible directions, for reference only: exclude the left indent from the selection, add a one-key copy for a whole code
block, or render code blocks without the outer indent.

Proposed Solution

<img width="814" height="489" alt="Image" src="https://github.com/user-attachments/assets/35bc61f2-b90d-4961-a072-7a772cda3628" />

Alternative Solutions

<img width="1229" height="680" alt="Image" src="https://github.com/user-attachments/assets/22123627-415c-467b-9d39-5df2f13f4e8c" />

as codex good:

<img width="814" height="489" alt="Image" src="https://github.com/user-attachments/assets/ebd4b8be-f5f1-4c32-b2c7-bb2d8c545325" />

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗