Terminal output splits words mid-character instead of wrapping at word boundaries
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
(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
$COLUMNSenvironment variable shows0within Claude Code environmenttput colsreturns80- 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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗