Terminal output splits words mid-character instead of wrapping at word boundaries

Status Fixed / completed
Reported on v2.0.76
Maintainer reply None cached
Activity 4 comments · opened Jan 1, 2026 · closed Jan 1, 2026

Description

Terminal output wraps at character boundaries instead of word boundaries, causing words to be split mid-character at line breaks. This makes output very difficult to read.

Examples from actual output

  • "comes" renders as "come s"
  • "encoder" renders as "enc oder"
  • "doesn't" renders as "does n't"

Screenshot

!Word splitting example

(I'll attach the actual screenshot in a follow-up comment)

Environment

  • Claude Code version: 2.0.76
  • OS: macOS 15.1 (Darwin 25.1.0)
  • Terminal: Standard macOS terminal environment
  • Terminal width: Variable (issue persists across window sizes)

Expected behavior

Text should wrap at word boundaries (spaces, hyphens) rather than splitting words mid-character. Most terminal applications and text renderers implement word-aware wrapping to maintain readability.

Actual behavior

Text wraps at exact character positions regardless of word boundaries, splitting words arbitrarily and significantly reducing readability.

Additional context

  • $COLUMNS environment variable shows 0 within Claude Code environment
  • tput cols returns 80
  • The mismatch may indicate terminal width detection issues, but the core problem is character-based vs word-based wrapping logic

Suggested fix

Implement word-boundary-aware text wrapping in the terminal rendering layer, similar to how text editors and most CLI tools handle line wrapping.

View original on GitHub ↗

4 Comments

github-actions[bot] · 9 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/15199

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

CreightonJewkes · 9 months ago

<img width="954" height="1037" alt="Image" src="https://github.com/user-attachments/assets/4a8799ca-d459-4f2e-bcf0-7c8a5db61487" />

Here's an example of how the text doesn't wrap properly at the ends of my screen.

CreightonJewkes · 9 months ago

Screenshot Context

The attached screenshot demonstrates the word-splitting issue on generic technical content. Notice how words break mid-character at line boundaries throughout the output—this happens on essentially every response that spans multiple lines.

Impact on usability:

  • Significantly reduces reading speed and comprehension
  • Requires mental effort to reconstruct split words ("transfor mations", "configu ration", etc.)
  • Makes Claude Code output noticeably harder to read than other CLI tools
  • Persists across all terminal widths and window sizes

Duration: This has been occurring consistently for approximately one month (late November 2024 through present).

Severity: This affects the core output rendering of every Claude Code session—it's not an edge case but the default behavior. For users who spend hours daily in Claude Code, the cumulative friction is substantial.

Expected behavior: Word-aware line wrapping (standard in virtually all terminal applications and text renderers) that breaks at spaces/hyphens rather than mid-character.

github-actions[bot] · 9 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.