Skip to content

Conversation

@max-sixty
Copy link
Owner

Summary

  • When terminal width detection fails (piped context, no TTY), return usize::MAX instead of defaulting to 80
  • Lets the consumer handle truncation rather than arbitrarily cutting output

Fixes Claude Code statusline being truncated despite space available. Claude Code runs statusline commands with pipes, so TTY detection fails: anthropics/claude-code#5430

Test plan

  • cargo test passes
  • pre-commit run --all-files passes
  • Verified statusline output is no longer truncated in Claude Code

🤖 Generated with Claude Code

When terminal width detection fails (piped context, no TTY, COLUMNS not set),
return usize::MAX instead of defaulting to 80. This lets the consumer handle
truncation rather than arbitrarily cutting output.

Fixes Claude Code statusline being truncated despite plenty of space available.
Claude Code runs statusline with pipes, so TTY detection fails:
anthropics/claude-code#5430

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty max-sixty merged commit 543b533 into main Jan 10, 2026
18 of 19 checks passed
@max-sixty max-sixty deleted the statusline-cutting-off branch January 10, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants