[FEATURE] Code blocks in terminal output have unnecessary 2-space leading indentation

Resolved 💬 2 comments Opened May 22, 2026 by avatar-lavventura Closed May 26, 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

When the assistant responds with a fenced code block, the CLI renders
each line with 2 spaces of leading indentation. This is not present
in the actual response content — it appears to be added by the
terminal rendering layer.

Steps to reproduce

Ask Claude any question that produces a code block (e.g. "show me a sample .fdignore file").

Expected output

# Version control
.git/
.svn/

# Dependencies
node_modules/
.venv/

# Build output
dist/
build/

Actual output

⏺ # Version control
  .git/
  .svn/

  # Dependencies
  node_modules/
  .venv/

  # Build output
  dist/
  build/

<img width="291" height="168" alt="Image" src="https://github.com/user-attachments/assets/7dbc74b4-b4a1-4e1c-9b65-9e4d0b3d01c2" />

Environment

  • Claude Code version: 2.1.148
  • OS: macOS
  • Shell: zsh

Proposed Solution

n/a

Alternative Solutions

n/a

Priority

Low - Nice to have

Feature Category

CLI commands and flags

Use Case Example

cat file file

Additional Context

_No response_

View original on GitHub ↗

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