Skip to content

Comments

Use process.stdout dimensions for terminal-aware prompt#10

Merged
evantahler merged 1 commit intomainfrom
evantahler/terminal-size-prompt
Feb 18, 2026
Merged

Use process.stdout dimensions for terminal-aware prompt#10
evantahler merged 1 commit intomainfrom
evantahler/terminal-size-prompt

Conversation

@evantahler
Copy link
Contributor

Summary

Updates the system prompt to use reliable terminal dimensions (process.stdout.columns and process.stdout.rows) instead of environment variables. Adds fallback defaults for non-TTY environments and improves the instruction to ensure Markdown output fits within the terminal width.

Changes

  • Replace Bun.env.COLUMNS/LINES with process.stdout.columns/rows
  • Add fallback defaults of 80 columns × 24 rows
  • Enhance prompt to instruct agent to keep tables, ASCII art, and code blocks within terminal width

Testing

Existing tests pass (pre-existing failures in CLI test unrelated to this change).

🤖 Generated with Claude Code

Replace unreliable Bun.env.COLUMNS/LINES with process.stdout.columns/rows to detect actual terminal size at runtime. Add fallback defaults (80x24) for non-TTY environments. Improve prompt to instruct agent to keep Markdown output within terminal width to avoid wrapping.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@evantahler evantahler merged commit 777f735 into main Feb 18, 2026
4 checks passed
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.

1 participant