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:

  1. Custom statusline output - branch names show mai instead of main, maste instead of master
  2. Release notes (/release-notes command) - words truncated like inpu instead of input, Escap instead of Escape, bugfixe instead of bugfixes

Reproduction

  1. Set up a custom statusline script that outputs git branch name with ANSI color codes
  2. Observe the last character is missing
  3. Run /release-notes and 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

View original on GitHub ↗

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