Last character truncated in terminal output (statusline, release notes, etc.)
Resolved 💬 5 comments Opened Dec 14, 2025 by wickedblythe Closed Feb 14, 2026
Description
The last character of text is being truncated/eaten in various terminal outputs, including:
- Custom statusline output - branch names show
maiinstead ofmain,masteinstead ofmaster - Release notes (
/release-notescommand) - words truncated likeinpuinstead ofinput,Escapinstead ofEscape,bugfixeinstead ofbugfixes
Reproduction
- Set up a custom statusline script that outputs git branch name with ANSI color codes
- Observe the last character is missing
- Run
/release-notesand look for truncated words
Workaround
Adding a trailing space before the ANSI reset sequence \033[0m preserves the full text:
# Before (truncated):
printf " on \033[33m⎇ %s\033[0m" "$BRANCH"
# After (works):
printf " on \033[33m⎇ %s \033[0m" "$BRANCH"
Likely Cause
Appears to be an off-by-one error when parsing ANSI escape sequences, possibly consuming one character before the escape sequence during color code processing.
Environment
- Claude Code version: 2.0.69
- Platform: Linux (aarch64)
- Terminal: Standard terminal with Nerd Fonts
🤖 Generated with Claude Code
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗