The content of this post is in reference to xo, but I believe that chalk is the source of the problem/issue. This was spotted as an xo issue (sindresorhus/xo#145). I traced that back to sindresorhus/eslint-formatter-pretty and now chalk.
I'm not sure what's special about the output from xo, but it's the only thing that seems to be affected. I cannot read the output without copying and pasting it somewhere. Here are a few screenshots:


I've been copying the highlighted output my editor to read it. Any idea what xo is doing that's unique in this way? I've used hundreds of other cli tools including the underlying ESLint without any problems. I've used dozens of other programs that use chalk to print colorized output. I've even tried changing my local color profiles to no avail. Any help would be greatly appreciated.
xo | tee makes the output visible although not colorized.
This is the content of the hidden output in both screenshots:
➜ ava git:(add-test-run-duration) xo
api.js:183:2
âš 183:2 Unexpected todo comment. no-warning-comments
lib/assert.js:15:1
âš 15:1 This function has too many parameters (5). Maximum allowed is 4. max-params
lib/logger.js:94:2
âš 94:2 Unexpected todo comment. no-warning-comments
lib/reporters/mini.js:178:4
âš 178:4 Unexpected todo comment. no-warning-comments
âš 305:1 Unexpected todo comment. no-warning-comments
lib/test.js:42:2
âš 42:2 Unexpected todo comment. no-warning-comments
test/cli.js:96:3
âš 96:3 Unexpected todo comment. no-warning-comments
âš 141:3 Unexpected todo comment. no-warning-comments
test/promise.js:129:1
âš 129:1 Unexpected todo comment. no-warning-comments
9 warnings
OS: Ubuntu 16.04 x64
Terminal: Byobu terminal
$TERM: screen-256color
$SHELL: /usr/bin/zsh
[ -t 1 ] && echo yes || echo no: yes
This is most definitely a bug in your terminal emulator (Byobu). Please file a bug with them.
Yeah, looks like your terminal can not handle chalk.hidden.dim.gray(), probably the hidden part: https://github.com/sindresorhus/eslint-formatter-pretty/blob/d5961796a238c463fd5d2b3b1ac8d5208d34e44e/index.js#L99
Thanks for the input!
Do you know if this works in other 256 color environments?
Yes, it definitely does. XTerm should do this well.
Excellent! Thanks again.
In case anyone else finds this post, first test your terminal emulator.
echo -e "Normal \e[8mHidden \e[28mNormal"
should print

In case anyone else finds this post, first test your terminal emulator.
echo -e "Normal \e[8mHidden \e[28mNormal"
For anyone who's made it this far down the rabbit hole and is seeing only the first Normal in the test listed above, see this Q/A for fixes.
It took some playing for me to get this working, and in the end I aliased tmux to TERM=screen-256color-bce tmux. I already had set -g default-terminal "screen-256color" in my .tmux.conf file.
Most helpful comment
For anyone who's made it this far down the rabbit hole and is seeing only the first
Normalin the test listed above, see this Q/A for fixes.It took some playing for me to get this working, and in the end I aliased
tmuxtoTERM=screen-256color-bce tmux. I already hadset -g default-terminal "screen-256color"in my .tmux.conf file.