claudefix
v2.7.3
Published
Fixes screen glitching, blocky colors, AND MEMORY LEAKS in Claude Code CLI on Linux and macOS. All features optional via env vars. Shows config options on install. Developed by Hardwick Software Services @ https://justcalljon.pro
Maintainers
Readme
claudefix | Anthropic pls hire me :)
Developed by Hardwick Software Services @ justcalljon.pro
Fixes screen glitching, blocky color display, AND the scrollback lag in Claude Code CLI on Linux. This affects a ton of people using Linux terminals - VTE rendering bugs cause background colors to be drawn ON TOP of text instead of behind it.
What It Fixes
- VTE Color Glitches - Background colors rendering on top of text (common on Xvfb/VNC/Linux)
- Compound ANSI Sequences - Strips background colors from complex escape codes (v2.3.1)
- Scrollback Buffer Bloat - Terminal lags after long sessions because Claude doesn't clear scrollback
- Resize Event Thrashing - tmux/screen users get cooked by rapid SIGWINCH events
Install
npx claudefix installThis checks for permissions first and tells you if you need sudo. Or just run directly:
sudo npm install -g claudefixNote: Global npm install requires sudo on most systems. If you don't have sudo, see Alternative Install below.
That's it! The install script:
- Auto-detects and installs build dependencies (if running as root)
- Compiles node-pty for your system
- Sets up your
claudecommand to use the fix
Works with both npm-installed Claude AND native Claude installs (the new self-updating version at ~/.local/share/claude/versions).
How It Works
Claude Code is a compiled binary that uses Ink (React for terminals). We wrap it in a PTY and:
- Strip background colors - Removes ANSI background color codes that cause VTE glitches
- Clear scrollback periodically - Every 500 renders or 60 seconds
- Debounce resize events - Batches SIGWINCH instead of thrashing
Config
| Env Var | What It Does | Default |
|---------|--------------|---------|
| CLAUDEFIX_DISABLED | Set to 1 to disable the fix | off |
| CLAUDE_TERMINAL_FIX_DEBUG | Set to 1 for debug logs | off |
Manual Usage
If the auto-setup didn't work:
claude-fixed # Use this instead of claudeOr alias it:
alias claude='claude-fixed'shoutout to the big dogs
hey @anthropics yall made a sick product but these terminal bugs been cooking people for months. maybe steal this fix idc - just add \x1b[3J to your clear command and strip BG colors on Linux.
Anthropic if you're reading this - I'm available for hire
- Email: [email protected]
- Site: https://justcalljon.pro
Alternative Install
If you don't have sudo access, configure npm to use your home directory:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g claudefixLicense
MIT - do whatever you want with it
