[BUG] RTL paragraph alignment regressed in terminal CLI: right-aligned in 2.1.132 → left-aligned since 2.1.138

Open 💬 2 comments Opened Jun 2, 2026 by noydrang9

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Summary

RTL languages (Hebrew, Arabic, Persian, Urdu, etc.) used to render right-aligned in the Claude Code terminal CLI as of version 2.1.132. Starting somewhere between 2.1.133 and 2.1.138, the same RTL text renders left-aligned. This is a regression for native RTL-language speakers who rely on the CLI surface (not VS Code / Cursor / Desktop — all the existing RTL issues are about those webview surfaces, not the terminal binary).

This is distinct from the existing open issues (#30085, #30080, #30110, #29662, #29811, #38005, #30984, #26665, #16814, #6751, #37556) — those are all about webview/UI extensions forcing direction: ltr via CSS. This one is about the native terminal binary rendering pipeline and a behavior that used to work.

Suspected cause

The 2.1.136 changelog includes:

Fixed a stray leading space on the second line of wrapped text at the column boundary

…along with several other visual-width / string-width-style fixes affecting CJK and emoji rendering. RTL scripts fall in the same family of Unicode-width edge cases. My hypothesis: the renderer was previously miscalculating visual width for BiDi characters, accidentally producing leading whitespace on wrapped lines. For RTL text this looked like "right alignment" — when the bug was fixed for CJK/emoji, the side effect of accidental right-alignment for RTL also went away.

I.e. nobody intentionally removed RTL support — there was none. The right-alignment was an accidental byproduct of a width-calculation bug. The fix was correct in its narrow goal (no spurious leading spaces in English/CJK), but removed an unintended benefit for RTL users.

Environment

  • Claude Code version: confirmed regression between 2.1.132 (good) and 2.1.138 (bad); also present in 2.1.150 and current
  • OS: macOS (Darwin 25.0.0), Apple Silicon (arm64)
  • Terminal: reproducible in Terminal.app and iTerm2, with BiDi support enabled or disabled — the alignment difference is driven by the Claude Code renderer itself, not the terminal emulator
  • Surface: native CLI (claude in a terminal), NOT the VS Code / Cursor extension

What Should Happen?

Expected behavior

RTL paragraph content (Hebrew, Arabic, Persian, etc.) should render right-aligned in the terminal CLI, with code blocks, file paths, and command output remaining left-aligned. This is how every RTL-aware text surface works (web, Word, macOS native text views, etc.) — paragraph direction follows the first strong character (Unicode BiDi P2/P3).

Ideally this would be a real, documented feature with a config flag (textDirection: "auto" | "ltr" | "rtl" in settings) rather than relying on width-bug side effects.

Workaround

Downgrade to @anthropic-ai/claude-code@2.1.132. This works but forfeits ~28 versions of fixes (OAuth, MCP token refresh, plugin improvements, security patches, etc.).

Why this matters

RTL scripts cover ~500M speakers globally: Arabic (~400M), Persian/Farsi (~110M), Urdu (~230M), Hebrew (~10M), plus Pashto, Sindhi, Kurdish, Yiddish, etc. None of these languages currently has a working RTL paragraph-alignment experience in any Claude Code surface — the CLI was the closest thing, and it regressed silently.

Happy to help test a fix or contribute repro material.

Error Messages/Logs

Steps to Reproduce

Reproduction

  1. npm install -g @anthropic-ai/claude-code@2.1.132
  2. Launch claude in any terminal (tested: macOS Terminal.app, iTerm2)
  3. Send a prompt in any RTL language, e.g. Hebrew שלום, איך אתה היום? or Arabic مرحبا، كيف حالك اليوم؟
  4. Observe: assistant's reply is right-aligned in the output pane.
  5. Now: npm install -g @anthropic-ai/claude-code@2.1.138 (or any version ≥ 2.1.138)
  6. Repeat steps 2–3.
  7. Observe: assistant's reply is now left-aligned. The text itself is readable (characters in correct logical order), but paragraph alignment is wrong.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.132‬

Claude Code Version

2.1.150‬

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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