Skip to content

Conversation

@eYdr1en
Copy link

@eYdr1en eYdr1en commented Jan 28, 2026

Summary

  • Unsets COLORTERM in all PTY spawns to fix rendering issues in xterm.js

Problem

When COLORTERM=truecolor is inherited from the outer terminal (e.g., Ghostty, iTerm2), Claude Code's Ink UI tries to use truecolor mode. However, xterm.js doesn't handle this correctly, causing rendering issues like gray/white backgrounds appearing where they shouldn't.

Solution

Unset COLORTERM in the environment when spawning PTY processes so applications fall back to standard 256-color mode which xterm.js fully supports.

Changes

  • screen-manager.ts: Add unset COLORTERM to screen session environment
  • session.ts: Add COLORTERM: undefined to all PTY spawn env objects

Related

🤖 Generated with Claude Code

When COLORTERM=truecolor is inherited from the outer terminal (e.g., Ghostty),
Claude Code's Ink UI tries to use truecolor mode which xterm.js doesn't
handle correctly, causing rendering issues (gray/white backgrounds).

This fix unsets COLORTERM in all PTY spawns so applications use standard
256-color mode which xterm.js fully supports.

Fixes: xtermjs/xterm.js#484
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