If xterm.js is slower than tmux, why don't you just use tmux for the headless sessions as well? How is tmux not headless enough?

Not everyone has tmux. I default to tmux if you have it and fallback to xterm.js